/* 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/template.js']) {
  _$jscoverage['plugins/template.js'] = [];
  _$jscoverage['plugins/template.js'][2] = 0;
  _$jscoverage['plugins/template.js'][3] = 0;
  _$jscoverage['plugins/template.js'][5] = 0;
  _$jscoverage['plugins/template.js'][8] = 0;
  _$jscoverage['plugins/template.js'][9] = 0;
  _$jscoverage['plugins/template.js'][11] = 0;
  _$jscoverage['plugins/template.js'][12] = 0;
  _$jscoverage['plugins/template.js'][13] = 0;
  _$jscoverage['plugins/template.js'][16] = 0;
  _$jscoverage['plugins/template.js'][18] = 0;
  _$jscoverage['plugins/template.js'][19] = 0;
  _$jscoverage['plugins/template.js'][20] = 0;
  _$jscoverage['plugins/template.js'][21] = 0;
  _$jscoverage['plugins/template.js'][22] = 0;
  _$jscoverage['plugins/template.js'][23] = 0;
  _$jscoverage['plugins/template.js'][24] = 0;
  _$jscoverage['plugins/template.js'][27] = 0;
  _$jscoverage['plugins/template.js'][28] = 0;
}
_$jscoverage['plugins/template.js'].source = ["","UE<span class=\"k\">.</span>plugins<span class=\"k\">[</span><span class=\"s\">'template'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'template'</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>cmd<span class=\"k\">,</span> obj<span class=\"k\">)</span> <span class=\"k\">{</span>","            obj<span class=\"k\">.</span>html <span class=\"k\">&amp;&amp;</span> <span class=\"k\">this</span><span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"inserthtml\"</span><span class=\"k\">,</span> obj<span class=\"k\">.</span>html<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"k\">this</span><span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">\"click\"</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> el <span class=\"k\">=</span> evt<span class=\"k\">.</span>target <span class=\"k\">||</span> evt<span class=\"k\">.</span>srcElement<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>","        <span class=\"k\">var</span> tnode <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>el<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\">if</span> <span class=\"k\">(</span>node<span class=\"k\">.</span>className <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>hasClass<span class=\"k\">(</span>node<span class=\"k\">,</span> <span class=\"s\">\"ue_t\"</span><span class=\"k\">))</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> node<span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","        tnode <span class=\"k\">&amp;&amp;</span> range<span class=\"k\">.</span>selectNode<span class=\"k\">(</span>tnode<span class=\"k\">).</span>shrinkBoundary<span class=\"k\">().</span>select<span class=\"k\">();</span>","    <span class=\"k\">}</span><span class=\"k\">);</span>","    <span class=\"k\">this</span><span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">\"keydown\"</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> range <span class=\"k\">=</span> <span class=\"k\">this</span><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\">if</span> <span class=\"k\">(!</span>evt<span class=\"k\">.</span>ctrlKey <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!</span>evt<span class=\"k\">.</span>metaKey <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!</span>evt<span class=\"k\">.</span>shiftKey <span class=\"k\">&amp;&amp;</span> <span class=\"k\">!</span>evt<span class=\"k\">.</span>altKey<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> tnode <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>range<span class=\"k\">.</span>startContainer<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\">if</span> <span class=\"k\">(</span>node<span class=\"k\">.</span>className <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>hasClass<span class=\"k\">(</span>node<span class=\"k\">,</span> <span class=\"s\">\"ue_t\"</span><span class=\"k\">))</span> <span class=\"k\">{</span>","                        <span class=\"k\">return</span> node<span class=\"k\">;</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>tnode<span class=\"k\">)</span> <span class=\"k\">{</span>","                    domUtils<span class=\"k\">.</span>removeClasses<span class=\"k\">(</span>tnode<span class=\"k\">,</span> <span class=\"k\">[</span><span class=\"s\">\"ue_t\"</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><span class=\"k\">;</span>"];
_$jscoverage['plugins/template.js'][2]++;
UE.plugins.template = (function () {
  _$jscoverage['plugins/template.js'][3]++;
  UE.commands.template = {execCommand: (function (cmd, obj) {
  _$jscoverage['plugins/template.js'][5]++;
  (obj.html && this.execCommand("inserthtml", obj.html));
})};
  _$jscoverage['plugins/template.js'][8]++;
  this.addListener("click", (function (type, evt) {
  _$jscoverage['plugins/template.js'][9]++;
  var el = (evt.target || evt.srcElement), range = this.selection.getRange();
  _$jscoverage['plugins/template.js'][11]++;
  var tnode = domUtils.findParent(el, (function (node) {
  _$jscoverage['plugins/template.js'][12]++;
  if ((node.className && domUtils.hasClass(node, "ue_t"))) {
    _$jscoverage['plugins/template.js'][13]++;
    return node;
  }
}), true);
  _$jscoverage['plugins/template.js'][16]++;
  (tnode && range.selectNode(tnode).shrinkBoundary().select());
}));
  _$jscoverage['plugins/template.js'][18]++;
  this.addListener("keydown", (function (type, evt) {
  _$jscoverage['plugins/template.js'][19]++;
  var range = this.selection.getRange();
  _$jscoverage['plugins/template.js'][20]++;
  if ((! range.collapsed)) {
    _$jscoverage['plugins/template.js'][21]++;
    if (((! evt.ctrlKey) && (! evt.metaKey) && (! evt.shiftKey) && (! evt.altKey))) {
      _$jscoverage['plugins/template.js'][22]++;
      var tnode = domUtils.findParent(range.startContainer, (function (node) {
  _$jscoverage['plugins/template.js'][23]++;
  if ((node.className && domUtils.hasClass(node, "ue_t"))) {
    _$jscoverage['plugins/template.js'][24]++;
    return node;
  }
}), true);
      _$jscoverage['plugins/template.js'][27]++;
      if (tnode) {
        _$jscoverage['plugins/template.js'][28]++;
        domUtils.removeClasses(tnode, ["ue_t"]);
      }
    }
  }
}));
});
