/* 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/dialog.js']) {
  _$jscoverage['ui/dialog.js'] = [];
  _$jscoverage['ui/dialog.js'][5] = 0;
  _$jscoverage['ui/dialog.js'][6] = 0;
  _$jscoverage['ui/dialog.js'][13] = 0;
  _$jscoverage['ui/dialog.js'][19] = 0;
  _$jscoverage['ui/dialog.js'][24] = 0;
  _$jscoverage['ui/dialog.js'][26] = 0;
  _$jscoverage['ui/dialog.js'][27] = 0;
  _$jscoverage['ui/dialog.js'][28] = 0;
  _$jscoverage['ui/dialog.js'][32] = 0;
  _$jscoverage['ui/dialog.js'][34] = 0;
  _$jscoverage['ui/dialog.js'][35] = 0;
  _$jscoverage['ui/dialog.js'][39] = 0;
  _$jscoverage['ui/dialog.js'][43] = 0;
  _$jscoverage['ui/dialog.js'][48] = 0;
  _$jscoverage['ui/dialog.js'][51] = 0;
  _$jscoverage['ui/dialog.js'][52] = 0;
  _$jscoverage['ui/dialog.js'][53] = 0;
  _$jscoverage['ui/dialog.js'][54] = 0;
  _$jscoverage['ui/dialog.js'][60] = 0;
  _$jscoverage['ui/dialog.js'][65] = 0;
  _$jscoverage['ui/dialog.js'][66] = 0;
  _$jscoverage['ui/dialog.js'][67] = 0;
  _$jscoverage['ui/dialog.js'][68] = 0;
  _$jscoverage['ui/dialog.js'][71] = 0;
  _$jscoverage['ui/dialog.js'][72] = 0;
  _$jscoverage['ui/dialog.js'][73] = 0;
  _$jscoverage['ui/dialog.js'][74] = 0;
  _$jscoverage['ui/dialog.js'][75] = 0;
  _$jscoverage['ui/dialog.js'][76] = 0;
  _$jscoverage['ui/dialog.js'][77] = 0;
  _$jscoverage['ui/dialog.js'][79] = 0;
  _$jscoverage['ui/dialog.js'][80] = 0;
  _$jscoverage['ui/dialog.js'][81] = 0;
  _$jscoverage['ui/dialog.js'][83] = 0;
  _$jscoverage['ui/dialog.js'][84] = 0;
  _$jscoverage['ui/dialog.js'][87] = 0;
  _$jscoverage['ui/dialog.js'][88] = 0;
  _$jscoverage['ui/dialog.js'][89] = 0;
  _$jscoverage['ui/dialog.js'][90] = 0;
  _$jscoverage['ui/dialog.js'][91] = 0;
  _$jscoverage['ui/dialog.js'][92] = 0;
  _$jscoverage['ui/dialog.js'][93] = 0;
  _$jscoverage['ui/dialog.js'][94] = 0;
  _$jscoverage['ui/dialog.js'][98] = 0;
  _$jscoverage['ui/dialog.js'][99] = 0;
  _$jscoverage['ui/dialog.js'][101] = 0;
  _$jscoverage['ui/dialog.js'][104] = 0;
  _$jscoverage['ui/dialog.js'][105] = 0;
  _$jscoverage['ui/dialog.js'][106] = 0;
  _$jscoverage['ui/dialog.js'][107] = 0;
  _$jscoverage['ui/dialog.js'][108] = 0;
  _$jscoverage['ui/dialog.js'][111] = 0;
  _$jscoverage['ui/dialog.js'][114] = 0;
  _$jscoverage['ui/dialog.js'][116] = 0;
  _$jscoverage['ui/dialog.js'][117] = 0;
  _$jscoverage['ui/dialog.js'][118] = 0;
  _$jscoverage['ui/dialog.js'][119] = 0;
  _$jscoverage['ui/dialog.js'][121] = 0;
  _$jscoverage['ui/dialog.js'][126] = 0;
  _$jscoverage['ui/dialog.js'][140] = 0;
  _$jscoverage['ui/dialog.js'][141] = 0;
  _$jscoverage['ui/dialog.js'][142] = 0;
  _$jscoverage['ui/dialog.js'][144] = 0;
  _$jscoverage['ui/dialog.js'][145] = 0;
  _$jscoverage['ui/dialog.js'][146] = 0;
  _$jscoverage['ui/dialog.js'][148] = 0;
  _$jscoverage['ui/dialog.js'][149] = 0;
  _$jscoverage['ui/dialog.js'][150] = 0;
  _$jscoverage['ui/dialog.js'][152] = 0;
  _$jscoverage['ui/dialog.js'][153] = 0;
  _$jscoverage['ui/dialog.js'][155] = 0;
  _$jscoverage['ui/dialog.js'][156] = 0;
  _$jscoverage['ui/dialog.js'][157] = 0;
  _$jscoverage['ui/dialog.js'][160] = 0;
  _$jscoverage['ui/dialog.js'][161] = 0;
  _$jscoverage['ui/dialog.js'][162] = 0;
  _$jscoverage['ui/dialog.js'][163] = 0;
  _$jscoverage['ui/dialog.js'][169] = 0;
  _$jscoverage['ui/dialog.js'][171] = 0;
  _$jscoverage['ui/dialog.js'][172] = 0;
  _$jscoverage['ui/dialog.js'][173] = 0;
  _$jscoverage['ui/dialog.js'][176] = 0;
  _$jscoverage['ui/dialog.js'][177] = 0;
  _$jscoverage['ui/dialog.js'][178] = 0;
  _$jscoverage['ui/dialog.js'][180] = 0;
  _$jscoverage['ui/dialog.js'][182] = 0;
  _$jscoverage['ui/dialog.js'][184] = 0;
  _$jscoverage['ui/dialog.js'][185] = 0;
  _$jscoverage['ui/dialog.js'][186] = 0;
  _$jscoverage['ui/dialog.js'][187] = 0;
  _$jscoverage['ui/dialog.js'][188] = 0;
  _$jscoverage['ui/dialog.js'][195] = 0;
  _$jscoverage['ui/dialog.js'][196] = 0;
  _$jscoverage['ui/dialog.js'][205] = 0;
  _$jscoverage['ui/dialog.js'][208] = 0;
  _$jscoverage['ui/dialog.js'][209] = 0;
  _$jscoverage['ui/dialog.js'][210] = 0;
  _$jscoverage['ui/dialog.js'][211] = 0;
  _$jscoverage['ui/dialog.js'][212] = 0;
  _$jscoverage['ui/dialog.js'][215] = 0;
  _$jscoverage['ui/dialog.js'][216] = 0;
  _$jscoverage['ui/dialog.js'][217] = 0;
  _$jscoverage['ui/dialog.js'][218] = 0;
  _$jscoverage['ui/dialog.js'][219] = 0;
  _$jscoverage['ui/dialog.js'][221] = 0;
  _$jscoverage['ui/dialog.js'][222] = 0;
  _$jscoverage['ui/dialog.js'][223] = 0;
  _$jscoverage['ui/dialog.js'][226] = 0;
  _$jscoverage['ui/dialog.js'][227] = 0;
  _$jscoverage['ui/dialog.js'][228] = 0;
  _$jscoverage['ui/dialog.js'][234] = 0;
  _$jscoverage['ui/dialog.js'][235] = 0;
  _$jscoverage['ui/dialog.js'][236] = 0;
  _$jscoverage['ui/dialog.js'][242] = 0;
  _$jscoverage['ui/dialog.js'][243] = 0;
  _$jscoverage['ui/dialog.js'][246] = 0;
  _$jscoverage['ui/dialog.js'][247] = 0;
  _$jscoverage['ui/dialog.js'][250] = 0;
  _$jscoverage['ui/dialog.js'][251] = 0;
  _$jscoverage['ui/dialog.js'][252] = 0;
  _$jscoverage['ui/dialog.js'][253] = 0;
  _$jscoverage['ui/dialog.js'][257] = 0;
  _$jscoverage['ui/dialog.js'][260] = 0;
  _$jscoverage['ui/dialog.js'][261] = 0;
  _$jscoverage['ui/dialog.js'][262] = 0;
  _$jscoverage['ui/dialog.js'][263] = 0;
  _$jscoverage['ui/dialog.js'][264] = 0;
  _$jscoverage['ui/dialog.js'][268] = 0;
  _$jscoverage['ui/dialog.js'][270] = 0;
  _$jscoverage['ui/dialog.js'][271] = 0;
  _$jscoverage['ui/dialog.js'][273] = 0;
  _$jscoverage['ui/dialog.js'][274] = 0;
  _$jscoverage['ui/dialog.js'][277] = 0;
  _$jscoverage['ui/dialog.js'][278] = 0;
  _$jscoverage['ui/dialog.js'][279] = 0;
  _$jscoverage['ui/dialog.js'][280] = 0;
  _$jscoverage['ui/dialog.js'][285] = 0;
  _$jscoverage['ui/dialog.js'][288] = 0;
  _$jscoverage['ui/dialog.js'][289] = 0;
  _$jscoverage['ui/dialog.js'][293] = 0;
}
_$jscoverage['ui/dialog.js'].source = ["<span class=\"c\">///import core</span>","<span class=\"c\">///import uicore</span>","<span class=\"c\">///import ui/mask.js</span>","<span class=\"c\">///import ui/button.js</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>","        domUtils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>dom<span class=\"k\">.</span>domUtils<span class=\"k\">,</span>","        uiUtils <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>uiUtils<span class=\"k\">,</span>","        Mask <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Mask<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>","        Button <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Button<span class=\"k\">,</span>","        Dialog <span class=\"k\">=</span> baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>Dialog <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>utils<span class=\"k\">.</span>extend<span class=\"k\">(</span><span class=\"k\">{</span>","                autoReset<span class=\"k\">:</span> <span class=\"k\">true</span><span class=\"k\">,</span>","                draggable<span class=\"k\">:</span> <span class=\"k\">true</span><span class=\"k\">,</span>","                onok<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{}</span><span class=\"k\">,</span>","                oncancel<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{}</span><span class=\"k\">,</span>","                onclose<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>t<span class=\"k\">,</span> ok<span class=\"k\">)</span><span class=\"k\">{</span>","                    <span class=\"k\">return</span> ok <span class=\"k\">?</span> <span class=\"k\">this</span><span class=\"k\">.</span>onok<span class=\"k\">()</span> <span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>oncancel<span class=\"k\">();</span>","                <span class=\"k\">}</span><span class=\"k\">,</span>","                <span class=\"c\">//&#26159;&#21542;&#25511;&#21046;dialog&#20013;&#30340;scroll&#20107;&#20214;&#65292; &#40664;&#35748;&#20026;&#19981;&#38459;&#27490;</span>","                holdScroll<span class=\"k\">:</span> <span class=\"k\">false</span>","            <span class=\"k\">}</span><span class=\"k\">,</span>options<span class=\"k\">));</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initDialog<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"k\">var</span> modalMask<span class=\"k\">;</span>","    <span class=\"k\">var</span> dragMask<span class=\"k\">;</span>","    Dialog<span class=\"k\">.</span>prototype <span class=\"k\">=</span> <span class=\"k\">{</span>","        draggable<span class=\"k\">:</span> <span class=\"k\">false</span><span class=\"k\">,</span>","        uiName<span class=\"k\">:</span> <span class=\"s\">'dialog'</span><span class=\"k\">,</span>","        initDialog<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>","                theme<span class=\"k\">=</span><span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>theme<span class=\"k\">;</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>initUIBase<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>modalMask <span class=\"k\">=</span> <span class=\"k\">(</span>modalMask <span class=\"k\">||</span> <span class=\"k\">(</span>modalMask <span class=\"k\">=</span> <span class=\"k\">new</span> Mask<span class=\"k\">(</span><span class=\"k\">{</span>","                className<span class=\"k\">:</span> <span class=\"s\">'edui-dialog-modalmask'</span><span class=\"k\">,</span>","                theme<span class=\"k\">:</span>theme","            <span class=\"k\">}</span><span class=\"k\">)));</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>dragMask <span class=\"k\">=</span> <span class=\"k\">(</span>dragMask <span class=\"k\">||</span> <span class=\"k\">(</span>dragMask <span class=\"k\">=</span> <span class=\"k\">new</span> Mask<span class=\"k\">(</span><span class=\"k\">{</span>","                className<span class=\"k\">:</span> <span class=\"s\">'edui-dialog-dragmask'</span><span class=\"k\">,</span>","                theme<span class=\"k\">:</span>theme","            <span class=\"k\">}</span><span class=\"k\">)));</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>closeButton <span class=\"k\">=</span> <span class=\"k\">new</span> Button<span class=\"k\">(</span><span class=\"k\">{</span>","                className<span class=\"k\">:</span> <span class=\"s\">'edui-dialog-closebutton'</span><span class=\"k\">,</span>","                title<span class=\"k\">:</span> me<span class=\"k\">.</span>closeDialog<span class=\"k\">,</span>","                theme<span class=\"k\">:</span>theme<span class=\"k\">,</span>","                onclick<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                    me<span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">false</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><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i<span class=\"k\">=</span><span class=\"s\">0</span><span class=\"k\">;</span> i<span class=\"k\">&lt;</span><span class=\"k\">this</span><span class=\"k\">.</span>buttons<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><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">instanceof</span> Button<span class=\"k\">))</span> <span class=\"k\">{</span>","                        <span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">new</span> Button<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">[</span>i<span class=\"k\">]);</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        fitSize<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> popBodyEl <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'body'</span><span class=\"k\">);</span>","<span class=\"c\">//            if (!(baidu.editor.browser.ie &amp;&amp; baidu.editor.browser.version == 7)) {</span>","<span class=\"c\">//                uiUtils.removeStyle(popBodyEl, 'width');</span>","<span class=\"c\">//                uiUtils.removeStyle(popBodyEl, 'height');</span>","<span class=\"c\">//            }</span>","            <span class=\"k\">var</span> size <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>mesureSize<span class=\"k\">();</span>","            popBodyEl<span class=\"k\">.</span>style<span class=\"k\">.</span>width <span class=\"k\">=</span> size<span class=\"k\">.</span>width <span class=\"k\">+</span> <span class=\"s\">'px'</span><span class=\"k\">;</span>","            popBodyEl<span class=\"k\">.</span>style<span class=\"k\">.</span>height <span class=\"k\">=</span> size<span class=\"k\">.</span>height <span class=\"k\">+</span> <span class=\"s\">'px'</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> size<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        safeSetOffset<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>offset<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\">var</span> el <span class=\"k\">=</span> me<span class=\"k\">.</span>getDom<span class=\"k\">();</span>","            <span class=\"k\">var</span> vpRect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getViewportRect<span class=\"k\">();</span>","            <span class=\"k\">var</span> rect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span>el<span class=\"k\">);</span>","            <span class=\"k\">var</span> left <span class=\"k\">=</span> offset<span class=\"k\">.</span>left<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>left <span class=\"k\">+</span> rect<span class=\"k\">.</span>width <span class=\"k\">&gt;</span> vpRect<span class=\"k\">.</span>right<span class=\"k\">)</span> <span class=\"k\">{</span>","                left <span class=\"k\">=</span> vpRect<span class=\"k\">.</span>right <span class=\"k\">-</span> rect<span class=\"k\">.</span>width<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> top <span class=\"k\">=</span> offset<span class=\"k\">.</span>top<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>top <span class=\"k\">+</span> rect<span class=\"k\">.</span>height <span class=\"k\">&gt;</span> vpRect<span class=\"k\">.</span>bottom<span class=\"k\">)</span> <span class=\"k\">{</span>","                top <span class=\"k\">=</span> vpRect<span class=\"k\">.</span>bottom <span class=\"k\">-</span> rect<span class=\"k\">.</span>height<span class=\"k\">;</span>","            <span class=\"k\">}</span>","            el<span class=\"k\">.</span>style<span class=\"k\">.</span>left <span class=\"k\">=</span> Math<span class=\"k\">.</span>max<span class=\"k\">(</span>left<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'px'</span><span class=\"k\">;</span>","            el<span class=\"k\">.</span>style<span class=\"k\">.</span>top <span class=\"k\">=</span> Math<span class=\"k\">.</span>max<span class=\"k\">(</span>top<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'px'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        showAtCenter<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>style<span class=\"k\">.</span>display <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> vpRect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getViewportRect<span class=\"k\">();</span>","            <span class=\"k\">var</span> popSize <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>fitSize<span class=\"k\">();</span>","            <span class=\"k\">var</span> titleHeight <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'titlebar'</span><span class=\"k\">).</span>offsetHeight <span class=\"k\">|</span> <span class=\"s\">0</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> left <span class=\"k\">=</span> vpRect<span class=\"k\">.</span>width <span class=\"k\">/</span> <span class=\"s\">2</span> <span class=\"k\">-</span> popSize<span class=\"k\">.</span>width <span class=\"k\">/</span> <span class=\"s\">2</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> top <span class=\"k\">=</span> vpRect<span class=\"k\">.</span>height <span class=\"k\">/</span> <span class=\"s\">2</span> <span class=\"k\">-</span> <span class=\"k\">(</span>popSize<span class=\"k\">.</span>height <span class=\"k\">-</span> titleHeight<span class=\"k\">)</span> <span class=\"k\">/</span> <span class=\"s\">2</span> <span class=\"k\">-</span> titleHeight<span class=\"k\">;</span>","            <span class=\"k\">var</span> popEl <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>safeSetOffset<span class=\"k\">(</span><span class=\"k\">{</span>","                left<span class=\"k\">:</span> Math<span class=\"k\">.</span>max<span class=\"k\">(</span>left <span class=\"k\">|</span> <span class=\"s\">0</span><span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">),</span>","                top<span class=\"k\">:</span> Math<span class=\"k\">.</span>max<span class=\"k\">(</span>top <span class=\"k\">|</span> <span class=\"s\">0</span><span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">)</span>","            <span class=\"k\">}</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>domUtils<span class=\"k\">.</span>hasClass<span class=\"k\">(</span>popEl<span class=\"k\">,</span> <span class=\"s\">'edui-state-centered'</span><span class=\"k\">))</span> <span class=\"k\">{</span>","                popEl<span class=\"k\">.</span>className <span class=\"k\">+=</span> <span class=\"s\">' edui-state-centered'</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>_show<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getContentHtml<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> contentHtml <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">typeof</span> <span class=\"k\">this</span><span class=\"k\">.</span>content <span class=\"k\">==</span> <span class=\"s\">'string'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                contentHtml <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>content<span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>iframeUrl<span class=\"k\">)</span> <span class=\"k\">{</span>","                contentHtml <span class=\"k\">=</span> <span class=\"s\">'&lt;span id=\"'</span><span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>id <span class=\"k\">+</span><span class=\"s\">'_contmask\" class=\"dialogcontmask\"&gt;&lt;/span&gt;&lt;iframe id=\"'</span><span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>id <span class=\"k\">+</span>","                    <span class=\"s\">'_iframe\" class=\"%%-iframe\" height=\"100%\" width=\"100%\" frameborder=\"0\" src=\"'</span><span class=\"k\">+</span> <span class=\"k\">this</span><span class=\"k\">.</span>iframeUrl <span class=\"k\">+</span><span class=\"s\">'\"&gt;&lt;/iframe&gt;'</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> contentHtml<span class=\"k\">;</span>","        <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\">var</span> footHtml <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> buff <span class=\"k\">=</span> <span class=\"k\">[];</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i<span class=\"k\">=</span><span class=\"s\">0</span><span class=\"k\">;</span> i<span class=\"k\">&lt;</span><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    buff<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">[</span>i<span class=\"k\">].</span>renderHtml<span class=\"k\">();</span>","                <span class=\"k\">}</span>","                footHtml <span class=\"k\">=</span> <span class=\"s\">'&lt;div class=\"%%-foot\"&gt;'</span> <span class=\"k\">+</span>","                     <span class=\"s\">'&lt;div id=\"##_buttons\" class=\"%%-buttons\"&gt;'</span> <span class=\"k\">+</span> buff<span class=\"k\">.</span>join<span class=\"k\">(</span><span class=\"s\">''</span><span class=\"k\">)</span> <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=\"k\">}</span>","","            <span class=\"k\">return</span> <span class=\"s\">'&lt;div id=\"##\" class=\"%%\"&gt;&lt;div class=\"%%-wrap\"&gt;&lt;div id=\"##_body\" class=\"%%-body\"&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div class=\"%%-shadow\"&gt;&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div id=\"##_titlebar\" class=\"%%-titlebar\"&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div class=\"%%-draghandle\" onmousedown=\"$$._onTitlebarMouseDown(event, this);\"&gt;'</span> <span class=\"k\">+</span>","                 <span class=\"s\">'&lt;span class=\"%%-caption\"&gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>title <span class=\"k\">||</span> <span class=\"s\">''</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/span&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>closeButton<span class=\"k\">.</span>renderHtml<span class=\"k\">()</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                <span class=\"s\">'&lt;div id=\"##_content\" class=\"%%-content\"&gt;'</span><span class=\"k\">+</span> <span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>autoReset <span class=\"k\">?</span> <span class=\"s\">''</span> <span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>getContentHtml<span class=\"k\">())</span> <span class=\"k\">+</span><span class=\"s\">'&lt;/div&gt;'</span> <span class=\"k\">+</span>","                footHtml <span class=\"k\">+</span>","                <span class=\"s\">'&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;'</span><span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        postRender<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"c\">// todo: &#20445;&#25345;&#23621;&#20013;/&#35760;&#20303;&#19978;&#27425;&#20851;&#38381;&#20301;&#32622;&#36873;&#39033;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span><span class=\"k\">this</span><span class=\"k\">.</span>modalMask<span class=\"k\">.</span>getDom<span class=\"k\">())</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>modalMask<span class=\"k\">.</span>render<span class=\"k\">();</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>modalMask<span class=\"k\">.</span>hide<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>dragMask<span class=\"k\">.</span>getDom<span class=\"k\">())</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>dragMask<span class=\"k\">.</span>render<span class=\"k\">();</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>dragMask<span class=\"k\">.</span>hide<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\">this</span><span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'show'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                me<span class=\"k\">.</span>modalMask<span class=\"k\">.</span>show<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">-</span> <span class=\"s\">2</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\">'hide'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                me<span class=\"k\">.</span>modalMask<span class=\"k\">.</span>hide<span class=\"k\">();</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>buttons<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i<span class=\"k\">=</span><span class=\"s\">0</span><span class=\"k\">;</span> i<span class=\"k\">&lt;</span><span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">.</span>length<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>buttons<span class=\"k\">[</span>i<span class=\"k\">].</span>postRender<span class=\"k\">();</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span>window<span class=\"k\">,</span> <span class=\"s\">'resize'</span><span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                setTimeout<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>me<span class=\"k\">.</span>isHidden<span class=\"k\">())</span> <span class=\"k\">{</span>","                        me<span class=\"k\">.</span>safeSetOffset<span class=\"k\">(</span>uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span>me<span class=\"k\">.</span>getDom<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=\"c\">//hold&#20303;scroll&#20107;&#20214;&#65292;&#38450;&#27490;dialog&#30340;&#28378;&#21160;&#24433;&#21709;&#39029;&#38754;</span>","            <span class=\"k\">if</span><span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">.</span>holdScroll <span class=\"k\">)</span> <span class=\"k\">{</span>","","                <span class=\"k\">if</span><span class=\"k\">(</span> <span class=\"k\">!</span>me<span class=\"k\">.</span>iframeUrl <span class=\"k\">)</span> <span class=\"k\">{</span>","                    domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span> document<span class=\"k\">.</span>getElementById<span class=\"k\">(</span> me<span class=\"k\">.</span>id <span class=\"k\">+</span> <span class=\"s\">\"_iframe\"</span><span class=\"k\">),</span> <span class=\"k\">!</span>browser<span class=\"k\">.</span>gecko <span class=\"k\">?</span> <span class=\"s\">\"mousewheel\"</span> <span class=\"k\">:</span> <span class=\"s\">\"DOMMouseScroll\"</span><span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">(</span>e<span class=\"k\">)</span><span class=\"k\">{</span>","                        domUtils<span class=\"k\">.</span>preventDefault<span class=\"k\">(</span>e<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>","                    me<span class=\"k\">.</span>addListener<span class=\"k\">(</span><span class=\"s\">'dialogafterreset'</span><span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">()</span><span class=\"k\">{</span>","                        window<span class=\"k\">.</span>setTimeout<span class=\"k\">(</span><span class=\"k\">function</span><span class=\"k\">()</span><span class=\"k\">{</span>","                            <span class=\"k\">var</span> iframeWindow <span class=\"k\">=</span> document<span class=\"k\">.</span>getElementById<span class=\"k\">(</span> me<span class=\"k\">.</span>id <span class=\"k\">+</span> <span class=\"s\">\"_iframe\"</span><span class=\"k\">).</span>contentWindow<span class=\"k\">;</span>","","                            <span class=\"k\">if</span><span class=\"k\">(</span> browser<span class=\"k\">.</span>ie <span class=\"k\">)</span> <span class=\"k\">{</span>","","                                <span class=\"k\">var</span> timer <span class=\"k\">=</span> window<span class=\"k\">.</span>setInterval<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> iframeWindow<span class=\"k\">.</span>document <span class=\"k\">&amp;&amp;</span> iframeWindow<span class=\"k\">.</span>document<span class=\"k\">.</span>body <span class=\"k\">)</span> <span class=\"k\">{</span>","                                        window<span class=\"k\">.</span>clearInterval<span class=\"k\">(</span> timer <span class=\"k\">);</span>","                                        timer <span class=\"k\">=</span> <span class=\"k\">null</span><span class=\"k\">;</span>","                                        domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span> iframeWindow<span class=\"k\">.</span>document<span class=\"k\">.</span>body<span class=\"k\">,</span> <span class=\"k\">!</span>browser<span class=\"k\">.</span>gecko <span class=\"k\">?</span> <span class=\"s\">\"mousewheel\"</span> <span class=\"k\">:</span> <span class=\"s\">\"DOMMouseScroll\"</span><span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">(</span>e<span class=\"k\">)</span><span class=\"k\">{</span>","                                            domUtils<span class=\"k\">.</span>preventDefault<span class=\"k\">(</span>e<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=\"s\">100</span><span class=\"k\">);</span>","","                            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                                domUtils<span class=\"k\">.</span>on<span class=\"k\">(</span> iframeWindow<span class=\"k\">,</span> <span class=\"k\">!</span>browser<span class=\"k\">.</span>gecko <span class=\"k\">?</span> <span class=\"s\">\"mousewheel\"</span> <span class=\"k\">:</span> <span class=\"s\">\"DOMMouseScroll\"</span><span class=\"k\">,</span> <span class=\"k\">function</span><span class=\"k\">(</span>e<span class=\"k\">)</span><span class=\"k\">{</span>","                                    domUtils<span class=\"k\">.</span>preventDefault<span class=\"k\">(</span>e<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=\"s\">1</span><span class=\"k\">);</span>","                    <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>_hide<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        mesureSize<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">var</span> body <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'body'</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> width <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'content'</span><span class=\"k\">)).</span>width<span class=\"k\">;</span>","            <span class=\"k\">var</span> dialogBodyStyle <span class=\"k\">=</span> body<span class=\"k\">.</span>style<span class=\"k\">;</span>","            dialogBodyStyle<span class=\"k\">.</span>width <span class=\"k\">=</span> width<span class=\"k\">;</span>","            <span class=\"k\">return</span> uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span>body<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onTitlebarMouseDown<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>evt<span class=\"k\">,</span> el<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>draggable<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> rect<span class=\"k\">;</span>","                <span class=\"k\">var</span> vpRect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getViewportRect<span class=\"k\">();</span>","                <span class=\"k\">var</span> me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","                uiUtils<span class=\"k\">.</span>startDrag<span class=\"k\">(</span>evt<span class=\"k\">,</span> <span class=\"k\">{</span>","                    ondragstart<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                        rect <span class=\"k\">=</span> uiUtils<span class=\"k\">.</span>getClientRect<span class=\"k\">(</span>me<span class=\"k\">.</span>getDom<span class=\"k\">());</span>","                        me<span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'contmask'</span><span class=\"k\">).</span>style<span class=\"k\">.</span>visibility <span class=\"k\">=</span> <span class=\"s\">'visible'</span><span class=\"k\">;</span>","                        me<span class=\"k\">.</span>dragMask<span class=\"k\">.</span>show<span class=\"k\">(</span>me<span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">-</span> <span class=\"s\">1</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    ondragmove<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>x<span class=\"k\">,</span> y<span class=\"k\">)</span><span class=\"k\">{</span>","                        <span class=\"k\">var</span> left <span class=\"k\">=</span> rect<span class=\"k\">.</span>left <span class=\"k\">+</span> x<span class=\"k\">;</span>","                        <span class=\"k\">var</span> top <span class=\"k\">=</span> rect<span class=\"k\">.</span>top <span class=\"k\">+</span> y<span class=\"k\">;</span>","                        me<span class=\"k\">.</span>safeSetOffset<span class=\"k\">(</span><span class=\"k\">{</span>","                            left<span class=\"k\">:</span> left<span class=\"k\">,</span>","                            top<span class=\"k\">:</span> top","                        <span class=\"k\">}</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span><span class=\"k\">,</span>","                    ondragstop<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","                        me<span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'contmask'</span><span class=\"k\">).</span>style<span class=\"k\">.</span>visibility <span class=\"k\">=</span> <span class=\"s\">'hidden'</span><span class=\"k\">;</span>","                        domUtils<span class=\"k\">.</span>removeClasses<span class=\"k\">(</span>me<span class=\"k\">.</span>getDom<span class=\"k\">(),</span> <span class=\"k\">[</span><span class=\"s\">'edui-state-centered'</span><span class=\"k\">]);</span>","                        me<span class=\"k\">.</span>dragMask<span class=\"k\">.</span>hide<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>","        reset<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\">'content'</span><span class=\"k\">).</span>innerHTML <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getContentHtml<span class=\"k\">();</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'dialogafterreset'</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _show<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>_hidden<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>display <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","","                <span class=\"c\">//&#35201;&#39640;&#36807;&#32534;&#36753;&#22120;&#30340;zindxe</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>container<span class=\"k\">.</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>editor<span class=\"k\">.</span>container<span class=\"k\">.</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">*</span> <span class=\"s\">1</span> <span class=\"k\">+</span> <span class=\"s\">10</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>_hidden <span class=\"k\">=</span> <span class=\"k\">false</span><span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'show'</span><span class=\"k\">);</span>","                baidu<span class=\"k\">.</span>editor<span class=\"k\">.</span>ui<span class=\"k\">.</span>uiUtils<span class=\"k\">.</span>getFixedLayer<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">-</span> <span class=\"s\">4</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        isHidden<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span><span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">this</span><span class=\"k\">.</span>_hidden<span class=\"k\">;</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _hide<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>_hidden<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>display <span class=\"k\">=</span> <span class=\"s\">'none'</span><span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">().</span>style<span class=\"k\">.</span>zIndex <span class=\"k\">=</span> <span class=\"s\">''</span><span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>_hidden <span class=\"k\">=</span> <span class=\"k\">true</span><span class=\"k\">;</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">'hide'</span><span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        open<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>autoReset<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"c\">//&#26377;&#21487;&#33021;&#36824;&#27809;&#26377;&#28210;&#26579;</span>","                <span class=\"k\">try</span><span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>reset<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\">this</span><span class=\"k\">.</span>render<span class=\"k\">();</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>open<span class=\"k\">()</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>showAtCenter<span class=\"k\">();</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>iframeUrl<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">try</span> <span class=\"k\">{</span>","                    <span class=\"k\">this</span><span class=\"k\">.</span>getDom<span class=\"k\">(</span><span class=\"s\">'iframe'</span><span class=\"k\">).</span>focus<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>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        _onCloseButtonClick<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>evt<span class=\"k\">,</span> el<span class=\"k\">)</span><span class=\"k\">{</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>close<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        close<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>ok<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>fireEvent<span class=\"k\">(</span><span class=\"s\">'close'</span><span class=\"k\">,</span> ok<span class=\"k\">)</span> <span class=\"k\">!==</span> <span class=\"k\">false</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>_hide<span class=\"k\">();</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>Dialog<span class=\"k\">,</span> UIBase<span class=\"k\">);</span>","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['ui/dialog.js'][5]++;
(function () {
  _$jscoverage['ui/dialog.js'][6]++;
  var utils = baidu.editor.utils, domUtils = baidu.editor.dom.domUtils, uiUtils = baidu.editor.ui.uiUtils, Mask = baidu.editor.ui.Mask, UIBase = baidu.editor.ui.UIBase, Button = baidu.editor.ui.Button, Dialog = (baidu.editor.ui.Dialog = (function (options) {
  _$jscoverage['ui/dialog.js'][13]++;
  this.initOptions(utils.extend({autoReset: true, draggable: true, onok: (function () {
}), oncancel: (function () {
}), onclose: (function (t, ok) {
  _$jscoverage['ui/dialog.js'][19]++;
  return (ok? this.onok(): this.oncancel());
}), holdScroll: false}, options));
  _$jscoverage['ui/dialog.js'][24]++;
  this.initDialog();
}));
  _$jscoverage['ui/dialog.js'][26]++;
  var modalMask;
  _$jscoverage['ui/dialog.js'][27]++;
  var dragMask;
  _$jscoverage['ui/dialog.js'][28]++;
  Dialog.prototype = {draggable: false, uiName: "dialog", initDialog: (function () {
  _$jscoverage['ui/dialog.js'][32]++;
  var me = this, theme = this.editor.options.theme;
  _$jscoverage['ui/dialog.js'][34]++;
  this.initUIBase();
  _$jscoverage['ui/dialog.js'][35]++;
  this.modalMask = (modalMask || (modalMask = new Mask({className: "edui-dialog-modalmask", theme: theme})));
  _$jscoverage['ui/dialog.js'][39]++;
  this.dragMask = (dragMask || (dragMask = new Mask({className: "edui-dialog-dragmask", theme: theme})));
  _$jscoverage['ui/dialog.js'][43]++;
  this.closeButton = new Button({className: "edui-dialog-closebutton", title: me.closeDialog, theme: theme, onclick: (function () {
  _$jscoverage['ui/dialog.js'][48]++;
  me.close(false);
})});
  _$jscoverage['ui/dialog.js'][51]++;
  if (this.buttons) {
    _$jscoverage['ui/dialog.js'][52]++;
    for (var i = 0; (i < this.buttons.length); (i++)) {
      _$jscoverage['ui/dialog.js'][53]++;
      if ((! (this.buttons[i] instanceof Button))) {
        _$jscoverage['ui/dialog.js'][54]++;
        this.buttons[i] = new Button(this.buttons[i]);
      }
}
  }
}), fitSize: (function () {
  _$jscoverage['ui/dialog.js'][60]++;
  var popBodyEl = this.getDom("body");
  _$jscoverage['ui/dialog.js'][65]++;
  var size = this.mesureSize();
  _$jscoverage['ui/dialog.js'][66]++;
  popBodyEl.style.width = (size.width + "px");
  _$jscoverage['ui/dialog.js'][67]++;
  popBodyEl.style.height = (size.height + "px");
  _$jscoverage['ui/dialog.js'][68]++;
  return size;
}), safeSetOffset: (function (offset) {
  _$jscoverage['ui/dialog.js'][71]++;
  var me = this;
  _$jscoverage['ui/dialog.js'][72]++;
  var el = me.getDom();
  _$jscoverage['ui/dialog.js'][73]++;
  var vpRect = uiUtils.getViewportRect();
  _$jscoverage['ui/dialog.js'][74]++;
  var rect = uiUtils.getClientRect(el);
  _$jscoverage['ui/dialog.js'][75]++;
  var left = offset.left;
  _$jscoverage['ui/dialog.js'][76]++;
  if (((left + rect.width) > vpRect.right)) {
    _$jscoverage['ui/dialog.js'][77]++;
    left = (vpRect.right - rect.width);
  }
  _$jscoverage['ui/dialog.js'][79]++;
  var top = offset.top;
  _$jscoverage['ui/dialog.js'][80]++;
  if (((top + rect.height) > vpRect.bottom)) {
    _$jscoverage['ui/dialog.js'][81]++;
    top = (vpRect.bottom - rect.height);
  }
  _$jscoverage['ui/dialog.js'][83]++;
  el.style.left = (Math.max(left, 0) + "px");
  _$jscoverage['ui/dialog.js'][84]++;
  el.style.top = (Math.max(top, 0) + "px");
}), showAtCenter: (function () {
  _$jscoverage['ui/dialog.js'][87]++;
  this.getDom().style.display = "";
  _$jscoverage['ui/dialog.js'][88]++;
  var vpRect = uiUtils.getViewportRect();
  _$jscoverage['ui/dialog.js'][89]++;
  var popSize = this.fitSize();
  _$jscoverage['ui/dialog.js'][90]++;
  var titleHeight = (this.getDom("titlebar").offsetHeight | 0);
  _$jscoverage['ui/dialog.js'][91]++;
  var left = ((vpRect.width / 2) - (popSize.width / 2));
  _$jscoverage['ui/dialog.js'][92]++;
  var top = ((vpRect.height / 2) - ((popSize.height - titleHeight) / 2) - titleHeight);
  _$jscoverage['ui/dialog.js'][93]++;
  var popEl = this.getDom();
  _$jscoverage['ui/dialog.js'][94]++;
  this.safeSetOffset({left: Math.max((left | 0), 0), top: Math.max((top | 0), 0)});
  _$jscoverage['ui/dialog.js'][98]++;
  if ((! domUtils.hasClass(popEl, "edui-state-centered"))) {
    _$jscoverage['ui/dialog.js'][99]++;
    popEl.className += " edui-state-centered";
  }
  _$jscoverage['ui/dialog.js'][101]++;
  this._show();
}), getContentHtml: (function () {
  _$jscoverage['ui/dialog.js'][104]++;
  var contentHtml = "";
  _$jscoverage['ui/dialog.js'][105]++;
  if (((typeof this.content) == "string")) {
    _$jscoverage['ui/dialog.js'][106]++;
    contentHtml = this.content;
  }
  else {
    _$jscoverage['ui/dialog.js'][107]++;
    if (this.iframeUrl) {
      _$jscoverage['ui/dialog.js'][108]++;
      contentHtml = ("<span id=\"" + this.id + "_contmask\" class=\"dialogcontmask\"></span><iframe id=\"" + this.id + "_iframe\" class=\"%%-iframe\" height=\"100%\" width=\"100%\" frameborder=\"0\" src=\"" + this.iframeUrl + "\"></iframe>");
    }
  }
  _$jscoverage['ui/dialog.js'][111]++;
  return contentHtml;
}), getHtmlTpl: (function () {
  _$jscoverage['ui/dialog.js'][114]++;
  var footHtml = "";
  _$jscoverage['ui/dialog.js'][116]++;
  if (this.buttons) {
    _$jscoverage['ui/dialog.js'][117]++;
    var buff = [];
    _$jscoverage['ui/dialog.js'][118]++;
    for (var i = 0; (i < this.buttons.length); (i++)) {
      _$jscoverage['ui/dialog.js'][119]++;
      buff[i] = this.buttons[i].renderHtml();
}
    _$jscoverage['ui/dialog.js'][121]++;
    footHtml = ("<div class=\"%%-foot\">" + "<div id=\"##_buttons\" class=\"%%-buttons\">" + buff.join("") + "</div>" + "</div>");
  }
  _$jscoverage['ui/dialog.js'][126]++;
  return ("<div id=\"##\" class=\"%%\"><div class=\"%%-wrap\"><div id=\"##_body\" class=\"%%-body\">" + "<div class=\"%%-shadow\"></div>" + "<div id=\"##_titlebar\" class=\"%%-titlebar\">" + "<div class=\"%%-draghandle\" onmousedown=\"$$._onTitlebarMouseDown(event, this);\">" + "<span class=\"%%-caption\">" + (this.title || "") + "</span>" + "</div>" + this.closeButton.renderHtml() + "</div>" + "<div id=\"##_content\" class=\"%%-content\">" + (this.autoReset? "": this.getContentHtml()) + "</div>" + footHtml + "</div></div></div>");
}), postRender: (function () {
  _$jscoverage['ui/dialog.js'][140]++;
  if ((! this.modalMask.getDom())) {
    _$jscoverage['ui/dialog.js'][141]++;
    this.modalMask.render();
    _$jscoverage['ui/dialog.js'][142]++;
    this.modalMask.hide();
  }
  _$jscoverage['ui/dialog.js'][144]++;
  if ((! this.dragMask.getDom())) {
    _$jscoverage['ui/dialog.js'][145]++;
    this.dragMask.render();
    _$jscoverage['ui/dialog.js'][146]++;
    this.dragMask.hide();
  }
  _$jscoverage['ui/dialog.js'][148]++;
  var me = this;
  _$jscoverage['ui/dialog.js'][149]++;
  this.addListener("show", (function () {
  _$jscoverage['ui/dialog.js'][150]++;
  me.modalMask.show((this.getDom().style.zIndex - 2));
}));
  _$jscoverage['ui/dialog.js'][152]++;
  this.addListener("hide", (function () {
  _$jscoverage['ui/dialog.js'][153]++;
  me.modalMask.hide();
}));
  _$jscoverage['ui/dialog.js'][155]++;
  if (this.buttons) {
    _$jscoverage['ui/dialog.js'][156]++;
    for (var i = 0; (i < this.buttons.length); (i++)) {
      _$jscoverage['ui/dialog.js'][157]++;
      this.buttons[i].postRender();
}
  }
  _$jscoverage['ui/dialog.js'][160]++;
  domUtils.on(window, "resize", (function () {
  _$jscoverage['ui/dialog.js'][161]++;
  setTimeout((function () {
  _$jscoverage['ui/dialog.js'][162]++;
  if ((! me.isHidden())) {
    _$jscoverage['ui/dialog.js'][163]++;
    me.safeSetOffset(uiUtils.getClientRect(me.getDom()));
  }
}));
}));
  _$jscoverage['ui/dialog.js'][169]++;
  if (this.holdScroll) {
    _$jscoverage['ui/dialog.js'][171]++;
    if ((! me.iframeUrl)) {
      _$jscoverage['ui/dialog.js'][172]++;
      domUtils.on(document.getElementById((me.id + "_iframe")), ((! browser.gecko)? "mousewheel": "DOMMouseScroll"), (function (e) {
  _$jscoverage['ui/dialog.js'][173]++;
  domUtils.preventDefault(e);
}));
    }
    else {
      _$jscoverage['ui/dialog.js'][176]++;
      me.addListener("dialogafterreset", (function () {
  _$jscoverage['ui/dialog.js'][177]++;
  window.setTimeout((function () {
  _$jscoverage['ui/dialog.js'][178]++;
  var iframeWindow = document.getElementById((me.id + "_iframe")).contentWindow;
  _$jscoverage['ui/dialog.js'][180]++;
  if (browser.ie) {
    _$jscoverage['ui/dialog.js'][182]++;
    var timer = window.setInterval((function () {
  _$jscoverage['ui/dialog.js'][184]++;
  if ((iframeWindow.document && iframeWindow.document.body)) {
    _$jscoverage['ui/dialog.js'][185]++;
    window.clearInterval(timer);
    _$jscoverage['ui/dialog.js'][186]++;
    timer = null;
    _$jscoverage['ui/dialog.js'][187]++;
    domUtils.on(iframeWindow.document.body, ((! browser.gecko)? "mousewheel": "DOMMouseScroll"), (function (e) {
  _$jscoverage['ui/dialog.js'][188]++;
  domUtils.preventDefault(e);
}));
  }
}), 100);
  }
  else {
    _$jscoverage['ui/dialog.js'][195]++;
    domUtils.on(iframeWindow, ((! browser.gecko)? "mousewheel": "DOMMouseScroll"), (function (e) {
  _$jscoverage['ui/dialog.js'][196]++;
  domUtils.preventDefault(e);
}));
  }
}), 1);
}));
    }
  }
  _$jscoverage['ui/dialog.js'][205]++;
  this._hide();
}), mesureSize: (function () {
  _$jscoverage['ui/dialog.js'][208]++;
  var body = this.getDom("body");
  _$jscoverage['ui/dialog.js'][209]++;
  var width = uiUtils.getClientRect(this.getDom("content")).width;
  _$jscoverage['ui/dialog.js'][210]++;
  var dialogBodyStyle = body.style;
  _$jscoverage['ui/dialog.js'][211]++;
  dialogBodyStyle.width = width;
  _$jscoverage['ui/dialog.js'][212]++;
  return uiUtils.getClientRect(body);
}), _onTitlebarMouseDown: (function (evt, el) {
  _$jscoverage['ui/dialog.js'][215]++;
  if (this.draggable) {
    _$jscoverage['ui/dialog.js'][216]++;
    var rect;
    _$jscoverage['ui/dialog.js'][217]++;
    var vpRect = uiUtils.getViewportRect();
    _$jscoverage['ui/dialog.js'][218]++;
    var me = this;
    _$jscoverage['ui/dialog.js'][219]++;
    uiUtils.startDrag(evt, {ondragstart: (function () {
  _$jscoverage['ui/dialog.js'][221]++;
  rect = uiUtils.getClientRect(me.getDom());
  _$jscoverage['ui/dialog.js'][222]++;
  me.getDom("contmask").style.visibility = "visible";
  _$jscoverage['ui/dialog.js'][223]++;
  me.dragMask.show((me.getDom().style.zIndex - 1));
}), ondragmove: (function (x, y) {
  _$jscoverage['ui/dialog.js'][226]++;
  var left = (rect.left + x);
  _$jscoverage['ui/dialog.js'][227]++;
  var top = (rect.top + y);
  _$jscoverage['ui/dialog.js'][228]++;
  me.safeSetOffset({left: left, top: top});
}), ondragstop: (function () {
  _$jscoverage['ui/dialog.js'][234]++;
  me.getDom("contmask").style.visibility = "hidden";
  _$jscoverage['ui/dialog.js'][235]++;
  domUtils.removeClasses(me.getDom(), ["edui-state-centered"]);
  _$jscoverage['ui/dialog.js'][236]++;
  me.dragMask.hide();
})});
  }
}), reset: (function () {
  _$jscoverage['ui/dialog.js'][242]++;
  this.getDom("content").innerHTML = this.getContentHtml();
  _$jscoverage['ui/dialog.js'][243]++;
  this.fireEvent("dialogafterreset");
}), _show: (function () {
  _$jscoverage['ui/dialog.js'][246]++;
  if (this._hidden) {
    _$jscoverage['ui/dialog.js'][247]++;
    this.getDom().style.display = "";
    _$jscoverage['ui/dialog.js'][250]++;
    (this.editor.container.style.zIndex && (this.getDom().style.zIndex = ((this.editor.container.style.zIndex * 1) + 10)));
    _$jscoverage['ui/dialog.js'][251]++;
    this._hidden = false;
    _$jscoverage['ui/dialog.js'][252]++;
    this.fireEvent("show");
    _$jscoverage['ui/dialog.js'][253]++;
    baidu.editor.ui.uiUtils.getFixedLayer().style.zIndex = (this.getDom().style.zIndex - 4);
  }
}), isHidden: (function () {
  _$jscoverage['ui/dialog.js'][257]++;
  return this._hidden;
}), _hide: (function () {
  _$jscoverage['ui/dialog.js'][260]++;
  if ((! this._hidden)) {
    _$jscoverage['ui/dialog.js'][261]++;
    this.getDom().style.display = "none";
    _$jscoverage['ui/dialog.js'][262]++;
    this.getDom().style.zIndex = "";
    _$jscoverage['ui/dialog.js'][263]++;
    this._hidden = true;
    _$jscoverage['ui/dialog.js'][264]++;
    this.fireEvent("hide");
  }
}), open: (function () {
  _$jscoverage['ui/dialog.js'][268]++;
  if (this.autoReset) {
    _$jscoverage['ui/dialog.js'][270]++;
    try {
      _$jscoverage['ui/dialog.js'][271]++;
      this.reset();
    }
    catch (e) {
      _$jscoverage['ui/dialog.js'][273]++;
      this.render();
      _$jscoverage['ui/dialog.js'][274]++;
      this.open();
    }
  }
  _$jscoverage['ui/dialog.js'][277]++;
  this.showAtCenter();
  _$jscoverage['ui/dialog.js'][278]++;
  if (this.iframeUrl) {
    _$jscoverage['ui/dialog.js'][279]++;
    try {
      _$jscoverage['ui/dialog.js'][280]++;
      this.getDom("iframe").focus();
    }
    catch (ex) {
    }
  }
}), _onCloseButtonClick: (function (evt, el) {
  _$jscoverage['ui/dialog.js'][285]++;
  this.close(false);
}), close: (function (ok) {
  _$jscoverage['ui/dialog.js'][288]++;
  if ((this.fireEvent("close", ok) !== false)) {
    _$jscoverage['ui/dialog.js'][289]++;
    this._hide();
  }
})};
  _$jscoverage['ui/dialog.js'][293]++;
  utils.inherits(Dialog, UIBase);
})();
