/* 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/table.cmds.js']) {
  _$jscoverage['plugins/table.cmds.js'] = [];
  _$jscoverage['plugins/table.cmds.js'][8] = 0;
  _$jscoverage['plugins/table.cmds.js'][9] = 0;
  _$jscoverage['plugins/table.cmds.js'][10] = 0;
  _$jscoverage['plugins/table.cmds.js'][12] = 0;
  _$jscoverage['plugins/table.cmds.js'][15] = 0;
  _$jscoverage['plugins/table.cmds.js'][18] = 0;
  _$jscoverage['plugins/table.cmds.js'][21] = 0;
  _$jscoverage['plugins/table.cmds.js'][25] = 0;
  _$jscoverage['plugins/table.cmds.js'][27] = 0;
  _$jscoverage['plugins/table.cmds.js'][30] = 0;
  _$jscoverage['plugins/table.cmds.js'][31] = 0;
  _$jscoverage['plugins/table.cmds.js'][34] = 0;
  _$jscoverage['plugins/table.cmds.js'][35] = 0;
  _$jscoverage['plugins/table.cmds.js'][36] = 0;
  _$jscoverage['plugins/table.cmds.js'][37] = 0;
  _$jscoverage['plugins/table.cmds.js'][39] = 0;
  _$jscoverage['plugins/table.cmds.js'][42] = 0;
  _$jscoverage['plugins/table.cmds.js'][45] = 0;
  _$jscoverage['plugins/table.cmds.js'][46] = 0;
  _$jscoverage['plugins/table.cmds.js'][52] = 0;
  _$jscoverage['plugins/table.cmds.js'][53] = 0;
  _$jscoverage['plugins/table.cmds.js'][56] = 0;
  _$jscoverage['plugins/table.cmds.js'][59] = 0;
  _$jscoverage['plugins/table.cmds.js'][64] = 0;
  _$jscoverage['plugins/table.cmds.js'][65] = 0;
  _$jscoverage['plugins/table.cmds.js'][69] = 0;
  _$jscoverage['plugins/table.cmds.js'][71] = 0;
  _$jscoverage['plugins/table.cmds.js'][74] = 0;
  _$jscoverage['plugins/table.cmds.js'][75] = 0;
  _$jscoverage['plugins/table.cmds.js'][76] = 0;
  _$jscoverage['plugins/table.cmds.js'][77] = 0;
  _$jscoverage['plugins/table.cmds.js'][78] = 0;
  _$jscoverage['plugins/table.cmds.js'][79] = 0;
  _$jscoverage['plugins/table.cmds.js'][84] = 0;
  _$jscoverage['plugins/table.cmds.js'][86] = 0;
  _$jscoverage['plugins/table.cmds.js'][87] = 0;
  _$jscoverage['plugins/table.cmds.js'][90] = 0;
  _$jscoverage['plugins/table.cmds.js'][91] = 0;
  _$jscoverage['plugins/table.cmds.js'][92] = 0;
  _$jscoverage['plugins/table.cmds.js'][93] = 0;
  _$jscoverage['plugins/table.cmds.js'][94] = 0;
  _$jscoverage['plugins/table.cmds.js'][95] = 0;
  _$jscoverage['plugins/table.cmds.js'][98] = 0;
  _$jscoverage['plugins/table.cmds.js'][100] = 0;
  _$jscoverage['plugins/table.cmds.js'][101] = 0;
  _$jscoverage['plugins/table.cmds.js'][102] = 0;
  _$jscoverage['plugins/table.cmds.js'][103] = 0;
  _$jscoverage['plugins/table.cmds.js'][105] = 0;
  _$jscoverage['plugins/table.cmds.js'][107] = 0;
  _$jscoverage['plugins/table.cmds.js'][108] = 0;
  _$jscoverage['plugins/table.cmds.js'][114] = 0;
  _$jscoverage['plugins/table.cmds.js'][116] = 0;
  _$jscoverage['plugins/table.cmds.js'][119] = 0;
  _$jscoverage['plugins/table.cmds.js'][120] = 0;
  _$jscoverage['plugins/table.cmds.js'][121] = 0;
  _$jscoverage['plugins/table.cmds.js'][122] = 0;
  _$jscoverage['plugins/table.cmds.js'][127] = 0;
  _$jscoverage['plugins/table.cmds.js'][129] = 0;
  _$jscoverage['plugins/table.cmds.js'][132] = 0;
  _$jscoverage['plugins/table.cmds.js'][133] = 0;
  _$jscoverage['plugins/table.cmds.js'][134] = 0;
  _$jscoverage['plugins/table.cmds.js'][135] = 0;
  _$jscoverage['plugins/table.cmds.js'][140] = 0;
  _$jscoverage['plugins/table.cmds.js'][142] = 0;
  _$jscoverage['plugins/table.cmds.js'][143] = 0;
  _$jscoverage['plugins/table.cmds.js'][144] = 0;
  _$jscoverage['plugins/table.cmds.js'][146] = 0;
  _$jscoverage['plugins/table.cmds.js'][149] = 0;
  _$jscoverage['plugins/table.cmds.js'][150] = 0;
  _$jscoverage['plugins/table.cmds.js'][151] = 0;
  _$jscoverage['plugins/table.cmds.js'][152] = 0;
  _$jscoverage['plugins/table.cmds.js'][153] = 0;
  _$jscoverage['plugins/table.cmds.js'][154] = 0;
  _$jscoverage['plugins/table.cmds.js'][155] = 0;
  _$jscoverage['plugins/table.cmds.js'][160] = 0;
  _$jscoverage['plugins/table.cmds.js'][162] = 0;
  _$jscoverage['plugins/table.cmds.js'][164] = 0;
  _$jscoverage['plugins/table.cmds.js'][165] = 0;
  _$jscoverage['plugins/table.cmds.js'][167] = 0;
  _$jscoverage['plugins/table.cmds.js'][170] = 0;
  _$jscoverage['plugins/table.cmds.js'][172] = 0;
  _$jscoverage['plugins/table.cmds.js'][173] = 0;
  _$jscoverage['plugins/table.cmds.js'][174] = 0;
  _$jscoverage['plugins/table.cmds.js'][175] = 0;
  _$jscoverage['plugins/table.cmds.js'][180] = 0;
  _$jscoverage['plugins/table.cmds.js'][182] = 0;
  _$jscoverage['plugins/table.cmds.js'][183] = 0;
  _$jscoverage['plugins/table.cmds.js'][184] = 0;
  _$jscoverage['plugins/table.cmds.js'][185] = 0;
  _$jscoverage['plugins/table.cmds.js'][187] = 0;
  _$jscoverage['plugins/table.cmds.js'][190] = 0;
  _$jscoverage['plugins/table.cmds.js'][191] = 0;
  _$jscoverage['plugins/table.cmds.js'][192] = 0;
  _$jscoverage['plugins/table.cmds.js'][194] = 0;
  _$jscoverage['plugins/table.cmds.js'][195] = 0;
  _$jscoverage['plugins/table.cmds.js'][198] = 0;
  _$jscoverage['plugins/table.cmds.js'][200] = 0;
  _$jscoverage['plugins/table.cmds.js'][201] = 0;
  _$jscoverage['plugins/table.cmds.js'][202] = 0;
  _$jscoverage['plugins/table.cmds.js'][203] = 0;
  _$jscoverage['plugins/table.cmds.js'][205] = 0;
  _$jscoverage['plugins/table.cmds.js'][208] = 0;
  _$jscoverage['plugins/table.cmds.js'][209] = 0;
  _$jscoverage['plugins/table.cmds.js'][210] = 0;
  _$jscoverage['plugins/table.cmds.js'][212] = 0;
  _$jscoverage['plugins/table.cmds.js'][213] = 0;
  _$jscoverage['plugins/table.cmds.js'][217] = 0;
  _$jscoverage['plugins/table.cmds.js'][219] = 0;
  _$jscoverage['plugins/table.cmds.js'][220] = 0;
  _$jscoverage['plugins/table.cmds.js'][221] = 0;
  _$jscoverage['plugins/table.cmds.js'][222] = 0;
  _$jscoverage['plugins/table.cmds.js'][223] = 0;
  _$jscoverage['plugins/table.cmds.js'][225] = 0;
  _$jscoverage['plugins/table.cmds.js'][226] = 0;
  _$jscoverage['plugins/table.cmds.js'][227] = 0;
  _$jscoverage['plugins/table.cmds.js'][231] = 0;
  _$jscoverage['plugins/table.cmds.js'][233] = 0;
  _$jscoverage['plugins/table.cmds.js'][235] = 0;
  _$jscoverage['plugins/table.cmds.js'][236] = 0;
  _$jscoverage['plugins/table.cmds.js'][239] = 0;
  _$jscoverage['plugins/table.cmds.js'][241] = 0;
  _$jscoverage['plugins/table.cmds.js'][243] = 0;
  _$jscoverage['plugins/table.cmds.js'][244] = 0;
  _$jscoverage['plugins/table.cmds.js'][245] = 0;
  _$jscoverage['plugins/table.cmds.js'][246] = 0;
  _$jscoverage['plugins/table.cmds.js'][249] = 0;
  _$jscoverage['plugins/table.cmds.js'][250] = 0;
  _$jscoverage['plugins/table.cmds.js'][252] = 0;
  _$jscoverage['plugins/table.cmds.js'][256] = 0;
  _$jscoverage['plugins/table.cmds.js'][258] = 0;
  _$jscoverage['plugins/table.cmds.js'][260] = 0;
  _$jscoverage['plugins/table.cmds.js'][261] = 0;
  _$jscoverage['plugins/table.cmds.js'][264] = 0;
  _$jscoverage['plugins/table.cmds.js'][266] = 0;
  _$jscoverage['plugins/table.cmds.js'][269] = 0;
  _$jscoverage['plugins/table.cmds.js'][270] = 0;
  _$jscoverage['plugins/table.cmds.js'][271] = 0;
  _$jscoverage['plugins/table.cmds.js'][272] = 0;
  _$jscoverage['plugins/table.cmds.js'][273] = 0;
  _$jscoverage['plugins/table.cmds.js'][274] = 0;
  _$jscoverage['plugins/table.cmds.js'][275] = 0;
  _$jscoverage['plugins/table.cmds.js'][277] = 0;
  _$jscoverage['plugins/table.cmds.js'][279] = 0;
  _$jscoverage['plugins/table.cmds.js'][285] = 0;
  _$jscoverage['plugins/table.cmds.js'][287] = 0;
  _$jscoverage['plugins/table.cmds.js'][289] = 0;
  _$jscoverage['plugins/table.cmds.js'][292] = 0;
  _$jscoverage['plugins/table.cmds.js'][294] = 0;
  _$jscoverage['plugins/table.cmds.js'][300] = 0;
  _$jscoverage['plugins/table.cmds.js'][301] = 0;
  _$jscoverage['plugins/table.cmds.js'][303] = 0;
  _$jscoverage['plugins/table.cmds.js'][304] = 0;
  _$jscoverage['plugins/table.cmds.js'][305] = 0;
  _$jscoverage['plugins/table.cmds.js'][308] = 0;
  _$jscoverage['plugins/table.cmds.js'][309] = 0;
  _$jscoverage['plugins/table.cmds.js'][313] = 0;
  _$jscoverage['plugins/table.cmds.js'][315] = 0;
  _$jscoverage['plugins/table.cmds.js'][317] = 0;
  _$jscoverage['plugins/table.cmds.js'][320] = 0;
  _$jscoverage['plugins/table.cmds.js'][322] = 0;
  _$jscoverage['plugins/table.cmds.js'][328] = 0;
  _$jscoverage['plugins/table.cmds.js'][329] = 0;
  _$jscoverage['plugins/table.cmds.js'][331] = 0;
  _$jscoverage['plugins/table.cmds.js'][332] = 0;
  _$jscoverage['plugins/table.cmds.js'][333] = 0;
  _$jscoverage['plugins/table.cmds.js'][336] = 0;
  _$jscoverage['plugins/table.cmds.js'][337] = 0;
  _$jscoverage['plugins/table.cmds.js'][340] = 0;
  _$jscoverage['plugins/table.cmds.js'][342] = 0;
  _$jscoverage['plugins/table.cmds.js'][343] = 0;
  _$jscoverage['plugins/table.cmds.js'][344] = 0;
  _$jscoverage['plugins/table.cmds.js'][348] = 0;
  _$jscoverage['plugins/table.cmds.js'][355] = 0;
  _$jscoverage['plugins/table.cmds.js'][356] = 0;
  _$jscoverage['plugins/table.cmds.js'][358] = 0;
  _$jscoverage['plugins/table.cmds.js'][359] = 0;
  _$jscoverage['plugins/table.cmds.js'][362] = 0;
  _$jscoverage['plugins/table.cmds.js'][363] = 0;
  _$jscoverage['plugins/table.cmds.js'][364] = 0;
  _$jscoverage['plugins/table.cmds.js'][365] = 0;
  _$jscoverage['plugins/table.cmds.js'][366] = 0;
  _$jscoverage['plugins/table.cmds.js'][367] = 0;
  _$jscoverage['plugins/table.cmds.js'][370] = 0;
  _$jscoverage['plugins/table.cmds.js'][371] = 0;
  _$jscoverage['plugins/table.cmds.js'][373] = 0;
  _$jscoverage['plugins/table.cmds.js'][374] = 0;
  _$jscoverage['plugins/table.cmds.js'][377] = 0;
  _$jscoverage['plugins/table.cmds.js'][380] = 0;
  _$jscoverage['plugins/table.cmds.js'][382] = 0;
  _$jscoverage['plugins/table.cmds.js'][384] = 0;
  _$jscoverage['plugins/table.cmds.js'][387] = 0;
  _$jscoverage['plugins/table.cmds.js'][389] = 0;
  _$jscoverage['plugins/table.cmds.js'][390] = 0;
  _$jscoverage['plugins/table.cmds.js'][395] = 0;
  _$jscoverage['plugins/table.cmds.js'][396] = 0;
  _$jscoverage['plugins/table.cmds.js'][398] = 0;
  _$jscoverage['plugins/table.cmds.js'][399] = 0;
  _$jscoverage['plugins/table.cmds.js'][400] = 0;
  _$jscoverage['plugins/table.cmds.js'][403] = 0;
  _$jscoverage['plugins/table.cmds.js'][406] = 0;
  _$jscoverage['plugins/table.cmds.js'][408] = 0;
  _$jscoverage['plugins/table.cmds.js'][410] = 0;
  _$jscoverage['plugins/table.cmds.js'][413] = 0;
  _$jscoverage['plugins/table.cmds.js'][415] = 0;
  _$jscoverage['plugins/table.cmds.js'][419] = 0;
  _$jscoverage['plugins/table.cmds.js'][420] = 0;
  _$jscoverage['plugins/table.cmds.js'][422] = 0;
  _$jscoverage['plugins/table.cmds.js'][423] = 0;
  _$jscoverage['plugins/table.cmds.js'][424] = 0;
  _$jscoverage['plugins/table.cmds.js'][427] = 0;
  _$jscoverage['plugins/table.cmds.js'][431] = 0;
  _$jscoverage['plugins/table.cmds.js'][433] = 0;
  _$jscoverage['plugins/table.cmds.js'][434] = 0;
  _$jscoverage['plugins/table.cmds.js'][437] = 0;
  _$jscoverage['plugins/table.cmds.js'][443] = 0;
  _$jscoverage['plugins/table.cmds.js'][444] = 0;
  _$jscoverage['plugins/table.cmds.js'][446] = 0;
  _$jscoverage['plugins/table.cmds.js'][447] = 0;
  _$jscoverage['plugins/table.cmds.js'][450] = 0;
  _$jscoverage['plugins/table.cmds.js'][453] = 0;
  _$jscoverage['plugins/table.cmds.js'][454] = 0;
  _$jscoverage['plugins/table.cmds.js'][455] = 0;
  _$jscoverage['plugins/table.cmds.js'][456] = 0;
  _$jscoverage['plugins/table.cmds.js'][457] = 0;
  _$jscoverage['plugins/table.cmds.js'][460] = 0;
  _$jscoverage['plugins/table.cmds.js'][461] = 0;
  _$jscoverage['plugins/table.cmds.js'][463] = 0;
  _$jscoverage['plugins/table.cmds.js'][464] = 0;
  _$jscoverage['plugins/table.cmds.js'][466] = 0;
  _$jscoverage['plugins/table.cmds.js'][467] = 0;
  _$jscoverage['plugins/table.cmds.js'][474] = 0;
  _$jscoverage['plugins/table.cmds.js'][476] = 0;
  _$jscoverage['plugins/table.cmds.js'][478] = 0;
  _$jscoverage['plugins/table.cmds.js'][479] = 0;
  _$jscoverage['plugins/table.cmds.js'][480] = 0;
  _$jscoverage['plugins/table.cmds.js'][481] = 0;
  _$jscoverage['plugins/table.cmds.js'][484] = 0;
  _$jscoverage['plugins/table.cmds.js'][486] = 0;
  _$jscoverage['plugins/table.cmds.js'][488] = 0;
  _$jscoverage['plugins/table.cmds.js'][489] = 0;
  _$jscoverage['plugins/table.cmds.js'][492] = 0;
  _$jscoverage['plugins/table.cmds.js'][494] = 0;
  _$jscoverage['plugins/table.cmds.js'][496] = 0;
  _$jscoverage['plugins/table.cmds.js'][497] = 0;
  _$jscoverage['plugins/table.cmds.js'][498] = 0;
  _$jscoverage['plugins/table.cmds.js'][499] = 0;
  _$jscoverage['plugins/table.cmds.js'][502] = 0;
  _$jscoverage['plugins/table.cmds.js'][504] = 0;
  _$jscoverage['plugins/table.cmds.js'][506] = 0;
  _$jscoverage['plugins/table.cmds.js'][507] = 0;
  _$jscoverage['plugins/table.cmds.js'][510] = 0;
  _$jscoverage['plugins/table.cmds.js'][512] = 0;
  _$jscoverage['plugins/table.cmds.js'][514] = 0;
  _$jscoverage['plugins/table.cmds.js'][515] = 0;
  _$jscoverage['plugins/table.cmds.js'][516] = 0;
  _$jscoverage['plugins/table.cmds.js'][517] = 0;
  _$jscoverage['plugins/table.cmds.js'][520] = 0;
  _$jscoverage['plugins/table.cmds.js'][522] = 0;
  _$jscoverage['plugins/table.cmds.js'][524] = 0;
  _$jscoverage['plugins/table.cmds.js'][525] = 0;
  _$jscoverage['plugins/table.cmds.js'][530] = 0;
  _$jscoverage['plugins/table.cmds.js'][533] = 0;
  _$jscoverage['plugins/table.cmds.js'][536] = 0;
  _$jscoverage['plugins/table.cmds.js'][538] = 0;
  _$jscoverage['plugins/table.cmds.js'][539] = 0;
  _$jscoverage['plugins/table.cmds.js'][540] = 0;
  _$jscoverage['plugins/table.cmds.js'][542] = 0;
  _$jscoverage['plugins/table.cmds.js'][543] = 0;
  _$jscoverage['plugins/table.cmds.js'][544] = 0;
  _$jscoverage['plugins/table.cmds.js'][546] = 0;
  _$jscoverage['plugins/table.cmds.js'][553] = 0;
  _$jscoverage['plugins/table.cmds.js'][555] = 0;
  _$jscoverage['plugins/table.cmds.js'][556] = 0;
  _$jscoverage['plugins/table.cmds.js'][557] = 0;
  _$jscoverage['plugins/table.cmds.js'][560] = 0;
  _$jscoverage['plugins/table.cmds.js'][563] = 0;
  _$jscoverage['plugins/table.cmds.js'][564] = 0;
  _$jscoverage['plugins/table.cmds.js'][568] = 0;
  _$jscoverage['plugins/table.cmds.js'][569] = 0;
  _$jscoverage['plugins/table.cmds.js'][570] = 0;
  _$jscoverage['plugins/table.cmds.js'][572] = 0;
  _$jscoverage['plugins/table.cmds.js'][575] = 0;
  _$jscoverage['plugins/table.cmds.js'][576] = 0;
  _$jscoverage['plugins/table.cmds.js'][577] = 0;
  _$jscoverage['plugins/table.cmds.js'][578] = 0;
  _$jscoverage['plugins/table.cmds.js'][579] = 0;
  _$jscoverage['plugins/table.cmds.js'][582] = 0;
  _$jscoverage['plugins/table.cmds.js'][583] = 0;
  _$jscoverage['plugins/table.cmds.js'][586] = 0;
  _$jscoverage['plugins/table.cmds.js'][587] = 0;
  _$jscoverage['plugins/table.cmds.js'][588] = 0;
  _$jscoverage['plugins/table.cmds.js'][590] = 0;
  _$jscoverage['plugins/table.cmds.js'][592] = 0;
  _$jscoverage['plugins/table.cmds.js'][593] = 0;
  _$jscoverage['plugins/table.cmds.js'][594] = 0;
  _$jscoverage['plugins/table.cmds.js'][599] = 0;
  _$jscoverage['plugins/table.cmds.js'][600] = 0;
  _$jscoverage['plugins/table.cmds.js'][605] = 0;
  _$jscoverage['plugins/table.cmds.js'][607] = 0;
  _$jscoverage['plugins/table.cmds.js'][608] = 0;
  _$jscoverage['plugins/table.cmds.js'][609] = 0;
  _$jscoverage['plugins/table.cmds.js'][610] = 0;
  _$jscoverage['plugins/table.cmds.js'][613] = 0;
  _$jscoverage['plugins/table.cmds.js'][616] = 0;
  _$jscoverage['plugins/table.cmds.js'][617] = 0;
  _$jscoverage['plugins/table.cmds.js'][622] = 0;
  _$jscoverage['plugins/table.cmds.js'][623] = 0;
  _$jscoverage['plugins/table.cmds.js'][627] = 0;
  _$jscoverage['plugins/table.cmds.js'][628] = 0;
  _$jscoverage['plugins/table.cmds.js'][630] = 0;
  _$jscoverage['plugins/table.cmds.js'][631] = 0;
  _$jscoverage['plugins/table.cmds.js'][634] = 0;
  _$jscoverage['plugins/table.cmds.js'][635] = 0;
  _$jscoverage['plugins/table.cmds.js'][637] = 0;
  _$jscoverage['plugins/table.cmds.js'][641] = 0;
  _$jscoverage['plugins/table.cmds.js'][642] = 0;
  _$jscoverage['plugins/table.cmds.js'][643] = 0;
  _$jscoverage['plugins/table.cmds.js'][645] = 0;
  _$jscoverage['plugins/table.cmds.js'][648] = 0;
  _$jscoverage['plugins/table.cmds.js'][649] = 0;
  _$jscoverage['plugins/table.cmds.js'][651] = 0;
  _$jscoverage['plugins/table.cmds.js'][653] = 0;
  _$jscoverage['plugins/table.cmds.js'][656] = 0;
  _$jscoverage['plugins/table.cmds.js'][657] = 0;
  _$jscoverage['plugins/table.cmds.js'][658] = 0;
  _$jscoverage['plugins/table.cmds.js'][659] = 0;
  _$jscoverage['plugins/table.cmds.js'][660] = 0;
  _$jscoverage['plugins/table.cmds.js'][665] = 0;
  _$jscoverage['plugins/table.cmds.js'][666] = 0;
  _$jscoverage['plugins/table.cmds.js'][672] = 0;
  _$jscoverage['plugins/table.cmds.js'][674] = 0;
  _$jscoverage['plugins/table.cmds.js'][677] = 0;
  _$jscoverage['plugins/table.cmds.js'][680] = 0;
  _$jscoverage['plugins/table.cmds.js'][681] = 0;
  _$jscoverage['plugins/table.cmds.js'][683] = 0;
  _$jscoverage['plugins/table.cmds.js'][684] = 0;
  _$jscoverage['plugins/table.cmds.js'][686] = 0;
  _$jscoverage['plugins/table.cmds.js'][687] = 0;
  _$jscoverage['plugins/table.cmds.js'][689] = 0;
  _$jscoverage['plugins/table.cmds.js'][691] = 0;
  _$jscoverage['plugins/table.cmds.js'][692] = 0;
  _$jscoverage['plugins/table.cmds.js'][702] = 0;
  _$jscoverage['plugins/table.cmds.js'][704] = 0;
  _$jscoverage['plugins/table.cmds.js'][705] = 0;
  _$jscoverage['plugins/table.cmds.js'][708] = 0;
  _$jscoverage['plugins/table.cmds.js'][710] = 0;
  _$jscoverage['plugins/table.cmds.js'][715] = 0;
  _$jscoverage['plugins/table.cmds.js'][717] = 0;
  _$jscoverage['plugins/table.cmds.js'][719] = 0;
  _$jscoverage['plugins/table.cmds.js'][726] = 0;
  _$jscoverage['plugins/table.cmds.js'][728] = 0;
  _$jscoverage['plugins/table.cmds.js'][729] = 0;
  _$jscoverage['plugins/table.cmds.js'][731] = 0;
  _$jscoverage['plugins/table.cmds.js'][734] = 0;
  _$jscoverage['plugins/table.cmds.js'][738] = 0;
  _$jscoverage['plugins/table.cmds.js'][739] = 0;
  _$jscoverage['plugins/table.cmds.js'][745] = 0;
  _$jscoverage['plugins/table.cmds.js'][747] = 0;
  _$jscoverage['plugins/table.cmds.js'][750] = 0;
  _$jscoverage['plugins/table.cmds.js'][752] = 0;
  _$jscoverage['plugins/table.cmds.js'][753] = 0;
  _$jscoverage['plugins/table.cmds.js'][757] = 0;
  _$jscoverage['plugins/table.cmds.js'][758] = 0;
  _$jscoverage['plugins/table.cmds.js'][764] = 0;
  _$jscoverage['plugins/table.cmds.js'][766] = 0;
  _$jscoverage['plugins/table.cmds.js'][769] = 0;
  _$jscoverage['plugins/table.cmds.js'][772] = 0;
  _$jscoverage['plugins/table.cmds.js'][773] = 0;
  _$jscoverage['plugins/table.cmds.js'][775] = 0;
  _$jscoverage['plugins/table.cmds.js'][776] = 0;
  _$jscoverage['plugins/table.cmds.js'][779] = 0;
  _$jscoverage['plugins/table.cmds.js'][780] = 0;
  _$jscoverage['plugins/table.cmds.js'][785] = 0;
  _$jscoverage['plugins/table.cmds.js'][787] = 0;
  _$jscoverage['plugins/table.cmds.js'][789] = 0;
  _$jscoverage['plugins/table.cmds.js'][790] = 0;
  _$jscoverage['plugins/table.cmds.js'][792] = 0;
  _$jscoverage['plugins/table.cmds.js'][793] = 0;
  _$jscoverage['plugins/table.cmds.js'][795] = 0;
  _$jscoverage['plugins/table.cmds.js'][798] = 0;
  _$jscoverage['plugins/table.cmds.js'][805] = 0;
  _$jscoverage['plugins/table.cmds.js'][806] = 0;
  _$jscoverage['plugins/table.cmds.js'][810] = 0;
  _$jscoverage['plugins/table.cmds.js'][812] = 0;
  _$jscoverage['plugins/table.cmds.js'][815] = 0;
  _$jscoverage['plugins/table.cmds.js'][816] = 0;
  _$jscoverage['plugins/table.cmds.js'][819] = 0;
  _$jscoverage['plugins/table.cmds.js'][821] = 0;
  _$jscoverage['plugins/table.cmds.js'][824] = 0;
  _$jscoverage['plugins/table.cmds.js'][825] = 0;
  _$jscoverage['plugins/table.cmds.js'][826] = 0;
  _$jscoverage['plugins/table.cmds.js'][827] = 0;
  _$jscoverage['plugins/table.cmds.js'][831] = 0;
  _$jscoverage['plugins/table.cmds.js'][833] = 0;
  _$jscoverage['plugins/table.cmds.js'][834] = 0;
  _$jscoverage['plugins/table.cmds.js'][835] = 0;
  _$jscoverage['plugins/table.cmds.js'][836] = 0;
  _$jscoverage['plugins/table.cmds.js'][838] = 0;
  _$jscoverage['plugins/table.cmds.js'][841] = 0;
  _$jscoverage['plugins/table.cmds.js'][843] = 0;
  _$jscoverage['plugins/table.cmds.js'][847] = 0;
  _$jscoverage['plugins/table.cmds.js'][849] = 0;
  _$jscoverage['plugins/table.cmds.js'][850] = 0;
  _$jscoverage['plugins/table.cmds.js'][851] = 0;
  _$jscoverage['plugins/table.cmds.js'][852] = 0;
  _$jscoverage['plugins/table.cmds.js'][855] = 0;
  _$jscoverage['plugins/table.cmds.js'][857] = 0;
  _$jscoverage['plugins/table.cmds.js'][861] = 0;
  _$jscoverage['plugins/table.cmds.js'][862] = 0;
  _$jscoverage['plugins/table.cmds.js'][863] = 0;
  _$jscoverage['plugins/table.cmds.js'][864] = 0;
  _$jscoverage['plugins/table.cmds.js'][866] = 0;
  _$jscoverage['plugins/table.cmds.js'][867] = 0;
  _$jscoverage['plugins/table.cmds.js'][872] = 0;
  _$jscoverage['plugins/table.cmds.js'][873] = 0;
  _$jscoverage['plugins/table.cmds.js'][874] = 0;
  _$jscoverage['plugins/table.cmds.js'][875] = 0;
  _$jscoverage['plugins/table.cmds.js'][877] = 0;
  _$jscoverage['plugins/table.cmds.js'][878] = 0;
  _$jscoverage['plugins/table.cmds.js'][879] = 0;
  _$jscoverage['plugins/table.cmds.js'][880] = 0;
  _$jscoverage['plugins/table.cmds.js'][885] = 0;
  _$jscoverage['plugins/table.cmds.js'][886] = 0;
  _$jscoverage['plugins/table.cmds.js'][887] = 0;
  _$jscoverage['plugins/table.cmds.js'][890] = 0;
  _$jscoverage['plugins/table.cmds.js'][891] = 0;
  _$jscoverage['plugins/table.cmds.js'][892] = 0;
  _$jscoverage['plugins/table.cmds.js'][893] = 0;
  _$jscoverage['plugins/table.cmds.js'][894] = 0;
  _$jscoverage['plugins/table.cmds.js'][896] = 0;
}
_$jscoverage['plugins/table.cmds.js'].source = ["<span class=\"c\">/*</span>","<span class=\"c\"> * Created with JetBrains PhpStorm.</span>","<span class=\"c\"> * User: taoqili</span>","<span class=\"c\"> * Date: 13-2-20</span>","<span class=\"c\"> * Time: &#19979;&#21320;6:25</span>","<span class=\"c\"> * To change this template use File | Settings | File Templates.</span>","<span class=\"c\"> */</span>","<span class=\"k\">;</span>","<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","    <span class=\"k\">var</span> UT <span class=\"k\">=</span> UE<span class=\"k\">.</span>UETable<span class=\"k\">,</span>","        getTableItemsByRange <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> UT<span class=\"k\">.</span>getTableItemsByRange<span class=\"k\">(</span>editor<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getUETableBySelected <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> UT<span class=\"k\">.</span>getUETableBySelected<span class=\"k\">(</span>editor<span class=\"k\">)</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getDefaultValue <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>editor<span class=\"k\">,</span> table<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> UT<span class=\"k\">.</span>getDefaultValue<span class=\"k\">(</span>editor<span class=\"k\">,</span> table<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        getUETable <span class=\"k\">=</span> <span class=\"k\">function</span> <span class=\"k\">(</span>tdOrTable<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> UT<span class=\"k\">.</span>getUETable<span class=\"k\">(</span>tdOrTable<span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">;</span>","","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'inserttable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">:</span> <span class=\"s\">0</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> opt<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">function</span> createTable<span class=\"k\">(</span>opt<span class=\"k\">,</span> tdWidth<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> html <span class=\"k\">=</span> <span class=\"k\">[],</span>","                    rowsNum <span class=\"k\">=</span> opt<span class=\"k\">.</span>numRows<span class=\"k\">,</span>","                    colsNum <span class=\"k\">=</span> opt<span class=\"k\">.</span>numCols<span class=\"k\">;</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> r <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span> r <span class=\"k\">&lt;</span> rowsNum<span class=\"k\">;</span> r<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    html<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"s\">'&lt;tr&gt;'</span><span class=\"k\">);</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> c <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">;</span> c <span class=\"k\">&lt;</span> colsNum<span class=\"k\">;</span> c<span class=\"k\">++)</span> <span class=\"k\">{</span>","                        html<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"s\">'&lt;td width=\"'</span> <span class=\"k\">+</span> tdWidth <span class=\"k\">+</span> <span class=\"s\">'\"  vAlign=\"'</span> <span class=\"k\">+</span> opt<span class=\"k\">.</span>tdvalign <span class=\"k\">+</span> <span class=\"s\">'\" &gt;'</span> <span class=\"k\">+</span> <span class=\"k\">(</span>browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> domUtils<span class=\"k\">.</span>fillChar <span class=\"k\">:</span> <span class=\"s\">'&lt;br/&gt;'</span><span class=\"k\">)</span> <span class=\"k\">+</span> <span class=\"s\">'&lt;/td&gt;'</span><span class=\"k\">)</span>","                    <span class=\"k\">}</span>","                    html<span class=\"k\">.</span>push<span class=\"k\">(</span><span class=\"s\">'&lt;/tr&gt;'</span><span class=\"k\">)</span>","                <span class=\"k\">}</span>","                <span class=\"c\">//&#31105;&#27490;&#25351;&#23450;table-width</span>","                <span class=\"k\">return</span> <span class=\"s\">'&lt;table&gt;&lt;tbody&gt;'</span> <span class=\"k\">+</span> html<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;/tbody&gt;&lt;/table&gt;'</span>","            <span class=\"k\">}</span>","","            <span class=\"k\">if</span> <span class=\"k\">(!</span>opt<span class=\"k\">)</span> <span class=\"k\">{</span>","                opt <span class=\"k\">=</span> utils<span class=\"k\">.</span>extend<span class=\"k\">(</span><span class=\"k\">{}</span><span class=\"k\">,</span> <span class=\"k\">{</span>","                    numCols<span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>defaultCols<span class=\"k\">,</span>","                    numRows<span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>defaultRows<span class=\"k\">,</span>","                    tdvalign<span class=\"k\">:</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>tdvalign","                <span class=\"k\">}</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\">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>","                start <span class=\"k\">=</span> range<span class=\"k\">.</span>startContainer<span class=\"k\">,</span>","                firstParentBlock <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParent<span class=\"k\">(</span>start<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">return</span> domUtils<span class=\"k\">.</span>isBlockElm<span class=\"k\">(</span>node<span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">)</span> <span class=\"k\">||</span> me<span class=\"k\">.</span>body<span class=\"k\">;</span>","","            <span class=\"k\">var</span> defaultValue <span class=\"k\">=</span> getDefaultValue<span class=\"k\">(</span>me<span class=\"k\">),</span>","                tableWidth <span class=\"k\">=</span> firstParentBlock<span class=\"k\">.</span>offsetWidth<span class=\"k\">,</span>","                tdWidth <span class=\"k\">=</span> Math<span class=\"k\">.</span>floor<span class=\"k\">(</span>tableWidth <span class=\"k\">/</span> opt<span class=\"k\">.</span>numCols <span class=\"k\">-</span> defaultValue<span class=\"k\">.</span>tdPadding <span class=\"k\">*</span> <span class=\"s\">2</span> <span class=\"k\">-</span> defaultValue<span class=\"k\">.</span>tdBorder<span class=\"k\">);</span>","","            <span class=\"c\">//todo&#20854;&#20182;&#23646;&#24615;</span>","            <span class=\"k\">!</span>opt<span class=\"k\">.</span>tdvalign <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>opt<span class=\"k\">.</span>tdvalign <span class=\"k\">=</span> me<span class=\"k\">.</span>options<span class=\"k\">.</span>tdvalign<span class=\"k\">);</span>","            me<span class=\"k\">.</span>execCommand<span class=\"k\">(</span><span class=\"s\">\"inserthtml\"</span><span class=\"k\">,</span> createTable<span class=\"k\">(</span>opt<span class=\"k\">,</span> tdWidth<span class=\"k\">));</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'insertparagraphbeforetable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> p <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">\"p\"</span><span class=\"k\">);</span>","                p<span class=\"k\">.</span>innerHTML <span class=\"k\">=</span> browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> <span class=\"s\">'&amp;nbsp;'</span> <span class=\"k\">:</span> <span class=\"s\">'&lt;br /&gt;'</span><span class=\"k\">;</span>","                table<span class=\"k\">.</span>parentNode<span class=\"k\">.</span>insertBefore<span class=\"k\">(</span>p<span class=\"k\">,</span> table<span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>setStart<span class=\"k\">(</span>p<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'deletetable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <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\">return</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>rng<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"s\">'table'</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> table<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","            table <span class=\"k\">=</span> table <span class=\"k\">||</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>rng<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"s\">'table'</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> next <span class=\"k\">=</span> table<span class=\"k\">.</span>nextSibling<span class=\"k\">;</span>","                <span class=\"k\">if</span> <span class=\"k\">(!</span>next<span class=\"k\">)</span> <span class=\"k\">{</span>","                    next <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">,</span> <span class=\"s\">'p'</span><span class=\"k\">,</span> <span class=\"k\">{</span>","                        <span class=\"s\">'innerHTML'</span><span class=\"k\">:</span> browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> domUtils<span class=\"k\">.</span>fillChar <span class=\"k\">:</span> <span class=\"s\">'&lt;br/&gt;'</span>","                    <span class=\"k\">}</span><span class=\"k\">);</span>","                    table<span class=\"k\">.</span>parentNode<span class=\"k\">.</span>insertBefore<span class=\"k\">(</span>next<span class=\"k\">,</span> table<span class=\"k\">);</span>","                <span class=\"k\">}</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>table<span class=\"k\">);</span>","                rng <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>next<span class=\"k\">.</span>nodeType <span class=\"k\">==</span> <span class=\"s\">3</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStartBefore<span class=\"k\">(</span>next<span class=\"k\">)</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStart<span class=\"k\">(</span>next<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">)</span>","                <span class=\"k\">}</span>","                rng<span class=\"k\">.</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><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\">\"tablehasdeleted\"</span><span class=\"k\">)</span>","","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'cellalign'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>length <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> align<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> selectedTds <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>selectedTds<span class=\"k\">.</span>length<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> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> selectedTds<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                    ci<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">'align'</span><span class=\"k\">,</span> align<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'cellvalign'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>length <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> valign<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> selectedTds <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>selectedTds<span class=\"k\">.</span>length<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> ci<span class=\"k\">;</span> ci <span class=\"k\">=</span> selectedTds<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                    ci<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">'vAlign'</span><span class=\"k\">,</span> valign<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'insertcaption'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'caption'</span><span class=\"k\">).</span>length <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=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> caption <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">.</span>createElement<span class=\"k\">(</span><span class=\"s\">'caption'</span><span class=\"k\">);</span>","                caption<span class=\"k\">.</span>innerHTML <span class=\"k\">=</span> browser<span class=\"k\">.</span>ie <span class=\"k\">?</span> domUtils<span class=\"k\">.</span>fillChar <span class=\"k\">:</span> <span class=\"s\">'&lt;br/&gt;'</span><span class=\"k\">;</span>","                table<span class=\"k\">.</span>insertBefore<span class=\"k\">(</span>caption<span class=\"k\">,</span> table<span class=\"k\">.</span>firstChild<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>","                range<span class=\"k\">.</span>setStart<span class=\"k\">(</span>caption<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'deletecaption'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                table <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>rng<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"s\">'table'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'caption'</span><span class=\"k\">).</span>length <span class=\"k\">==</span> <span class=\"s\">0</span> <span class=\"k\">?</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">:</span> <span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                table <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>rng<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"s\">'table'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'caption'</span><span class=\"k\">)[</span><span class=\"s\">0</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>","                range<span class=\"k\">.</span>setStart<span class=\"k\">(</span>table<span class=\"k\">.</span>rows<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">].</span>cells<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">],</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">();</span>","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'inserttitle'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> firstRow <span class=\"k\">=</span> table<span class=\"k\">.</span>rows<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">];</span>","                <span class=\"k\">return</span> firstRow<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'th'</span><span class=\"k\">).</span>length <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=\"s\">1</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                getUETable<span class=\"k\">(</span>table<span class=\"k\">).</span>insertRow<span class=\"k\">(</span><span class=\"s\">0</span><span class=\"k\">,</span> <span class=\"s\">'th'</span><span class=\"k\">);</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> th <span class=\"k\">=</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'th'</span><span class=\"k\">)[</span><span class=\"s\">0</span><span class=\"k\">];</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>setStart<span class=\"k\">(</span>th<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'deletetitle'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> firstRow <span class=\"k\">=</span> table<span class=\"k\">.</span>rows<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">];</span>","                <span class=\"k\">return</span> firstRow<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'th'</span><span class=\"k\">).</span>length <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>table<span class=\"k\">.</span>rows<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">])</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> td <span class=\"k\">=</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'td'</span><span class=\"k\">)[</span><span class=\"s\">0</span><span class=\"k\">];</span>","            <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>setStart<span class=\"k\">(</span>td<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"mergeright\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">),</span>","                rightColIndex <span class=\"k\">=</span> cellInfo<span class=\"k\">.</span>colIndex <span class=\"k\">+</span> cellInfo<span class=\"k\">.</span>colSpan<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>rightColIndex <span class=\"k\">&gt;=</span> ut<span class=\"k\">.</span>colsNum<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> rightCellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>indexTable<span class=\"k\">[</span>cellInfo<span class=\"k\">.</span>rowIndex<span class=\"k\">][</span>rightColIndex<span class=\"k\">];</span>","            <span class=\"k\">return</span> <span class=\"k\">(</span>rightCellInfo<span class=\"k\">.</span>rowIndex <span class=\"k\">==</span> cellInfo<span class=\"k\">.</span>rowIndex","                <span class=\"k\">&amp;&amp;</span> rightCellInfo<span class=\"k\">.</span>rowSpan <span class=\"k\">==</span> cellInfo<span class=\"k\">.</span>rowSpan<span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>mergeRight<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"mergedown\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>cell <span class=\"k\">||</span> cell<span class=\"k\">.</span>tagName <span class=\"k\">==</span> <span class=\"s\">\"TH\"</span><span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">),</span>","                downRowIndex <span class=\"k\">=</span> cellInfo<span class=\"k\">.</span>rowIndex <span class=\"k\">+</span> cellInfo<span class=\"k\">.</span>rowSpan<span class=\"k\">;</span>","            <span class=\"c\">// &#22914;&#26524;&#22788;&#20110;&#26368;&#19979;&#36793;&#21017;&#19981;&#33021;f&#21521;&#21491;&#21512;&#24182;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>downRowIndex <span class=\"k\">&gt;=</span> ut<span class=\"k\">.</span>rowsNum<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> downCellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>indexTable<span class=\"k\">[</span>downRowIndex<span class=\"k\">][</span>cellInfo<span class=\"k\">.</span>colIndex<span class=\"k\">];</span>","            <span class=\"c\">// &#24403;&#19988;&#20165;&#24403;&#20004;&#20010;Cell&#30340;&#24320;&#22987;&#21015;&#21495;&#21644;&#32467;&#26463;&#21015;&#21495;&#19968;&#33268;&#26102;&#33021;&#36827;&#34892;&#21512;&#24182;</span>","            <span class=\"k\">return</span> <span class=\"k\">(</span>downCellInfo<span class=\"k\">.</span>colIndex <span class=\"k\">==</span> cellInfo<span class=\"k\">.</span>colIndex","                <span class=\"k\">&amp;&amp;</span> downCellInfo<span class=\"k\">.</span>colSpan <span class=\"k\">==</span> cellInfo<span class=\"k\">.</span>colSpan<span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">.</span>tagName <span class=\"k\">!==</span> <span class=\"s\">'TH'</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>mergeDown<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"mergecells\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getUETableBySelected<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut <span class=\"k\">&amp;&amp;</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> cell <span class=\"k\">=</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">];</span>","                ut<span class=\"k\">.</span>mergeRange<span class=\"k\">();</span>","                <span class=\"k\">var</span> rng <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>domUtils<span class=\"k\">.</span>isEmptyBlock<span class=\"k\">(</span>cell<span class=\"k\">))</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStart<span class=\"k\">(</span>cell<span class=\"k\">,</span> <span class=\"s\">0</span><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\">else</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>selectNodeContents<span class=\"k\">(</span>cell<span class=\"k\">)</span>","                <span class=\"k\">}</span>","                rng<span class=\"k\">.</span>select<span class=\"k\">();</span>","            <span class=\"k\">}</span>","","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"insertrow\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> cell<span class=\"k\">.</span>tagName <span class=\"k\">==</span> <span class=\"s\">\"TD\"</span> <span class=\"k\">&amp;&amp;</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">).</span>rowsNum <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>maxRowNum <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">,</span>","                table <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>table<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>table<span class=\"k\">),</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            <span class=\"c\">//ut.insertRow(!ut.selectedTds.length ? cellInfo.rowIndex:ut.cellsRange.beginRowIndex,'');</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>insertRow<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>rowIndex<span class=\"k\">,</span> cell<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> range <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<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> len <span class=\"k\">=</span> range<span class=\"k\">.</span>endRowIndex <span class=\"k\">-</span> range<span class=\"k\">.</span>beginRowIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i <span class=\"k\">&lt;</span> len<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>insertRow<span class=\"k\">(</span>range<span class=\"k\">.</span>beginRowIndex<span class=\"k\">,</span> cell<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">)</span> <span class=\"k\">===</span> <span class=\"s\">\"enabled\"</span><span class=\"k\">)</span><span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">\"interlacetable\"</span><span class=\"k\">,</span> table<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"c\">//&#21518;&#25554;&#20837;&#34892;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"insertrownext\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>cell<span class=\"k\">.</span>tagName <span class=\"k\">==</span> <span class=\"s\">\"TD\"</span><span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">).</span>rowsNum <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>maxRowNum <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">,</span>","                table <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>table<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>table<span class=\"k\">),</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            <span class=\"c\">//ut.insertRow(!ut.selectedTds.length? cellInfo.rowIndex + cellInfo.rowSpan : ut.cellsRange.endRowIndex + 1,'');</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>insertRow<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>rowIndex <span class=\"k\">+</span> cellInfo<span class=\"k\">.</span>rowSpan<span class=\"k\">,</span> cell<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> range <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<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> len <span class=\"k\">=</span> range<span class=\"k\">.</span>endRowIndex <span class=\"k\">-</span> range<span class=\"k\">.</span>beginRowIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i <span class=\"k\">&lt;</span> len<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>insertRow<span class=\"k\">(</span>range<span class=\"k\">.</span>endRowIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">,</span> cell<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">)</span> <span class=\"k\">===</span> <span class=\"s\">\"enabled\"</span><span class=\"k\">)</span><span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">\"interlacetable\"</span><span class=\"k\">,</span> table<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"deleterow\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                cellsRange <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">,</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                preCell <span class=\"k\">=</span> ut<span class=\"k\">.</span>getVSideCell<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                nextCell <span class=\"k\">=</span> ut<span class=\"k\">.</span>getVSideCell<span class=\"k\">(</span>cell<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">),</span>","                rng <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>utils<span class=\"k\">.</span>isEmptyObject<span class=\"k\">(</span>cellsRange<span class=\"k\">))</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>deleteRow<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>rowIndex<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> cellsRange<span class=\"k\">.</span>beginRowIndex<span class=\"k\">;</span> i <span class=\"k\">&lt;</span> cellsRange<span class=\"k\">.</span>endRowIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>deleteRow<span class=\"k\">(</span>cellsRange<span class=\"k\">.</span>beginRowIndex<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> ut<span class=\"k\">.</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'td'</span><span class=\"k\">).</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> nextSibling <span class=\"k\">=</span> table<span class=\"k\">.</span>nextSibling<span class=\"k\">;</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>table<span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>nextSibling<span class=\"k\">)</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStart<span class=\"k\">(</span>nextSibling<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>rowSpan <span class=\"k\">==</span> <span class=\"s\">1</span> <span class=\"k\">||</span> cellInfo<span class=\"k\">.</span>rowSpan <span class=\"k\">==</span> cellsRange<span class=\"k\">.</span>endRowIndex <span class=\"k\">-</span> cellsRange<span class=\"k\">.</span>beginRowIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>nextCell <span class=\"k\">||</span> preCell<span class=\"k\">)</span> rng<span class=\"k\">.</span>selectNodeContents<span class=\"k\">(</span>nextCell <span class=\"k\">||</span> preCell<span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> newCell <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCell<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>rowIndex<span class=\"k\">,</span> ut<span class=\"k\">.</span>indexTable<span class=\"k\">[</span>cellInfo<span class=\"k\">.</span>rowIndex<span class=\"k\">][</span>cellInfo<span class=\"k\">.</span>colIndex<span class=\"k\">].</span>cellIndex<span class=\"k\">);</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>newCell<span class=\"k\">)</span> rng<span class=\"k\">.</span>selectNodeContents<span class=\"k\">(</span>newCell<span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><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>table<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">)</span> <span class=\"k\">===</span> <span class=\"s\">\"enabled\"</span><span class=\"k\">)</span><span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">\"interlacetable\"</span><span class=\"k\">,</span> table<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"insertcol\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>cell<span class=\"k\">.</span>tagName <span class=\"k\">==</span> <span class=\"s\">\"TD\"</span> <span class=\"k\">||</span> cell<span class=\"k\">.</span>tagName <span class=\"k\">==</span> <span class=\"s\">'TH'</span><span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">).</span>colsNum <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>maxColNum <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>queryCommandState<span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">==</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">)</span><span class=\"k\">return</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">);</span>","","            <span class=\"c\">//ut.insertCol(!ut.selectedTds.length ? cellInfo.colIndex:ut.cellsRange.beginColIndex);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>insertCol<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>colIndex<span class=\"k\">,</span> cell<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> range <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<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> len <span class=\"k\">=</span> range<span class=\"k\">.</span>endColIndex <span class=\"k\">-</span> range<span class=\"k\">.</span>beginColIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i <span class=\"k\">&lt;</span> len<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>insertCol<span class=\"k\">(</span>range<span class=\"k\">.</span>beginColIndex<span class=\"k\">,</span> cell<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"insertcolnext\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">).</span>colsNum <span class=\"k\">&lt;</span> <span class=\"k\">this</span><span class=\"k\">.</span>options<span class=\"k\">.</span>maxColNum <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            <span class=\"c\">//ut.insertCol(!ut.selectedTds.length ? cellInfo.colIndex + cellInfo.colSpan:ut.cellsRange.endColIndex +1);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>insertCol<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>colIndex <span class=\"k\">+</span> cellInfo<span class=\"k\">.</span>colSpan<span class=\"k\">,</span> cell<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> range <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<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> len <span class=\"k\">=</span> range<span class=\"k\">.</span>endColIndex <span class=\"k\">-</span> range<span class=\"k\">.</span>beginColIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i <span class=\"k\">&lt;</span> len<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>insertCol<span class=\"k\">(</span>range<span class=\"k\">.</span>endColIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">,</span> cell<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"deletecol\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                range <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">,</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                preCell <span class=\"k\">=</span> ut<span class=\"k\">.</span>getHSideCell<span class=\"k\">(</span>cell<span class=\"k\">),</span>","                nextCell <span class=\"k\">=</span> ut<span class=\"k\">.</span>getHSideCell<span class=\"k\">(</span>cell<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>utils<span class=\"k\">.</span>isEmptyObject<span class=\"k\">(</span>range<span class=\"k\">))</span> <span class=\"k\">{</span>","                ut<span class=\"k\">.</span>deleteCol<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>colIndex<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> range<span class=\"k\">.</span>beginColIndex<span class=\"k\">;</span> i <span class=\"k\">&lt;</span> range<span class=\"k\">.</span>endColIndex <span class=\"k\">+</span> <span class=\"s\">1</span><span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                    ut<span class=\"k\">.</span>deleteCol<span class=\"k\">(</span>range<span class=\"k\">.</span>beginColIndex<span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> ut<span class=\"k\">.</span>table<span class=\"k\">,</span>","                rng <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>table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'td'</span><span class=\"k\">).</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> nextSibling <span class=\"k\">=</span> table<span class=\"k\">.</span>nextSibling<span class=\"k\">;</span>","                domUtils<span class=\"k\">.</span>remove<span class=\"k\">(</span>table<span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>nextSibling<span class=\"k\">)</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStart<span class=\"k\">(</span>nextSibling<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>domUtils<span class=\"k\">.</span>inDoc<span class=\"k\">(</span>cell<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">))</span> <span class=\"k\">{</span>","                    rng<span class=\"k\">.</span>setStart<span class=\"k\">(</span>cell<span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>nextCell <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>inDoc<span class=\"k\">(</span>nextCell<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">))</span> <span class=\"k\">{</span>","                        rng<span class=\"k\">.</span>selectNodeContents<span class=\"k\">(</span>nextCell<span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">false</span><span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        <span class=\"k\">if</span> <span class=\"k\">(</span>preCell <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>inDoc<span class=\"k\">(</span>preCell<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">.</span>document<span class=\"k\">))</span> <span class=\"k\">{</span>","                            rng<span class=\"k\">.</span>selectNodeContents<span class=\"k\">(</span>preCell<span class=\"k\">).</span>setCursor<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">,</span> <span class=\"k\">true</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>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"splittocells\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span>cell<span class=\"k\">.</span>colSpan <span class=\"k\">&gt;</span> <span class=\"s\">1</span> <span class=\"k\">||</span> cell<span class=\"k\">.</span>rowSpan <span class=\"k\">&gt;</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>splitToCells<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"splittorows\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> cell<span class=\"k\">.</span>rowSpan <span class=\"k\">&gt;</span> <span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>splitToRows<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"splittocols\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> cell <span class=\"k\">&amp;&amp;</span> cell<span class=\"k\">.</span>colSpan <span class=\"k\">&gt;</span> <span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> rng<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>splitToCols<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            rng<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"adaptbytext\"</span><span class=\"k\">]</span> <span class=\"k\">=</span>","        UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"adaptbywindow\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","            queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","                <span class=\"k\">var</span> tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                    table <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>table<span class=\"k\">;</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>cmd <span class=\"k\">==</span> <span class=\"s\">'adaptbywindow'</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        resetTdWidth<span class=\"k\">(</span>table<span class=\"k\">,</span> <span class=\"k\">this</span><span class=\"k\">);</span>","                    <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                        <span class=\"k\">var</span> cells <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>table<span class=\"k\">,</span> <span class=\"s\">\"td th\"</span><span class=\"k\">);</span>","                        utils<span class=\"k\">.</span>each<span class=\"k\">(</span>cells<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","                            cell<span class=\"k\">.</span>removeAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</span><span class=\"k\">);</span>","                        <span class=\"k\">}</span><span class=\"k\">);</span>","                        table<span class=\"k\">.</span>removeAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</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=\"c\">//&#24179;&#22343;&#20998;&#37197;&#21508;&#21015;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'averagedistributecol'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> ut<span class=\"k\">.</span>isFullRow<span class=\"k\">()</span> <span class=\"k\">||</span> ut<span class=\"k\">.</span>isFullCol<span class=\"k\">()</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<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>","                ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span>me<span class=\"k\">);</span>","","            <span class=\"k\">function</span> getAverageWidth<span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> tb <span class=\"k\">=</span> ut<span class=\"k\">.</span>table<span class=\"k\">,</span>","                    averageWidth<span class=\"k\">,</span> sumWidth <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span> colsNum <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span>","                    tbAttr <span class=\"k\">=</span> getDefaultValue<span class=\"k\">(</span>me<span class=\"k\">,</span> tb<span class=\"k\">);</span>","","                <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>isFullRow<span class=\"k\">())</span> <span class=\"k\">{</span>","                    sumWidth <span class=\"k\">=</span> tb<span class=\"k\">.</span>offsetWidth<span class=\"k\">;</span>","                    colsNum <span class=\"k\">=</span> ut<span class=\"k\">.</span>colsNum<span class=\"k\">;</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> begin <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">.</span>beginColIndex<span class=\"k\">,</span>","                        end <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">.</span>endColIndex<span class=\"k\">,</span>","                        node<span class=\"k\">;</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> begin<span class=\"k\">;</span> i <span class=\"k\">&lt;=</span> end<span class=\"k\">;)</span> <span class=\"k\">{</span>","                        node <span class=\"k\">=</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">[</span>i<span class=\"k\">];</span>","                        sumWidth <span class=\"k\">+=</span> node<span class=\"k\">.</span>offsetWidth<span class=\"k\">;</span>","                        i <span class=\"k\">+=</span> node<span class=\"k\">.</span>colSpan<span class=\"k\">;</span>","                        colsNum <span class=\"k\">+=</span> <span class=\"s\">1</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                <span class=\"k\">}</span>","                averageWidth <span class=\"k\">=</span> Math<span class=\"k\">.</span>ceil<span class=\"k\">(</span>sumWidth <span class=\"k\">/</span> colsNum<span class=\"k\">)</span> <span class=\"k\">-</span> tbAttr<span class=\"k\">.</span>tdBorder <span class=\"k\">*</span> <span class=\"s\">2</span> <span class=\"k\">-</span> tbAttr<span class=\"k\">.</span>tdPadding <span class=\"k\">*</span> <span class=\"s\">2</span><span class=\"k\">;</span>","                <span class=\"k\">return</span> averageWidth<span class=\"k\">;</span>","            <span class=\"k\">}</span>","","            <span class=\"k\">function</span> setAverageWidth<span class=\"k\">(</span>averageWidth<span class=\"k\">)</span> <span class=\"k\">{</span>","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>ut<span class=\"k\">.</span>table<span class=\"k\">,</span> <span class=\"s\">\"th\"</span><span class=\"k\">),</span> <span class=\"k\">function</span> <span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                    node<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</span><span class=\"k\">,</span> <span class=\"s\">\"\"</span><span class=\"k\">);</span>","                <span class=\"k\">}</span><span class=\"k\">);</span>","                <span class=\"k\">var</span> cells <span class=\"k\">=</span> ut<span class=\"k\">.</span>isFullRow<span class=\"k\">()</span> <span class=\"k\">?</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>ut<span class=\"k\">.</span>table<span class=\"k\">,</span> <span class=\"s\">\"td\"</span><span class=\"k\">)</span> <span class=\"k\">:</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">;</span>","","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>cells<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>colSpan <span class=\"k\">==</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        node<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</span><span class=\"k\">,</span> averageWidth<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>ut <span class=\"k\">&amp;&amp;</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                setAverageWidth<span class=\"k\">(</span>getAverageWidth<span class=\"k\">());</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"c\">//&#24179;&#22343;&#20998;&#37197;&#21508;&#34892;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'averagedistributerow'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds <span class=\"k\">&amp;&amp;</span> <span class=\"s\">/th/ig</span><span class=\"k\">.</span>test<span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">].</span>tagName<span class=\"k\">))</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">return</span> ut<span class=\"k\">.</span>isFullRow<span class=\"k\">()</span> <span class=\"k\">||</span> ut<span class=\"k\">.</span>isFullCol<span class=\"k\">()</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<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>","                ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span>me<span class=\"k\">);</span>","","            <span class=\"k\">function</span> getAverageHeight<span class=\"k\">()</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> averageHeight<span class=\"k\">,</span> rowNum<span class=\"k\">,</span> sumHeight <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span>","                    tb <span class=\"k\">=</span> ut<span class=\"k\">.</span>table<span class=\"k\">,</span>","                    tbAttr <span class=\"k\">=</span> getDefaultValue<span class=\"k\">(</span>me<span class=\"k\">,</span> tb<span class=\"k\">),</span>","                    tdpadding <span class=\"k\">=</span> parseInt<span class=\"k\">(</span>domUtils<span class=\"k\">.</span>getComputedStyle<span class=\"k\">(</span>tb<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">'td'</span><span class=\"k\">)[</span><span class=\"s\">0</span><span class=\"k\">],</span> <span class=\"s\">\"padding-top\"</span><span class=\"k\">));</span>","","                <span class=\"k\">if</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>isFullCol<span class=\"k\">())</span> <span class=\"k\">{</span>","                    <span class=\"k\">var</span> captionArr <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>tb<span class=\"k\">,</span> <span class=\"s\">\"caption\"</span><span class=\"k\">),</span>","                        thArr <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>tb<span class=\"k\">,</span> <span class=\"s\">\"th\"</span><span class=\"k\">),</span>","                        captionHeight<span class=\"k\">,</span> thHeight<span class=\"k\">;</span>","","                    <span class=\"k\">if</span> <span class=\"k\">(</span>captionArr<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        captionHeight <span class=\"k\">=</span> captionArr<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">].</span>offsetHeight<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    <span class=\"k\">if</span> <span class=\"k\">(</span>thArr<span class=\"k\">.</span>length <span class=\"k\">&gt;</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        thHeight <span class=\"k\">=</span> thArr<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">].</span>offsetHeight<span class=\"k\">;</span>","                    <span class=\"k\">}</span>","","                    sumHeight <span class=\"k\">=</span> tb<span class=\"k\">.</span>offsetHeight <span class=\"k\">-</span> <span class=\"k\">(</span>captionHeight <span class=\"k\">||</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">-</span> <span class=\"k\">(</span>thHeight <span class=\"k\">||</span> <span class=\"s\">0</span><span class=\"k\">);</span>","                    rowNum <span class=\"k\">=</span> thArr<span class=\"k\">.</span>length <span class=\"k\">==</span> <span class=\"s\">0</span> <span class=\"k\">?</span> ut<span class=\"k\">.</span>rowsNum <span class=\"k\">:</span> <span class=\"k\">(</span>ut<span class=\"k\">.</span>rowsNum <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=\"k\">var</span> begin <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">.</span>beginRowIndex<span class=\"k\">,</span>","                        end <span class=\"k\">=</span> ut<span class=\"k\">.</span>cellsRange<span class=\"k\">.</span>endRowIndex<span class=\"k\">,</span>","                        count <span class=\"k\">=</span> <span class=\"s\">0</span><span class=\"k\">,</span>","                        trs <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>tb<span class=\"k\">,</span> <span class=\"s\">\"tr\"</span><span class=\"k\">);</span>","                    <span class=\"k\">for</span> <span class=\"k\">(</span><span class=\"k\">var</span> i <span class=\"k\">=</span> begin<span class=\"k\">;</span> i <span class=\"k\">&lt;=</span> end<span class=\"k\">;</span> i<span class=\"k\">++)</span> <span class=\"k\">{</span>","                        sumHeight <span class=\"k\">+=</span> trs<span class=\"k\">[</span>i<span class=\"k\">].</span>offsetHeight<span class=\"k\">;</span>","                        count <span class=\"k\">+=</span> <span class=\"s\">1</span><span class=\"k\">;</span>","                    <span class=\"k\">}</span>","                    rowNum <span class=\"k\">=</span> count<span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"c\">//ie8&#19979;&#26159;&#28151;&#26434;&#27169;&#24335;</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>browser<span class=\"k\">.</span>ie <span class=\"k\">&amp;&amp;</span> browser<span class=\"k\">.</span>version <span class=\"k\">&lt;</span> <span class=\"s\">9</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    averageHeight <span class=\"k\">=</span> Math<span class=\"k\">.</span>ceil<span class=\"k\">(</span>sumHeight <span class=\"k\">/</span> rowNum<span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    averageHeight <span class=\"k\">=</span> Math<span class=\"k\">.</span>ceil<span class=\"k\">(</span>sumHeight <span class=\"k\">/</span> rowNum<span class=\"k\">)</span> <span class=\"k\">-</span> tbAttr<span class=\"k\">.</span>tdBorder <span class=\"k\">*</span> <span class=\"s\">2</span> <span class=\"k\">-</span> tdpadding <span class=\"k\">*</span> <span class=\"s\">2</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"k\">return</span> averageHeight<span class=\"k\">;</span>","            <span class=\"k\">}</span>","","            <span class=\"k\">function</span> setAverageHeight<span class=\"k\">(</span>averageHeight<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> cells <span class=\"k\">=</span> ut<span class=\"k\">.</span>isFullCol<span class=\"k\">()</span> <span class=\"k\">?</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>ut<span class=\"k\">.</span>table<span class=\"k\">,</span> <span class=\"s\">\"td\"</span><span class=\"k\">)</span> <span class=\"k\">:</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">;</span>","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>cells<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>rowSpan <span class=\"k\">==</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                        node<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"height\"</span><span class=\"k\">,</span> averageHeight<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>ut <span class=\"k\">&amp;&amp;</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length<span class=\"k\">)</span> <span class=\"k\">{</span>","                setAverageHeight<span class=\"k\">(</span>getAverageHeight<span class=\"k\">());</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"c\">//&#21333;&#20803;&#26684;&#23545;&#40784;&#26041;&#24335;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'cellalignment'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> data<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>","                ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span>me<span class=\"k\">);</span>","","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> start <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span>","                    cell <span class=\"k\">=</span> start <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>start<span class=\"k\">,</span> <span class=\"k\">[</span><span class=\"s\">\"td\"</span><span class=\"k\">,</span> <span class=\"s\">\"th\"</span><span class=\"k\">,</span> <span class=\"s\">\"caption\"</span><span class=\"k\">],</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(!</span><span class=\"s\">/caption/ig</span><span class=\"k\">.</span>test<span class=\"k\">(</span>cell<span class=\"k\">.</span>tagName<span class=\"k\">))</span> <span class=\"k\">{</span>","                    domUtils<span class=\"k\">.</span>setAttributes<span class=\"k\">(</span>cell<span class=\"k\">,</span> data<span class=\"k\">);</span>","                <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                    cell<span class=\"k\">.</span>style<span class=\"k\">.</span>textAlign <span class=\"k\">=</span> data<span class=\"k\">.</span>align<span class=\"k\">;</span>","                    cell<span class=\"k\">.</span>style<span class=\"k\">.</span>verticalAlign <span class=\"k\">=</span> data<span class=\"k\">.</span>vAlign<span class=\"k\">;</span>","                <span class=\"k\">}</span>","                me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">().</span>setCursor<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","                    domUtils<span class=\"k\">.</span>setAttributes<span class=\"k\">(</span>cell<span class=\"k\">,</span> data<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\">/*</span>","<span class=\"c\">         * &#26597;&#35810;&#24403;&#21069;&#28857;&#20987;&#30340;&#21333;&#20803;&#26684;&#30340;&#23545;&#40784;&#29366;&#24577;&#65292; &#22914;&#26524;&#24403;&#21069;&#24050;&#32463;&#36873;&#25321;&#20102;&#22810;&#20010;&#21333;&#20803;&#26684;&#65292; &#21017;&#20250;&#36820;&#22238;&#25152;&#26377;&#21333;&#20803;&#26684;&#32463;&#36807;&#32479;&#19968;&#21327;&#35843;&#36807;&#21518;&#30340;&#29366;&#24577;</span>","<span class=\"c\">         * @see UE.UETable.getTableCellAlignState</span>","<span class=\"c\">         */</span>","        queryCommandValue<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","","            <span class=\"k\">var</span> activeMenuCell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span> <span class=\"k\">this</span><span class=\"k\">).</span>cell<span class=\"k\">;</span>","","            <span class=\"k\">if</span><span class=\"k\">(</span> <span class=\"k\">!</span>activeMenuCell <span class=\"k\">)</span> <span class=\"k\">{</span>","                activeMenuCell <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><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>activeMenuCell<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\">else</span> <span class=\"k\">{</span>","","                <span class=\"c\">//&#33719;&#21462;&#21516;&#26102;&#36873;&#20013;&#30340;&#20854;&#20182;&#21333;&#20803;&#26684;</span>","                <span class=\"k\">var</span> cells <span class=\"k\">=</span> UE<span class=\"k\">.</span>UETable<span class=\"k\">.</span>getUETable<span class=\"k\">(</span>activeMenuCell<span class=\"k\">).</span>selectedTds<span class=\"k\">;</span>","","                <span class=\"k\">!</span>cells<span class=\"k\">.</span>length <span class=\"k\">&amp;&amp;</span> <span class=\"k\">(</span> cells <span class=\"k\">=</span> activeMenuCell <span class=\"k\">);</span>","","                <span class=\"k\">return</span> UE<span class=\"k\">.</span>UETable<span class=\"k\">.</span>getTableCellAlignState<span class=\"k\">(</span>cells<span class=\"k\">);</span>","","            <span class=\"k\">}</span>","","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    <span class=\"c\">//&#34920;&#26684;&#23545;&#40784;&#26041;&#24335;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'tablealignment'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<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>browser<span class=\"k\">.</span>ie <span class=\"k\">&amp;&amp;</span> browser<span class=\"k\">.</span>version <span class=\"k\">&lt;</span> <span class=\"s\">8</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> value<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>","                start <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span>","                table <span class=\"k\">=</span> start <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>start<span class=\"k\">,</span> <span class=\"k\">[</span><span class=\"s\">\"table\"</span><span class=\"k\">],</span> <span class=\"k\">true</span><span class=\"k\">);</span>","","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                table<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"align\"</span><span class=\"k\">,</span>value<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"c\">//&#34920;&#26684;&#23646;&#24615;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'edittable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> color<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> rng <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                table <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>rng<span class=\"k\">.</span>startContainer<span class=\"k\">,</span> <span class=\"s\">'table'</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>table<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> arr <span class=\"k\">=</span> domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>table<span class=\"k\">,</span> <span class=\"s\">\"td\"</span><span class=\"k\">).</span>concat<span class=\"k\">(</span>","                    domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>table<span class=\"k\">,</span> <span class=\"s\">\"th\"</span><span class=\"k\">),</span>","                    domUtils<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span>table<span class=\"k\">,</span> <span class=\"s\">\"caption\"</span><span class=\"k\">)</span>","                <span class=\"k\">);</span>","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>arr<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>node<span class=\"k\">)</span> <span class=\"k\">{</span>","                    node<span class=\"k\">.</span>style<span class=\"k\">.</span>borderColor <span class=\"k\">=</span> color<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=\"c\">//&#21333;&#20803;&#26684;&#23646;&#24615;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'edittd'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</span> <span class=\"k\">:</span> <span class=\"k\">-</span><span class=\"s\">1</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> bkColor<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>","                ut <span class=\"k\">=</span> getUETableBySelected<span class=\"k\">(</span>me<span class=\"k\">);</span>","","            <span class=\"k\">if</span> <span class=\"k\">(!</span>ut<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">var</span> start <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getStart<span class=\"k\">(),</span>","                    cell <span class=\"k\">=</span> start <span class=\"k\">&amp;&amp;</span> domUtils<span class=\"k\">.</span>findParentByTagName<span class=\"k\">(</span>start<span class=\"k\">,</span> <span class=\"k\">[</span><span class=\"s\">\"td\"</span><span class=\"k\">,</span> <span class=\"s\">\"th\"</span><span class=\"k\">,</span> <span class=\"s\">\"caption\"</span><span class=\"k\">],</span> <span class=\"k\">true</span><span class=\"k\">);</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","                    cell<span class=\"k\">.</span>style<span class=\"k\">.</span>backgroundColor <span class=\"k\">=</span> bkColor<span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                utils<span class=\"k\">.</span>each<span class=\"k\">(</span>ut<span class=\"k\">.</span>selectedTds<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","                    cell<span class=\"k\">.</span>style<span class=\"k\">.</span>backgroundColor <span class=\"k\">=</span> bkColor<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>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'sorttable'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<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>","                tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span>me<span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>tableItems<span class=\"k\">.</span>cell<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>table<span class=\"k\">,</span>","                cells <span class=\"k\">=</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">\"td\"</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> cell<span class=\"k\">;</span> cell <span class=\"k\">=</span> cells<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>cell<span class=\"k\">.</span>rowSpan <span class=\"k\">!=</span> <span class=\"s\">1</span> <span class=\"k\">||</span> cell<span class=\"k\">.</span>colSpan <span class=\"k\">!=</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"s\">0</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> fn<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>","                range <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">(),</span>","                bk <span class=\"k\">=</span> range<span class=\"k\">.</span>createBookmark<span class=\"k\">(</span><span class=\"k\">true</span><span class=\"k\">),</span>","                tableItems <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span>me<span class=\"k\">),</span>","                cell <span class=\"k\">=</span> tableItems<span class=\"k\">.</span>cell<span class=\"k\">,</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>tableItems<span class=\"k\">.</span>table<span class=\"k\">),</span>","                cellInfo <span class=\"k\">=</span> ut<span class=\"k\">.</span>getCellInfo<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            ut<span class=\"k\">.</span>sortTable<span class=\"k\">(</span>cellInfo<span class=\"k\">.</span>cellIndex<span class=\"k\">,</span> fn<span class=\"k\">);</span>","            range<span class=\"k\">.</span>moveToBookmark<span class=\"k\">(</span>bk<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"enablesort\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"disablesort\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            table<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"data-sort\"</span><span class=\"k\">,</span> cmd <span class=\"k\">==</span> <span class=\"s\">\"enablesort\"</span> <span class=\"k\">?</span> <span class=\"s\">\"sortEnabled\"</span> <span class=\"k\">:</span> <span class=\"s\">\"sortDisabled\"</span><span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"settablebackground\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>length <span class=\"k\">&gt;</span> <span class=\"s\">1</span> <span class=\"k\">?</span> <span class=\"s\">0</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>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> value<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table<span class=\"k\">,</span> cells<span class=\"k\">,</span> ut<span class=\"k\">;</span>","            cells <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cells<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">]);</span>","            ut<span class=\"k\">.</span>setBackground<span class=\"k\">(</span>cells<span class=\"k\">,</span> value<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"cleartablebackground\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> cells <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>cells<span class=\"k\">.</span>length<span class=\"k\">)</span><span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> cell<span class=\"k\">;</span> cell <span class=\"k\">=</span> cells<span class=\"k\">[</span>i<span class=\"k\">++];)</span> <span class=\"k\">{</span>","                <span class=\"k\">if</span> <span class=\"k\">(</span>cell<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\">return</span> <span class=\"s\">0</span><span class=\"k\">;</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</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> <span class=\"k\">{</span>","            <span class=\"k\">var</span> cells <span class=\"k\">=</span> getSelectedArr<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">),</span>","                ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cells<span class=\"k\">[</span><span class=\"s\">0</span><span class=\"k\">]);</span>","            ut<span class=\"k\">.</span>removeBackground<span class=\"k\">(</span>cells<span class=\"k\">);</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"interlacetable\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> UE<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">\"uninterlacetable\"</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        queryCommandState<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(!</span>table<span class=\"k\">)</span> <span class=\"k\">return</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> interlaced <span class=\"k\">=</span> table<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">);</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>cmd <span class=\"k\">==</span> <span class=\"s\">\"interlacetable\"</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"c\">//TODO &#24453;&#23450;</span>","                <span class=\"c\">//&#26159;&#21542;&#38656;&#35201;&#24453;&#23450;&#65292;&#22914;&#26524;&#35774;&#32622;&#65292;&#21017;&#21629;&#20196;&#21482;&#33021;&#21333;&#27425;&#25191;&#34892;&#25104;&#21151;&#65292;&#20294;&#21453;&#23556;&#20855;&#22791;toggle&#25928;&#26524;&#65307;&#21542;&#21017;&#21487;&#20197;&#35206;&#30422;&#21069;&#27425;&#21629;&#20196;&#65292;&#20294;&#21453;&#23556;&#23558;&#19981;&#23384;&#22312;toggle&#25928;&#26524;</span>","                <span class=\"k\">return</span> <span class=\"k\">(</span>interlaced <span class=\"k\">===</span> <span class=\"s\">\"enabled\"</span><span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"k\">-</span><span class=\"s\">1</span> <span class=\"k\">:</span> <span class=\"s\">0</span><span class=\"k\">;</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                <span class=\"k\">return</span> <span class=\"k\">(!</span>interlaced <span class=\"k\">||</span> interlaced <span class=\"k\">===</span> <span class=\"s\">\"disabled\"</span><span class=\"k\">)</span> <span class=\"k\">?</span> <span class=\"k\">-</span><span class=\"s\">1</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\">,</span>","        execCommand<span class=\"k\">:</span> <span class=\"k\">function</span> <span class=\"k\">(</span>cmd<span class=\"k\">,</span> classList<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> table <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">).</span>table<span class=\"k\">;</span>","            <span class=\"k\">if</span> <span class=\"k\">(</span>cmd <span class=\"k\">==</span> <span class=\"s\">\"interlacetable\"</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                table<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">,</span> <span class=\"s\">\"enabled\"</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">\"interlacetable\"</span><span class=\"k\">,</span> table<span class=\"k\">,</span> classList<span class=\"k\">);</span>","            <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","                table<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"interlaced\"</span><span class=\"k\">,</span> <span class=\"s\">\"disabled\"</span><span class=\"k\">);</span>","                <span class=\"k\">this</span><span class=\"k\">.</span>fireEvent<span class=\"k\">(</span><span class=\"s\">\"uninterlacetable\"</span><span class=\"k\">,</span> table<span class=\"k\">);</span>","            <span class=\"k\">}</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","","    <span class=\"k\">function</span> resetTdWidth<span class=\"k\">(</span>table<span class=\"k\">,</span> editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> tds <span class=\"k\">=</span> table<span class=\"k\">.</span>getElementsByTagName<span class=\"k\">(</span><span class=\"s\">\"td\"</span><span class=\"k\">);</span>","        utils<span class=\"k\">.</span>each<span class=\"k\">(</span>tds<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>td<span class=\"k\">)</span> <span class=\"k\">{</span>","            td<span class=\"k\">.</span>removeAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</span><span class=\"k\">);</span>","        <span class=\"k\">}</span><span class=\"k\">);</span>","        table<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">'width'</span><span class=\"k\">,</span> getTableWidth<span class=\"k\">(</span>editor<span class=\"k\">,</span> <span class=\"k\">true</span><span class=\"k\">,</span> getDefaultValue<span class=\"k\">(</span>editor<span class=\"k\">,</span> table<span class=\"k\">)));</span>","        setTimeout<span class=\"k\">(</span><span class=\"k\">function</span> <span class=\"k\">()</span> <span class=\"k\">{</span>","            utils<span class=\"k\">.</span>each<span class=\"k\">(</span>tds<span class=\"k\">,</span> <span class=\"k\">function</span> <span class=\"k\">(</span>td<span class=\"k\">)</span> <span class=\"k\">{</span>","                <span class=\"k\">(</span>td<span class=\"k\">.</span>colSpan <span class=\"k\">==</span> <span class=\"s\">1</span><span class=\"k\">)</span> <span class=\"k\">&amp;&amp;</span> td<span class=\"k\">.</span>setAttribute<span class=\"k\">(</span><span class=\"s\">\"width\"</span><span class=\"k\">,</span> td<span class=\"k\">.</span>offsetWidth <span class=\"k\">+</span> <span class=\"s\">\"\"</span><span class=\"k\">);</span>","            <span class=\"k\">}</span><span class=\"k\">)</span>","        <span class=\"k\">}</span><span class=\"k\">,</span> <span class=\"s\">0</span><span class=\"k\">);</span>","    <span class=\"k\">}</span>","","    <span class=\"k\">function</span> getTableWidth<span class=\"k\">(</span>editor<span class=\"k\">,</span> needIEHack<span class=\"k\">,</span> defaultValue<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> body <span class=\"k\">=</span> editor<span class=\"k\">.</span>body<span class=\"k\">;</span>","        <span class=\"k\">return</span> body<span class=\"k\">.</span>offsetWidth <span class=\"k\">-</span> <span class=\"k\">(</span>needIEHack <span class=\"k\">?</span> parseInt<span class=\"k\">(</span>domUtils<span class=\"k\">.</span>getComputedStyle<span class=\"k\">(</span>body<span class=\"k\">,</span> <span class=\"s\">'margin-left'</span><span class=\"k\">),</span> <span class=\"s\">10</span><span class=\"k\">)</span> <span class=\"k\">*</span> <span class=\"s\">2</span> <span class=\"k\">:</span> <span class=\"s\">0</span><span class=\"k\">)</span> <span class=\"k\">-</span> defaultValue<span class=\"k\">.</span>tableBorder <span class=\"k\">*</span> <span class=\"s\">2</span> <span class=\"k\">-</span> <span class=\"k\">(</span>editor<span class=\"k\">.</span>options<span class=\"k\">.</span>offsetWidth <span class=\"k\">||</span> <span class=\"s\">0</span><span class=\"k\">);</span>","    <span class=\"k\">}</span>","","    <span class=\"k\">function</span> getSelectedArr<span class=\"k\">(</span>editor<span class=\"k\">)</span> <span class=\"k\">{</span>","        <span class=\"k\">var</span> cell <span class=\"k\">=</span> getTableItemsByRange<span class=\"k\">(</span>editor<span class=\"k\">).</span>cell<span class=\"k\">;</span>","        <span class=\"k\">if</span> <span class=\"k\">(</span>cell<span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">var</span> ut <span class=\"k\">=</span> getUETable<span class=\"k\">(</span>cell<span class=\"k\">);</span>","            <span class=\"k\">return</span> ut<span class=\"k\">.</span>selectedTds<span class=\"k\">.</span>length <span class=\"k\">?</span> ut<span class=\"k\">.</span>selectedTds <span class=\"k\">:</span> <span class=\"k\">[</span>cell<span class=\"k\">];</span>","        <span class=\"k\">}</span> <span class=\"k\">else</span> <span class=\"k\">{</span>","            <span class=\"k\">return</span> <span class=\"k\">[];</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span>","<span class=\"k\">}</span><span class=\"k\">)();</span>"];
_$jscoverage['plugins/table.cmds.js'][8]++;
;
_$jscoverage['plugins/table.cmds.js'][9]++;
(function () {
  _$jscoverage['plugins/table.cmds.js'][10]++;
  var UT = UE.UETable, getTableItemsByRange = (function (editor) {
  _$jscoverage['plugins/table.cmds.js'][12]++;
  return UT.getTableItemsByRange(editor);
}), getUETableBySelected = (function (editor) {
  _$jscoverage['plugins/table.cmds.js'][15]++;
  return UT.getUETableBySelected(editor);
}), getDefaultValue = (function (editor, table) {
  _$jscoverage['plugins/table.cmds.js'][18]++;
  return UT.getDefaultValue(editor, table);
}), getUETable = (function (tdOrTable) {
  _$jscoverage['plugins/table.cmds.js'][21]++;
  return UT.getUETable(tdOrTable);
});
  _$jscoverage['plugins/table.cmds.js'][25]++;
  UE.commands.inserttable = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][27]++;
  return (getTableItemsByRange(this).table? -1: 0);
}), execCommand: (function (cmd, opt) {
  _$jscoverage['plugins/table.cmds.js'][30]++;
  function createTable(opt, tdWidth) {
    _$jscoverage['plugins/table.cmds.js'][31]++;
    var html = [], rowsNum = opt.numRows, colsNum = opt.numCols;
    _$jscoverage['plugins/table.cmds.js'][34]++;
    for (var r = 0; (r < rowsNum); (r++)) {
      _$jscoverage['plugins/table.cmds.js'][35]++;
      html.push("<tr>");
      _$jscoverage['plugins/table.cmds.js'][36]++;
      for (var c = 0; (c < colsNum); (c++)) {
        _$jscoverage['plugins/table.cmds.js'][37]++;
        html.push(("<td width=\"" + tdWidth + "\"  vAlign=\"" + opt.tdvalign + "\" >" + (browser.ie? domUtils.fillChar: "<br/>") + "</td>"));
}
      _$jscoverage['plugins/table.cmds.js'][39]++;
      html.push("</tr>");
}
    _$jscoverage['plugins/table.cmds.js'][42]++;
    return ("<table><tbody>" + html.join("") + "</tbody></table>");
}
  _$jscoverage['plugins/table.cmds.js'][45]++;
  if ((! opt)) {
    _$jscoverage['plugins/table.cmds.js'][46]++;
    opt = utils.extend({}, {numCols: this.options.defaultCols, numRows: this.options.defaultRows, tdvalign: this.options.tdvalign});
  }
  _$jscoverage['plugins/table.cmds.js'][52]++;
  var me = this;
  _$jscoverage['plugins/table.cmds.js'][53]++;
  var range = this.selection.getRange(), start = range.startContainer, firstParentBlock = (domUtils.findParent(start, (function (node) {
  _$jscoverage['plugins/table.cmds.js'][56]++;
  return domUtils.isBlockElm(node);
}), true) || me.body);
  _$jscoverage['plugins/table.cmds.js'][59]++;
  var defaultValue = getDefaultValue(me), tableWidth = firstParentBlock.offsetWidth, tdWidth = Math.floor(((tableWidth / opt.numCols) - (defaultValue.tdPadding * 2) - defaultValue.tdBorder));
  _$jscoverage['plugins/table.cmds.js'][64]++;
  ((! opt.tdvalign) && (opt.tdvalign = me.options.tdvalign));
  _$jscoverage['plugins/table.cmds.js'][65]++;
  me.execCommand("inserthtml", createTable(opt, tdWidth));
})};
  _$jscoverage['plugins/table.cmds.js'][69]++;
  UE.commands.insertparagraphbeforetable = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][71]++;
  return (getTableItemsByRange(this).cell? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][74]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][75]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][76]++;
    var p = this.document.createElement("p");
    _$jscoverage['plugins/table.cmds.js'][77]++;
    p.innerHTML = (browser.ie? "&nbsp;": "<br />");
    _$jscoverage['plugins/table.cmds.js'][78]++;
    table.parentNode.insertBefore(p, table);
    _$jscoverage['plugins/table.cmds.js'][79]++;
    this.selection.getRange().setStart(p, 0).setCursor();
  }
})};
  _$jscoverage['plugins/table.cmds.js'][84]++;
  UE.commands.deletetable = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][86]++;
  var rng = this.selection.getRange();
  _$jscoverage['plugins/table.cmds.js'][87]++;
  return (domUtils.findParentByTagName(rng.startContainer, "table", true)? 0: -1);
}), execCommand: (function (cmd, table) {
  _$jscoverage['plugins/table.cmds.js'][90]++;
  var rng = this.selection.getRange();
  _$jscoverage['plugins/table.cmds.js'][91]++;
  table = (table || domUtils.findParentByTagName(rng.startContainer, "table", true));
  _$jscoverage['plugins/table.cmds.js'][92]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][93]++;
    var next = table.nextSibling;
    _$jscoverage['plugins/table.cmds.js'][94]++;
    if ((! next)) {
      _$jscoverage['plugins/table.cmds.js'][95]++;
      next = domUtils.createElement(this.document, "p", {"innerHTML": (browser.ie? domUtils.fillChar: "<br/>")});
      _$jscoverage['plugins/table.cmds.js'][98]++;
      table.parentNode.insertBefore(next, table);
    }
    _$jscoverage['plugins/table.cmds.js'][100]++;
    domUtils.remove(table);
    _$jscoverage['plugins/table.cmds.js'][101]++;
    rng = this.selection.getRange();
    _$jscoverage['plugins/table.cmds.js'][102]++;
    if ((next.nodeType == 3)) {
      _$jscoverage['plugins/table.cmds.js'][103]++;
      rng.setStartBefore(next);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][105]++;
      rng.setStart(next, 0);
    }
    _$jscoverage['plugins/table.cmds.js'][107]++;
    rng.setCursor(false, true);
    _$jscoverage['plugins/table.cmds.js'][108]++;
    this.fireEvent("tablehasdeleted");
  }
})};
  _$jscoverage['plugins/table.cmds.js'][114]++;
  UE.commands.cellalign = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][116]++;
  return (getSelectedArr(this).length? 0: -1);
}), execCommand: (function (cmd, align) {
  _$jscoverage['plugins/table.cmds.js'][119]++;
  var selectedTds = getSelectedArr(this);
  _$jscoverage['plugins/table.cmds.js'][120]++;
  if (selectedTds.length) {
    _$jscoverage['plugins/table.cmds.js'][121]++;
    for (var i = 0, ci; (ci = selectedTds[(i++)]);) {
      _$jscoverage['plugins/table.cmds.js'][122]++;
      ci.setAttribute("align", align);
}
  }
})};
  _$jscoverage['plugins/table.cmds.js'][127]++;
  UE.commands.cellvalign = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][129]++;
  return (getSelectedArr(this).length? 0: -1);
}), execCommand: (function (cmd, valign) {
  _$jscoverage['plugins/table.cmds.js'][132]++;
  var selectedTds = getSelectedArr(this);
  _$jscoverage['plugins/table.cmds.js'][133]++;
  if (selectedTds.length) {
    _$jscoverage['plugins/table.cmds.js'][134]++;
    for (var i = 0, ci; (ci = selectedTds[(i++)]);) {
      _$jscoverage['plugins/table.cmds.js'][135]++;
      ci.setAttribute("vAlign", valign);
}
  }
})};
  _$jscoverage['plugins/table.cmds.js'][140]++;
  UE.commands.insertcaption = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][142]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][143]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][144]++;
    return ((table.getElementsByTagName("caption").length == 0)? 1: -1);
  }
  _$jscoverage['plugins/table.cmds.js'][146]++;
  return -1;
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][149]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][150]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][151]++;
    var caption = this.document.createElement("caption");
    _$jscoverage['plugins/table.cmds.js'][152]++;
    caption.innerHTML = (browser.ie? domUtils.fillChar: "<br/>");
    _$jscoverage['plugins/table.cmds.js'][153]++;
    table.insertBefore(caption, table.firstChild);
    _$jscoverage['plugins/table.cmds.js'][154]++;
    var range = this.selection.getRange();
    _$jscoverage['plugins/table.cmds.js'][155]++;
    range.setStart(caption, 0).setCursor();
  }
})};
  _$jscoverage['plugins/table.cmds.js'][160]++;
  UE.commands.deletecaption = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][162]++;
  var rng = this.selection.getRange(), table = domUtils.findParentByTagName(rng.startContainer, "table");
  _$jscoverage['plugins/table.cmds.js'][164]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][165]++;
    return ((table.getElementsByTagName("caption").length == 0)? -1: 1);
  }
  _$jscoverage['plugins/table.cmds.js'][167]++;
  return -1;
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][170]++;
  var rng = this.selection.getRange(), table = domUtils.findParentByTagName(rng.startContainer, "table");
  _$jscoverage['plugins/table.cmds.js'][172]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][173]++;
    domUtils.remove(table.getElementsByTagName("caption")[0]);
    _$jscoverage['plugins/table.cmds.js'][174]++;
    var range = this.selection.getRange();
    _$jscoverage['plugins/table.cmds.js'][175]++;
    range.setStart(table.rows[0].cells[0], 0).setCursor();
  }
})};
  _$jscoverage['plugins/table.cmds.js'][180]++;
  UE.commands.inserttitle = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][182]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][183]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][184]++;
    var firstRow = table.rows[0];
    _$jscoverage['plugins/table.cmds.js'][185]++;
    return ((firstRow.getElementsByTagName("th").length == 0)? 0: -1);
  }
  _$jscoverage['plugins/table.cmds.js'][187]++;
  return -1;
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][190]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][191]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][192]++;
    getUETable(table).insertRow(0, "th");
  }
  _$jscoverage['plugins/table.cmds.js'][194]++;
  var th = table.getElementsByTagName("th")[0];
  _$jscoverage['plugins/table.cmds.js'][195]++;
  this.selection.getRange().setStart(th, 0).setCursor(false, true);
})};
  _$jscoverage['plugins/table.cmds.js'][198]++;
  UE.commands.deletetitle = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][200]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][201]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][202]++;
    var firstRow = table.rows[0];
    _$jscoverage['plugins/table.cmds.js'][203]++;
    return (firstRow.getElementsByTagName("th").length? 0: -1);
  }
  _$jscoverage['plugins/table.cmds.js'][205]++;
  return -1;
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][208]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][209]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][210]++;
    domUtils.remove(table.rows[0]);
  }
  _$jscoverage['plugins/table.cmds.js'][212]++;
  var td = table.getElementsByTagName("td")[0];
  _$jscoverage['plugins/table.cmds.js'][213]++;
  this.selection.getRange().setStart(td, 0).setCursor(false, true);
})};
  _$jscoverage['plugins/table.cmds.js'][217]++;
  UE.commands.mergeright = {queryCommandState: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][219]++;
  var tableItems = getTableItemsByRange(this);
  _$jscoverage['plugins/table.cmds.js'][220]++;
  if ((! tableItems.cell)) {
    _$jscoverage['plugins/table.cmds.js'][220]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][221]++;
  var ut = getUETable(tableItems.table);
  _$jscoverage['plugins/table.cmds.js'][222]++;
  if (ut.selectedTds.length) {
    _$jscoverage['plugins/table.cmds.js'][222]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][223]++;
  var cellInfo = ut.getCellInfo(tableItems.cell), rightColIndex = (cellInfo.colIndex + cellInfo.colSpan);
  _$jscoverage['plugins/table.cmds.js'][225]++;
  if ((rightColIndex >= ut.colsNum)) {
    _$jscoverage['plugins/table.cmds.js'][225]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][226]++;
  var rightCellInfo = ut.indexTable[cellInfo.rowIndex][rightColIndex];
  _$jscoverage['plugins/table.cmds.js'][227]++;
  return (((rightCellInfo.rowIndex == cellInfo.rowIndex) && (rightCellInfo.rowSpan == cellInfo.rowSpan))? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][231]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][233]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell);
  _$jscoverage['plugins/table.cmds.js'][235]++;
  ut.mergeRight(cell);
  _$jscoverage['plugins/table.cmds.js'][236]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][239]++;
  UE.commands.mergedown = {queryCommandState: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][241]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][243]++;
  if (((! cell) || (cell.tagName == "TH"))) {
    _$jscoverage['plugins/table.cmds.js'][243]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][244]++;
  var ut = getUETable(tableItems.table);
  _$jscoverage['plugins/table.cmds.js'][245]++;
  if (ut.selectedTds.length) {
    _$jscoverage['plugins/table.cmds.js'][245]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][246]++;
  var cellInfo = ut.getCellInfo(tableItems.cell), downRowIndex = (cellInfo.rowIndex + cellInfo.rowSpan);
  _$jscoverage['plugins/table.cmds.js'][249]++;
  if ((downRowIndex >= ut.rowsNum)) {
    _$jscoverage['plugins/table.cmds.js'][249]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][250]++;
  var downCellInfo = ut.indexTable[downRowIndex][cellInfo.colIndex];
  _$jscoverage['plugins/table.cmds.js'][252]++;
  return (((downCellInfo.colIndex == cellInfo.colIndex) && (downCellInfo.colSpan == cellInfo.colSpan) && (tableItems.cell.tagName !== "TH"))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][256]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][258]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell);
  _$jscoverage['plugins/table.cmds.js'][260]++;
  ut.mergeDown(cell);
  _$jscoverage['plugins/table.cmds.js'][261]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][264]++;
  UE.commands.mergecells = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][266]++;
  return (getUETableBySelected(this)? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][269]++;
  var ut = getUETableBySelected(this);
  _$jscoverage['plugins/table.cmds.js'][270]++;
  if ((ut && ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][271]++;
    var cell = ut.selectedTds[0];
    _$jscoverage['plugins/table.cmds.js'][272]++;
    ut.mergeRange();
    _$jscoverage['plugins/table.cmds.js'][273]++;
    var rng = this.selection.getRange();
    _$jscoverage['plugins/table.cmds.js'][274]++;
    if (domUtils.isEmptyBlock(cell)) {
      _$jscoverage['plugins/table.cmds.js'][275]++;
      rng.setStart(cell, 0).collapse(true);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][277]++;
      rng.selectNodeContents(cell);
    }
    _$jscoverage['plugins/table.cmds.js'][279]++;
    rng.select();
  }
})};
  _$jscoverage['plugins/table.cmds.js'][285]++;
  UE.commands.insertrow = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][287]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][289]++;
  return ((cell && (cell.tagName == "TD") && (getUETable(tableItems.table).rowsNum < this.options.maxRowNum))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][292]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][294]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell, table = tableItems.table, ut = getUETable(table), cellInfo = ut.getCellInfo(cell);
  _$jscoverage['plugins/table.cmds.js'][300]++;
  if ((! ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][301]++;
    ut.insertRow(cellInfo.rowIndex, cell);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][303]++;
    var range = ut.cellsRange;
    _$jscoverage['plugins/table.cmds.js'][304]++;
    for (var i = 0, len = ((range.endRowIndex - range.beginRowIndex) + 1); (i < len); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][305]++;
      ut.insertRow(range.beginRowIndex, cell);
}
  }
  _$jscoverage['plugins/table.cmds.js'][308]++;
  rng.moveToBookmark(bk).select();
  _$jscoverage['plugins/table.cmds.js'][309]++;
  if ((table.getAttribute("interlaced") === "enabled")) {
    _$jscoverage['plugins/table.cmds.js'][309]++;
    this.fireEvent("interlacetable", table);
  }
})};
  _$jscoverage['plugins/table.cmds.js'][313]++;
  UE.commands.insertrownext = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][315]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][317]++;
  return ((cell && (cell.tagName == "TD") && (getUETable(tableItems.table).rowsNum < this.options.maxRowNum))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][320]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][322]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell, table = tableItems.table, ut = getUETable(table), cellInfo = ut.getCellInfo(cell);
  _$jscoverage['plugins/table.cmds.js'][328]++;
  if ((! ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][329]++;
    ut.insertRow((cellInfo.rowIndex + cellInfo.rowSpan), cell);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][331]++;
    var range = ut.cellsRange;
    _$jscoverage['plugins/table.cmds.js'][332]++;
    for (var i = 0, len = ((range.endRowIndex - range.beginRowIndex) + 1); (i < len); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][333]++;
      ut.insertRow((range.endRowIndex + 1), cell);
}
  }
  _$jscoverage['plugins/table.cmds.js'][336]++;
  rng.moveToBookmark(bk).select();
  _$jscoverage['plugins/table.cmds.js'][337]++;
  if ((table.getAttribute("interlaced") === "enabled")) {
    _$jscoverage['plugins/table.cmds.js'][337]++;
    this.fireEvent("interlacetable", table);
  }
})};
  _$jscoverage['plugins/table.cmds.js'][340]++;
  UE.commands.deleterow = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][342]++;
  var tableItems = getTableItemsByRange(this);
  _$jscoverage['plugins/table.cmds.js'][343]++;
  if ((! tableItems.cell)) {
    _$jscoverage['plugins/table.cmds.js'][344]++;
    return -1;
  }
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][348]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell), cellsRange = ut.cellsRange, cellInfo = ut.getCellInfo(cell), preCell = ut.getVSideCell(cell), nextCell = ut.getVSideCell(cell, true), rng = this.selection.getRange();
  _$jscoverage['plugins/table.cmds.js'][355]++;
  if (utils.isEmptyObject(cellsRange)) {
    _$jscoverage['plugins/table.cmds.js'][356]++;
    ut.deleteRow(cellInfo.rowIndex);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][358]++;
    for (var i = cellsRange.beginRowIndex; (i < (cellsRange.endRowIndex + 1)); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][359]++;
      ut.deleteRow(cellsRange.beginRowIndex);
}
  }
  _$jscoverage['plugins/table.cmds.js'][362]++;
  var table = ut.table;
  _$jscoverage['plugins/table.cmds.js'][363]++;
  if ((! table.getElementsByTagName("td").length)) {
    _$jscoverage['plugins/table.cmds.js'][364]++;
    var nextSibling = table.nextSibling;
    _$jscoverage['plugins/table.cmds.js'][365]++;
    domUtils.remove(table);
    _$jscoverage['plugins/table.cmds.js'][366]++;
    if (nextSibling) {
      _$jscoverage['plugins/table.cmds.js'][367]++;
      rng.setStart(nextSibling, 0).setCursor(false, true);
    }
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][370]++;
    if (((cellInfo.rowSpan == 1) || (cellInfo.rowSpan == ((cellsRange.endRowIndex - cellsRange.beginRowIndex) + 1)))) {
      _$jscoverage['plugins/table.cmds.js'][371]++;
      if ((nextCell || preCell)) {
        _$jscoverage['plugins/table.cmds.js'][371]++;
        rng.selectNodeContents((nextCell || preCell)).setCursor(false, true);
      }
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][373]++;
      var newCell = ut.getCell(cellInfo.rowIndex, ut.indexTable[cellInfo.rowIndex][cellInfo.colIndex].cellIndex);
      _$jscoverage['plugins/table.cmds.js'][374]++;
      if (newCell) {
        _$jscoverage['plugins/table.cmds.js'][374]++;
        rng.selectNodeContents(newCell).setCursor(false, true);
      }
    }
  }
  _$jscoverage['plugins/table.cmds.js'][377]++;
  if ((table.getAttribute("interlaced") === "enabled")) {
    _$jscoverage['plugins/table.cmds.js'][377]++;
    this.fireEvent("interlacetable", table);
  }
})};
  _$jscoverage['plugins/table.cmds.js'][380]++;
  UE.commands.insertcol = {queryCommandState: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][382]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][384]++;
  return ((cell && ((cell.tagName == "TD") || (cell.tagName == "TH")) && (getUETable(tableItems.table).colsNum < this.options.maxColNum))? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][387]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][389]++;
  if ((this.queryCommandState(cmd) == -1)) {
    _$jscoverage['plugins/table.cmds.js'][389]++;
    return;
  }
  _$jscoverage['plugins/table.cmds.js'][390]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell), cellInfo = ut.getCellInfo(cell);
  _$jscoverage['plugins/table.cmds.js'][395]++;
  if ((! ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][396]++;
    ut.insertCol(cellInfo.colIndex, cell);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][398]++;
    var range = ut.cellsRange;
    _$jscoverage['plugins/table.cmds.js'][399]++;
    for (var i = 0, len = ((range.endColIndex - range.beginColIndex) + 1); (i < len); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][400]++;
      ut.insertCol(range.beginColIndex, cell);
}
  }
  _$jscoverage['plugins/table.cmds.js'][403]++;
  rng.moveToBookmark(bk).select(true);
})};
  _$jscoverage['plugins/table.cmds.js'][406]++;
  UE.commands.insertcolnext = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][408]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][410]++;
  return ((cell && (getUETable(tableItems.table).colsNum < this.options.maxColNum))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][413]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][415]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell), cellInfo = ut.getCellInfo(cell);
  _$jscoverage['plugins/table.cmds.js'][419]++;
  if ((! ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][420]++;
    ut.insertCol((cellInfo.colIndex + cellInfo.colSpan), cell);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][422]++;
    var range = ut.cellsRange;
    _$jscoverage['plugins/table.cmds.js'][423]++;
    for (var i = 0, len = ((range.endColIndex - range.beginColIndex) + 1); (i < len); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][424]++;
      ut.insertCol((range.endColIndex + 1), cell);
}
  }
  _$jscoverage['plugins/table.cmds.js'][427]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][431]++;
  UE.commands.deletecol = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][433]++;
  var tableItems = getTableItemsByRange(this);
  _$jscoverage['plugins/table.cmds.js'][434]++;
  if ((! tableItems.cell)) {
    _$jscoverage['plugins/table.cmds.js'][434]++;
    return -1;
  }
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][437]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell), range = ut.cellsRange, cellInfo = ut.getCellInfo(cell), preCell = ut.getHSideCell(cell), nextCell = ut.getHSideCell(cell, true);
  _$jscoverage['plugins/table.cmds.js'][443]++;
  if (utils.isEmptyObject(range)) {
    _$jscoverage['plugins/table.cmds.js'][444]++;
    ut.deleteCol(cellInfo.colIndex);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][446]++;
    for (var i = range.beginColIndex; (i < (range.endColIndex + 1)); (i++)) {
      _$jscoverage['plugins/table.cmds.js'][447]++;
      ut.deleteCol(range.beginColIndex);
}
  }
  _$jscoverage['plugins/table.cmds.js'][450]++;
  var table = ut.table, rng = this.selection.getRange();
  _$jscoverage['plugins/table.cmds.js'][453]++;
  if ((! table.getElementsByTagName("td").length)) {
    _$jscoverage['plugins/table.cmds.js'][454]++;
    var nextSibling = table.nextSibling;
    _$jscoverage['plugins/table.cmds.js'][455]++;
    domUtils.remove(table);
    _$jscoverage['plugins/table.cmds.js'][456]++;
    if (nextSibling) {
      _$jscoverage['plugins/table.cmds.js'][457]++;
      rng.setStart(nextSibling, 0).setCursor(false, true);
    }
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][460]++;
    if (domUtils.inDoc(cell, this.document)) {
      _$jscoverage['plugins/table.cmds.js'][461]++;
      rng.setStart(cell, 0).setCursor(false, true);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][463]++;
      if ((nextCell && domUtils.inDoc(nextCell, this.document))) {
        _$jscoverage['plugins/table.cmds.js'][464]++;
        rng.selectNodeContents(nextCell).setCursor(false, true);
      }
      else {
        _$jscoverage['plugins/table.cmds.js'][466]++;
        if ((preCell && domUtils.inDoc(preCell, this.document))) {
          _$jscoverage['plugins/table.cmds.js'][467]++;
          rng.selectNodeContents(preCell).setCursor(true, true);
        }
      }
    }
  }
})};
  _$jscoverage['plugins/table.cmds.js'][474]++;
  UE.commands.splittocells = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][476]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][478]++;
  if ((! cell)) {
    _$jscoverage['plugins/table.cmds.js'][478]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][479]++;
  var ut = getUETable(tableItems.table);
  _$jscoverage['plugins/table.cmds.js'][480]++;
  if ((ut.selectedTds.length > 0)) {
    _$jscoverage['plugins/table.cmds.js'][480]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][481]++;
  return ((cell && ((cell.colSpan > 1) || (cell.rowSpan > 1)))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][484]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][486]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell);
  _$jscoverage['plugins/table.cmds.js'][488]++;
  ut.splitToCells(cell);
  _$jscoverage['plugins/table.cmds.js'][489]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][492]++;
  UE.commands.splittorows = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][494]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][496]++;
  if ((! cell)) {
    _$jscoverage['plugins/table.cmds.js'][496]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][497]++;
  var ut = getUETable(tableItems.table);
  _$jscoverage['plugins/table.cmds.js'][498]++;
  if ((ut.selectedTds.length > 0)) {
    _$jscoverage['plugins/table.cmds.js'][498]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][499]++;
  return ((cell && (cell.rowSpan > 1))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][502]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][504]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell);
  _$jscoverage['plugins/table.cmds.js'][506]++;
  ut.splitToRows(cell);
  _$jscoverage['plugins/table.cmds.js'][507]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][510]++;
  UE.commands.splittocols = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][512]++;
  var tableItems = getTableItemsByRange(this), cell = tableItems.cell;
  _$jscoverage['plugins/table.cmds.js'][514]++;
  if ((! cell)) {
    _$jscoverage['plugins/table.cmds.js'][514]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][515]++;
  var ut = getUETable(tableItems.table);
  _$jscoverage['plugins/table.cmds.js'][516]++;
  if ((ut.selectedTds.length > 0)) {
    _$jscoverage['plugins/table.cmds.js'][516]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][517]++;
  return ((cell && (cell.colSpan > 1))? 0: -1);
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][520]++;
  var rng = this.selection.getRange(), bk = rng.createBookmark(true);
  _$jscoverage['plugins/table.cmds.js'][522]++;
  var cell = getTableItemsByRange(this).cell, ut = getUETable(cell);
  _$jscoverage['plugins/table.cmds.js'][524]++;
  ut.splitToCols(cell);
  _$jscoverage['plugins/table.cmds.js'][525]++;
  rng.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][530]++;
  UE.commands.adaptbytext = (UE.commands.adaptbywindow = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][533]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][536]++;
  var tableItems = getTableItemsByRange(this), table = tableItems.table;
  _$jscoverage['plugins/table.cmds.js'][538]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][539]++;
    if ((cmd == "adaptbywindow")) {
      _$jscoverage['plugins/table.cmds.js'][540]++;
      resetTdWidth(table, this);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][542]++;
      var cells = domUtils.getElementsByTagName(table, "td th");
      _$jscoverage['plugins/table.cmds.js'][543]++;
      utils.each(cells, (function (cell) {
  _$jscoverage['plugins/table.cmds.js'][544]++;
  cell.removeAttribute("width");
}));
      _$jscoverage['plugins/table.cmds.js'][546]++;
      table.removeAttribute("width");
    }
  }
})});
  _$jscoverage['plugins/table.cmds.js'][553]++;
  UE.commands.averagedistributecol = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][555]++;
  var ut = getUETableBySelected(this);
  _$jscoverage['plugins/table.cmds.js'][556]++;
  if ((! ut)) {
    _$jscoverage['plugins/table.cmds.js'][556]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][557]++;
  return ((ut.isFullRow() || ut.isFullCol())? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][560]++;
  var me = this, ut = getUETableBySelected(me);
  _$jscoverage['plugins/table.cmds.js'][563]++;
  function getAverageWidth() {
    _$jscoverage['plugins/table.cmds.js'][564]++;
    var tb = ut.table, averageWidth, sumWidth = 0, colsNum = 0, tbAttr = getDefaultValue(me, tb);
    _$jscoverage['plugins/table.cmds.js'][568]++;
    if (ut.isFullRow()) {
      _$jscoverage['plugins/table.cmds.js'][569]++;
      sumWidth = tb.offsetWidth;
      _$jscoverage['plugins/table.cmds.js'][570]++;
      colsNum = ut.colsNum;
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][572]++;
      var begin = ut.cellsRange.beginColIndex, end = ut.cellsRange.endColIndex, node;
      _$jscoverage['plugins/table.cmds.js'][575]++;
      for (var i = begin; (i <= end);) {
        _$jscoverage['plugins/table.cmds.js'][576]++;
        node = ut.selectedTds[i];
        _$jscoverage['plugins/table.cmds.js'][577]++;
        sumWidth += node.offsetWidth;
        _$jscoverage['plugins/table.cmds.js'][578]++;
        i += node.colSpan;
        _$jscoverage['plugins/table.cmds.js'][579]++;
        colsNum += 1;
}
    }
    _$jscoverage['plugins/table.cmds.js'][582]++;
    averageWidth = (Math.ceil((sumWidth / colsNum)) - (tbAttr.tdBorder * 2) - (tbAttr.tdPadding * 2));
    _$jscoverage['plugins/table.cmds.js'][583]++;
    return averageWidth;
}
  _$jscoverage['plugins/table.cmds.js'][586]++;
  function setAverageWidth(averageWidth) {
    _$jscoverage['plugins/table.cmds.js'][587]++;
    utils.each(domUtils.getElementsByTagName(ut.table, "th"), (function (node) {
  _$jscoverage['plugins/table.cmds.js'][588]++;
  node.setAttribute("width", "");
}));
    _$jscoverage['plugins/table.cmds.js'][590]++;
    var cells = (ut.isFullRow()? domUtils.getElementsByTagName(ut.table, "td"): ut.selectedTds);
    _$jscoverage['plugins/table.cmds.js'][592]++;
    utils.each(cells, (function (node) {
  _$jscoverage['plugins/table.cmds.js'][593]++;
  if ((node.colSpan == 1)) {
    _$jscoverage['plugins/table.cmds.js'][594]++;
    node.setAttribute("width", averageWidth);
  }
}));
}
  _$jscoverage['plugins/table.cmds.js'][599]++;
  if ((ut && ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][600]++;
    setAverageWidth(getAverageWidth());
  }
})};
  _$jscoverage['plugins/table.cmds.js'][605]++;
  UE.commands.averagedistributerow = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][607]++;
  var ut = getUETableBySelected(this);
  _$jscoverage['plugins/table.cmds.js'][608]++;
  if ((! ut)) {
    _$jscoverage['plugins/table.cmds.js'][608]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][609]++;
  if ((ut.selectedTds && /th/gi.test(ut.selectedTds[0].tagName))) {
    _$jscoverage['plugins/table.cmds.js'][609]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][610]++;
  return ((ut.isFullRow() || ut.isFullCol())? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][613]++;
  var me = this, ut = getUETableBySelected(me);
  _$jscoverage['plugins/table.cmds.js'][616]++;
  function getAverageHeight() {
    _$jscoverage['plugins/table.cmds.js'][617]++;
    var averageHeight, rowNum, sumHeight = 0, tb = ut.table, tbAttr = getDefaultValue(me, tb), tdpadding = parseInt(domUtils.getComputedStyle(tb.getElementsByTagName("td")[0], "padding-top"));
    _$jscoverage['plugins/table.cmds.js'][622]++;
    if (ut.isFullCol()) {
      _$jscoverage['plugins/table.cmds.js'][623]++;
      var captionArr = domUtils.getElementsByTagName(tb, "caption"), thArr = domUtils.getElementsByTagName(tb, "th"), captionHeight, thHeight;
      _$jscoverage['plugins/table.cmds.js'][627]++;
      if ((captionArr.length > 0)) {
        _$jscoverage['plugins/table.cmds.js'][628]++;
        captionHeight = captionArr[0].offsetHeight;
      }
      _$jscoverage['plugins/table.cmds.js'][630]++;
      if ((thArr.length > 0)) {
        _$jscoverage['plugins/table.cmds.js'][631]++;
        thHeight = thArr[0].offsetHeight;
      }
      _$jscoverage['plugins/table.cmds.js'][634]++;
      sumHeight = (tb.offsetHeight - (captionHeight || 0) - (thHeight || 0));
      _$jscoverage['plugins/table.cmds.js'][635]++;
      rowNum = ((thArr.length == 0)? ut.rowsNum: (ut.rowsNum - 1));
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][637]++;
      var begin = ut.cellsRange.beginRowIndex, end = ut.cellsRange.endRowIndex, count = 0, trs = domUtils.getElementsByTagName(tb, "tr");
      _$jscoverage['plugins/table.cmds.js'][641]++;
      for (var i = begin; (i <= end); (i++)) {
        _$jscoverage['plugins/table.cmds.js'][642]++;
        sumHeight += trs[i].offsetHeight;
        _$jscoverage['plugins/table.cmds.js'][643]++;
        count += 1;
}
      _$jscoverage['plugins/table.cmds.js'][645]++;
      rowNum = count;
    }
    _$jscoverage['plugins/table.cmds.js'][648]++;
    if ((browser.ie && (browser.version < 9))) {
      _$jscoverage['plugins/table.cmds.js'][649]++;
      averageHeight = Math.ceil((sumHeight / rowNum));
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][651]++;
      averageHeight = (Math.ceil((sumHeight / rowNum)) - (tbAttr.tdBorder * 2) - (tdpadding * 2));
    }
    _$jscoverage['plugins/table.cmds.js'][653]++;
    return averageHeight;
}
  _$jscoverage['plugins/table.cmds.js'][656]++;
  function setAverageHeight(averageHeight) {
    _$jscoverage['plugins/table.cmds.js'][657]++;
    var cells = (ut.isFullCol()? domUtils.getElementsByTagName(ut.table, "td"): ut.selectedTds);
    _$jscoverage['plugins/table.cmds.js'][658]++;
    utils.each(cells, (function (node) {
  _$jscoverage['plugins/table.cmds.js'][659]++;
  if ((node.rowSpan == 1)) {
    _$jscoverage['plugins/table.cmds.js'][660]++;
    node.setAttribute("height", averageHeight);
  }
}));
}
  _$jscoverage['plugins/table.cmds.js'][665]++;
  if ((ut && ut.selectedTds.length)) {
    _$jscoverage['plugins/table.cmds.js'][666]++;
    setAverageHeight(getAverageHeight());
  }
})};
  _$jscoverage['plugins/table.cmds.js'][672]++;
  UE.commands.cellalignment = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][674]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd, data) {
  _$jscoverage['plugins/table.cmds.js'][677]++;
  var me = this, ut = getUETableBySelected(me);
  _$jscoverage['plugins/table.cmds.js'][680]++;
  if ((! ut)) {
    _$jscoverage['plugins/table.cmds.js'][681]++;
    var start = me.selection.getStart(), cell = (start && domUtils.findParentByTagName(start, ["td", "th", "caption"], true));
    _$jscoverage['plugins/table.cmds.js'][683]++;
    if ((! /caption/gi.test(cell.tagName))) {
      _$jscoverage['plugins/table.cmds.js'][684]++;
      domUtils.setAttributes(cell, data);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][686]++;
      cell.style.textAlign = data.align;
      _$jscoverage['plugins/table.cmds.js'][687]++;
      cell.style.verticalAlign = data.vAlign;
    }
    _$jscoverage['plugins/table.cmds.js'][689]++;
    me.selection.getRange().setCursor(true);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][691]++;
    utils.each(ut.selectedTds, (function (cell) {
  _$jscoverage['plugins/table.cmds.js'][692]++;
  domUtils.setAttributes(cell, data);
}));
  }
}), queryCommandValue: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][702]++;
  var activeMenuCell = getTableItemsByRange(this).cell;
  _$jscoverage['plugins/table.cmds.js'][704]++;
  if ((! activeMenuCell)) {
    _$jscoverage['plugins/table.cmds.js'][705]++;
    activeMenuCell = getSelectedArr(this)[0];
  }
  _$jscoverage['plugins/table.cmds.js'][708]++;
  if ((! activeMenuCell)) {
    _$jscoverage['plugins/table.cmds.js'][710]++;
    return null;
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][715]++;
    var cells = UE.UETable.getUETable(activeMenuCell).selectedTds;
    _$jscoverage['plugins/table.cmds.js'][717]++;
    ((! cells.length) && (cells = activeMenuCell));
    _$jscoverage['plugins/table.cmds.js'][719]++;
    return UE.UETable.getTableCellAlignState(cells);
  }
})};
  _$jscoverage['plugins/table.cmds.js'][726]++;
  UE.commands.tablealignment = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][728]++;
  if ((browser.ie && (browser.version < 8))) {
    _$jscoverage['plugins/table.cmds.js'][729]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][731]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd, value) {
  _$jscoverage['plugins/table.cmds.js'][734]++;
  var me = this, start = me.selection.getStart(), table = (start && domUtils.findParentByTagName(start, ["table"], true));
  _$jscoverage['plugins/table.cmds.js'][738]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][739]++;
    table.setAttribute("align", value);
  }
})};
  _$jscoverage['plugins/table.cmds.js'][745]++;
  UE.commands.edittable = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][747]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd, color) {
  _$jscoverage['plugins/table.cmds.js'][750]++;
  var rng = this.selection.getRange(), table = domUtils.findParentByTagName(rng.startContainer, "table");
  _$jscoverage['plugins/table.cmds.js'][752]++;
  if (table) {
    _$jscoverage['plugins/table.cmds.js'][753]++;
    var arr = domUtils.getElementsByTagName(table, "td").concat(domUtils.getElementsByTagName(table, "th"), domUtils.getElementsByTagName(table, "caption"));
    _$jscoverage['plugins/table.cmds.js'][757]++;
    utils.each(arr, (function (node) {
  _$jscoverage['plugins/table.cmds.js'][758]++;
  node.style.borderColor = color;
}));
  }
})};
  _$jscoverage['plugins/table.cmds.js'][764]++;
  UE.commands.edittd = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][766]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd, bkColor) {
  _$jscoverage['plugins/table.cmds.js'][769]++;
  var me = this, ut = getUETableBySelected(me);
  _$jscoverage['plugins/table.cmds.js'][772]++;
  if ((! ut)) {
    _$jscoverage['plugins/table.cmds.js'][773]++;
    var start = me.selection.getStart(), cell = (start && domUtils.findParentByTagName(start, ["td", "th", "caption"], true));
    _$jscoverage['plugins/table.cmds.js'][775]++;
    if (cell) {
      _$jscoverage['plugins/table.cmds.js'][776]++;
      cell.style.backgroundColor = bkColor;
    }
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][779]++;
    utils.each(ut.selectedTds, (function (cell) {
  _$jscoverage['plugins/table.cmds.js'][780]++;
  cell.style.backgroundColor = bkColor;
}));
  }
})};
  _$jscoverage['plugins/table.cmds.js'][785]++;
  UE.commands.sorttable = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][787]++;
  var me = this, tableItems = getTableItemsByRange(me);
  _$jscoverage['plugins/table.cmds.js'][789]++;
  if ((! tableItems.cell)) {
    _$jscoverage['plugins/table.cmds.js'][789]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][790]++;
  var table = tableItems.table, cells = table.getElementsByTagName("td");
  _$jscoverage['plugins/table.cmds.js'][792]++;
  for (var i = 0, cell; (cell = cells[(i++)]);) {
    _$jscoverage['plugins/table.cmds.js'][793]++;
    if (((cell.rowSpan != 1) || (cell.colSpan != 1))) {
      _$jscoverage['plugins/table.cmds.js'][793]++;
      return -1;
    }
}
  _$jscoverage['plugins/table.cmds.js'][795]++;
  return 0;
}), execCommand: (function (cmd, fn) {
  _$jscoverage['plugins/table.cmds.js'][798]++;
  var me = this, range = me.selection.getRange(), bk = range.createBookmark(true), tableItems = getTableItemsByRange(me), cell = tableItems.cell, ut = getUETable(tableItems.table), cellInfo = ut.getCellInfo(cell);
  _$jscoverage['plugins/table.cmds.js'][805]++;
  ut.sortTable(cellInfo.cellIndex, fn);
  _$jscoverage['plugins/table.cmds.js'][806]++;
  range.moveToBookmark(bk).select();
})};
  _$jscoverage['plugins/table.cmds.js'][810]++;
  UE.commands.enablesort = (UE.commands.disablesort = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][812]++;
  return (getTableItemsByRange(this).table? 0: -1);
}), execCommand: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][815]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][816]++;
  table.setAttribute("data-sort", ((cmd == "enablesort")? "sortEnabled": "sortDisabled"));
})});
  _$jscoverage['plugins/table.cmds.js'][819]++;
  UE.commands.settablebackground = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][821]++;
  return ((getSelectedArr(this).length > 1)? 0: -1);
}), execCommand: (function (cmd, value) {
  _$jscoverage['plugins/table.cmds.js'][824]++;
  var table, cells, ut;
  _$jscoverage['plugins/table.cmds.js'][825]++;
  cells = getSelectedArr(this);
  _$jscoverage['plugins/table.cmds.js'][826]++;
  ut = getUETable(cells[0]);
  _$jscoverage['plugins/table.cmds.js'][827]++;
  ut.setBackground(cells, value);
})};
  _$jscoverage['plugins/table.cmds.js'][831]++;
  UE.commands.cleartablebackground = {queryCommandState: (function () {
  _$jscoverage['plugins/table.cmds.js'][833]++;
  var cells = getSelectedArr(this);
  _$jscoverage['plugins/table.cmds.js'][834]++;
  if ((! cells.length)) {
    _$jscoverage['plugins/table.cmds.js'][834]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][835]++;
  for (var i = 0, cell; (cell = cells[(i++)]);) {
    _$jscoverage['plugins/table.cmds.js'][836]++;
    if ((cell.style.backgroundColor !== "")) {
      _$jscoverage['plugins/table.cmds.js'][836]++;
      return 0;
    }
}
  _$jscoverage['plugins/table.cmds.js'][838]++;
  return -1;
}), execCommand: (function () {
  _$jscoverage['plugins/table.cmds.js'][841]++;
  var cells = getSelectedArr(this), ut = getUETable(cells[0]);
  _$jscoverage['plugins/table.cmds.js'][843]++;
  ut.removeBackground(cells);
})};
  _$jscoverage['plugins/table.cmds.js'][847]++;
  UE.commands.interlacetable = (UE.commands.uninterlacetable = {queryCommandState: (function (cmd) {
  _$jscoverage['plugins/table.cmds.js'][849]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][850]++;
  if ((! table)) {
    _$jscoverage['plugins/table.cmds.js'][850]++;
    return -1;
  }
  _$jscoverage['plugins/table.cmds.js'][851]++;
  var interlaced = table.getAttribute("interlaced");
  _$jscoverage['plugins/table.cmds.js'][852]++;
  if ((cmd == "interlacetable")) {
    _$jscoverage['plugins/table.cmds.js'][855]++;
    return ((interlaced === "enabled")? -1: 0);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][857]++;
    return (((! interlaced) || (interlaced === "disabled"))? -1: 0);
  }
}), execCommand: (function (cmd, classList) {
  _$jscoverage['plugins/table.cmds.js'][861]++;
  var table = getTableItemsByRange(this).table;
  _$jscoverage['plugins/table.cmds.js'][862]++;
  if ((cmd == "interlacetable")) {
    _$jscoverage['plugins/table.cmds.js'][863]++;
    table.setAttribute("interlaced", "enabled");
    _$jscoverage['plugins/table.cmds.js'][864]++;
    this.fireEvent("interlacetable", table, classList);
  }
  else {
    _$jscoverage['plugins/table.cmds.js'][866]++;
    table.setAttribute("interlaced", "disabled");
    _$jscoverage['plugins/table.cmds.js'][867]++;
    this.fireEvent("uninterlacetable", table);
  }
})});
  _$jscoverage['plugins/table.cmds.js'][872]++;
  function resetTdWidth(table, editor) {
    _$jscoverage['plugins/table.cmds.js'][873]++;
    var tds = table.getElementsByTagName("td");
    _$jscoverage['plugins/table.cmds.js'][874]++;
    utils.each(tds, (function (td) {
  _$jscoverage['plugins/table.cmds.js'][875]++;
  td.removeAttribute("width");
}));
    _$jscoverage['plugins/table.cmds.js'][877]++;
    table.setAttribute("width", getTableWidth(editor, true, getDefaultValue(editor, table)));
    _$jscoverage['plugins/table.cmds.js'][878]++;
    setTimeout((function () {
  _$jscoverage['plugins/table.cmds.js'][879]++;
  utils.each(tds, (function (td) {
  _$jscoverage['plugins/table.cmds.js'][880]++;
  ((td.colSpan == 1) && td.setAttribute("width", (td.offsetWidth + "")));
}));
}), 0);
}
  _$jscoverage['plugins/table.cmds.js'][885]++;
  function getTableWidth(editor, needIEHack, defaultValue) {
    _$jscoverage['plugins/table.cmds.js'][886]++;
    var body = editor.body;
    _$jscoverage['plugins/table.cmds.js'][887]++;
    return (body.offsetWidth - (needIEHack? (parseInt(domUtils.getComputedStyle(body, "margin-left"), 10) * 2): 0) - (defaultValue.tableBorder * 2) - (editor.options.offsetWidth || 0));
}
  _$jscoverage['plugins/table.cmds.js'][890]++;
  function getSelectedArr(editor) {
    _$jscoverage['plugins/table.cmds.js'][891]++;
    var cell = getTableItemsByRange(editor).cell;
    _$jscoverage['plugins/table.cmds.js'][892]++;
    if (cell) {
      _$jscoverage['plugins/table.cmds.js'][893]++;
      var ut = getUETable(cell);
      _$jscoverage['plugins/table.cmds.js'][894]++;
      return (ut.selectedTds.length? ut.selectedTds: [cell]);
    }
    else {
      _$jscoverage['plugins/table.cmds.js'][896]++;
      return [];
    }
}
})();
