/* 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['core/Selection.js']) {
  _$jscoverage['core/Selection.js'] = [];
  _$jscoverage['core/Selection.js'][13] = 0;
  _$jscoverage['core/Selection.js'][15] = 0;
  _$jscoverage['core/Selection.js'][16] = 0;
  _$jscoverage['core/Selection.js'][17] = 0;
  _$jscoverage['core/Selection.js'][18] = 0;
  _$jscoverage['core/Selection.js'][19] = 0;
  _$jscoverage['core/Selection.js'][21] = 0;
  _$jscoverage['core/Selection.js'][22] = 0;
  _$jscoverage['core/Selection.js'][24] = 0;
  _$jscoverage['core/Selection.js'][29] = 0;
  _$jscoverage['core/Selection.js'][30] = 0;
  _$jscoverage['core/Selection.js'][31] = 0;
  _$jscoverage['core/Selection.js'][32] = 0;
  _$jscoverage['core/Selection.js'][33] = 0;
  _$jscoverage['core/Selection.js'][34] = 0;
  _$jscoverage['core/Selection.js'][35] = 0;
  _$jscoverage['core/Selection.js'][36] = 0;
  _$jscoverage['core/Selection.js'][37] = 0;
  _$jscoverage['core/Selection.js'][40] = 0;
  _$jscoverage['core/Selection.js'][43] = 0;
  _$jscoverage['core/Selection.js'][44] = 0;
  _$jscoverage['core/Selection.js'][45] = 0;
  _$jscoverage['core/Selection.js'][46] = 0;
  _$jscoverage['core/Selection.js'][47] = 0;
  _$jscoverage['core/Selection.js'][48] = 0;
  _$jscoverage['core/Selection.js'][49] = 0;
  _$jscoverage['core/Selection.js'][50] = 0;
  _$jscoverage['core/Selection.js'][53] = 0;
  _$jscoverage['core/Selection.js'][54] = 0;
  _$jscoverage['core/Selection.js'][55] = 0;
  _$jscoverage['core/Selection.js'][57] = 0;
  _$jscoverage['core/Selection.js'][59] = 0;
  _$jscoverage['core/Selection.js'][60] = 0;
  _$jscoverage['core/Selection.js'][61] = 0;
  _$jscoverage['core/Selection.js'][62] = 0;
  _$jscoverage['core/Selection.js'][63] = 0;
  _$jscoverage['core/Selection.js'][67] = 0;
  _$jscoverage['core/Selection.js'][68] = 0;
  _$jscoverage['core/Selection.js'][69] = 0;
  _$jscoverage['core/Selection.js'][70] = 0;
  _$jscoverage['core/Selection.js'][71] = 0;
  _$jscoverage['core/Selection.js'][73] = 0;
  _$jscoverage['core/Selection.js'][76] = 0;
  _$jscoverage['core/Selection.js'][85] = 0;
  _$jscoverage['core/Selection.js'][86] = 0;
  _$jscoverage['core/Selection.js'][87] = 0;
  _$jscoverage['core/Selection.js'][89] = 0;
  _$jscoverage['core/Selection.js'][90] = 0;
  _$jscoverage['core/Selection.js'][91] = 0;
  _$jscoverage['core/Selection.js'][92] = 0;
  _$jscoverage['core/Selection.js'][93] = 0;
  _$jscoverage['core/Selection.js'][96] = 0;
  _$jscoverage['core/Selection.js'][104] = 0;
  _$jscoverage['core/Selection.js'][105] = 0;
  _$jscoverage['core/Selection.js'][107] = 0;
  _$jscoverage['core/Selection.js'][108] = 0;
  _$jscoverage['core/Selection.js'][110] = 0;
  _$jscoverage['core/Selection.js'][112] = 0;
  _$jscoverage['core/Selection.js'][113] = 0;
  _$jscoverage['core/Selection.js'][114] = 0;
  _$jscoverage['core/Selection.js'][116] = 0;
  _$jscoverage['core/Selection.js'][119] = 0;
  _$jscoverage['core/Selection.js'][120] = 0;
  _$jscoverage['core/Selection.js'][121] = 0;
  _$jscoverage['core/Selection.js'][122] = 0;
  _$jscoverage['core/Selection.js'][123] = 0;
  _$jscoverage['core/Selection.js'][124] = 0;
  _$jscoverage['core/Selection.js'][125] = 0;
  _$jscoverage['core/Selection.js'][127] = 0;
  _$jscoverage['core/Selection.js'][128] = 0;
  _$jscoverage['core/Selection.js'][129] = 0;
  _$jscoverage['core/Selection.js'][130] = 0;
  _$jscoverage['core/Selection.js'][134] = 0;
  _$jscoverage['core/Selection.js'][137] = 0;
  _$jscoverage['core/Selection.js'][140] = 0;
  _$jscoverage['core/Selection.js'][151] = 0;
  _$jscoverage['core/Selection.js'][152] = 0;
  _$jscoverage['core/Selection.js'][153] = 0;
  _$jscoverage['core/Selection.js'][155] = 0;
  _$jscoverage['core/Selection.js'][168] = 0;
  _$jscoverage['core/Selection.js'][169] = 0;
  _$jscoverage['core/Selection.js'][170] = 0;
  _$jscoverage['core/Selection.js'][171] = 0;
  _$jscoverage['core/Selection.js'][174] = 0;
  _$jscoverage['core/Selection.js'][182] = 0;
  _$jscoverage['core/Selection.js'][183] = 0;
  _$jscoverage['core/Selection.js'][184] = 0;
  _$jscoverage['core/Selection.js'][185] = 0;
  _$jscoverage['core/Selection.js'][198] = 0;
  _$jscoverage['core/Selection.js'][199] = 0;
  _$jscoverage['core/Selection.js'][201] = 0;
  _$jscoverage['core/Selection.js'][202] = 0;
  _$jscoverage['core/Selection.js'][203] = 0;
  _$jscoverage['core/Selection.js'][205] = 0;
  _$jscoverage['core/Selection.js'][212] = 0;
  _$jscoverage['core/Selection.js'][219] = 0;
  _$jscoverage['core/Selection.js'][220] = 0;
  _$jscoverage['core/Selection.js'][222] = 0;
  _$jscoverage['core/Selection.js'][236] = 0;
  _$jscoverage['core/Selection.js'][237] = 0;
  _$jscoverage['core/Selection.js'][238] = 0;
  _$jscoverage['core/Selection.js'][240] = 0;
  _$jscoverage['core/Selection.js'][241] = 0;
  _$jscoverage['core/Selection.js'][242] = 0;
  _$jscoverage['core/Selection.js'][244] = 0;
  _$jscoverage['core/Selection.js'][245] = 0;
  _$jscoverage['core/Selection.js'][247] = 0;
  _$jscoverage['core/Selection.js'][248] = 0;
  _$jscoverage['core/Selection.js'][252] = 0;
  _$jscoverage['core/Selection.js'][253] = 0;
  _$jscoverage['core/Selection.js'][255] = 0;
  _$jscoverage['core/Selection.js'][256] = 0;
  _$jscoverage['core/Selection.js'][257] = 0;
  _$jscoverage['core/Selection.js'][258] = 0;
  _$jscoverage['core/Selection.js'][260] = 0;
  _$jscoverage['core/Selection.js'][261] = 0;
  _$jscoverage['core/Selection.js'][263] = 0;
  _$jscoverage['core/Selection.js'][267] = 0;
  _$jscoverage['core/Selection.js'][270] = 0;
  _$jscoverage['core/Selection.js'][271] = 0;
  _$jscoverage['core/Selection.js'][272] = 0;
  _$jscoverage['core/Selection.js'][273] = 0;
  _$jscoverage['core/Selection.js'][274] = 0;
  _$jscoverage['core/Selection.js'][275] = 0;
  _$jscoverage['core/Selection.js'][276] = 0;
  _$jscoverage['core/Selection.js'][280] = 0;
  _$jscoverage['core/Selection.js'][281] = 0;
  _$jscoverage['core/Selection.js'][283] = 0;
  _$jscoverage['core/Selection.js'][286] = 0;
  _$jscoverage['core/Selection.js'][298] = 0;
  _$jscoverage['core/Selection.js'][299] = 0;
  _$jscoverage['core/Selection.js'][301] = 0;
  _$jscoverage['core/Selection.js'][304] = 0;
  _$jscoverage['core/Selection.js'][305] = 0;
  _$jscoverage['core/Selection.js'][307] = 0;
  _$jscoverage['core/Selection.js'][310] = 0;
  _$jscoverage['core/Selection.js'][311] = 0;
  _$jscoverage['core/Selection.js'][313] = 0;
  _$jscoverage['core/Selection.js'][315] = 0;
  _$jscoverage['core/Selection.js'][316] = 0;
  _$jscoverage['core/Selection.js'][317] = 0;
  _$jscoverage['core/Selection.js'][318] = 0;
  _$jscoverage['core/Selection.js'][319] = 0;
  _$jscoverage['core/Selection.js'][320] = 0;
  _$jscoverage['core/Selection.js'][321] = 0;
  _$jscoverage['core/Selection.js'][322] = 0;
  _$jscoverage['core/Selection.js'][326] = 0;
  _$jscoverage['core/Selection.js'][327] = 0;
  _$jscoverage['core/Selection.js'][328] = 0;
  _$jscoverage['core/Selection.js'][329] = 0;
  _$jscoverage['core/Selection.js'][331] = 0;
  _$jscoverage['core/Selection.js'][332] = 0;
  _$jscoverage['core/Selection.js'][335] = 0;
  _$jscoverage['core/Selection.js'][347] = 0;
  _$jscoverage['core/Selection.js'][348] = 0;
  _$jscoverage['core/Selection.js'][349] = 0;
  _$jscoverage['core/Selection.js'][350] = 0;
  _$jscoverage['core/Selection.js'][352] = 0;
  _$jscoverage['core/Selection.js'][363] = 0;
}
_$jscoverage['core/Selection.js'].source = ["<span class=\"c\">/**</span>","<span class=\"c\"> * &#36873;&#38598;</span>","<span class=\"c\"> * @file</span>","<span class=\"c\"> * @module UE.dom.Selection</span>","<span class=\"c\"> * @since 1.2.6.1</span>","<span class=\"c\"> */</span>","","<span class=\"c\">/**</span>","<span class=\"c\"> * UEditor&#20844;&#29992;&#31354;&#38388;&#65292;UEditor&#25152;&#26377;&#30340;&#21151;&#33021;&#37117;&#25346;&#36733;&#22312;&#35813;&#31354;&#38388;&#19979;</span>","<span class=\"c\"> * @module UE</span>","<span class=\"c\"> */</span>","","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","","    <span class=\"k\">function</span> getBoundaryInformation<span class=\"k\">(</span> range<span class=\"k\">,</span> start <span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> getIndex <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getNodeIndex<span class=\"k\">;</span>","        range <span class=\"k\">=</span> range<span class=\"k\">.</span>duplicate<span class=\"k\">();</span>","        range<span class=\"k\">.</span>collapse<span class=\"k\">(</span> start <span class=\"k\">);</span>","        <span class=\"k\">var</span> parent <span class=\"k\">=</span> range<span class=\"k\">.</span>parentElement<span class=\"k\">();</span>","        <span class=\"c\">//&#22914;&#26524;&#33410;&#28857;&#37324;&#27809;&#26377;&#23376;&#33410;&#28857;&#65292;&#30452;&#25509;&#36864;&#20986;</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>parent<span class=\"k\">.</span>hasChildNodes<span class=\"k\">()</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span>  <span class=\"k\">{</span>container<span class=\"k\">:</span>parent<span class=\"k\">,</span> offset<span class=\"k\">:</span><span class=\"s\">0</span><span class=\"k\">}</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> siblings <span class=\"k\">=</span> parent<span class=\"k\">.</span>children<span class=\"k\">,</span>","            child<span class=\"k\">,</span>","            testRange <span class=\"k\">=</span> range<span class=\"k\">.</span>duplicate<span class=\"k\">(),</span>","            startIndex <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> endIndex <span class=\"k\">=</span> siblings<span class=\"k\">.</span>length <span class=\"k\">-</span> <span class=\"s\">1</span><span class=\"k\">,</span> index <span class=\"k\">=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">,</span>","            distance<span class=\"k\">;</span>","        <span class=\"k\">while</span> <span class=\"k\">(</span> startIndex <span class=\"k\">&lt;=</span> endIndex <span class=\"k\">)</span> <span class=\"k\">{</span>","            index <span class=\"k\">=</span> Math<span class=\"k\">.</span>floor<span class=\"k\">(</span> <span class=\"k\">(</span>startIndex <span class=\"k\">+</span> endIndex<span class=\"k\">)</span> <span class=\"k\">/</span> <span class=\"s\">2</span> <span class=\"k\">);</span>","            child <span class=\"k\">=</span> siblings<span class=\"k\">[</span>index<span class=\"k\">];</span>","            testRange<span class=\"k\">.</span>moveToElementText<span class=\"k\">(</span> child <span class=\"k\">);</span>","            <span class=\"k\">var</span> position <span class=\"k\">=</span> testRange<span class=\"k\">.</span>compareEndPoints<span class=\"k\">(</span> <span class=\"s\">'StartToStart'</span><span class=\"k\">,</span> range <span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                endIndex <span class=\"k\">=</span> index <span class=\"k\">-</span> <span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(</span> position <span class=\"k\">&lt;</span> <span class=\"s\">0</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                startIndex <span class=\"k\">=</span> index <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"c\">//trace:1043</span>","                <span class=\"k\">return</span>  <span class=\"k\">{</span>container<span class=\"k\">:</span>parent<span class=\"k\">,</span> offset<span class=\"k\">:</span>getIndex<span class=\"k\">(</span> child <span class=\"k\">)</span><span class=\"k\">}</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> index <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","            testRange<span class=\"k\">.</span>moveToElementText<span class=\"k\">(</span> parent <span class=\"k\">);</span>","            testRange<span class=\"k\">.</span>setEndPoint<span class=\"k\">(</span> <span class=\"s\">'StartToStart'</span><span class=\"k\">,</span> range <span class=\"k\">);</span>","            distance <span class=\"k\">=</span> testRange<span class=\"k\">.</span>text<span class=\"k\">.</span>replace<span class=\"k\">(</span> <span class=\"s\">/(\\r\\n|\\r)/g</span><span class=\"k\">,</span> <span class=\"s\">'</span><span class=\"t\">\\n</span><span class=\"s\">'</span> <span class=\"k\">).</span>length<span class=\"k\">;</span>","            siblings <span class=\"k\">=</span> parent<span class=\"k\">.</span>childNodes<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>distance <span class=\"k\">)</span> <span class=\"k\">{</span>","                child <span class=\"k\">=</span> siblings<span class=\"k\">[</span>siblings<span class=\"k\">.</span>length <span class=\"k\">-</span> <span class=\"s\">1</span><span class=\"k\">];</span>","                <span class=\"k\">return</span>  <span class=\"k\">{</span>container<span class=\"k\">:</span>child<span class=\"k\">,</span> offset<span class=\"k\">:</span>child<span class=\"k\">.</span>nodeValue<span class=\"k\">.</span>length<span class=\"k\">}</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","","            <span class=\"k\">var</span> i <span class=\"k\">=</span> siblings<span class=\"k\">.</span>length<span class=\"k\">;</span>","            <span class=\"k\">while</span> <span class=\"k\">(</span> distance <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">)</span><span class=\"k\">{</span>","                distance <span class=\"k\">-=</span> siblings<span class=\"k\">[</span> <span class=\"k\">--</span>i <span class=\"k\">].</span>nodeValue<span class=\"k\">.</span>length<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">{</span>container<span class=\"k\">:</span>siblings<span class=\"k\">[</span>i<span class=\"k\">],</span> offset<span class=\"k\">:-</span>distance<span class=\"k\">}</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","        testRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span> position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">);</span>","        testRange<span class=\"k\">.</span>setEndPoint<span class=\"k\">(</span> position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"s\">'StartToStart'</span> <span class=\"k\">:</span> <span class=\"s\">'EndToStart'</span><span class=\"k\">,</span> range <span class=\"k\">);</span>","        distance <span class=\"k\">=</span> testRange<span class=\"k\">.</span>text<span class=\"k\">.</span>replace<span class=\"k\">(</span> <span class=\"s\">/(\\r\\n|\\r)/g</span><span class=\"k\">,</span> <span class=\"s\">'</span><span class=\"t\">\\n</span><span class=\"s\">'</span> <span class=\"k\">).</span>length<span class=\"k\">;</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>distance <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span>  dtd<span class=\"k\">.</span>$empty<span class=\"k\">[</span>child<span class=\"k\">.</span>tagName<span class=\"k\">]</span> <span class=\"k\">||</span> dtd<span class=\"k\">.</span>$nonChild<span class=\"k\">[</span>child<span class=\"k\">.</span>tagName<span class=\"k\">]</span> <span class=\"k\">?</span>","            <span class=\"k\">{</span>container<span class=\"k\">:</span>parent<span class=\"k\">,</span> offset<span class=\"k\">:</span>getIndex<span class=\"k\">(</span> child <span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"k\">(</span>position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"s\">1</span><span class=\"k\">)</span><span class=\"k\">}</span> <span class=\"k\">:</span>","            <span class=\"k\">{</span>container<span class=\"k\">:</span>child<span class=\"k\">,</span> offset<span class=\"k\">:</span>position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> child<span class=\"k\">.</span>childNodes<span class=\"k\">.</span>length<span class=\"k\">}</span>","        <span class=\"k\">}</span>","        <span class=\"k\">while</span> <span class=\"k\">(</span> distance <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">try</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> pre <span class=\"k\">=</span> child<span class=\"k\">;</span>","                child <span class=\"k\">=</span> child<span class=\"k\">[</span>position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"s\">'previousSibling'</span> <span class=\"k\">:</span> <span class=\"s\">'nextSibling'</span><span class=\"k\">];</span>","                distance <span class=\"k\">-=</span> child<span class=\"k\">.</span>nodeValue<span class=\"k\">.</span>length<span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span> e <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">{</span>container<span class=\"k\">:</span>parent<span class=\"k\">,</span> offset<span class=\"k\">:</span>getIndex<span class=\"k\">(</span> pre <span class=\"k\">)</span><span class=\"k\">}</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","        <span class=\"k\">return</span>  <span class=\"k\">{</span>container<span class=\"k\">:</span>child<span class=\"k\">,</span> offset<span class=\"k\">:</span>position <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"k\">-</span>distance <span class=\"k\">:</span> child<span class=\"k\">.</span>nodeValue<span class=\"k\">.</span>length <span class=\"k\">+</span> distance<span class=\"k\">}</span>","    <span class=\"k\">}</span>","","    <span class=\"c\">/*</span>","<span class=\"c\">     * &#23558;ieRange&#36716;&#25442;&#20026;Range&#23545;&#35937;</span>","<span class=\"c\">     * @param {Range}   ieRange    ieRange&#23545;&#35937;</span>","<span class=\"c\">     * @param {Range}   range      Range&#23545;&#35937;</span>","<span class=\"c\">     * @return  {Range}  range       &#36820;&#22238;&#36716;&#25442;&#21518;&#30340;Range&#23545;&#35937;</span>","<span class=\"c\">     */</span>","    <span class=\"k\">function</span> transformIERangeToRange<span class=\"k\">(</span> ieRange<span class=\"k\">,</span> range <span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> ieRange<span class=\"k\">.</span>item <span class=\"k\">)</span> <span class=\"k\">{</span>","            range<span class=\"k\">.</span>selectNode<span class=\"k\">(</span> ieRange<span class=\"k\">.</span>item<span class=\"k\">(</span> <span class=\"s\">0</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> bi <span class=\"k\">=</span> getBoundaryInformation<span class=\"k\">(</span> ieRange<span class=\"k\">,</span> <span class=\"k\">true</span> <span class=\"k\">);</span>","            range<span class=\"k\">.</span>setStart<span class=\"k\">(</span> bi<span class=\"k\">.</span>container<span class=\"k\">,</span> bi<span class=\"k\">.</span>offset <span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> ieRange<span class=\"k\">.</span>compareEndPoints<span class=\"k\">(</span> <span class=\"s\">'StartToEnd'</span><span class=\"k\">,</span> ieRange <span class=\"k\">)</span> <span class=\"k\">!=</span> <span class=\"s\">0</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                bi <span class=\"k\">=</span> getBoundaryInformation<span class=\"k\">(</span> ieRange<span class=\"k\">,</span> <span class=\"k\">false</span> <span class=\"k\">);</span>","                range<span class=\"k\">.</span>setEnd<span class=\"k\">(</span> bi<span class=\"k\">.</span>container<span class=\"k\">,</span> bi<span class=\"k\">.</span>offset <span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","        <span class=\"k\">return</span> range<span class=\"k\">;</span>","    <span class=\"k\">}</span>","","    <span class=\"c\">/*</span>","<span class=\"c\">     * &#33719;&#24471;ieRange</span>","<span class=\"c\">     * @param {Selection} sel    Selection&#23545;&#35937;</span>","<span class=\"c\">     * @return {ieRange}    &#24471;&#21040;ieRange</span>","<span class=\"c\">     */</span>","    <span class=\"k\">function</span> _getIERange<span class=\"k\">(</span> sel <span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> ieRange<span class=\"k\">;</span>","        <span class=\"c\">//ie&#19979;&#26377;&#21487;&#33021;&#25253;&#38169;</span>","        <span class=\"k\">try</span> <span class=\"k\">{</span>","            ieRange <span class=\"k\">=</span> sel<span class=\"k\">.</span>getNative<span class=\"k\">().</span>createRange<span class=\"k\">();</span>","        <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span> e <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","        <span class=\"k\">var</span> el <span class=\"k\">=</span> ieRange<span class=\"k\">.</span>item <span class=\"k\">?</span> ieRange<span class=\"k\">.</span>item<span class=\"k\">(</span> <span class=\"s\">0</span> <span class=\"k\">)</span> <span class=\"k\">:</span> ieRange<span class=\"k\">.</span>parentElement<span class=\"k\">();</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">(</span> el<span class=\"k\">.</span>ownerDocument <span class=\"k\">||</span> el <span class=\"k\">)</span> <span class=\"k\">===</span> sel<span class=\"k\">.</span>document <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> ieRange<span class=\"k\">;</span>","        <span class=\"k\">}</span>","        <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","    <span class=\"k\">}</span>","","    <span class=\"k\">var</span> Selection <span class=\"k\">=</span> dom<span class=\"k\">.</span>Selection <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span> doc <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> iframe<span class=\"k\">;</span>","        me<span class=\"k\">.</span>document <span class=\"k\">=</span> doc<span class=\"k\">;</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span> ie <span class=\"k\">)</span> <span class=\"k\">{</span>","            iframe <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getWindow<span class=\"k\">(</span> doc <span class=\"k\">).</span>frameElement<span class=\"k\">;</span>","            domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span> iframe<span class=\"k\">,</span> <span class=\"s\">'beforedeactivate'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                me<span class=\"k\">.</span>_bakIERange <span class=\"k\">=</span> me<span class=\"k\">.</span>getIERange<span class=\"k\">();</span>","            <span class=\"k\">}</span> <span class=\"k\">);</span>","            domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span> iframe<span class=\"k\">,</span> <span class=\"s\">'activate'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">try</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>_getIERange<span class=\"k\">(</span> me <span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> me<span class=\"k\">.</span>_bakIERange <span class=\"k\">)</span> <span class=\"k\">{</span>","                        me<span class=\"k\">.</span>_bakIERange<span class=\"k\">.</span>select<span class=\"k\">();</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span> ex <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">}</span>","                me<span class=\"k\">.</span>_bakIERange <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">);</span>","        <span class=\"k\">}</span>","        iframe <span class=\"k\">=</span> doc <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    Selection<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#33719;&#21462;&#21407;&#29983;seleciton&#23545;&#35937;</span>","<span class=\"c\">         * @method getNative</span>","<span class=\"c\">         * @return { Object } &#33719;&#24471;selection&#23545;&#35937;</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getNative();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getNative<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> doc <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">;</span>","            <span class=\"k\">try</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">!</span>doc <span class=\"k\">?</span> <span class=\"k\">null</span> <span class=\"k\">:</span> ie <span class=\"k\">&amp;&amp;</span> browser<span class=\"k\">.</span>ie <span class=\"k\">&lt;</span> <span class=\"s\">9</span> <span class=\"k\">?</span> doc<span class=\"k\">.</span>selection <span class=\"k\">:</span> domUtils<span class=\"k\">.</span>getWindow<span class=\"k\">(</span> doc <span class=\"k\">).</span>getSelection<span class=\"k\">();</span>","            <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span> e <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">null</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#33719;&#24471;ieRange</span>","<span class=\"c\">         * @method getIERange</span>","<span class=\"c\">         * @return { Object } &#36820;&#22238;ie&#21407;&#29983;&#30340;Range</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getIERange();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getIERange<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> ieRange <span class=\"k\">=</span> _getIERange<span class=\"k\">(</span> <span class=\"k\">this</span> <span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>ieRange <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakIERange <span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakIERange<span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> ieRange<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#32531;&#23384;&#24403;&#21069;&#36873;&#21306;&#30340;range&#21644;&#36873;&#21306;&#30340;&#24320;&#22987;&#33410;&#28857;</span>","<span class=\"c\">         * @method cache</span>","<span class=\"c\">         */</span>","        cache<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>clear<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_cachedRange <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getRange<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElement <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getStart<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElementPath <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getStartElementPath<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#33719;&#21462;&#36873;&#21306;&#24320;&#22987;&#20301;&#32622;&#30340;&#29238;&#33410;&#28857;&#21040;body</span>","<span class=\"c\">         * @method getStartElementPath</span>","<span class=\"c\">         * @return { Array } &#36820;&#22238;&#29238;&#33410;&#28857;&#38598;&#21512;</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getStartElementPath();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getStartElementPath<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElementPath <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElementPath<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> start <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getStart<span class=\"k\">();</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> start <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> domUtils<span class=\"k\">.</span>findParents<span class=\"k\">(</span> start<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">,</span> <span class=\"k\">null</span><span class=\"k\">,</span> <span class=\"k\">true</span> <span class=\"k\">)</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">[];</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#28165;&#31354;&#32531;&#23384;</span>","<span class=\"c\">         * @method clear</span>","<span class=\"c\">         */</span>","        clear<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElementPath <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedRange <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElement <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#32534;&#36753;&#22120;&#26159;&#21542;&#24471;&#21040;&#20102;&#36873;&#21306;</span>","<span class=\"c\">         * @method isFocus</span>","<span class=\"c\">         */</span>","        isFocus<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">try</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> browser<span class=\"k\">.</span>ie <span class=\"k\">&amp;&amp;</span> _getIERange<span class=\"k\">(</span> <span class=\"k\">this</span> <span class=\"k\">)</span> <span class=\"k\">||</span> <span class=\"k\">!</span>browser<span class=\"k\">.</span>ie <span class=\"k\">&amp;&amp;</span> <span class=\"k\">this</span><span class=\"k\">.</span>getNative<span class=\"k\">().</span>rangeCount <span class=\"k\">?</span> <span class=\"k\">true</span> <span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">catch</span> <span class=\"k\">(</span> e <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">false</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#33719;&#21462;&#36873;&#21306;&#23545;&#24212;&#30340;Range</span>","<span class=\"c\">         * @method getRange</span>","<span class=\"c\">         * @return { Object } &#24471;&#21040;Range&#23545;&#35937;</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getRange();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getRange<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>","            <span class=\"k\">function</span> optimze<span class=\"k\">(</span> range <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> child <span class=\"k\">=</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">.</span>firstChild<span class=\"k\">,</span>","                    collapsed <span class=\"k\">=</span> range<span class=\"k\">.</span>collapsed<span class=\"k\">;</span>","                <span class=\"k\">while</span> <span class=\"k\">(</span> child <span class=\"k\">&amp;&amp;</span> child<span class=\"k\">.</span>firstChild <span class=\"k\">)</span> <span class=\"k\">{</span>","                    range<span class=\"k\">.</span>setStart<span class=\"k\">(</span> child<span class=\"k\">,</span> <span class=\"s\">0</span> <span class=\"k\">);</span>","                    child <span class=\"k\">=</span> child<span class=\"k\">.</span>firstChild<span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>range<span class=\"k\">.</span>startContainer <span class=\"k\">)</span> <span class=\"k\">{</span>","                    range<span class=\"k\">.</span>setStart<span class=\"k\">(</span> me<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">,</span> <span class=\"s\">0</span> <span class=\"k\">)</span>","                <span class=\"k\">}</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> collapsed <span class=\"k\">)</span> <span class=\"k\">{</span>","                    range<span class=\"k\">.</span>collapse<span class=\"k\">(</span> <span class=\"k\">true</span> <span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","","            <span class=\"k\">if</span> <span class=\"k\">(</span> me<span class=\"k\">.</span>_cachedRange <span class=\"k\">!=</span> <span class=\"k\">null</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedRange<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> range <span class=\"k\">=</span> <span class=\"k\">new</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>dom<span class=\"k\">.</span>Range<span class=\"k\">(</span> me<span class=\"k\">.</span>document <span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> ie <span class=\"k\">&amp;&amp;</span> browser<span class=\"k\">.</span>ie <span class=\"k\">&lt;</span> <span class=\"s\">9</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> nativeRange <span class=\"k\">=</span> me<span class=\"k\">.</span>getIERange<span class=\"k\">();</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> nativeRange <span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"c\">//&#22791;&#20221;&#30340;_bakIERange&#21487;&#33021;&#24050;&#32463;&#23454;&#25928;&#20102;&#65292;dom&#26641;&#21457;&#29983;&#20102;&#21464;&#21270;&#27604;&#22914;&#20174;&#28304;&#30721;&#27169;&#24335;&#20999;&#22238;&#26469;&#65292;&#25152;&#20197;try&#19968;&#19979;&#65292;&#23454;&#25928;&#23601;&#25918;&#21040;body&#24320;&#22987;&#20301;&#32622;</span>","                    <span class=\"k\">try</span><span class=\"k\">{</span>","                        transformIERangeToRange<span class=\"k\">(</span> nativeRange<span class=\"k\">,</span> range <span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">catch</span><span class=\"k\">(</span>e<span class=\"k\">)</span><span class=\"k\">{</span>","                        optimze<span class=\"k\">(</span> range <span class=\"k\">);</span>","                    <span class=\"k\">}</span>","","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    optimze<span class=\"k\">(</span> range <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> sel <span class=\"k\">=</span> me<span class=\"k\">.</span>getNative<span class=\"k\">();</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> sel <span class=\"k\">&amp;&amp;</span> sel<span class=\"k\">.</span>rangeCount <span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> firstRange <span class=\"k\">=</span> sel<span class=\"k\">.</span>getRangeAt<span class=\"k\">(</span> <span class=\"s\">0</span> <span class=\"k\">);</span>","                    <span class=\"k\">var</span> lastRange <span class=\"k\">=</span> sel<span class=\"k\">.</span>getRangeAt<span class=\"k\">(</span> sel<span class=\"k\">.</span>rangeCount <span class=\"k\">-</span> <span class=\"s\">1</span> <span class=\"k\">);</span>","                    range<span class=\"k\">.</span>setStart<span class=\"k\">(</span> firstRange<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> firstRange<span class=\"k\">.</span>startOffset <span class=\"k\">).</span>setEnd<span class=\"k\">(</span> lastRange<span class=\"k\">.</span>endContainer<span class=\"k\">,</span> lastRange<span class=\"k\">.</span>endOffset <span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span> range<span class=\"k\">.</span>collapsed <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>isBody<span class=\"k\">(</span> range<span class=\"k\">.</span>startContainer <span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!</span>range<span class=\"k\">.</span>startOffset <span class=\"k\">)</span> <span class=\"k\">{</span>","                        optimze<span class=\"k\">(</span> range <span class=\"k\">);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    <span class=\"c\">//trace:1734 &#26377;&#21487;&#33021;&#24050;&#32463;&#19981;&#22312;dom&#26641;&#19978;&#20102;&#65292;&#26631;&#35782;&#30340;&#33410;&#28857;</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakRange <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>inDoc<span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakRange<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>document <span class=\"k\">)</span> <span class=\"k\">)</span><span class=\"k\">{</span>","                        <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakRange<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    optimze<span class=\"k\">(</span> range <span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_bakRange <span class=\"k\">=</span> range<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#33719;&#21462;&#24320;&#22987;&#20803;&#32032;&#65292;&#29992;&#20110;&#29366;&#24577;&#21453;&#23556;</span>","<span class=\"c\">         * @method getStart</span>","<span class=\"c\">         * @return { Element } &#33719;&#24471;&#24320;&#22987;&#20803;&#32032;</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getStart();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getStart<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElement <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_cachedStartElement<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> range <span class=\"k\">=</span> ie <span class=\"k\">?</span> <span class=\"k\">this</span><span class=\"k\">.</span>getIERange<span class=\"k\">()</span> <span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                tmpRange<span class=\"k\">,</span>","                start<span class=\"k\">,</span> tmp<span class=\"k\">,</span> parent<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> ie <span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">!</span>range <span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"c\">//todo &#32473;&#31532;&#19968;&#20010;&#20540;&#21487;&#33021;&#20250;&#26377;&#38382;&#39064;</span>","                    <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">.</span>firstChild<span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"c\">//control&#20803;&#32032;</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> range<span class=\"k\">.</span>item <span class=\"k\">)</span><span class=\"k\">{</span>","                    <span class=\"k\">return</span> range<span class=\"k\">.</span>item<span class=\"k\">(</span> <span class=\"s\">0</span> <span class=\"k\">);</span>","                <span class=\"k\">}</span>","                tmpRange <span class=\"k\">=</span> range<span class=\"k\">.</span>duplicate<span class=\"k\">();</span>","                <span class=\"c\">//&#20462;&#27491;ie&#19979;&lt;b&gt;x&lt;/b&gt;[xx] &#38381;&#21512;&#21518; &lt;b&gt;x|&lt;/b&gt;xx</span>","                tmpRange<span class=\"k\">.</span>text<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span> <span class=\"k\">&amp;&amp;</span> tmpRange<span class=\"k\">.</span>moveStart<span class=\"k\">(</span> <span class=\"s\">'character'</span><span class=\"k\">,</span> <span class=\"s\">1</span> <span class=\"k\">);</span>","                tmpRange<span class=\"k\">.</span>collapse<span class=\"k\">(</span> <span class=\"s\">1</span> <span class=\"k\">);</span>","                start <span class=\"k\">=</span> tmpRange<span class=\"k\">.</span>parentElement<span class=\"k\">();</span>","                parent <span class=\"k\">=</span> tmp <span class=\"k\">=</span> range<span class=\"k\">.</span>parentElement<span class=\"k\">();</span>","                <span class=\"k\">while</span> <span class=\"k\">(</span> tmp <span class=\"k\">=</span> tmp<span class=\"k\">.</span>parentNode <span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span> tmp <span class=\"k\">==</span> start <span class=\"k\">)</span> <span class=\"k\">{</span>","                        start <span class=\"k\">=</span> parent<span class=\"k\">;</span>","                        <span class=\"k\">break</span><span class=\"k\">;</span>","                    <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>shrinkBoundary<span class=\"k\">();</span>","                start <span class=\"k\">=</span> range<span class=\"k\">.</span>startContainer<span class=\"k\">;</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> start<span class=\"k\">.</span>nodeType <span class=\"k\">==</span> <span class=\"s\">1</span> <span class=\"k\">&amp;&amp;</span> start<span class=\"k\">.</span>hasChildNodes<span class=\"k\">()</span> <span class=\"k\">)</span><span class=\"k\">{</span>","                    start <span class=\"k\">=</span> start<span class=\"k\">.</span>childNodes<span class=\"k\">[</span>Math<span class=\"k\">.</span>min<span class=\"k\">(</span> start<span class=\"k\">.</span>childNodes<span class=\"k\">.</span>length <span class=\"k\">-</span> <span class=\"s\">1</span><span class=\"k\">,</span> range<span class=\"k\">.</span>startOffset <span class=\"k\">)];</span>","                <span class=\"k\">}</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span> start<span class=\"k\">.</span>nodeType <span class=\"k\">==</span> <span class=\"s\">3</span> <span class=\"k\">)</span><span class=\"k\">{</span>","                    <span class=\"k\">return</span> start<span class=\"k\">.</span>parentNode<span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> start<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#24471;&#21040;&#36873;&#21306;&#20013;&#30340;&#25991;&#26412;</span>","<span class=\"c\">         * @method getText</span>","<span class=\"c\">         * @return { String } &#36873;&#21306;&#20013;&#21253;&#21547;&#30340;&#25991;&#26412;</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.getText();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        getText<span class=\"k\">:</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> nativeSel<span class=\"k\">,</span> nativeRange<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>isFocus<span class=\"k\">()</span> <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>nativeSel <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getNative<span class=\"k\">())</span> <span class=\"k\">)</span> <span class=\"k\">{</span>","                nativeRange <span class=\"k\">=</span> browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> nativeSel<span class=\"k\">.</span>createRange<span class=\"k\">()</span> <span class=\"k\">:</span> nativeSel<span class=\"k\">.</span>getRangeAt<span class=\"k\">(</span> <span class=\"s\">0</span> <span class=\"k\">);</span>","                <span class=\"k\">return</span> browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> nativeRange<span class=\"k\">.</span>text <span class=\"k\">:</span> nativeRange<span class=\"k\">.</span>toString<span class=\"k\">();</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        <span class=\"c\">/**</span>","<span class=\"c\">         * &#28165;&#38500;&#36873;&#21306;</span>","<span class=\"c\">         * @method clearRange</span>","<span class=\"c\">         * @example</span>","<span class=\"c\">         * ```javascript</span>","<span class=\"c\">         * editor.selection.clearRange();</span>","<span class=\"c\">         * ```</span>","<span class=\"c\">         */</span>","        clearRange <span class=\"k\">:</span> <span class=\"k\">function</span><span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>getNative<span class=\"k\">()[</span>browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> <span class=\"s\">'empty'</span> <span class=\"k\">:</span> <span class=\"s\">'removeAllRanges'</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['core/Selection.js'][13]++;
(function () {
  _$jscoverage['core/Selection.js'][15]++;
  function getBoundaryInformation(range, start) {
    _$jscoverage['core/Selection.js'][16]++;
    var getIndex = domUtils.getNodeIndex;
    _$jscoverage['core/Selection.js'][17]++;
    range = range.duplicate();
    _$jscoverage['core/Selection.js'][18]++;
    range.collapse(start);
    _$jscoverage['core/Selection.js'][19]++;
    var parent = range.parentElement();
    _$jscoverage['core/Selection.js'][21]++;
    if ((! parent.hasChildNodes())) {
      _$jscoverage['core/Selection.js'][22]++;
      return ({container: parent, offset: 0});
    }
    _$jscoverage['core/Selection.js'][24]++;
    var siblings = parent.children, child, testRange = range.duplicate(), startIndex = 0, endIndex = (siblings.length - 1), index = -1, distance;
    _$jscoverage['core/Selection.js'][29]++;
    while ((startIndex <= endIndex)) {
      _$jscoverage['core/Selection.js'][30]++;
      index = Math.floor(((startIndex + endIndex) / 2));
      _$jscoverage['core/Selection.js'][31]++;
      child = siblings[index];
      _$jscoverage['core/Selection.js'][32]++;
      testRange.moveToElementText(child);
      _$jscoverage['core/Selection.js'][33]++;
      var position = testRange.compareEndPoints("StartToStart", range);
      _$jscoverage['core/Selection.js'][34]++;
      if ((position > 0)) {
        _$jscoverage['core/Selection.js'][35]++;
        endIndex = (index - 1);
      }
      else {
        _$jscoverage['core/Selection.js'][36]++;
        if ((position < 0)) {
          _$jscoverage['core/Selection.js'][37]++;
          startIndex = (index + 1);
        }
        else {
          _$jscoverage['core/Selection.js'][40]++;
          return ({container: parent, offset: getIndex(child)});
        }
      }
}
    _$jscoverage['core/Selection.js'][43]++;
    if ((index == -1)) {
      _$jscoverage['core/Selection.js'][44]++;
      testRange.moveToElementText(parent);
      _$jscoverage['core/Selection.js'][45]++;
      testRange.setEndPoint("StartToStart", range);
      _$jscoverage['core/Selection.js'][46]++;
      distance = testRange.text.replace(/(\r\n|\r)/g, "\n").length;
      _$jscoverage['core/Selection.js'][47]++;
      siblings = parent.childNodes;
      _$jscoverage['core/Selection.js'][48]++;
      if ((! distance)) {
        _$jscoverage['core/Selection.js'][49]++;
        child = siblings[(siblings.length - 1)];
        _$jscoverage['core/Selection.js'][50]++;
        return ({container: child, offset: child.nodeValue.length});
      }
      _$jscoverage['core/Selection.js'][53]++;
      var i = siblings.length;
      _$jscoverage['core/Selection.js'][54]++;
      while ((distance > 0)) {
        _$jscoverage['core/Selection.js'][55]++;
        distance -= siblings[(--i)].nodeValue.length;
}
      _$jscoverage['core/Selection.js'][57]++;
      return ({container: siblings[i], offset: (- distance)});
    }
    _$jscoverage['core/Selection.js'][59]++;
    testRange.collapse((position > 0));
    _$jscoverage['core/Selection.js'][60]++;
    testRange.setEndPoint(((position > 0)? "StartToStart": "EndToStart"), range);
    _$jscoverage['core/Selection.js'][61]++;
    distance = testRange.text.replace(/(\r\n|\r)/g, "\n").length;
    _$jscoverage['core/Selection.js'][62]++;
    if ((! distance)) {
      _$jscoverage['core/Selection.js'][63]++;
      return ((dtd.$empty[child.tagName] || dtd.$nonChild[child.tagName])? {container: parent, offset: (getIndex(child) + ((position > 0)? 0: 1))}: {container: child, offset: ((position > 0)? 0: child.childNodes.length)});
    }
    _$jscoverage['core/Selection.js'][67]++;
    while ((distance > 0)) {
      _$jscoverage['core/Selection.js'][68]++;
      try {
        _$jscoverage['core/Selection.js'][69]++;
        var pre = child;
        _$jscoverage['core/Selection.js'][70]++;
        child = child[((position > 0)? "previousSibling": "nextSibling")];
        _$jscoverage['core/Selection.js'][71]++;
        distance -= child.nodeValue.length;
      }
      catch (e) {
        _$jscoverage['core/Selection.js'][73]++;
        return ({container: parent, offset: getIndex(pre)});
      }
}
    _$jscoverage['core/Selection.js'][76]++;
    return ({container: child, offset: ((position > 0)? (- distance): (child.nodeValue.length + distance))});
}
  _$jscoverage['core/Selection.js'][85]++;
  function transformIERangeToRange(ieRange, range) {
    _$jscoverage['core/Selection.js'][86]++;
    if (ieRange.item) {
      _$jscoverage['core/Selection.js'][87]++;
      range.selectNode(ieRange.item(0));
    }
    else {
      _$jscoverage['core/Selection.js'][89]++;
      var bi = getBoundaryInformation(ieRange, true);
      _$jscoverage['core/Selection.js'][90]++;
      range.setStart(bi.container, bi.offset);
      _$jscoverage['core/Selection.js'][91]++;
      if ((ieRange.compareEndPoints("StartToEnd", ieRange) != 0)) {
        _$jscoverage['core/Selection.js'][92]++;
        bi = getBoundaryInformation(ieRange, false);
        _$jscoverage['core/Selection.js'][93]++;
        range.setEnd(bi.container, bi.offset);
      }
    }
    _$jscoverage['core/Selection.js'][96]++;
    return range;
}
  _$jscoverage['core/Selection.js'][104]++;
  function _getIERange(sel) {
    _$jscoverage['core/Selection.js'][105]++;
    var ieRange;
    _$jscoverage['core/Selection.js'][107]++;
    try {
      _$jscoverage['core/Selection.js'][108]++;
      ieRange = sel.getNative().createRange();
    }
    catch (e) {
      _$jscoverage['core/Selection.js'][110]++;
      return null;
    }
    _$jscoverage['core/Selection.js'][112]++;
    var el = (ieRange.item? ieRange.item(0): ieRange.parentElement());
    _$jscoverage['core/Selection.js'][113]++;
    if (((el.ownerDocument || el) === sel.document)) {
      _$jscoverage['core/Selection.js'][114]++;
      return ieRange;
    }
    _$jscoverage['core/Selection.js'][116]++;
    return null;
}
  _$jscoverage['core/Selection.js'][119]++;
  var Selection = (dom.Selection = (function (doc) {
  _$jscoverage['core/Selection.js'][120]++;
  var me = this, iframe;
  _$jscoverage['core/Selection.js'][121]++;
  me.document = doc;
  _$jscoverage['core/Selection.js'][122]++;
  if (ie) {
    _$jscoverage['core/Selection.js'][123]++;
    iframe = domUtils.getWindow(doc).frameElement;
    _$jscoverage['core/Selection.js'][124]++;
    domUtils.on(iframe, "beforedeactivate", (function () {
  _$jscoverage['core/Selection.js'][125]++;
  me._bakIERange = me.getIERange();
}));
    _$jscoverage['core/Selection.js'][127]++;
    domUtils.on(iframe, "activate", (function () {
  _$jscoverage['core/Selection.js'][128]++;
  try {
    _$jscoverage['core/Selection.js'][129]++;
    if (((! _getIERange(me)) && me._bakIERange)) {
      _$jscoverage['core/Selection.js'][130]++;
      me._bakIERange.select();
    }
  }
  catch (ex) {
  }
  _$jscoverage['core/Selection.js'][134]++;
  me._bakIERange = null;
}));
  }
  _$jscoverage['core/Selection.js'][137]++;
  iframe = (doc = null);
}));
  _$jscoverage['core/Selection.js'][140]++;
  Selection.prototype = {getNative: (function () {
  _$jscoverage['core/Selection.js'][151]++;
  var doc = this.document;
  _$jscoverage['core/Selection.js'][152]++;
  try {
    _$jscoverage['core/Selection.js'][153]++;
    return ((! doc)? null: ((ie && (browser.ie < 9))? doc.selection: domUtils.getWindow(doc).getSelection()));
  }
  catch (e) {
    _$jscoverage['core/Selection.js'][155]++;
    return null;
  }
}), getIERange: (function () {
  _$jscoverage['core/Selection.js'][168]++;
  var ieRange = _getIERange(this);
  _$jscoverage['core/Selection.js'][169]++;
  if ((! ieRange)) {
    _$jscoverage['core/Selection.js'][170]++;
    if (this._bakIERange) {
      _$jscoverage['core/Selection.js'][171]++;
      return this._bakIERange;
    }
  }
  _$jscoverage['core/Selection.js'][174]++;
  return ieRange;
}), cache: (function () {
  _$jscoverage['core/Selection.js'][182]++;
  this.clear();
  _$jscoverage['core/Selection.js'][183]++;
  this._cachedRange = this.getRange();
  _$jscoverage['core/Selection.js'][184]++;
  this._cachedStartElement = this.getStart();
  _$jscoverage['core/Selection.js'][185]++;
  this._cachedStartElementPath = this.getStartElementPath();
}), getStartElementPath: (function () {
  _$jscoverage['core/Selection.js'][198]++;
  if (this._cachedStartElementPath) {
    _$jscoverage['core/Selection.js'][199]++;
    return this._cachedStartElementPath;
  }
  _$jscoverage['core/Selection.js'][201]++;
  var start = this.getStart();
  _$jscoverage['core/Selection.js'][202]++;
  if (start) {
    _$jscoverage['core/Selection.js'][203]++;
    return domUtils.findParents(start, true, null, true);
  }
  _$jscoverage['core/Selection.js'][205]++;
  return [];
}), clear: (function () {
  _$jscoverage['core/Selection.js'][212]++;
  this._cachedStartElementPath = (this._cachedRange = (this._cachedStartElement = null));
}), isFocus: (function () {
  _$jscoverage['core/Selection.js'][219]++;
  try {
    _$jscoverage['core/Selection.js'][220]++;
    return (((browser.ie && _getIERange(this)) || ((! browser.ie) && this.getNative().rangeCount))? true: false);
  }
  catch (e) {
    _$jscoverage['core/Selection.js'][222]++;
    return false;
  }
}), getRange: (function () {
  _$jscoverage['core/Selection.js'][236]++;
  var me = this;
  _$jscoverage['core/Selection.js'][237]++;
  function optimze(range) {
    _$jscoverage['core/Selection.js'][238]++;
    var child = me.document.body.firstChild, collapsed = range.collapsed;
    _$jscoverage['core/Selection.js'][240]++;
    while ((child && child.firstChild)) {
      _$jscoverage['core/Selection.js'][241]++;
      range.setStart(child, 0);
      _$jscoverage['core/Selection.js'][242]++;
      child = child.firstChild;
}
    _$jscoverage['core/Selection.js'][244]++;
    if ((! range.startContainer)) {
      _$jscoverage['core/Selection.js'][245]++;
      range.setStart(me.document.body, 0);
    }
    _$jscoverage['core/Selection.js'][247]++;
    if (collapsed) {
      _$jscoverage['core/Selection.js'][248]++;
      range.collapse(true);
    }
}
  _$jscoverage['core/Selection.js'][252]++;
  if ((me._cachedRange != null)) {
    _$jscoverage['core/Selection.js'][253]++;
    return this._cachedRange;
  }
  _$jscoverage['core/Selection.js'][255]++;
  var range = new (baidu.editor.dom.Range)(me.document);
  _$jscoverage['core/Selection.js'][256]++;
  if ((ie && (browser.ie < 9))) {
    _$jscoverage['core/Selection.js'][257]++;
    var nativeRange = me.getIERange();
    _$jscoverage['core/Selection.js'][258]++;
    if (nativeRange) {
      _$jscoverage['core/Selection.js'][260]++;
      try {
        _$jscoverage['core/Selection.js'][261]++;
        transformIERangeToRange(nativeRange, range);
      }
      catch (e) {
        _$jscoverage['core/Selection.js'][263]++;
        optimze(range);
      }
    }
    else {
      _$jscoverage['core/Selection.js'][267]++;
      optimze(range);
    }
  }
  else {
    _$jscoverage['core/Selection.js'][270]++;
    var sel = me.getNative();
    _$jscoverage['core/Selection.js'][271]++;
    if ((sel && sel.rangeCount)) {
      _$jscoverage['core/Selection.js'][272]++;
      var firstRange = sel.getRangeAt(0);
      _$jscoverage['core/Selection.js'][273]++;
      var lastRange = sel.getRangeAt((sel.rangeCount - 1));
      _$jscoverage['core/Selection.js'][274]++;
      range.setStart(firstRange.startContainer, firstRange.startOffset).setEnd(lastRange.endContainer, lastRange.endOffset);
      _$jscoverage['core/Selection.js'][275]++;
      if ((range.collapsed && domUtils.isBody(range.startContainer) && (! range.startOffset))) {
        _$jscoverage['core/Selection.js'][276]++;
        optimze(range);
      }
    }
    else {
      _$jscoverage['core/Selection.js'][280]++;
      if ((this._bakRange && domUtils.inDoc(this._bakRange.startContainer, this.document))) {
        _$jscoverage['core/Selection.js'][281]++;
        return this._bakRange;
      }
      _$jscoverage['core/Selection.js'][283]++;
      optimze(range);
    }
  }
  _$jscoverage['core/Selection.js'][286]++;
  return (this._bakRange = range);
}), getStart: (function () {
  _$jscoverage['core/Selection.js'][298]++;
  if (this._cachedStartElement) {
    _$jscoverage['core/Selection.js'][299]++;
    return this._cachedStartElement;
  }
  _$jscoverage['core/Selection.js'][301]++;
  var range = (ie? this.getIERange(): this.getRange()), tmpRange, start, tmp, parent;
  _$jscoverage['core/Selection.js'][304]++;
  if (ie) {
    _$jscoverage['core/Selection.js'][305]++;
    if ((! range)) {
      _$jscoverage['core/Selection.js'][307]++;
      return this.document.body.firstChild;
    }
    _$jscoverage['core/Selection.js'][310]++;
    if (range.item) {
      _$jscoverage['core/Selection.js'][311]++;
      return range.item(0);
    }
    _$jscoverage['core/Selection.js'][313]++;
    tmpRange = range.duplicate();
    _$jscoverage['core/Selection.js'][315]++;
    ((tmpRange.text.length > 0) && tmpRange.moveStart("character", 1));
    _$jscoverage['core/Selection.js'][316]++;
    tmpRange.collapse(1);
    _$jscoverage['core/Selection.js'][317]++;
    start = tmpRange.parentElement();
    _$jscoverage['core/Selection.js'][318]++;
    parent = (tmp = range.parentElement());
    _$jscoverage['core/Selection.js'][319]++;
    while ((tmp = tmp.parentNode)) {
      _$jscoverage['core/Selection.js'][320]++;
      if ((tmp == start)) {
        _$jscoverage['core/Selection.js'][321]++;
        start = parent;
        _$jscoverage['core/Selection.js'][322]++;
        break;
      }
}
  }
  else {
    _$jscoverage['core/Selection.js'][326]++;
    range.shrinkBoundary();
    _$jscoverage['core/Selection.js'][327]++;
    start = range.startContainer;
    _$jscoverage['core/Selection.js'][328]++;
    if (((start.nodeType == 1) && start.hasChildNodes())) {
      _$jscoverage['core/Selection.js'][329]++;
      start = start.childNodes[Math.min((start.childNodes.length - 1), range.startOffset)];
    }
    _$jscoverage['core/Selection.js'][331]++;
    if ((start.nodeType == 3)) {
      _$jscoverage['core/Selection.js'][332]++;
      return start.parentNode;
    }
  }
  _$jscoverage['core/Selection.js'][335]++;
  return start;
}), getText: (function () {
  _$jscoverage['core/Selection.js'][347]++;
  var nativeSel, nativeRange;
  _$jscoverage['core/Selection.js'][348]++;
  if ((this.isFocus() && (nativeSel = this.getNative()))) {
    _$jscoverage['core/Selection.js'][349]++;
    nativeRange = (browser.ie? nativeSel.createRange(): nativeSel.getRangeAt(0));
    _$jscoverage['core/Selection.js'][350]++;
    return (browser.ie? nativeRange.text: nativeRange.toString());
  }
  _$jscoverage['core/Selection.js'][352]++;
  return "";
}), clearRange: (function () {
  _$jscoverage['core/Selection.js'][363]++;
  (this.getNative()[(browser.ie? "empty": "removeAllRanges")])();
})};
})();
