/* 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['ui/colorpicker.js']) {
  _$jscoverage['ui/colorpicker.js'] = [];
  _$jscoverage['ui/colorpicker.js'][3] = 0;
  _$jscoverage['ui/colorpicker.js'][4] = 0;
  _$jscoverage['ui/colorpicker.js'][7] = 0;
  _$jscoverage['ui/colorpicker.js'][8] = 0;
  _$jscoverage['ui/colorpicker.js'][9] = 0;
  _$jscoverage['ui/colorpicker.js'][12] = 0;
  _$jscoverage['ui/colorpicker.js'][14] = 0;
  _$jscoverage['ui/colorpicker.js'][17] = 0;
  _$jscoverage['ui/colorpicker.js'][18] = 0;
  _$jscoverage['ui/colorpicker.js'][19] = 0;
  _$jscoverage['ui/colorpicker.js'][20] = 0;
  _$jscoverage['ui/colorpicker.js'][24] = 0;
  _$jscoverage['ui/colorpicker.js'][25] = 0;
  _$jscoverage['ui/colorpicker.js'][26] = 0;
  _$jscoverage['ui/colorpicker.js'][27] = 0;
  _$jscoverage['ui/colorpicker.js'][31] = 0;
  _$jscoverage['ui/colorpicker.js'][34] = 0;
  _$jscoverage['ui/colorpicker.js'][37] = 0;
  _$jscoverage['ui/colorpicker.js'][39] = 0;
  _$jscoverage['ui/colorpicker.js'][48] = 0;
  _$jscoverage['ui/colorpicker.js'][49] = 0;
  _$jscoverage['ui/colorpicker.js'][57] = 0;
  _$jscoverage['ui/colorpicker.js'][58] = 0;
  _$jscoverage['ui/colorpicker.js'][59] = 0;
  _$jscoverage['ui/colorpicker.js'][61] = 0;
  _$jscoverage['ui/colorpicker.js'][71] = 0;
  _$jscoverage['ui/colorpicker.js'][72] = 0;
}
_$jscoverage['ui/colorpicker.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///import uicore</span>","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","    <span class=\"k\">var</span> utils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>utils<span class=\"k\">,</span>","        UIBase <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>UIBase<span class=\"k\">,</span>","        ColorPicker <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>ColorPicker <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>options<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initOptions<span class=\"k\">(</span>options<span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>noColorText <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>noColorText <span class=\"k\">||</span> <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"clearColor\"</span><span class=\"k\">);</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initUIBase<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","","    ColorPicker<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        getHtmlTpl<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">return</span> genColorPicker<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>noColorText<span class=\"k\">,</span><span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onTableClick<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>evt<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> tgt <span class=\"k\">=</span> evt<span class=\"k\">.</span>target <span class=\"k\">||</span> evt<span class=\"k\">.</span>srcElement<span class=\"k\">;</span>","            <span class=\"k\">var</span> color <span class=\"k\">=</span> tgt<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'data-color'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>color<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'pickcolor'</span><span class=\"k\">,</span> color<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onTableOver<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>evt<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> tgt <span class=\"k\">=</span> evt<span class=\"k\">.</span>target <span class=\"k\">||</span> evt<span class=\"k\">.</span>srcElement<span class=\"k\">;</span>","            <span class=\"k\">var</span> color <span class=\"k\">=</span> tgt<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'data-color'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>color<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'preview'</span><span class=\"k\">).</span>style<span class=\"k\">.</span>backgroundColor <span class=\"k\">=</span> color<span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onTableOut<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>getDom<span class=\"k\">(</span><span class=\"s\">'preview'</span><span class=\"k\">).</span>style<span class=\"k\">.</span>backgroundColor <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onPickNoColor<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>fireEvent<span class=\"k\">(</span><span class=\"s\">'picknocolor'</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    utils<span class=\"k\">.</span>inherits<span class=\"k\">(</span>ColorPicker<span class=\"k\">,</span> UIBase<span class=\"k\">);</span>","","    <span class=\"k\">var</span> COLORS <span class=\"k\">=</span> <span class=\"k\">(</span>","        <span class=\"s\">'ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,'</span> <span class=\"k\">+</span>","            <span class=\"s\">'c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,'</span><span class=\"k\">).</span>split<span class=\"k\">(</span><span class=\"s\">','</span><span class=\"k\">);</span>","","    <span class=\"k\">function</span> genColorPicker<span class=\"k\">(</span>noColorText<span class=\"k\">,</span>editor<span class=\"k\">)</span><span class=\"k\">{</span>","        <span class=\"k\">var</span> html <span class=\"k\">=</span> <span class=\"s\">'&lt;div id=\"##\" class=\"edui-colorpicker %%\"&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;div class=\"edui-colorpicker-topbar edui-clearfix\"&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;div unselectable=\"on\" id=\"##_preview\" class=\"edui-colorpicker-preview\"&gt;&lt;/div&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;div unselectable=\"on\" class=\"edui-colorpicker-nocolor\" onclick=\"$$._onPickNoColor(event, this);\"&gt;'</span><span class=\"k\">+</span> noColorText <span class=\"k\">+</span><span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;table  class=\"edui-box\" style=\"border-collapse: collapse;\" onmouseover=\"$$._onTableOver(event, this);\" onmouseout=\"$$._onTableOut(event, this);\" onclick=\"return $$._onTableClick(event, this);\" cellspacing=\"0\" cellpadding=\"0\"&gt;'</span> <span class=\"k\">+</span>","            <span class=\"s\">'&lt;tr style=\"border-bottom: 1px solid #ddd;font-size: 13px;line-height: 25px;color:#39C;padding-top: 2px\"&gt;&lt;td colspan=\"10\"&gt;'</span><span class=\"k\">+</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"themeColor\"</span><span class=\"k\">)+</span><span class=\"s\">'&lt;/td&gt; &lt;/tr&gt;'</span><span class=\"k\">+</span>","            <span class=\"s\">'&lt;tr class=\"edui-colorpicker-tablefirstrow\" &gt;'</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> i<span class=\"k\">&lt;</span>COLORS<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>i <span class=\"k\">&amp;&amp;</span> i<span class=\"k\">%</span><span class=\"s\">10</span> <span class=\"k\">===</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                html <span class=\"k\">+=</span> <span class=\"s\">'&lt;/tr&gt;'</span><span class=\"k\">+(</span>i<span class=\"k\">==</span><span class=\"s\">60</span><span class=\"k\">?</span><span class=\"s\">'&lt;tr style=\"border-bottom: 1px solid #ddd;font-size: 13px;line-height: 25px;color:#39C;\"&gt;&lt;td colspan=\"10\"&gt;'</span><span class=\"k\">+</span>editor<span class=\"k\">.</span>getLang<span class=\"k\">(</span><span class=\"s\">\"standardColor\"</span><span class=\"k\">)+</span><span class=\"s\">'&lt;/td&gt;&lt;/tr&gt;'</span><span class=\"k\">:</span><span class=\"s\">''</span><span class=\"k\">)+</span><span class=\"s\">'&lt;tr'</span><span class=\"k\">+(</span>i<span class=\"k\">==</span><span class=\"s\">60</span><span class=\"k\">?</span><span class=\"s\">' class=\"edui-colorpicker-tablefirstrow\"'</span><span class=\"k\">:</span><span class=\"s\">''</span><span class=\"k\">)+</span><span class=\"s\">'&gt;'</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            html <span class=\"k\">+=</span> i<span class=\"k\">&lt;</span><span class=\"s\">70</span> <span class=\"k\">?</span> <span class=\"s\">'&lt;td style=\"padding: 0 2px;\"&gt;&lt;a hidefocus title=\"'</span><span class=\"k\">+</span>COLORS<span class=\"k\">[</span>i<span class=\"k\">]+</span><span class=\"s\">'\" onclick=\"return false;\" href=\"javascript:\" unselectable=\"on\" class=\"edui-box edui-colorpicker-colorcell\"'</span> <span class=\"k\">+</span>","                <span class=\"s\">' data-color=\"#'</span><span class=\"k\">+</span> COLORS<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">+</span><span class=\"s\">'\"'</span><span class=\"k\">+</span>","                <span class=\"s\">' style=\"background-color:#'</span><span class=\"k\">+</span> COLORS<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">+</span><span class=\"s\">';border:solid #ccc;'</span><span class=\"k\">+</span>","                <span class=\"k\">(</span>i<span class=\"k\">&lt;</span><span class=\"s\">10</span> <span class=\"k\">||</span> i<span class=\"k\">&gt;=</span><span class=\"s\">60</span><span class=\"k\">?</span><span class=\"s\">'border-width:1px;'</span><span class=\"k\">:</span>","                    i<span class=\"k\">&gt;=</span><span class=\"s\">10</span><span class=\"k\">&amp;&amp;</span>i<span class=\"k\">&lt;</span><span class=\"s\">20</span><span class=\"k\">?</span><span class=\"s\">'border-width:1px 1px 0 1px;'</span><span class=\"k\">:</span>","","                        <span class=\"s\">'border-width:0 1px 0 1px;'</span><span class=\"k\">)+</span>","                <span class=\"s\">'\"'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&gt;&lt;/a&gt;&lt;/td&gt;'</span><span class=\"k\">:</span><span class=\"s\">''</span><span class=\"k\">;</span>","        <span class=\"k\">}</span>","        html <span class=\"k\">+=</span> <span class=\"s\">'&lt;/tr&gt;&lt;/table&gt;&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">return</span> html<span class=\"k\">;</span>","    <span class=\"k\">}</span>","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/colorpicker.js'][3]++;
(function () {
  _$jscoverage['ui/colorpicker.js'][4]++;
  var utils = baidu.editor.utils, UIBase = baidu.editor.ui.UIBase, ColorPicker = (baidu.editor.ui.ColorPicker = (function (options) {
  _$jscoverage['ui/colorpicker.js'][7]++;
  this.initOptions(options);
  _$jscoverage['ui/colorpicker.js'][8]++;
  this.noColorText = (this.noColorText || this.editor.getLang("clearColor"));
  _$jscoverage['ui/colorpicker.js'][9]++;
  this.initUIBase();
}));
  _$jscoverage['ui/colorpicker.js'][12]++;
  ColorPicker.prototype = {getHtmlTpl: (function () {
  _$jscoverage['ui/colorpicker.js'][14]++;
  return genColorPicker(this.noColorText, this.editor);
}), _onTableClick: (function (evt) {
  _$jscoverage['ui/colorpicker.js'][17]++;
  var tgt = (evt.target || evt.srcElement);
  _$jscoverage['ui/colorpicker.js'][18]++;
  var color = tgt.getAttribute("data-color");
  _$jscoverage['ui/colorpicker.js'][19]++;
  if (color) {
    _$jscoverage['ui/colorpicker.js'][20]++;
    this.fireEvent("pickcolor", color);
  }
}), _onTableOver: (function (evt) {
  _$jscoverage['ui/colorpicker.js'][24]++;
  var tgt = (evt.target || evt.srcElement);
  _$jscoverage['ui/colorpicker.js'][25]++;
  var color = tgt.getAttribute("data-color");
  _$jscoverage['ui/colorpicker.js'][26]++;
  if (color) {
    _$jscoverage['ui/colorpicker.js'][27]++;
    this.getDom("preview").style.backgroundColor = color;
  }
}), _onTableOut: (function () {
  _$jscoverage['ui/colorpicker.js'][31]++;
  this.getDom("preview").style.backgroundColor = "";
}), _onPickNoColor: (function () {
  _$jscoverage['ui/colorpicker.js'][34]++;
  this.fireEvent("picknocolor");
})};
  _$jscoverage['ui/colorpicker.js'][37]++;
  utils.inherits(ColorPicker, UIBase);
  _$jscoverage['ui/colorpicker.js'][39]++;
  var COLORS = "ffffff,000000,eeece1,1f497d,4f81bd,c0504d,9bbb59,8064a2,4bacc6,f79646,f2f2f2,7f7f7f,ddd9c3,c6d9f0,dbe5f1,f2dcdb,ebf1dd,e5e0ec,dbeef3,fdeada,d8d8d8,595959,c4bd97,8db3e2,b8cce4,e5b9b7,d7e3bc,ccc1d9,b7dde8,fbd5b5,bfbfbf,3f3f3f,938953,548dd4,95b3d7,d99694,c3d69b,b2a2c7,92cddc,fac08f,a5a5a5,262626,494429,17365d,366092,953734,76923c,5f497a,31859b,e36c09,7f7f7f,0c0c0c,1d1b10,0f243e,244061,632423,4f6128,3f3151,205867,974806,c00000,ff0000,ffc000,ffff00,92d050,00b050,00b0f0,0070c0,002060,7030a0,".split(",");
  _$jscoverage['ui/colorpicker.js'][48]++;
  function genColorPicker(noColorText, editor) {
    _$jscoverage['ui/colorpicker.js'][49]++;
    var html = ("<div id=\"##\" class=\"edui-colorpicker %%\">" + "<div class=\"edui-colorpicker-topbar edui-clearfix\">" + "<div unselectable=\"on\" id=\"##_preview\" class=\"edui-colorpicker-preview\"></div>" + "<div unselectable=\"on\" class=\"edui-colorpicker-nocolor\" onclick=\"$$._onPickNoColor(event, this);\">" + noColorText + "</div>" + "</div>" + "<table  class=\"edui-box\" style=\"border-collapse: collapse;\" onmouseover=\"$$._onTableOver(event, this);\" onmouseout=\"$$._onTableOut(event, this);\" onclick=\"return $$._onTableClick(event, this);\" cellspacing=\"0\" cellpadding=\"0\">" + "<tr style=\"border-bottom: 1px solid #ddd;font-size: 13px;line-height: 25px;color:#39C;padding-top: 2px\"><td colspan=\"10\">" + editor.getLang("themeColor") + "</td> </tr>" + "<tr class=\"edui-colorpicker-tablefirstrow\" >");
    _$jscoverage['ui/colorpicker.js'][57]++;
    for (var i = 0; (i < COLORS.length); (i++)) {
      _$jscoverage['ui/colorpicker.js'][58]++;
      if ((i && ((i % 10) === 0))) {
        _$jscoverage['ui/colorpicker.js'][59]++;
        html += ("</tr>" + ((i == 60)? ("<tr style=\"border-bottom: 1px solid #ddd;font-size: 13px;line-height: 25px;color:#39C;\"><td colspan=\"10\">" + editor.getLang("standardColor") + "</td></tr>"): "") + "<tr" + ((i == 60)? " class=\"edui-colorpicker-tablefirstrow\"": "") + ">");
      }
      _$jscoverage['ui/colorpicker.js'][61]++;
      html += ((i < 70)? ("<td style=\"padding: 0 2px;\"><a hidefocus title=\"" + COLORS[i] + "\" onclick=\"return false;\" href=\"javascript:\" unselectable=\"on\" class=\"edui-box edui-colorpicker-colorcell\"" + " data-color=\"#" + COLORS[i] + "\"" + " style=\"background-color:#" + COLORS[i] + ";border:solid #ccc;" + (((i < 10) || (i >= 60))? "border-width:1px;": (((i >= 10) && (i < 20))? "border-width:1px 1px 0 1px;": "border-width:0 1px 0 1px;")) + "\"" + "></a></td>"): "");
}
    _$jscoverage['ui/colorpicker.js'][71]++;
    html += "</tr></table></div>";
    _$jscoverage['ui/colorpicker.js'][72]++;
    return html;
}
})();
