/* automatically generated by JSCoverage - do not edit */
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    _$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (typeof _$jscoverage !== 'object') {
  _$jscoverage = {};
}
if (! _$jscoverage['plugins/customstyle.js']) {
  _$jscoverage['plugins/customstyle.js'] = [];
  _$jscoverage['plugins/customstyle.js'][6] = 0;
  _$jscoverage['plugins/customstyle.js'][7] = 0;
  _$jscoverage['plugins/customstyle.js'][8] = 0;
  _$jscoverage['plugins/customstyle.js'][14] = 0;
  _$jscoverage['plugins/customstyle.js'][16] = 0;
  _$jscoverage['plugins/customstyle.js'][19] = 0;
  _$jscoverage['plugins/customstyle.js'][22] = 0;
  _$jscoverage['plugins/customstyle.js'][23] = 0;
  _$jscoverage['plugins/customstyle.js'][24] = 0;
  _$jscoverage['plugins/customstyle.js'][26] = 0;
  _$jscoverage['plugins/customstyle.js'][27] = 0;
  _$jscoverage['plugins/customstyle.js'][28] = 0;
  _$jscoverage['plugins/customstyle.js'][29] = 0;
  _$jscoverage['plugins/customstyle.js'][30] = 0;
  _$jscoverage['plugins/customstyle.js'][32] = 0;
  _$jscoverage['plugins/customstyle.js'][33] = 0;
  _$jscoverage['plugins/customstyle.js'][34] = 0;
  _$jscoverage['plugins/customstyle.js'][35] = 0;
  _$jscoverage['plugins/customstyle.js'][36] = 0;
  _$jscoverage['plugins/customstyle.js'][38] = 0;
  _$jscoverage['plugins/customstyle.js'][43] = 0;
  _$jscoverage['plugins/customstyle.js'][45] = 0;
  _$jscoverage['plugins/customstyle.js'][46] = 0;
  _$jscoverage['plugins/customstyle.js'][48] = 0;
  _$jscoverage['plugins/customstyle.js'][49] = 0;
  _$jscoverage['plugins/customstyle.js'][50] = 0;
  _$jscoverage['plugins/customstyle.js'][51] = 0;
  _$jscoverage['plugins/customstyle.js'][55] = 0;
  _$jscoverage['plugins/customstyle.js'][56] = 0;
  _$jscoverage['plugins/customstyle.js'][57] = 0;
  _$jscoverage['plugins/customstyle.js'][58] = 0;
  _$jscoverage['plugins/customstyle.js'][60] = 0;
  _$jscoverage['plugins/customstyle.js'][63] = 0;
  _$jscoverage['plugins/customstyle.js'][64] = 0;
  _$jscoverage['plugins/customstyle.js'][66] = 0;
  _$jscoverage['plugins/customstyle.js'][68] = 0;
  _$jscoverage['plugins/customstyle.js'][73] = 0;
  _$jscoverage['plugins/customstyle.js'][75] = 0;
  _$jscoverage['plugins/customstyle.js'][76] = 0;
  _$jscoverage['plugins/customstyle.js'][77] = 0;
  _$jscoverage['plugins/customstyle.js'][78] = 0;
  _$jscoverage['plugins/customstyle.js'][79] = 0;
  _$jscoverage['plugins/customstyle.js'][80] = 0;
  _$jscoverage['plugins/customstyle.js'][81] = 0;
  _$jscoverage['plugins/customstyle.js'][83] = 0;
  _$jscoverage['plugins/customstyle.js'][84] = 0;
  _$jscoverage['plugins/customstyle.js'][85] = 0;
  _$jscoverage['plugins/customstyle.js'][86] = 0;
  _$jscoverage['plugins/customstyle.js'][90] = 0;
  _$jscoverage['plugins/customstyle.js'][91] = 0;
  _$jscoverage['plugins/customstyle.js'][92] = 0;
  _$jscoverage['plugins/customstyle.js'][93] = 0;
  _$jscoverage['plugins/customstyle.js'][94] = 0;
  _$jscoverage['plugins/customstyle.js'][96] = 0;
  _$jscoverage['plugins/customstyle.js'][99] = 0;
  _$jscoverage['plugins/customstyle.js'][100] = 0;
  _$jscoverage['plugins/customstyle.js'][106] = 0;
  _$jscoverage['plugins/customstyle.js'][108] = 0;
  _$jscoverage['plugins/customstyle.js'][110] = 0;
  _$jscoverage['plugins/customstyle.js'][114] = 0;
  _$jscoverage['plugins/customstyle.js'][115] = 0;
  _$jscoverage['plugins/customstyle.js'][117] = 0;
  _$jscoverage['plugins/customstyle.js'][118] = 0;
  _$jscoverage['plugins/customstyle.js'][119] = 0;
  _$jscoverage['plugins/customstyle.js'][120] = 0;
  _$jscoverage['plugins/customstyle.js'][121] = 0;
  _$jscoverage['plugins/customstyle.js'][123] = 0;
  _$jscoverage['plugins/customstyle.js'][124] = 0;
  _$jscoverage['plugins/customstyle.js'][125] = 0;
  _$jscoverage['plugins/customstyle.js'][126] = 0;
  _$jscoverage['plugins/customstyle.js'][127] = 0;
  _$jscoverage['plugins/customstyle.js'][128] = 0;
}
_$jscoverage['plugins/customstyle.js'].source = ["<span class=\"c\">/**</span>","<span class=\"c\"> * &#33258;&#23450;&#20041;&#26679;&#24335;&#21629;&#20196;&#25903;&#25345;</span>","<span class=\"c\"> * @file</span>","<span class=\"c\"> */</span>","","UE<span class=\"k\">.</span>plugins<span class=\"k\">[</span><span class=\"s\">'customstyle'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span><span class=\"k\">()</span> <span class=\"k\">{</span>","    <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","    me<span class=\"k\">.</span>setOpt<span class=\"k\">(</span><span class=\"k\">{</span> <span class=\"s\">'customstyle'</span><span class=\"k\">:[</span>","        <span class=\"k\">{</span>tag<span class=\"k\">:</span><span class=\"s\">'h1'</span><span class=\"k\">,</span>name<span class=\"k\">:</span><span class=\"s\">'tc'</span><span class=\"k\">,</span> style<span class=\"k\">:</span><span class=\"s\">'font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;'</span><span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"k\">{</span>tag<span class=\"k\">:</span><span class=\"s\">'h1'</span><span class=\"k\">,</span>name<span class=\"k\">:</span><span class=\"s\">'tl'</span><span class=\"k\">,</span> style<span class=\"k\">:</span><span class=\"s\">'font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:left;margin:0 0 10px 0;'</span><span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"k\">{</span>tag<span class=\"k\">:</span><span class=\"s\">'span'</span><span class=\"k\">,</span>name<span class=\"k\">:</span><span class=\"s\">'im'</span><span class=\"k\">,</span> style<span class=\"k\">:</span><span class=\"s\">'font-size:16px;font-style:italic;font-weight:bold;line-height:18px;'</span><span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"k\">{</span>tag<span class=\"k\">:</span><span class=\"s\">'span'</span><span class=\"k\">,</span>name<span class=\"k\">:</span><span class=\"s\">'hi'</span><span class=\"k\">,</span> style<span class=\"k\">:</span><span class=\"s\">'font-size:16px;font-style:italic;font-weight:bold;color:rgb(51, 153, 204);line-height:18px;'</span><span class=\"k\">}</span>","    <span class=\"k\">]</span><span class=\"k\">}</span><span class=\"k\">);</span>","    me<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'customstyle'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        execCommand <span class=\"k\">:</span> <span class=\"k\">function</span><span class=\"k\">(</span>cmdName<span class=\"k\">,</span> obj<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">,</span>","                    tagName <span class=\"k\">=</span> obj<span class=\"k\">.</span>tag<span class=\"k\">,</span>","                    node <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span> <span class=\"k\">function</span><span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">),</span>","                    range<span class=\"k\">,</span>bk<span class=\"k\">,</span>tmpObj <span class=\"k\">=</span> <span class=\"k\">{}</span><span class=\"k\">;</span>","            <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> p <span class=\"k\">in</span> obj<span class=\"k\">)</span> <span class=\"k\">{</span>","               <span class=\"k\">if</span><span class=\"k\">(</span>obj<span class=\"k\">[</span>p<span class=\"k\">]!==</span>undefined<span class=\"k\">)</span>","                    tmpObj<span class=\"k\">[</span>p<span class=\"k\">]</span> <span class=\"k\">=</span> obj<span class=\"k\">[</span>p<span class=\"k\">];</span>","            <span class=\"k\">}</span>","            <span class=\"k\">delete</span> tmpObj<span class=\"k\">.</span>tag<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>node <span class=\"k\">&amp;&amp;</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span> <span class=\"k\">==</span> obj<span class=\"k\">.</span>label<span class=\"k\">)</span> <span class=\"k\">{</span>","                range <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","                bk <span class=\"k\">=</span> range<span class=\"k\">.</span>createBookmark<span class=\"k\">();</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>range<span class=\"k\">.</span>collapsed<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"c\">//trace:1732 &#21024;&#25481;&#33258;&#23450;&#20041;&#26631;&#31614;&#65292;&#35201;&#26377;p&#26469;&#22238;&#22635;&#31449;&#20301;</span>","                    <span class=\"k\">if</span><span class=\"k\">(</span>dtd<span class=\"k\">.</span>$block<span class=\"k\">[</span>node<span class=\"k\">.</span>tagName<span class=\"k\">])</span><span class=\"k\">{</span>","                        <span class=\"k\">var</span> fillNode <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">'p'</span><span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>moveChild<span class=\"k\">(</span>node<span class=\"k\">,</span> fillNode<span class=\"k\">);</span>","                        node<span class=\"k\">.</span>parentNode<span class=\"k\">.</span>insertBefore<span class=\"k\">(</span>fillNode<span class=\"k\">,</span> node<span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>node<span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">else</span><span class=\"k\">{</span>","                        domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>node<span class=\"k\">,</span><span class=\"k\">true</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span>","","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","","                    <span class=\"k\">var</span> common <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getCommonAncestor<span class=\"k\">(</span>bk<span class=\"k\">.</span>start<span class=\"k\">,</span> bk<span class=\"k\">.</span>end<span class=\"k\">),</span>","                            nodes <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>common<span class=\"k\">,</span> tagName<span class=\"k\">);</span>","                    <span class=\"k\">if</span><span class=\"k\">(</span><span class=\"k\">new</span> RegExp<span class=\"k\">(</span>tagName<span class=\"k\">,</span><span class=\"s\">'i'</span><span class=\"k\">).</span>test<span class=\"k\">(</span>common<span class=\"k\">.</span>tagName<span class=\"k\">))</span><span class=\"k\">{</span>","                        nodes<span class=\"k\">.</span>push<span class=\"k\">(</span>common<span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span>ni<span class=\"k\">;</span> ni <span class=\"k\">=</span> nodes<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span>ni<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span> <span class=\"k\">==</span> obj<span class=\"k\">.</span>label<span class=\"k\">)</span> <span class=\"k\">{</span>","                            <span class=\"k\">var</span> ps <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getPosition<span class=\"k\">(</span>ni<span class=\"k\">,</span> bk<span class=\"k\">.</span>start<span class=\"k\">),</span>pe <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getPosition<span class=\"k\">(</span>ni<span class=\"k\">,</span> bk<span class=\"k\">.</span>end<span class=\"k\">);</span>","                            <span class=\"k\">if</span> <span class=\"k\">((</span>ps <span class=\"k\">&amp;</span> domUtils<span class=\"k\">.</span>POSITION_FOLLOWING <span class=\"k\">||</span> ps <span class=\"k\">&amp;</span> domUtils<span class=\"k\">.</span>POSITION_CONTAINS<span class=\"k\">)</span>","                                    <span class=\"k\">&amp;&amp;</span>","                                    <span class=\"k\">(</span>pe <span class=\"k\">&amp;</span> domUtils<span class=\"k\">.</span>POSITION_PRECEDING <span class=\"k\">||</span> pe <span class=\"k\">&amp;</span> domUtils<span class=\"k\">.</span>POSITION_CONTAINS<span class=\"k\">)</span>","                                    <span class=\"k\">)</span>","                                <span class=\"k\">if</span> <span class=\"k\">(</span>dtd<span class=\"k\">.</span>$block<span class=\"k\">[</span>tagName<span class=\"k\">])</span> <span class=\"k\">{</span>","                                    <span class=\"k\">var</span> fillNode <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">'p'</span><span class=\"k\">);</span>","                                    domUtils<span class=\"k\">.</span>moveChild<span class=\"k\">(</span>ni<span class=\"k\">,</span> fillNode<span class=\"k\">);</span>","                                    ni<span class=\"k\">.</span>parentNode<span class=\"k\">.</span>insertBefore<span class=\"k\">(</span>fillNode<span class=\"k\">,</span> ni<span class=\"k\">);</span>","                                <span class=\"k\">}</span>","                            domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>ni<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span>","                    <span class=\"k\">}</span>","                    node <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>common<span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span> <span class=\"k\">==</span> obj<span class=\"k\">.</span>label<span class=\"k\">;</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","","                        domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>node<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","","                    <span class=\"k\">}</span>","","                <span class=\"k\">}</span>","                range<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>dtd<span class=\"k\">.</span>$block<span class=\"k\">[</span>tagName<span class=\"k\">])</span> <span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">'paragraph'</span><span class=\"k\">,</span> tagName<span class=\"k\">,</span> tmpObj<span class=\"k\">,</span><span class=\"s\">'customstyle'</span><span class=\"k\">);</span>","                    range <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","                    <span class=\"k\">if</span> <span class=\"k\">(!</span>range<span class=\"k\">.</span>collapsed<span class=\"k\">)</span> <span class=\"k\">{</span>","                        range<span class=\"k\">.</span>collapse<span class=\"k\">();</span>","                        node <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span> <span class=\"k\">function</span><span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                            <span class=\"k\">return</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span> <span class=\"k\">==</span> obj<span class=\"k\">.</span>label<span class=\"k\">;</span>","                        <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                        <span class=\"k\">var</span> pNode <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">'p'</span><span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>insertAfter<span class=\"k\">(</span>node<span class=\"k\">,</span> pNode<span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>fillNode<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">,</span> pNode<span class=\"k\">);</span>","                        range<span class=\"k\">.</span>setStart<span class=\"k\">(</span>pNode<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","","                    range <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>range<span class=\"k\">.</span>collapsed<span class=\"k\">)</span> <span class=\"k\">{</span>","                        node <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span>tagName<span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>setAttributes<span class=\"k\">(</span>node<span class=\"k\">,</span> tmpObj<span class=\"k\">);</span>","                        range<span class=\"k\">.</span>insertNode<span class=\"k\">(</span>node<span class=\"k\">).</span>setStart<span class=\"k\">(</span>node<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","","                        <span class=\"k\">return</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","","                    bk <span class=\"k\">=</span> range<span class=\"k\">.</span>createBookmark<span class=\"k\">();</span>","                    range<span class=\"k\">.</span>applyInlineStyle<span class=\"k\">(</span>tagName<span class=\"k\">,</span> tmpObj<span class=\"k\">).</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryCommandValue <span class=\"k\">:</span> <span class=\"k\">function</span><span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> parent <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>filterNodeList<span class=\"k\">(</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getStartElementPath<span class=\"k\">(),</span>","                <span class=\"k\">function</span><span class=\"k\">(</span>node<span class=\"k\">)</span><span class=\"k\">{</span><span class=\"k\">return</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span><span class=\"k\">}</span>","            <span class=\"k\">);</span>","            <span class=\"k\">return</span>  parent <span class=\"k\">?</span> parent<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">)</span> <span class=\"k\">:</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"c\">//&#24403;&#21435;&#25481;customstyle&#26159;&#65292;&#22914;&#26524;&#26159;&#22359;&#20803;&#32032;&#65292;&#29992;p&#20195;&#26367;</span>","    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'keyup'</span><span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">(</span>type<span class=\"k\">,</span> evt<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> keyCode <span class=\"k\">=</span> evt<span class=\"k\">.</span>keyCode <span class=\"k\">||</span> evt<span class=\"k\">.</span>which<span class=\"k\">;</span>","","        <span class=\"k\">if</span> <span class=\"k\">(</span>keyCode <span class=\"k\">==</span> <span class=\"s\">32</span> <span class=\"k\">||</span> keyCode <span class=\"k\">==</span> <span class=\"s\">13</span><span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> range <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>range<span class=\"k\">.</span>collapsed<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> node <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span> <span class=\"k\">function</span><span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> node<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'label'</span><span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>node <span class=\"k\">&amp;&amp;</span> dtd<span class=\"k\">.</span>$block<span class=\"k\">[</span>node<span class=\"k\">.</span>tagName<span class=\"k\">]</span> <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>isEmptyNode<span class=\"k\">(</span>node<span class=\"k\">))</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> p <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">'p'</span><span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>insertAfter<span class=\"k\">(</span>node<span class=\"k\">,</span> p<span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>fillNode<span class=\"k\">(</span>me<span class=\"k\">.</span>document<span class=\"k\">,</span> p<span class=\"k\">);</span>","                        domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>node<span class=\"k\">);</span>","                        range<span class=\"k\">.</span>setStart<span class=\"k\">(</span>p<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","","","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">);</span>","<span class=\"k\">}</span><span class=\"k\">;</span>"];
_$jscoverage['plugins/customstyle.js'][6]++;
UE.plugins.customstyle = (function () {
  _$jscoverage['plugins/customstyle.js'][7]++;
  var me = this;
  _$jscoverage['plugins/customstyle.js'][8]++;
  me.setOpt({"customstyle": [{tag: "h1", name: "tc", style: "font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:center;margin:0 0 20px 0;"}, {tag: "h1", name: "tl", style: "font-size:32px;font-weight:bold;border-bottom:#ccc 2px solid;padding:0 4px 0 0;text-align:left;margin:0 0 10px 0;"}, {tag: "span", name: "im", style: "font-size:16px;font-style:italic;font-weight:bold;line-height:18px;"}, {tag: "span", name: "hi", style: "font-size:16px;font-style:italic;font-weight:bold;color:rgb(51, 153, 204);line-height:18px;"}]});
  _$jscoverage['plugins/customstyle.js'][14]++;
  me.commands.customstyle = {execCommand: (function (cmdName, obj) {
  _$jscoverage['plugins/customstyle.js'][16]++;
  var me = this, tagName = obj.tag, node = domUtils.findParent(me.selection.getStart(), (function (node) {
  _$jscoverage['plugins/customstyle.js'][19]++;
  return node.getAttribute("label");
}), true), range, bk, tmpObj = {};
  _$jscoverage['plugins/customstyle.js'][22]++;
  for (var p in obj) {
    _$jscoverage['plugins/customstyle.js'][23]++;
    if ((obj[p] !== undefined)) {
      _$jscoverage['plugins/customstyle.js'][24]++;
      tmpObj[p] = obj[p];
    }
}
  _$jscoverage['plugins/customstyle.js'][26]++;
  (delete tmpObj.tag);
  _$jscoverage['plugins/customstyle.js'][27]++;
  if ((node && (node.getAttribute("label") == obj.label))) {
    _$jscoverage['plugins/customstyle.js'][28]++;
    range = this.selection.getRange();
    _$jscoverage['plugins/customstyle.js'][29]++;
    bk = range.createBookmark();
    _$jscoverage['plugins/customstyle.js'][30]++;
    if (range.collapsed) {
      _$jscoverage['plugins/customstyle.js'][32]++;
      if (dtd.$block[node.tagName]) {
        _$jscoverage['plugins/customstyle.js'][33]++;
        var fillNode = me.document.createElement("p");
        _$jscoverage['plugins/customstyle.js'][34]++;
        domUtils.moveChild(node, fillNode);
        _$jscoverage['plugins/customstyle.js'][35]++;
        node.parentNode.insertBefore(fillNode, node);
        _$jscoverage['plugins/customstyle.js'][36]++;
        domUtils.remove(node);
      }
      else {
        _$jscoverage['plugins/customstyle.js'][38]++;
        domUtils.remove(node, true);
      }
    }
    else {
      _$jscoverage['plugins/customstyle.js'][43]++;
      var common = domUtils.getCommonAncestor(bk.start, bk.end), nodes = domUtils.getElementsByTagName(common, tagName);
      _$jscoverage['plugins/customstyle.js'][45]++;
      if (new RegExp(tagName, "i").test(common.tagName)) {
        _$jscoverage['plugins/customstyle.js'][46]++;
        nodes.push(common);
      }
      _$jscoverage['plugins/customstyle.js'][48]++;
      for (var i = 0, ni; (ni = nodes[(i++)]);) {
        _$jscoverage['plugins/customstyle.js'][49]++;
        if ((ni.getAttribute("label") == obj.label)) {
          _$jscoverage['plugins/customstyle.js'][50]++;
          var ps = domUtils.getPosition(ni, bk.start), pe = domUtils.getPosition(ni, bk.end);
          _$jscoverage['plugins/customstyle.js'][51]++;
          if ((((ps & domUtils.POSITION_FOLLOWING) || (ps & domUtils.POSITION_CONTAINS)) && ((pe & domUtils.POSITION_PRECEDING) || (pe & domUtils.POSITION_CONTAINS)))) {
            _$jscoverage['plugins/customstyle.js'][55]++;
            if (dtd.$block[tagName]) {
              _$jscoverage['plugins/customstyle.js'][56]++;
              var fillNode = me.document.createElement("p");
              _$jscoverage['plugins/customstyle.js'][57]++;
              domUtils.moveChild(ni, fillNode);
              _$jscoverage['plugins/customstyle.js'][58]++;
              ni.parentNode.insertBefore(fillNode, ni);
            }
          }
          _$jscoverage['plugins/customstyle.js'][60]++;
          domUtils.remove(ni, true);
        }
}
      _$jscoverage['plugins/customstyle.js'][63]++;
      node = domUtils.findParent(common, (function (node) {
  _$jscoverage['plugins/customstyle.js'][64]++;
  return (node.getAttribute("label") == obj.label);
}), true);
      _$jscoverage['plugins/customstyle.js'][66]++;
      if (node) {
        _$jscoverage['plugins/customstyle.js'][68]++;
        domUtils.remove(node, true);
      }
    }
    _$jscoverage['plugins/customstyle.js'][73]++;
    range.moveToBookmark(bk).select();
  }
  else {
    _$jscoverage['plugins/customstyle.js'][75]++;
    if (dtd.$block[tagName]) {
      _$jscoverage['plugins/customstyle.js'][76]++;
      this.execCommand("paragraph", tagName, tmpObj, "customstyle");
      _$jscoverage['plugins/customstyle.js'][77]++;
      range = me.selection.getRange();
      _$jscoverage['plugins/customstyle.js'][78]++;
      if ((! range.collapsed)) {
        _$jscoverage['plugins/customstyle.js'][79]++;
        range.collapse();
        _$jscoverage['plugins/customstyle.js'][80]++;
        node = domUtils.findParent(me.selection.getStart(), (function (node) {
  _$jscoverage['plugins/customstyle.js'][81]++;
  return (node.getAttribute("label") == obj.label);
}), true);
        _$jscoverage['plugins/customstyle.js'][83]++;
        var pNode = me.document.createElement("p");
        _$jscoverage['plugins/customstyle.js'][84]++;
        domUtils.insertAfter(node, pNode);
        _$jscoverage['plugins/customstyle.js'][85]++;
        domUtils.fillNode(me.document, pNode);
        _$jscoverage['plugins/customstyle.js'][86]++;
        range.setStart(pNode, 0).setCursor();
      }
    }
    else {
      _$jscoverage['plugins/customstyle.js'][90]++;
      range = me.selection.getRange();
      _$jscoverage['plugins/customstyle.js'][91]++;
      if (range.collapsed) {
        _$jscoverage['plugins/customstyle.js'][92]++;
        node = me.document.createElement(tagName);
        _$jscoverage['plugins/customstyle.js'][93]++;
        domUtils.setAttributes(node, tmpObj);
        _$jscoverage['plugins/customstyle.js'][94]++;
        range.insertNode(node).setStart(node, 0).setCursor();
        _$jscoverage['plugins/customstyle.js'][96]++;
        return;
      }
      _$jscoverage['plugins/customstyle.js'][99]++;
      bk = range.createBookmark();
      _$jscoverage['plugins/customstyle.js'][100]++;
      range.applyInlineStyle(tagName, tmpObj).moveToBookmark(bk).select();
    }
  }
}), queryCommandValue: (function () {
  _$jscoverage['plugins/customstyle.js'][106]++;
  var parent = domUtils.filterNodeList(this.selection.getStartElementPath(), (function (node) {
  _$jscoverage['plugins/customstyle.js'][108]++;
  return node.getAttribute("label");
}));
  _$jscoverage['plugins/customstyle.js'][110]++;
  return (parent? parent.getAttribute("label"): "");
})};
  _$jscoverage['plugins/customstyle.js'][114]++;
  me.addListener("keyup", (function (type, evt) {
  _$jscoverage['plugins/customstyle.js'][115]++;
  var keyCode = (evt.keyCode || evt.which);
  _$jscoverage['plugins/customstyle.js'][117]++;
  if (((keyCode == 32) || (keyCode == 13))) {
    _$jscoverage['plugins/customstyle.js'][118]++;
    var range = me.selection.getRange();
    _$jscoverage['plugins/customstyle.js'][119]++;
    if (range.collapsed) {
      _$jscoverage['plugins/customstyle.js'][120]++;
      var node = domUtils.findParent(me.selection.getStart(), (function (node) {
  _$jscoverage['plugins/customstyle.js'][121]++;
  return node.getAttribute("label");
}), true);
      _$jscoverage['plugins/customstyle.js'][123]++;
      if ((node && dtd.$block[node.tagName] && domUtils.isEmptyNode(node))) {
        _$jscoverage['plugins/customstyle.js'][124]++;
        var p = me.document.createElement("p");
        _$jscoverage['plugins/customstyle.js'][125]++;
        domUtils.insertAfter(node, p);
        _$jscoverage['plugins/customstyle.js'][126]++;
        domUtils.fillNode(me.document, p);
        _$jscoverage['plugins/customstyle.js'][127]++;
        domUtils.remove(node);
        _$jscoverage['plugins/customstyle.js'][128]++;
        range.setStart(p, 0).setCursor();
      }
    }
  }
}));
});
