jspreadsheet 9.1.13 → 9.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +446 -445
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -22,471 +22,472 @@ $jscomp.polyfill=function(F,J,M,X){J&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(F,J,M,X){var W=F.split(".");F=1===W.length;X=W[0];X=!F&&X in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<W.length-1;Z++){var qa=W[Z];if(!(qa in X))return;X=X[qa]}W=W[W.length-1];M=$jscomp.IS_SYMBOL_NATIVE&&"es6"===M?X[W]:null;J=J(M);null!=J&&(F?$jscomp.defineProperty($jscomp.polyfills,W,{configurable:!0,writable:!0,value:J}):J!==M&&(void 0===$jscomp.propertyToPolyfillSymbol[W]&&(M=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[W]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
23
|
$jscomp.global.Symbol(W):$jscomp.POLYFILL_PREFIX+M+"$"+W),$jscomp.defineProperty(X,$jscomp.propertyToPolyfillSymbol[W],{configurable:!0,writable:!0,value:J})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(F){F={next:F};F[Symbol.iterator]=function(){return this};return F};
|
|
24
24
|
$jscomp.iteratorFromArray=function(F,J){F instanceof String&&(F+="");var M=0,X=!1,W={next:function(){if(!X&&M<F.length){var Z=M++;return{value:J(Z,F[Z]),done:!1}}X=!0;return{done:!0,value:void 0}}};W[Symbol.iterator]=function(){return W};return W};$jscomp.polyfill("Array.prototype.values",function(F){return F?F:function(){return $jscomp.iteratorFromArray(this,function(J,M){return M})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_315c=["use strict","{","}","","9.1.14","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","&","<","g","<",">",">","=","!",'"',"undefined","number","fullscreen","block","string","readonly","jss_rotate","span","rotate(","deg)","jss_hidden_index","div","right","10px","pointer","/v9",",","localhost",".","v9"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license",
|
|
26
26
|
"Your license is expired. Please renew your certificate.","jspreadsheet","img","/jspreadsheet/","logo.png","none","status","edition","scope","data-x","data-y","get","px","jss_frozen","0px","scroll","wheel","firefox","goto","jss_scroll","jss_hidden","jss_content_overflow","onresize","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge",
|
|
27
27
|
"removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setFreezeColumns","setFreezeRows","orderBy","setValue","setProperty","updateProperty","renameWorksheet","moveWorksheet","setDefinedNames","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","copying","keydown","oneditionstart","oncreateeditor","hidden","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input",
|
|
28
|
-
"contentEditable","oninput","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","onbeforesend","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","onblur","onfocus","onselection"," ","'","'!",":","jss_border","cloning","jss_border_","15","jss_resize_corner",
|
|
29
|
-
"moveLeft","-6px","moveTop","moveRight","moveDown","-2000px","tr","jss_group_container","td"," ",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.","jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action","51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title",
|
|
30
|
-
"col","oncreatecolumn","jss_filters_icon","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell","onchangenestedcell","center","data-nested-x","data-nested-y","align","calendar",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",
|
|
31
|
-
"Defined names are only available on the Premium edition.","onchangedefinednames","#REF!","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","-","/","*","^","(","[","|",";","data-token","picker","jss_picker","click","active","focus","input","jss_object","contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected",
|
|
32
|
-
"CHART(","#SPILL!","jss_number","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values","mergeCells","title","jss_comments","jss_unlocked","jss_zebra","jss_wrap","onchangeproperty","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration",
|
|
33
|
-
"oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments","ondeleterow","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination","onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","record","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration",
|
|
34
|
-
"onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta","onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined",
|
|
35
|
-
"jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_frozen_row","jss_freeze_control_row","jss_freeze_control_col","jss_content","selectstart","table","thead","tbody","tfoot","jss_nogridline","colgroup","50","jss_selectall","JSS: Freeze controls are only available on the Premium edition.","jss","cellpadding","cellspacing","unselectable","yes","jss_","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false",
|
|
36
|
-
"rows","onbeforechangereferences","onchangereferences","jss_container","jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","bottom","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.","jss_worksheet","init","To improve the performance, use tableOverflow or pagination.","resize","touchstart","touchmove",
|
|
37
|
-
"onopenfilter","Blanks","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all","select","jss_pagination_dropdown","option","Show","entries","jss_search","jss_searching","onbeforesearch","onsearch","jss_search_container",
|
|
38
|
-
"Delete this worksheet","Are you sure?","line","nested","Rename this cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before","Insert a new column after","Delete selected columns","Rename this column","Create a new row","Order ascending","Order descending","Insert a new row before","Insert a new row after","Delete selected rows","Edit notes",
|
|
39
|
-
"i","undo","redo","divisor","120px","Verdana","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large","x-large",'<span style="font-size:',"font-size","format_align_left","format_align_center","format_align_right","format_align_justify",'<i class="material-icons">',"</i>","text-align","_","format_align_","format_bold",
|
|
40
|
-
"vertical_align_center","vertical_align_bottom","vertical-align","web","Merge the selected cells","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left","border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ",
|
|
41
|
-
"80px","1","fullscreen_exit","Toggle Fullscreen","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet","oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet",
|
|
42
|
-
"data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","move","col-resize","grab","row-resize","A","mailto:","_blank","onclick","jclose","DOM el not found",
|
|
43
|
-
"data-locale","%","jss_percent","[Red]","red","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar",
|
|
44
|
-
'" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
45
|
-
(function(F,J){typeof exports===_$
|
|
46
|
-
{version:_$
|
|
47
|
-
k=k.replace(new RegExp(_$
|
|
48
|
-
0<=k?qa.call(this,k):k;typeof b===_$
|
|
49
|
-
v.current:null;typeof k===_$
|
|
50
|
-
else return typeof d===_$
|
|
51
|
-
d?(k&&k.classList&&k.classList.contains(_$
|
|
52
|
-
!1:!0;k?b.remove(d):b.add(d);I.call(this,!0)},Na=function(k){if(void 0===k)return this.status;var d=document.createElement(_$
|
|
53
|
-
_$
|
|
54
|
-
1E3),x=M(),g[1].date<h?(b=g[1].demo||!g[1].plan||g[1].date+2592E3<h?6:7,x.license=g[1].name+_$
|
|
55
|
-
!sessionStorage.getItem(_$
|
|
28
|
+
"contentEditable","oninput","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","onbeforesend","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","disconnected","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","onblur","onfocus","onselection"," ","'","'!",":","jss_border","cloning","jss_border_","15","jss_resize_corner",
|
|
29
|
+
"data-action","ontouchstart","moveLeft","-6px","moveTop","moveRight","moveDown","-2000px","tr","jss_group_container","td"," ",".jss_group","jss_group","+","width","Jspreadsheet: This column is part of a merged cell.","jss_dragging","1px","jss_helper_col","Jspreadsheet: This row is part of a merged cell","Jspreadsheet: Please clear your search before perform this action","51px","jss_helper_row","No cell selected","Invalid merged properties","onmerge","colspan","rowspan","Column name","data-title",
|
|
30
|
+
"onchangeheader","jss_header","col","oncreatecolumn","jss_filters_icon","setFooter","onchangefooter","setFooterValue","onchangefootervalue","resetFooter","setNestedHeaders","onchangenested","jss_nested","resetNestedHeaders","setNestedCell","onchangenestedcell","center","data-nested-x","data-nested-y","align","calendar",'""',"\t","oncopy","copy","color: initial","onbeforepaste","JSS: For better results, please allow pagination or tableOverflow.","onpaste","Export not allowed","\ufeff","text/csv;charset=utf-8;",
|
|
31
|
+
".csv","a","download","Defined names are only available on the Premium edition.","onchangedefinednames","#REF!","#1a237e","#b71c1c","#880e4f","#1b5e20","#ff6f00","-","/","*","^","(","[","|",";","data-token","picker","jss_picker","click","active","focus","input","jss_object","contenteditable","blur","last",'<b class="','" data-token="','">',"</b>","data-single","true","b",")","]","var "," = {};"," = ",";\n","; return ","onbeforeformula","#LOOP","Reference loop detected","#SELF","Self Reference detected",
|
|
32
|
+
"#ERROR","Table does not exist or is not loaded yet","CHART(","#SPILL!","jss_number","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onformulachain","onbeforechange","onchange","oncreatecell","values","mergeCells","title","jss_comments","jss_unlocked","jss_zebra","jss_wrap","onchangeproperty","jss_row","oncreaterow","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration",
|
|
33
|
+
"onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration","onbeforedeleterow","onbeforedeleterow returned false","meta","cells","comments","ondeleterow","Jspreadsheet: Invalid origin","Jspreadsheet: Invalid destination","onmovecolumn","Jspreadsheet: Insert column is not enabled in the table configuration","onbeforeinsertcolumn","onbeforeinsertcolumn returned false","record","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration",
|
|
34
|
+
"Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false","ondeletecolumn","; ","onchangestyle","No cell provided","onresetstyle","onbeforecomments","oncomments","setMeta","onchangemeta","resetMeta","onresetmeta","arrow-down","percent","numeric","onbeforesort","This action will destroy any existing merged cells. Are you sure?","onsort","arrow-up","jss_pagination","Jspreadsheet: No pagination defined","Jspreadsheet: pagination not defined",
|
|
35
|
+
"onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected","Showing page {0} of {1} entries","jss_frozen_row","jss_freeze_control_row","jss_freeze_control_col","jss_content","selectstart","table","thead","tbody","tfoot","jss_nogridline","colgroup","50","jss_selectall","JSS: Freeze controls are only available on the Premium edition.","jss","cellpadding","cellspacing","unselectable","yes","jss_","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false",
|
|
36
|
+
"X","Y","jss_content_pagination","Frozen columns cannot be greater than the number of available columns","rows","onbeforechangereferences","onchangereferences","jss_container","jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","bottom","beforeinit","Sheet","Worksheet clash name: ",". It is highly recommended to define a unique worksheetName on the initialization.","jss_worksheet","init","To improve the performance, use tableOverflow or pagination.","resize","touchstart","touchmove",
|
|
37
|
+
"touchend","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","onopenfilter","Blanks","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply","jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all","select","jss_pagination_dropdown","option","Show","entries","jss_search","jss_searching","onbeforesearch","onsearch","jss_search_container",
|
|
38
|
+
"jss_contextmenu","cell","row","header","Mac","⌘","Ctrl","tabs","Rename this worksheet","Delete this worksheet","Are you sure?","line","nested","Rename this cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before","Insert a new column after","Delete selected columns","Rename this column","Create a new row","Order ascending","Order descending","Insert a new row before","Insert a new row after","Delete selected rows","Edit notes",
|
|
39
|
+
"Add notes","notes","Notes","Clear notes","Save as","save"," + S","About","info","with-toolbar","i","jtoolbar-disabled","undo","redo","divisor","120px","Verdana","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large","x-large",'<span style="font-size:',"font-size","format_align_left","format_align_center","format_align_right","format_align_justify",'<i class="material-icons">',"</i>","text-align","_","format_align_","format_bold",
|
|
40
|
+
"font-weight","bold","format_color_text","format_color_fill","background-color","extended","top","middle","vertical_align_top","vertical_align_center","vertical_align_bottom","vertical-align","web","Merge the selected cells","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left","border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ",
|
|
41
|
+
"border-bottom: ","border-bottom: ; ","material-icons","color_lens",'<div style="height: ','px; width: 50px; background-color: black;"></div>',"80px","1","fullscreen_exit","Toggle Fullscreen","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet","oncreateworksheet","deleteWorksheet","ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet",
|
|
42
|
+
"TABLE","Element is not a table","colgroup > col","data-celltype","readOnly","name","id",":scope > thead > tr",":scope > tr, :scope > tbody > tr","data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","move","col-resize","grab","row-resize","A","mailto:","_blank","onclick","jclose","DOM el not found",
|
|
43
|
+
'<table class="jss"><tbody><tr><td>A</td></tr></tbody></table>',"Cloud extension not loaded.","onload","jtabs","jss_dialog","decimal","data-locale","%","jss_percent","[Red]","red","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar",
|
|
44
|
+
"min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex","jpanel","delete","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
45
|
+
(function(F,J){typeof exports===_$_315c[104]&&typeof module!==_$_315c[21]?module.exports=J():typeof define===_$_315c[105]&&define.amd?define(J):F.jspreadsheet=F.jexcel=J()})(this,function(){_$_315c[0];var F=function(k,d){k=jSuites.translate(k);if(d&&d.length)for(var b=0;b<d.length;b++)k=k.replace(_$_315c[1]+b+_$_315c[2],d[b]);return k},J=function(k,d){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_315c[3]).toUpperCase();if(void 0===d)return window[k]?window[k]:null;window[k]=d},M=function(){var k=
|
|
46
|
+
{version:_$_315c[4],edition:_$_315c[5],host:_$_315c[6],license:_$_315c[7],print:function(){return[_$_315c[8]+this.edition+_$_315c[9]+this.version+_$_315c[10]+this.host+_$_315c[10]+this.license]}};return function(){return k}}(),X=function(k){var d=parseInt(k.y);if(k.id)var b=parseInt(k.id);else k.value&&(b=parseInt(k.value));0<b&&(this.rows[d].id=b,ya[_$_315c[11]].call(this,b))},W=function(k,d){var b=_$_315c[3],a=0;-1!==k.indexOf(_$_315c[12])&&(k=k.replace(new RegExp(_$_315c[13],_$_315c[14]),_$_315c[15]),
|
|
47
|
+
k=k.replace(new RegExp(_$_315c[16],_$_315c[14]),_$_315c[17]));for(var c=[_$_315c[18],_$_315c[19],_$_315c[17],_$_315c[15]],e=0;e<k.length;e++)k[e]==_$_315c[20]&&(a=0==a?1:0),1==a?b+=k[e]:(b+=k[e].toUpperCase(),1==d&&0<e&&k[e]==_$_315c[18]&&-1==c.indexOf(k[e-1])&&-1==c.indexOf(k[e+1])&&(b+=_$_315c[18]));return b},Z=function(k){return(_$_315c[3]+k).substr(0,1)===_$_315c[18]},qa=function(k){var d=this.options.columns;return d[k]&&d[k].name?d[k].name:k},Q=function(k,d,b){var a;if(a=this.options.data[d]){var c=
|
|
48
|
+
0<=k?qa.call(this,k):k;typeof b===_$_315c[21]?b=typeof c===_$_315c[22]?a[k]:jSuites.path.call(a,_$_315c[3]+c):(typeof c===_$_315c[22]?a[k]=b:jSuites.path.call(a,_$_315c[3]+c,b),!Z(b)&&this.records[d][k]&&(this.records[d][k].v=b))}else b=null;return b},R=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Na.call(this))?7<=k?!0:!1:!0},Oa=function(k){var d=_$_315c[23];if(this.parent)var b=this.parent.config,a=this.parent.element,c=this;else b=this.config,a=this.element,c=v.current?
|
|
49
|
+
v.current:null;typeof k===_$_315c[21]&&(k=!a.classList.contains(d));k?(a.classList.add(d),b.fullscreen=!0):(a.classList.remove(d),b.fullscreen=!1);c&&(I.call(c,!0),ma.update.call(c.parent,c))},Pa=function(k){var d=this.loading;null===k&&(k=d.style.display==_$_315c[24]?!0:!1);d.style.display=k?_$_315c[24]:_$_315c[3];setTimeout(function(){d.style.display=_$_315c[3]},1E3)},Ka=function(k,d){if(typeof k===_$_315c[25]){var b=G.getCoordsFromColumnName(k);b=this.records[b[1]][b[0]];if(b.element)k=b.element;
|
|
50
|
+
else return typeof d===_$_315c[21]?b.readonly:b.readonly=d?!0:!1}b=_$_315c[26];k=k.classList;if(typeof d===_$_315c[21])return k.contains(b)?!0:!1;d?k.add(b):k.remove(b)},Ua=function(k,d){var b,a=[];if(typeof k===_$_315c[25]){var c=G.getCoordsFromColumnName(k);a.push({x:c[0],y:c[1],value:{rotate:d}})}else if(Array.isArray(k))for(b=0;b<k.length;b++)c=G.getCoordsFromColumnName(k[b]),a.push({x:c[0],y:c[1],value:{rotate:d}});for(b=0;b<a.length;b++)(c=this.records[a[b].y][a[b].x])&&c.element&&(k=c.element.firstChild,
|
|
51
|
+
d?(k&&k.classList&&k.classList.contains(_$_315c[27])||(k=document.createElement(_$_315c[28]),k.classList.add(_$_315c[27]),k.innerHTML=c.element.innerHTML,c.element.innerHTML=_$_315c[3],c.element.appendChild(k)),k.style.transform=_$_315c[29]+parseInt(270-d)+_$_315c[30]):k&&k.classList&&k.classList.contains(_$_315c[27])&&(k.classList.remove(_$_315c[27]),k.style.transform=_$_315c[3]));this.updateProperty(a);ba.refresh.call(this)},Ba=function(k){var d=_$_315c[31],b=this.table.classList;if(typeof k==_$_315c[21])return b.contains(d)?
|
|
52
|
+
!1:!0;k?b.remove(d):b.add(d);I.call(this,!0)},Na=function(k){if(void 0===k)return this.status;var d=document.createElement(_$_315c[32]);d.style.textAlign=_$_315c[33];d.style.fontSize=_$_315c[34];d.style.cursor=_$_315c[35];d.onclick=function(){window.location.href=M().host+_$_315c[36]};var b=null,a=[],c=[74,50,48,50,48,33].join(_$_315c[3]);(function(f){b=1;try{if(f){var g=window.atob(f);g=g.split(_$_315c[37]);if(g[1]){g[1]=window.atob(g[1]);var h=g[0];f=c;var n=g[1],l=jSuites.sha512,p=_$_315c[3],q=
|
|
53
|
+
_$_315c[3];128<f.length&&(f=l(f));for(var r=0;128>r;r++){var w=f[r]?f[r].charCodeAt(0):0;p+=String.fromCharCode(54^w);q+=String.fromCharCode(92^w)}var x=l(q+l(p+n));if(h!=x)b=3;else if(g[1]=JSON.parse(g[1]),g[1].date){var z=window.location.hostname||_$_315c[38];h=!1;for(x=0;x<g[1].domain.length;x++)-1===g[1].domain[x].indexOf(_$_315c[39])?z===g[1].domain[x]&&(h=!0):z.substr(z.indexOf(g[1].domain[x]))==g[1].domain[x]&&(h=!0);!1===h?b=4:g[1].scope&&0<=g[1].scope.indexOf(_$_315c[40])?(z=new Date,h=parseInt(z.getTime()/
|
|
54
|
+
1E3),x=M(),g[1].date<h?(b=g[1].demo||!g[1].plan||g[1].date+2592E3<h?6:7,x.license=g[1].name+_$_315c[41]):(b=8,x.license=_$_315c[42]+g[1].name,x.edition=3==g[1].plan||6==g[1].plan||31==g[1].plan||33==g[1].plan?_$_315c[43]:_$_315c[5],a=g[1].scope)):b=5}else b=4}else b=2}}catch(A){}})(k);k=_$_315c[3];if(1==b)k=_$_315c[44];else if(2==b||3==b||4==b)k=_$_315c[45];else if(5==b)k=_$_315c[46];else if(6==b||7==b)k=_$_315c[47];d.appendChild(document.createTextNode(k));if(8>b)try{if(typeof sessionStorage!==_$_315c[21]&&
|
|
55
|
+
!sessionStorage.getItem(_$_315c[48])){sessionStorage.setItem(_$_315c[48],!0);var e=document.createElement(_$_315c[49]);e.src=M().host+_$_315c[50]+_$_315c[51];e.style.display=_$_315c[52];d.appendChild(e)}}catch(f){}Object.defineProperty(this,_$_315c[53],{value:b,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_315c[54],{value:M().edition===_$_315c[43]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_315c[55],{get:function(){return a},
|
|
56
56
|
configurable:!1,enumerable:!1,extensible:!1});return d},I=function(){var k=function(l){-1==this.indexOf(l)&&this.push(l)},d=function(l,p){if(!l||!p)return!1;var q=l.length;if(q!=p.length)return!1;for(;q--;)if(l[q]!==p[q])return!1;return!0},b=function(l){var p=null,q,r,w=0,x={},z=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(ia.attached.call(this,q)){this.headers[q].parentNode.removeChild(this.headers[q]);this.colgroup[q].parentNode.removeChild(this.colgroup[q]);if(this.options.footers)for(r=
|
|
57
57
|
0;r<this.options.footers.length;r++)this.footers.content[r][q].element&&this.footers.content[r][q].element.parentNode&&this.footers.content[r][q].element.parentNode.removeChild(this.footers.content[r][q].element);z=!0}for(r=0;r<this.visibleRows.length;r++){var A=this.records[this.visibleRows[r]][q];A.element&&A.element.parentNode&&A.element.parentNode.removeChild(A.element)}}if(this.options.nestedHeaders)for(r=0;r<this.thead.children.length-1;r++)w+=this.thead.children[r].offsetHeight;for(q=0;q<l.length;q++){var y=
|
|
58
58
|
l[q];var D=Ea.create.call(this,y);if(p){if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[p].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[y],this.colgroupContainer.children[p].nextSibling);if(this.options.footers)for(r=0;r<this.options.footers.length;r++)this.tfoot.children[r].insertBefore(ha.create.call(this,y,r),this.tfoot.children[r].children[p].nextSibling);w&&(D.style.top+=w);z=!0}for(r=0;r<this.visibleRows.length;r++)A=this.visibleRows[r],
|
|
59
|
-
A=S[_$
|
|
60
|
-
0;r<this.visibleRows.length;r++)A=this.visibleRows[r],A=S[_$
|
|
59
|
+
A=S[_$_315c[58]].call(this,y,A),A.parentNode||this.tbody.children[r].insertBefore(A,this.tbody.children[r].children[p].nextSibling)}else{if(!D.parentNode){this.headerContainer.insertBefore(D,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[y],this.colgroupContainer.children[1]);if(this.options.footers)for(r=0;r<this.options.footers.length;r++)this.tfoot.children[r].insertBefore(ha.create.call(this,y,r),this.tfoot.children[r].children[1]);w&&(D.style.top+=w);z=!0}for(r=
|
|
60
|
+
0;r<this.visibleRows.length;r++)A=this.visibleRows[r],A=S[_$_315c[58]].call(this,y,A),A.parentNode||this.tbody.children[r].insertBefore(A,this.tbody.children[r].children[1])}if(this.options.mergeCells)for(r=0;r<this.visibleRows.length;r++)A=this.visibleRows[r],p=G.getColumnNameFromCoords(y,A),this.options.mergeCells[p]&&(this.records[A][y].merged||(x[p]=!1));p=Array.prototype.indexOf.call(this.headerContainer.children,D)}w=0;if(this.options.nestedHeaders)for(r=0;r<this.options.nestedHeaders.length;r++){p=
|
|
61
61
|
null;y=[];A=za.getColumns.call(this,r);for(q=0;q<l.length;q++)void 0!==A[l[q]]&&-1==y.indexOf(A[l[q]])&&y.push(A[l[q]]);for(q=0;q<this.options.nestedHeaders[r].length;q++)-1==y.indexOf(q)&&this.nested.content[r][q]&&this.nested.content[r][q].element.offsetHeight&&this.nested.content[r][q].element.remove();for(q=A=0;q<y.length;q++)D=za.create.call(this,y[q],r),D.parentNode||(p?this.thead.children[r].children[p]?this.thead.children[r].insertBefore(D,this.thead.children[r].children[p].nextSibling):this.thead.children[r].appendChild(D):
|
|
62
|
-
this.thead.children[r].insertBefore(D,this.thead.children[r].children[1]),D.style.top=w+_$
|
|
63
|
-
(this.table.style.left=_$
|
|
64
|
-
w=!0),q=p;w?(this.table.style.top=f.height.call(this,l[this.options.freezeRows||0])+_$
|
|
62
|
+
this.thead.children[r].insertBefore(D,this.thead.children[r].children[1]),D.style.top=w+_$_315c[59],this.options.freezeColumns&&this.options.nestedHeaders[r][y[q]].frozen&&(D.style.left=A+(Ba.call(this)?50:0)+_$_315c[59],D.classList.add(_$_315c[60]))),A+=D.offsetWidth,p=Array.prototype.indexOf.call(this.thead.children[r].children,D);w+=this.thead.children[r].offsetHeight}1==z?this.table.style.left=f.width.call(this,l[this.options.freezeColumns||0])+_$_315c[59]:this.width<parseInt(this.table.style.left)&&
|
|
63
|
+
(this.table.style.left=_$_315c[61]);sa.batch.call(this,x);this.visibleCols=l},a=function(l){var p=[],q=null,r,w=!1;for(r=0;r<this.tbody.children.length;r++)p.push(this.tbody.children[r]);for(r=0;r<p.length;r++){var x=parseInt(p[r].getAttribute(_$_315c[57]));-1===l.indexOf(x)&&(p[r].parentNode.removeChild(p[r]),w=!0)}for(r=0;r<l.length;r++)p=da.create.call(this,l[r]),p.parentNode||(q?this.tbody.insertBefore(p,q.nextSibling):this.tbody.insertBefore(p,this.tbody.firstChild),this.rows[l[r]].height=p.offsetHeight,
|
|
64
|
+
w=!0),q=p;w?(this.table.style.top=f.height.call(this,l[this.options.freezeRows||0])+_$_315c[59],this.visibleCols=null):this.height<parseInt(this.table.style.top)&&(this.table.style.top=_$_315c[61]);this.visibleRows=l},c=function(){var l=[],p=0,q=null;if(I.limited.call(this)){var r=q=0;r=this.content.scrollLeft;var w=r+this.content.offsetWidth;q=this.options.columns;var x=null,z=this.options.freezeColumns||0,A=0;z&&(r+=ca.getWidth.call(this,!0));for(p=0;p<q.length;p++)x=ia.isVisible.call(this,p)?parseInt(q[p].width):
|
|
65
65
|
0,(A+x>r&&A<=w||p<z)&&k.call(l,p),A+=x;for(p=0;p<l.length;p++)if(r=sa.getAffected.call(this.merged.cols,l[p]))for(q=0;q<r.length;q++)k.call(l,r[q]);for(p=0;p<l.length;p++)if(r=za.getAffected.call(this,l[p]))for(q=0;q<r.length;q++)this.options.columns[r[q]]&&k.call(l,r[q]);l.sort(function(y,D){return y-D})}else for(q=this.options.columns,p=0;p<q.length;p++)l.push(p);d(l,this.visibleCols)||b.call(this,l)},e=function(){var l=[],p=null,q=0,r=0;q=null;var w=0;if(I.limited.call(this)&&!this.options.pagination){var x=
|
|
66
66
|
this.content.scrollTop,z=x+this.content.offsetHeight,A=0,y=this.options.freezeRows||0,D=0;p=this.results?this.results:this.rows;y&&(x+=ja.getHeight.call(this,!0));for(r=0;r<p.length;r++)q=this.results?p[r]:r,A=da.height.call(this,q),(D+A>x&&D<z||r<y)&&l.push(q),D+=A}else for(p=this.results?this.results:this.rows,this.options.pagination?(q=parseInt(this.options.pagination)*this.pageNumber,w=q+parseInt(this.options.pagination),w>p.length&&(w=p.length)):(q=0,w=p.length),r=q;r<w;r++)q=this.results?p[r]:
|
|
67
|
-
r,l.push(q);if(this.options.mergeCells){for(r=0;r<l.length;r++)if(this.merged.rows[l[r]]&&(w=sa.getAffected.call(this.merged.rows,l[r])))for(q=0;q<w.length;q++)-1===l.indexOf(w[q])&&l.push(w[q]);l.sort(function(u,B){return u-B})}d(l,this.visibleRows)||a.call(this,l)},f=function(l,p){p&&(this.visibleCols=this.visibleRows=null);f.calculate.call(this);f.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$
|
|
68
|
-
function(r){if(I.limited.call(q)&&!q.options.pagination){var w=Math.abs(r.deltaX),x=Math.abs(r.deltaY);r.shiftKey||w>x?0>r.deltaX||0>r.deltaY?f.left.call(q):f.right.call(q):0>r.deltaY?f.up.call(q):f.down.call(q);r.preventDefault()}})}};f.calculate=function(){if(I.limited.call(this)){var l=ca.getWidth.call(this),p=ja.getHeight.call(this);this.width=f.width.call(this)+(l?l:1);this.height=f.height.call(this)+(p?p:1);this.scrollX.style.width=this.width+100+_$
|
|
69
|
-
100+_$
|
|
70
|
-
this.tbody.lastChild.getAttribute(_$
|
|
71
|
-
this.tbody.firstChild.getAttribute(_$
|
|
67
|
+
r,l.push(q);if(this.options.mergeCells){for(r=0;r<l.length;r++)if(this.merged.rows[l[r]]&&(w=sa.getAffected.call(this.merged.rows,l[r])))for(q=0;q<w.length;q++)-1===l.indexOf(w[q])&&l.push(w[q]);l.sort(function(u,B){return u-B})}d(l,this.visibleRows)||a.call(this,l)},f=function(l,p){p&&(this.visibleCols=this.visibleRows=null);f.calculate.call(this);f.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$_315c[62],function(){f.ignore||f.update.call(q)});this.content.addEventListener(_$_315c[63],
|
|
68
|
+
function(r){if(I.limited.call(q)&&!q.options.pagination){var w=Math.abs(r.deltaX),x=Math.abs(r.deltaY);r.shiftKey||w>x?0>r.deltaX||0>r.deltaY?f.left.call(q):f.right.call(q):0>r.deltaY?f.up.call(q):f.down.call(q);r.preventDefault()}})}};f.calculate=function(){if(I.limited.call(this)){var l=ca.getWidth.call(this),p=ja.getHeight.call(this);this.width=f.width.call(this)+(l?l:1);this.height=f.height.call(this)+(p?p:1);this.scrollX.style.width=this.width+100+_$_315c[59];this.scrollY.style.height=this.height+
|
|
69
|
+
100+_$_315c[59]}};var g=null;f.update=function(){e.call(this);c.call(this);Da.update.call(this);ca.refresh.call(this);ja.refresh.call(this);ba.refresh.call(this);g||(g=-1<window.navigator.userAgent.toLowerCase().indexOf(_$_315c[64]));g&&this.thead.appendChild(this.thead.lastChild)};f[_$_315c[65]]=function(l,p){null!==l&&(l=f.height.call(this,l),this.content.scrollTop=l);void 0!==p&&null!==p&&(p=f.width.call(this,p),this.content.scrollLeft=p)};f.up=function(l){if(l)this.content.scrollTop=0;else if(this.tbody.firstChild){l=
|
|
70
|
+
this.tbody.lastChild.getAttribute(_$_315c[57]);l=parseInt(l);var p=l;for(this.results&&(l=this.results.indexOf(l));0<l;){l--;var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){p=q;break}}q=da.height.call(this,p);l=this.tbody.firstChild.getAttribute(_$_315c[57]);da.attached.call(this,l)||(q+=this.content.scrollTop-this.table.offsetTop);this.content.scrollTop-=q}};f.down=function(l){if(l)this.content.scrollTop=this.content.scrollHeight;else if(this.tbody.firstChild){l=
|
|
71
|
+
this.tbody.firstChild.getAttribute(_$_315c[57]);l=parseInt(l);var p=l;for(this.results&&(l=this.results.indexOf(l));l<this.rows.length-1;){var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){p=q;break}l++}l=da.height.call(this,p);this.content.scrollTop+=l}};f.left=function(l){var p=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(p=l=this.thead.lastChild.children[1+p].getAttribute(_$_315c[56]);0<l;)if(l--,ia.isVisible.call(this,l)){p=l;break}l=p;
|
|
72
72
|
p=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||(p+=this.content.scrollLeft-this.table.offsetLeft);this.content.scrollLeft-=p}};f.right=function(l){var p=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+p].offsetWidth};var h=function(){for(var l,p=this.content.offsetHeight-this.thead.offsetHeight-ja.getHeight.call(this),q=0,r=0;r<this.tbody.children.length;r++)l=this.tbody.children[r].offsetHeight,
|
|
73
|
-
p>l&&(q+=l,p-=l);return q},n=function(){for(var l,p=this.content.offsetWidth-ca.getWidth.call(this),q=0,r=0;r<this.thead.lastChild.children.length;r++)l=this.thead.lastChild.children[r].offsetWidth,p>l&&(q+=l,p-=l);return q};f.pageUp=function(){this.content.scrollTop-=h.call(this)};f.pageDown=function(){this.content.scrollTop+=h.call(this)};f.pageLeft=function(){this.content.scrollLeft-=n.call(this)};f.pageRight=function(){this.content.scrollLeft+=n.call(this)};f.build=function(l){var p=document.createElement(_$
|
|
74
|
-
p.className=_$
|
|
75
|
-
p)return r}return p?r:q};f.adjust=function(l,p,q){var r=this.records[p][l].element;if(r){if(!this.records[p][l].merged)if(0==q||2==q){var w=0,x=Ba.call(this)?50:0;this.options.freezeColumns&&(w=ca.getWidth.call(this,!0));p=this.content.scrollLeft+w;w=this.content.scrollLeft+(this.content.offsetWidth-x);x=this.table.offsetLeft+r.offsetLeft-x;var z=r.offsetWidth;0==q?x+z<w&&l>this.options.freezeColumns-1&&x<p&&(r.offsetHeight?(q=this.content.scrollLeft+(x-p),f.setX.call(this,q)):f[_$
|
|
76
|
-
null,l)):l>this.options.freezeColumns-1&&(x>p?x+z>w&&(r.parentNode?(q=this.content.scrollLeft+(x+z-w+16),f.setX.call(this,q)):f[_$
|
|
77
|
-
l-x&&(q=this.content.scrollTop+(x-l),f.setY.call(this,q)):f[_$
|
|
78
|
-
l;f.ignore=!1};f.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return f}(),Qa=function(k,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var f=this.results?this.results[d]:d;if(!1!==this.rows[f].visible){var g=this.records[f][k].v===_$
|
|
79
|
-
if(!b)break;g=!0}}else{if(b&&g!==e&&!a)break;if(b)c=this.records[f][k].merged?f-this.records[f][k].merged[1]:f;else return f}e=g}}return c},Ra=function(k,d,b,a){for(var c=k,e,f=null;0<k;)if(k--,ia.isVisible.call(this,k)){e=!1;this.records[d]&&(e=this.records[d][k].merged?this.records[d-this.records[d][k].merged[1]][k-this.records[d][k].merged[0]].v?!0:!1:this.records[d][k].v?!0:!1);null===f&&(f=e);if(this.records[d]&&this.records[d][k].element&&this.records[d][k].element.classList.contains(_$
|
|
73
|
+
p>l&&(q+=l,p-=l);return q},n=function(){for(var l,p=this.content.offsetWidth-ca.getWidth.call(this),q=0,r=0;r<this.thead.lastChild.children.length;r++)l=this.thead.lastChild.children[r].offsetWidth,p>l&&(q+=l,p-=l);return q};f.pageUp=function(){this.content.scrollTop-=h.call(this)};f.pageDown=function(){this.content.scrollTop+=h.call(this)};f.pageLeft=function(){this.content.scrollLeft-=n.call(this)};f.pageRight=function(){this.content.scrollLeft+=n.call(this)};f.build=function(l){var p=document.createElement(_$_315c[32]);
|
|
74
|
+
p.className=_$_315c[66]+l;return p};f.width=function(l,p){for(var q=this.options.columns,r=0,w=this.options.freezeColumns||0;w<this.options.columns.length;w++){if(l===w)return r;ia.isVisible.call(this,w)&&(r+=parseInt(q[w].width));if(r>=p)return w}return p?w:r};f.height=function(l,p){for(var q=0,r=0,w=this.results?this.results:this.rows,x=this.options.freezeRows||0;x<w.length;x++){r=x;this.results&&(r=w[x]);if(l===r)return q;this.rows[r]&&!1!==this.rows[r].visible&&(q+=da.height.call(this,r));if(q>=
|
|
75
|
+
p)return r}return p?r:q};f.adjust=function(l,p,q){var r=this.records[p][l].element;if(r){if(!this.records[p][l].merged)if(0==q||2==q){var w=0,x=Ba.call(this)?50:0;this.options.freezeColumns&&(w=ca.getWidth.call(this,!0));p=this.content.scrollLeft+w;w=this.content.scrollLeft+(this.content.offsetWidth-x);x=this.table.offsetLeft+r.offsetLeft-x;var z=r.offsetWidth;0==q?x+z<w&&l>this.options.freezeColumns-1&&x<p&&(r.offsetHeight?(q=this.content.scrollLeft+(x-p),f.setX.call(this,q)):f[_$_315c[65]].call(this,
|
|
76
|
+
null,l)):l>this.options.freezeColumns-1&&(x>p?x+z>w&&(r.parentNode?(q=this.content.scrollLeft+(x+z-w+16),f.setX.call(this,q)):f[_$_315c[65]].call(this,null,l)):f[_$_315c[65]].call(this,null,l))}else w=0,this.options.freezeRows&&(w=ja.getHeight.call(this,!0)),l=this.content.scrollTop+w,w=this.content.scrollTop+this.content.offsetHeight-this.thead.offsetHeight-16,x=this.table.offsetTop+r.offsetTop-this.thead.offsetHeight,z=r.offsetHeight,1==q?x+z<w&&p>this.options.freezeRows-1&&(x<l?r.parentNode?0<
|
|
77
|
+
l-x&&(q=this.content.scrollTop+(x-l),f.setY.call(this,q)):f[_$_315c[65]].call(this,p):r.offsetHeight||f[_$_315c[65]].call(this,p)):p>this.options.freezeRows-1&&(x>l?x+z>w&&(r.parentNode?(q=this.content.scrollTop+(x+z-w),f.setY.call(this,q)):f[_$_315c[65]].call(this,p)):r.offsetHeight||f[_$_315c[65]].call(this,p))}else 0==q||2==q?f[_$_315c[65]].call(this,null,l):f[_$_315c[65]].call(this,p)};f.setX=function(l){f.ignore=!0;this.content.scrollLeft=l;f.ignore=!1};f.setY=function(l){f.ignore=!0;this.content.scrollTop=
|
|
78
|
+
l;f.ignore=!1};f.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return f}(),Qa=function(k,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var f=this.results?this.results[d]:d;if(!1!==this.rows[f].visible){var g=this.records[f][k].v===_$_315c[3]?!1:!0;null===e&&(e=g);if(this.records[f][k].element&&this.records[f][k].element.classList.contains(_$_315c[67])){if(this.records[f][k].merged){c=f-this.records[f][k].merged[1];
|
|
79
|
+
if(!b)break;g=!0}}else{if(b&&g!==e&&!a)break;if(b)c=this.records[f][k].merged?f-this.records[f][k].merged[1]:f;else return f}e=g}}return c},Ra=function(k,d,b,a){for(var c=k,e,f=null;0<k;)if(k--,ia.isVisible.call(this,k)){e=!1;this.records[d]&&(e=this.records[d][k].merged?this.records[d-this.records[d][k].merged[1]][k-this.records[d][k].merged[0]].v?!0:!1:this.records[d][k].v?!0:!1);null===f&&(f=e);if(this.records[d]&&this.records[d][k].element&&this.records[d][k].element.classList.contains(_$_315c[67])){if(this.records[d][k].merged&&
|
|
80
80
|
(c=k-this.records[d][k].merged[0],!b))break}else{if(b&&e!==f&&!a)break;if(b)c=k;else return k}f=e}return c},Va=function(){var k=function(b,a,c,e){1==b||3==b?da.attached.call(this,c)||(0<this.options.pagination?this.page(this.whichPage(c)):1==b?I.up.call(this,e):I.down.call(this,e)):S.attached.call(this,a,c)||(0==b?I.left.call(this,e):I.right.call(this,e))},d=function(b){b.up=d.up;b.down=d.down;b.right=d.right;b.left=d.left;b.last=d.last;b.first=d.first};d.up=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=
|
|
81
|
-
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);c=Qa.call(this,e,f,a,c);c!=f&&(f=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,1,e,f,a),ka[_$
|
|
82
|
-
a:{var g=e,h=f,n=h,l=null;if(this.results){h=this.results.indexOf(h);if(-1==h){c=n;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var q=this.results?this.results[h]:h;if(!1!==this.rows[q].visible){var r=this.records[q][g].v===_$
|
|
83
|
-
q;else{c=q;break a}l=r}}c=n}c!=f&&(f=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,3,e,f,a),ka[_$
|
|
84
|
-
!1;this.records[h]&&(p=this.records[h][g].merged?this.records[h-this.records[h][g].merged[1]][g-this.records[h][g].merged[0]].v?!0:!1:this.records[h][g].v?!0:!1);null===q&&(q=p);if(this.records[h]&&this.records[h][g].element&&this.records[h][g].element.classList.contains(_$
|
|
85
|
-
e,c=f,e=b,f=c),k.call(this,2,e,f,a),ka[_$
|
|
86
|
-
function(b,a){Array.isArray(this.selectedCell)&&(a?d.up.call(this,b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Wa=function(){return function(k){k.save=Sa;k.fullscreen=Oa;k.setReadOnly=Ka;k.getReadOnly=Ka;k.isReadOnly=Ka;k.rotate=Ua;k.setPlugins=function(d){va.call(this.parent,d)};k.showIndex=function(){Ba.call(this,!0)};k.hideIndex=function(){Ba.call(this,!1)};k[_$
|
|
87
|
-
k.undo=function(){T.undo.call(k.parent)};k.redo=function(){T.redo.call(k.parent)};k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return H.apply(this.parent,arguments)};k.persistence=L;k.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$
|
|
88
|
-
_$
|
|
89
|
-
columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$
|
|
90
|
-
freezeRowControl:!1,orderBy:null,worksheetId:_$
|
|
81
|
+
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);c=Qa.call(this,e,f,a,c);c!=f&&(f=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,1,e,f,a),ka[_$_315c[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,1))}};d.down=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);
|
|
82
|
+
a:{var g=e,h=f,n=h,l=null;if(this.results){h=this.results.indexOf(h);if(-1==h){c=n;break a}var p=this.results.length-1}else p=this.rows.length-1;for(;h<p;){h++;var q=this.results?this.results[h]:h;if(!1!==this.rows[q].visible){var r=this.records[q][g].v===_$_315c[3]?!1:!0;null===l&&(l=r);if(this.records[q][g].element&&this.records[q][g].element.classList.contains(_$_315c[67])){if(this.records[q][g].merged){if(!this.records[q][g].merged[1]&&(n=q,!a))break;r=!0}}else if(a&&r!==l&&!c){c=n;break a}else if(a)n=
|
|
83
|
+
q;else{c=q;break a}l=r}}c=n}c!=f&&(f=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,3,e,f,a),ka[_$_315c[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,3))}};d.right=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);a:{for(var g=e,h=f,n=this.options.columns,l=g,p,q=null;g<n.length-1;)if(g++,ia.isVisible.call(this,g)){p=
|
|
84
|
+
!1;this.records[h]&&(p=this.records[h][g].merged?this.records[h-this.records[h][g].merged[1]][g-this.records[h][g].merged[0]].v?!0:!1:this.records[h][g].v?!0:!1);null===q&&(q=p);if(this.records[h]&&this.records[h][g].element&&this.records[h][g].element.classList.contains(_$_315c[67])){if(this.records[h][g].merged&&g==g+this.records[h][g].merged[0]&&(l=g,!a))break}else if(a&&p!==q&&!c){c=l;break a}else if(a)l=g;else{c=g;break a}q=p}c=l}c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=
|
|
85
|
+
e,c=f,e=b,f=c),k.call(this,2,e,f,a),ka[_$_315c[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,2))}};d.left=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);c=Ra.call(this,e,f,a,c);c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=f,e=b,f=c),k.call(this,0,e,f,a),ka[_$_315c[11]].call(this,b,c,e,f),I.adjust.call(this,e,f,0))}};d.first=
|
|
86
|
+
function(b,a){Array.isArray(this.selectedCell)&&(a?d.up.call(this,b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Wa=function(){return function(k){k.save=Sa;k.fullscreen=Oa;k.setReadOnly=Ka;k.getReadOnly=Ka;k.isReadOnly=Ka;k.rotate=Ua;k.setPlugins=function(d){va.call(this.parent,d)};k.showIndex=function(){Ba.call(this,!0)};k.hideIndex=function(){Ba.call(this,!1)};k[_$_315c[65]]=I[_$_315c[65]];
|
|
87
|
+
k.undo=function(){T.undo.call(k.parent)};k.redo=function(){T.redo.call(k.parent)};k.isEditable=function(){return R.call(k.parent,k)};k.dispatch=function(){return H.apply(this.parent,arguments)};k.persistence=L;k.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$_315c[68]);150<d&&(this.options.tableWidth=d+_$_315c[59],this.content.style.width=this.options.tableWidth);150<b&&!this.options.pagination&&(this.options.tableHeight=parseInt(b)+
|
|
88
|
+
_$_315c[59],this.content.style.height=this.options.tableHeight);I.call(this,!0);ma.update.call(this.parent,this);H.call(this.parent,_$_315c[69],d,b)};k.helpers=G}}(),Ga=function(){var k={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_315c[48],csvHeaders:!0,csvDelimiter:_$_315c[37],columnSorting:!0,
|
|
89
|
+
columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$_315c[70],tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,freezeRows:0,freezeColumnControl:!1,
|
|
90
|
+
freezeRowControl:!1,orderBy:null,worksheetId:_$_315c[3],worksheetName:null,worksheetState:null,filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},d={application:_$_315c[71],cloud:null,root:null,definedNames:{},sorting:null,server:null,toolbar:null,editable:!0,allowExport:!0,includeHeadersOnDownload:!1,forceUpdateOnPaste:!1,loadingSpin:!1,fullscreen:!1,secureFormulas:!0,parseFormulas:!0,debugFormulas:!1,
|
|
91
91
|
editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!0,moveDownOnEnter:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,
|
|
92
92
|
ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,onselection:null,onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,
|
|
93
93
|
oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,
|
|
94
|
-
plugins:null,about:!0,license:null,worksheets:null,validations:null},b=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$
|
|
95
|
-
Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$
|
|
96
|
-
!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=parseInt(this.options.defaultColWidth)+_$
|
|
97
|
-
group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},c=function(e){e.getConfig=c[_$
|
|
98
|
-
0<g.length)for(var h=g.shift(),n=0;n<h.length;n++)f.options.columns[n]||(f.options.columns[n]={type:_$
|
|
99
|
-
if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$
|
|
100
|
-
f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));L.call(this,_$
|
|
101
|
-
c+1);this.history[c]=a}};var d=function(a){var c=a.worksheet;if(a.action==_$
|
|
102
|
-
a.attributes);else if(a.action==_$
|
|
103
|
-
a.oldValue);else if(a.action==_$
|
|
104
|
-
(g.style=a.records[f].oldStyle);e.push(g)}a.action==_$
|
|
105
|
-
!0;var c=a.worksheet;c.openWorksheet();d.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)d.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$
|
|
106
|
-
a.properties,a.data);else if(a.action==_$
|
|
107
|
-
a.newValue);else if(a.action==_$
|
|
108
|
-
a.t):a.action==_$
|
|
109
|
-
va=function(){var k=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$
|
|
110
|
-
Object.keys(this.plugins);if(a.length)for(var c=0;c<a.length;c++)if(typeof this.plugins[a[c]][d]==_$
|
|
111
|
-
na=function(){var k=function(d){d.getEditor=k[_$
|
|
112
|
-
!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][c].merged)c-=f[0],e-=f[1],d=this.records[e][c].element;if(!S.attached.call(this,c,e)){if(this.results&&0<this.results.length)return console.error(_$
|
|
113
|
-
_$
|
|
114
|
-
this.parent.config.editorFormulas&&Z(b)&&(f.classList.add(_$
|
|
115
|
-
_$
|
|
116
|
-
a.removeAttribute(_$
|
|
117
|
-
1+_$
|
|
118
|
-
H.call(v.current.parent,_$
|
|
119
|
-
ya=function(){var k=function(d){d.sequence=0;d.getNextSequence=k.next;d.getRowId=k.getId;d.setRowId=k.setId;d.getRowById=k.getRowById};k[_$
|
|
120
|
-
function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,k[_$
|
|
121
|
-
b[e].y,h=ya.getId.call(this,g);if(!h)if(c[g])h=c[g];else if(h=ya.next.call(this))c[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=qa.call(this,f);a[g].data[f]=b[e].value}ya.setId.call(this,c);return a.filter(function(n){return null!=n})},d=function(b){var a=b[0];if(0<=[_$
|
|
122
|
-
a,c,e){var f=this.parent,g=this,h=d.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=H.call(f,_$
|
|
123
|
-
jSuites.notification.isVisible()?console.log(n.name+_$
|
|
124
|
-
null;if(this.parent.config.server){var d=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$
|
|
125
|
-
this.getHighlighted(),d=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),c=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$
|
|
126
|
-
ka=function(){var k=function(d){d.resetSelection=k.reset;d.updateSelection=k.fromElements;d.updateSelectionFromCoords=k[_$
|
|
127
|
-
d<=f:d>=c&&d<=f&&b>=e&&b<=a};k.reset=function(){if(this.selectedCell)d=1,this.edition&&na.close.call(this,this.edition,!0),this.resetBorders(_$
|
|
128
|
-
b>=this.rows.length||a>=this.options.columns.length||c>=this.rows.length)};k[_$
|
|
129
|
-
l;w<=p;w++)for(var x=h;x<=n;x++)if(q=this.records[w][x].merged)q=G.getColumnNameFromCoords(x-q[0],w-q[1]),r[q]=!0;w=Object.keys(r);if(w.length)for(x=0;x<w.length;x++)q=G.getCoordsFromColumnName(w[x]),r=this.options.mergeCells[w[x]],q[0]<h&&(h=q[0]),q[0]+r[0]-1>n&&(n=q[0]+r[0]-1),q[1]<l&&(l=q[1]),q[1]+r[1]-1>p&&(p=q[1]+r[1]-1)}}f==_$
|
|
130
|
-
null!==x&&null!==r&&(I.adjust.call(this,a,c,3),I.adjust.call(this,a,c,2),I.adjust.call(this,a,c,1),I.adjust.call(this,a,c,0))),na.position.call(this,d,b),0==q&&H.call(this.parent,_$
|
|
131
|
-
c,b=d;k[_$
|
|
132
|
-
function(){var k=function(a){a.borders=[];a.setBorder=k[_$
|
|
133
|
-
g==_$
|
|
134
|
-
_$
|
|
135
|
-
a;l.y1=c;l.x2=e;l.y2=f;l.element.style.top=_$
|
|
136
|
-
e)||(e=Ra.call(this,e,null)),q=this.headers[e].offsetLeft):(q=this.thead.lastChild.lastChild.getAttribute(_$
|
|
137
|
-
this.rows[f].element.offsetHeight,l.element.style.borderBottomWidth=_$
|
|
138
|
-
e=e<this.options.freezeColumns,a&&e||(a&&!e?(e=this.content.scrollLeft+x,e>p+q&&(q+=e-(p+q),l.element.style.borderRightWidth=_$
|
|
139
|
-
_$
|
|
140
|
-
(n?(this.corner.style.top=_$
|
|
141
|
-
(this.corner.style.top=_$
|
|
142
|
-
a[e])}this.edition&&(c=this.parent.input,na.position.call(this,c.x,c.y))};k.destroy=function(a){var c;this&&(c=this.borders[a])&&(c.element.remove(),delete this.borders[a])};return k}(),Xa=function(){var k=function(d){d.setGroup=k[_$
|
|
143
|
-
d=document.createElement(_$
|
|
144
|
-
(b=d.target.getAttribute(_$
|
|
145
|
-
c=this.getSelectedColumns();d=c.indexOf(parseInt(k.event.x));if(c.length&&-1<d)for(e=0;e<c.length;e++)b.push(parseInt(this.options.columns[c[e]].width));else c=[];-1==d?(c.push(k.event.x),b.push(k.event.w)):b[d]=k.event.w;this.setWidth(c,a,b)}k.event=null},update:function(d){null!=k.event.y?(d=d.pageY-k.event.p,0<k.event.h+d&&(this.rows[k.event.y].element.style.height=k.event.h+d+_$
|
|
146
|
-
k.event.w+d),this.options.columns[k.event.x].width=k.event.w+d),0<this.options.freezeColumns&&ca.refresh.call(this),this.refreshBorders())},cancel:function(){k.end.call(this)}};return k}();(function(){var k={start:function(d){var b=this.parent.helper;d=parseInt(d.target.getAttribute(_$
|
|
147
|
-
this.records[c][d].element.classList.add(_$
|
|
148
|
-
this.tbody.children[d].getAttribute(_$
|
|
149
|
-
else{d=d.target.clientWidth/2>d.offsetX;k.event.d=d?k.event.x<b?parseInt(b)-1:parseInt(b):k.event.x>b?parseInt(b)+1:parseInt(b);b=this.headers[b].getBoundingClientRect();var a=this.content.getBoundingClientRect();this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$
|
|
150
|
-
this.merged.rows[a]?console.error(_$
|
|
151
|
-
parseInt(d.target.getAttribute(_$
|
|
152
|
-
b.style.left=a.left-c.left+_$
|
|
153
|
-
for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$
|
|
154
|
-
if(null!=b){var a=b=parseInt(b),c=d.target.clientHeight/2>d.offsetY;c?k.event.y<b&&(a=b-1):k.event.y>b&&(a=b+1);d=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(c?b.top:b.bottom)-a.top+_$
|
|
155
|
-
c&&(a=c-1):k.event.x>c&&(a=c+1),d=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0)),d||(k.event.d=a,a=this.headers[c].getBoundingClientRect(),c=this.content.getBoundingClientRect(),this.parent.helper.style.left=(b?a.left:a.right)-c.left+_$
|
|
156
|
-
b){var a=G.getColumnNameFromCoords(d,b);if(a=this.merged.cells[a])if(i=this.options.mergeCells[a])m&&void 0!==m[a]||(i[1]>t&&(t=i[1]),m&&(m[a]=this.records[b][d].element&&!this.records[b][d].merged?!0:!1))};k.getAffected=function(d){if(void 0!==this[d]){for(var b=d,a=this[d],c=[];this[b]==a;)c.push(b),b--;for(b=d+1;this[b]==a;)c.push(b),b++;c.sort(function(e,f){return e-f});return c}return!1};k[_$
|
|
157
|
-
b,a){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var c,e=null,f={},g={},h={},n=!1;typeof d==_$
|
|
158
|
-
2>q))console.log(F(_$
|
|
159
|
-
(n&&I[_$
|
|
160
|
-
b={};var a={},c={};typeof d==_$
|
|
161
|
-
a[d][0]||1,e=a[d][1]||1;d=G.getCoordsFromColumnName(d);if(!this.records[d[1]][d[0]].merged||1==b)if(a=S[_$
|
|
162
|
-
c,e],0!=g||0!=f)a.element||S[_$
|
|
163
|
-
(a.element.classList.remove(_$
|
|
94
|
+
plugins:null,about:!0,license:null,worksheets:null,validations:null},b=function(e,f){f=JSON.parse(JSON.stringify(f));var g={},h;for(h in f)e&&e.hasOwnProperty(h)?g[h]=e[h]:g[h]=f[h];return g},a=function(e){e&&(typeof e==_$_315c[25]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_315c[21]){var f=this.options.data[0].data&&0<
|
|
95
|
+
Object.keys(this.options.data[0].data).length?Object.keys(this.options.data[0].data):Object.keys(this.options.data[0]);f.length>e&&(e=f.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var g=0;g<e;g++)this.options.columns[g]?this.options.columns[g].type||(this.options.columns[g].type=_$_315c[72]):this.options.columns[g]={type:_$_315c[72]},this.options.columns[g].type==_$_315c[73]&&(this.options.columns[g].type=_$_315c[74],this.options.columns[g].autocomplete=
|
|
96
|
+
!0),!this.options.columns[g].name&&f&&f[g]&&Number(f[g])!=f[g]&&(this.options.columns[g].name=f[g]),this.options.columns[g].width||(this.options.columns[g].width=parseInt(this.options.defaultColWidth)+_$_315c[59]),this.options.columns[g].type!=_$_315c[74]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_315c[74]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_315c[75],dataType:_$_315c[76],worksheet:this,
|
|
97
|
+
group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},c=function(e){e.getConfig=c[_$_315c[58]];e.setConfig=c[_$_315c[11]]};c.spreadsheet=function(e){this.config=b(e,d);1!=this.config.secureFormulas&&console.log(_$_315c[77])};c.worksheet=function(e){var f=this;f.options=b(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_315c[75],dataType:_$_315c[72],group:f.parent.name,success:function(g){g=G.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&
|
|
98
|
+
0<g.length)for(var h=g.shift(),n=0;n<h.length;n++)f.options.columns[n]||(f.options.columns[n]={type:_$_315c[72],width:f.options.defaultColWidth}),typeof f.options.columns[n].title===_$_315c[21]&&(f.options.columns[n].title=h[n]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_315c[75],dataType:_$_315c[76],group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};c[_$_315c[58]]=function(){return this.options};c[_$_315c[11]]=function(e){typeof e==_$_315c[25]&&(e=JSON.parse(e));
|
|
99
|
+
if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_315c[21]&&(this.options[f[g]]=e[f[g]]);this.content.style.resize=e.resize?e.resize:_$_315c[3];!0===e.filters?la.show.call(this):!1===e.filters&&la.hide.call(this);!0===e.search?wa.show.call(this):!1===e.search&&wa.hide.call(this);!0===e.toolbar?ma.show.call(this.parent):!1===e.toolbar&&ma.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),
|
|
100
|
+
f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));L.call(this,_$_315c[78],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof d[f[g]]!==_$_315c[21]&&(this.config[f[g]]=e[f[g]])};return c}(),T=function(k){k=function(a){if(1!=this.ignoreHistory)if(this.historyCascade)this.history[this.historyIndex].cascade||(this.history[this.historyIndex].cascade=[]),this.history[this.historyIndex].cascade.push(a);else{var c=++this.historyIndex;this.history=this.history.slice(0,
|
|
101
|
+
c+1);this.history[c]=a}};var d=function(a){var c=a.worksheet;if(a.action==_$_315c[79])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+1,a.numOfRows);else if(a.action==_$_315c[80])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),S.setAttributes.call(c,a.attributes);else if(a.action==_$_315c[81])c.deleteColumn(a.insertBefore?a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_315c[82])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),S.setAttributes.call(c,
|
|
102
|
+
a.attributes);else if(a.action==_$_315c[83])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_315c[84])c.moveColumn(a.newValue,a.oldValue);else if(a.action==_$_315c[85])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_315c[86])c.setMerge(a.oldValue);else if(a.action==_$_315c[87])c.setStyle(a.oldValue,null,null,1);else if(a.action==_$_315c[88])c.setStyle(a.oldValue);else if(a.action==_$_315c[89])c.setWidth(a.column,a.oldValue);else if(a.action==_$_315c[90])c.setHeight(a.row,
|
|
103
|
+
a.oldValue);else if(a.action==_$_315c[91])c.setHeader(a.column,a.oldValue);else if(a.action==_$_315c[92]||a.action==_$_315c[93]||a.action==_$_315c[94])c[a.action](a.oldValue);else if(a.action==_$_315c[95])c.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_315c[96]||a.action==_$_315c[97]||a.action==_$_315c[98]){var e=[];for(var f=0;f<a.records.length;f++){var g={x:a.records[f].x,value:a.records[f].oldValue};void 0!==a.records[f].y&&(g.y=a.records[f].y);a.records[f].oldStyle&&
|
|
104
|
+
(g.style=a.records[f].oldStyle);e.push(g)}a.action==_$_315c[96]?c.setValue(e):c.setProperty(e)}else if(a.action==_$_315c[99])c.renameWorksheet(a.index,a.oldValue);else if(a.action==_$_315c[100])c.moveWorksheet(a.t,a.f);else if(a.action==_$_315c[101]){e=[];for(f=0;f<a.records.length;f++)e.push({index:a.records[f].index,value:a.records[f].oldValue});c.setDefinedNames(e)}H.call(this,_$_315c[102],c,a)};k.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];if(a){this.ignoreHistory=
|
|
105
|
+
!0;var c=a.worksheet;c.openWorksheet();d.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)d.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$_315c[79])c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_315c[80])c.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_315c[81])c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,
|
|
106
|
+
a.properties,a.data);else if(a.action==_$_315c[82])c.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_315c[83])c.moveRow(a.oldValue,a.newValue);else if(a.action==_$_315c[84])c.moveColumn(a.oldValue,a.newValue);else if(a.action==_$_315c[85])c.setMerge(a.newValue);else if(a.action==_$_315c[86])c.removeMerge(a.newValue);else if(a.action==_$_315c[87])c.setStyle(a.newValue,null,null,1);else if(a.action==_$_315c[88])c.resetStyle(a.cells);else if(a.action==_$_315c[89])c.setWidth(a.column,
|
|
107
|
+
a.newValue);else if(a.action==_$_315c[90])c.setHeight(a.row,a.newValue);else if(a.action==_$_315c[91])c.setHeader(a.column,a.newValue);else if(a.action==_$_315c[92]||a.action==_$_315c[93]||a.action==_$_315c[94])c[a.action](a.newValue);else if(a.action==_$_315c[95])c.orderBy(a.column,a.direction,a.newValue);else if(a.action==_$_315c[96]||a.action==_$_315c[97]||a.action==_$_315c[98])c[a.action](a.records);else a.action==_$_315c[99]?c.renameWorksheet(a.index,a.newValue):a.action==_$_315c[100]?c.moveWorksheet(a.f,
|
|
108
|
+
a.t):a.action==_$_315c[101]&&c.setDefinedNames(a.records);H.call(this,_$_315c[103],c,a)};k.redo=function(){if(this.historyIndex<this.history.length-1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};k.reset=function(){this.historyIndex=-1;this.history=[]};return k}(),
|
|
109
|
+
va=function(){var k=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$_315c[104]){b=[];var a=Object.keys(d);for(var c=0;c<a.length;c++)b.push({name:a[c],plugin:d[a[c]],options:{}})}if(b&&b.length)for(c=0;c<b.length;c++){if(b[c].name&&b[c].plugin){var e=b[c].name;var f=b[c].plugin;var g=b[c].options}typeof f===_$_315c[105]&&(this.plugins[e]=f.call(v,this,g,this.config),typeof f.license==_$_315c[105]&&v.license&&f.license(v.license))}};k.execute=function(d,b){if(this.plugins){var a=
|
|
110
|
+
Object.keys(this.plugins);if(a.length)for(var c=0;c<a.length;c++)if(typeof this.plugins[a[c]][d]==_$_315c[105]){var e=this.plugins[a[c]][d].apply(this.plugins[a[c]],b);e&&(d==_$_315c[106]&&(b[4]=e),d==_$_315c[107]&&(b[0]=e))}return b}};k.onevent=function(d){return function(){var b,a,c=this.plugins;if(c){var e=Object.keys(c);if(e.length)for(a=0;a<e.length;a++)if(typeof c[e[a]][d]==_$_315c[105]){var f=c[e[a]][d].apply(c[e[a]],arguments);typeof f!==_$_315c[21]&&(b=f)}}return b}}(_$_315c[108]);return k}(),
|
|
111
|
+
na=function(){var k=function(d){d.getEditor=k[_$_315c[58]];d.openEditor=k.open;d.closeEditor=k.close};k[_$_315c[58]]=function(d,b){d=La[_$_315c[58]].call(this,d,b);return[d.type&&typeof d.type==_$_315c[104]?d.type:v.editors[d.type],d]};k.open=function(d,b,a){if(!R.call(this.parent,this))return!1;if(1!=d.classList.contains(_$_315c[26])){var c=parseInt(d.getAttribute(_$_315c[56])),e=parseInt(d.getAttribute(_$_315c[57]));if(!0===this.options.locked){var f=G.getColumnNameFromCoords(c,e);if(!this.options.cells||
|
|
112
|
+
!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][c].merged)c-=f[0],e-=f[1],d=this.records[e][c].element;if(!S.attached.call(this,c,e)){if(this.results&&0<this.results.length)return console.error(_$_315c[109]),!1;var g=f=null;ia.attached.call(this,c)||(f=c);da.attached.call(this,e)||(g=e);I[_$_315c[65]].call(this,g,f)}this.resetBorders(_$_315c[110],!0);k.position.call(this,c,e);f=this.parent.input;if(113===a.keyCode||a.type!==_$_315c[111])f.selected=!0;f.innerText=
|
|
113
|
+
_$_315c[3];H.call(this.parent,_$_315c[112],this,d,c,e);b=1==b?_$_315c[3]:Q.call(this,c,e);g=k[_$_315c[58]].call(this,c,e);var h=!0;typeof g[0].openEditor==_$_315c[105]&&(!1===g[0].openEditor(d,b,c,e,this,g[1],a)?h=!1:H.call(this.parent,_$_315c[113],this,d,c,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][c].element.style.overflow=_$_315c[114],0<c&&this.records[e][c-1].element&&(this.records[e][c-1].element.style.overflow=_$_315c[114])),this.edition=d,f.classList.add(_$_315c[115]),1==
|
|
114
|
+
this.parent.config.editorFormulas&&Z(b)&&(f.classList.add(_$_315c[116]),ra.parse.call(this,f),d=document.createTextNode(_$_315c[3]),f.appendChild(d),jSuites.focus(f)))}};k.close=function(d,b){null===d&&(d=this.edition);this.parent.input.classList.contains(_$_315c[116])&&ra.close.call(this,this.parent.input);var a,c=parseInt(d.getAttribute(_$_315c[56])),e=parseInt(d.getAttribute(_$_315c[57]));1==this.options.textOverflow&&(a=this.records[e][c+1])&&a.element&&a.element.innerText==_$_315c[3]&&(this.records[e][c].element.style.overflow=
|
|
115
|
+
_$_315c[3]);a=k[_$_315c[58]].call(this,c,e);if(1==b){var f=null;typeof a[0].closeEditor==_$_315c[105]&&(a=a[0].closeEditor(d,!0,c,e,this,a[1]),void 0!==a&&(f=a));null!==f&&Q.call(this,c,e)!=f&&this.setValue(d,f)}else a[0].closeEditor(d,!1,c,e,this,a[1]);H.call(this.parent,_$_315c[117],this,d,c,e,f,b);a=this.parent.input;a.selected=!1;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);na.build(this.parent);a.removeAttribute(_$_315c[118]);
|
|
116
|
+
a.removeAttribute(_$_315c[119]);a.removeAttribute(_$_315c[120]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(d,b){var a=null;if(a=this.records[b][d].element){var c=this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=d;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$_315c[121]:(e.setAttribute(_$_315c[122],_$_315c[3]),d=a.top-c.top+1,b=a.left-c.left+1,e.style.top=d+_$_315c[59],e.style.left=b+_$_315c[59],e.style.minWidth=a.width-
|
|
117
|
+
1+_$_315c[59],e.style.minHeight=a.height-1+_$_315c[59],setTimeout(function(){e.focus()},0))}};k.build=function(d){d.input||(d.input=document.createElement(_$_315c[32]));d.input.className=_$_315c[123];d.input.setAttribute(_$_315c[124],!0);d.input.innerText=_$_315c[3];d.input.oninput=function(b){v.current&&(1==v.current.parent.config.editorFormulas&&(Z(b.target.innerText)?(b.target.classList.add(_$_315c[116]),b.target.selected=!0):b.target.classList.contains(_$_315c[116])&&ra.close.call(v.current,this)),
|
|
118
|
+
H.call(v.current.parent,_$_315c[125],v.current,b))};d.input.onclick=function(){this.selected=!0};return d.input};return k}(),H=function(k){var d;if(!this.ignoreEvents){if(typeof this.config.onevent==_$_315c[105]){var b=this.config.onevent.apply(this,arguments);typeof b!==_$_315c[21]&&(d=b)}typeof this.config[k]==_$_315c[105]&&(b=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)),typeof b!==_$_315c[21]&&(d=b));b=va.onevent.apply(this,arguments);typeof b!==_$_315c[21]&&(d=b)}return d},
|
|
119
|
+
ya=function(){var k=function(d){d.sequence=0;d.getNextSequence=k.next;d.getRowId=k.getId;d.setRowId=k.setId;d.getRowById=k.getRowById};k[_$_315c[58]]=function(){return this.sequence};k[_$_315c[11]]=function(d,b){if(d>this.sequence||b)this.sequence=d};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(d){if(this.rows[d]&&this.rows[d].id)return this.rows[d].id;var b=this.getPrimaryKey();if(!1!==b)return Q.call(this,b,d)};k.setId=
|
|
120
|
+
function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,k[_$_315c[11]].call(this,b);L.call(this,_$_315c[126],[a]);H.call(this.parent,_$_315c[127],this,a)}};k.getRowById=function(d,b){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==d)return!0===b?this.rows[a]:this.options.data[a];return!1};return k}(),Sa=function(){var k=function(b){for(var a=[],c={},e=0;e<b.length;e++){var f=b[e].x,g=
|
|
121
|
+
b[e].y,h=ya.getId.call(this,g);if(!h)if(c[g])h=c[g];else if(h=ya.next.call(this))c[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=qa.call(this,f);a[g].data[f]=b[e].value}ya.setId.call(this,c);return a.filter(function(n){return null!=n})},d=function(b){var a=b[0];if(0<=[_$_315c[128],_$_315c[129],_$_315c[126],_$_315c[130]].indexOf(a))return!1;var c={};a==_$_315c[96]||a==_$_315c[131]?(a=_$_315c[132],c[a]=k.call(this,b[1].data)):Array.isArray(b[1])&&1==b[1].length?c[a]=b[1][0]:c[a]=b[1];return c};return function(b,
|
|
122
|
+
a,c,e){var f=this.parent,g=this,h=d.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=H.call(f,_$_315c[133],f,g,a))a=h;else if(!1===h)return!1;Pa.call(f,!0);jSuites.ajax({url:b,method:_$_315c[134],dataType:_$_315c[76],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(n){c&&n.setRequestHeader(_$_315c[135],_$_315c[136]+c);H.call(f,_$_315c[137],g,n)},success:function(n){f.element.classList.contains(_$_315c[138])&&f.element.classList.remove(_$_315c[138]);n&&(n.message&&(n.name=f.config.application,
|
|
123
|
+
jSuites.notification.isVisible()?console.log(n.name+_$_315c[139]+n.message):jSuites.notification(n)),n.success?typeof e===_$_315c[105]?e(n):n.data&&Array.isArray(n.data)&&S.updateAll.call(g,n.data):n.error&&(alert(_$_315c[140]),window.open(window.location.href,_$_315c[141])));H.call(f,_$_315c[142],f,g,a,n)},error:function(){f.element.classList.add(_$_315c[143])}})}}(),L=function(){return function(){va.execute.call(this.parent,_$_315c[144],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var k=
|
|
124
|
+
null;if(this.parent.config.server){var d=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$_315c[145])?k+(_$_315c[146]+d):k+(_$_315c[147]+d)}else this.options.persistence&&(k=typeof this.options.persistence==_$_315c[25]?this.options.persistence:this.options.url);k&&Sa.call(this,k,arguments)}}}(),Ha=function(k){if(this.selectedCell){var d=this.selectedCell[0],b=this.selectedCell[1];this.records&&this.records[b]&&this.records[b][d]&&this.records[b][d].element||(this.selectedCell=
|
|
125
|
+
this.getHighlighted(),d=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),c=a[0],e=a[1],f=a[2];a=a[3];var g=k?_$_315c[148]:_$_315c[149];this.records[b]&&this.records[b][d]&&this.records[b][d].element&&(this.records[b][d].element.classList[g](_$_315c[150]),this.cursor=k?this.records[b][d].element:null);for(k=c;k<=f;k++)if(this.headers[k])this.headers[k].classList[g](_$_315c[151]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[g](_$_315c[151])}},
|
|
126
|
+
ka=function(){var k=function(d){d.resetSelection=k.reset;d.updateSelection=k.fromElements;d.updateSelectionFromCoords=k[_$_315c[11]];d.selectAll=k.all;d.isSelected=k.isSelected;d.getHighlighted=k.getHighlighted;d.getRange=k.getRange};k.getHighlighted=function(){var d=this.borders;return(d=d.main)?[d.x1,d.y1,d.x2,d.y2]:null};k.isSelected=function(d,b,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var c=a[0],e=a[1],f=a[2];a=a[3];f||(f=c);a||(a=e);return null==d?b>=e&&b<=a:null==b?d>=c&&
|
|
127
|
+
d<=f:d>=c&&d<=f&&b>=e&&b<=a};k.reset=function(){if(this.selectedCell)d=1,this.edition&&na.close.call(this,this.edition,!0),this.resetBorders(_$_315c[152],!0),this.resetBorders(_$_315c[110],!0),this.selectedCell=null,1==d&&H.call(this.parent,_$_315c[153],this);else var d=0;return d};k.refresh=function(){this.selectedCell&&k[_$_315c[11]].call(this,this.selectedCell)};k.isValid=function(d,b,a,c){if(!this)return!1;Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);return!(d>=this.options.columns.length||
|
|
128
|
+
b>=this.rows.length||a>=this.options.columns.length||c>=this.rows.length)};k[_$_315c[11]]=function(d,b,a,c,e,f,g){f||(f=_$_315c[152]);Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);null==a&&(a=d);null==c&&(c=b);if(!k.isValid.call(this,d,b,a,c))return!1;if(null!=d){if(parseInt(d)<parseInt(a))var h=parseInt(d),n=parseInt(a);else h=parseInt(a),n=parseInt(d);if(parseInt(b)<parseInt(c))var l=parseInt(b),p=parseInt(c);else l=parseInt(c),p=parseInt(b);var q;var r={};if(this.options.mergeCells){for(var w=
|
|
129
|
+
l;w<=p;w++)for(var x=h;x<=n;x++)if(q=this.records[w][x].merged)q=G.getColumnNameFromCoords(x-q[0],w-q[1]),r[q]=!0;w=Object.keys(r);if(w.length)for(x=0;x<w.length;x++)q=G.getCoordsFromColumnName(w[x]),r=this.options.mergeCells[w[x]],q[0]<h&&(h=q[0]),q[0]+r[0]-1>n&&(n=q[0]+r[0]-1),q[1]<l&&(l=q[1]),q[1]+r[1]-1>p&&(p=q[1]+r[1]-1)}}f==_$_315c[152]&&(this.selectedCell?(Ha.call(this,!1),q=1):q=0,this.selectedCell=[d,b,a,c],this.records[c][a].element&&e&&(x=e.target.getAttribute(_$_315c[56]),r=e.target.getAttribute(_$_315c[57]),
|
|
130
|
+
null!==x&&null!==r&&(I.adjust.call(this,a,c,3),I.adjust.call(this,a,c,2),I.adjust.call(this,a,c,1),I.adjust.call(this,a,c,0))),na.position.call(this,d,b),0==q&&H.call(this.parent,_$_315c[154],this));ba[_$_315c[11]].call(this,h,l,n,p,f,g);f==_$_315c[152]&&(H.call(this.parent,_$_315c[155],this,h,l,n,p,e),ma.update.call(this.parent,this,this.selectedCell))};k.fromElements=function(d,b,a){var c=d.getAttribute(_$_315c[56]);d=d.getAttribute(_$_315c[57]);if(b){var e=b.getAttribute(_$_315c[56]);b=b.getAttribute(_$_315c[57])}else e=
|
|
131
|
+
c,b=d;k[_$_315c[11]].call(this,c,d,e,b,a)};k.all=function(){k[_$_315c[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};k.getRange=function(){var d=this.selectedCell;if(!d)return _$_315c[3];var b=G.getColumnNameFromCoords(d[0],d[1]);d=G.getColumnNameFromCoords(d[2],d[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_315c[156])?_$_315c[157]+a+_$_315c[158]:a+_$_315c[19];return b==d?a+b:a+G.getRangeFromTokens(v.helpers.getTokensFromRange(b+_$_315c[159]+d))};return k}(),ba=
|
|
132
|
+
function(){var k=function(a){a.borders=[];a.setBorder=k[_$_315c[11]];a.getBorder=k[_$_315c[58]];a.resetBorders=k.reset;a.refreshBorders=k.refresh};k[_$_315c[58]]=function(a){return this.borders[a]};var d=function(a,c,e,f,g,h){if(!ka.isValid.call(this,a,c,e,f))return!1;var n=!1,l=null,p=null,q=null,r=null,w=null,x=this.options.freezeColumns||0;g||(g=0);this.borders[g]?l=this.borders[g]:(l={},l.element=document.createElement(_$_315c[32]),l.element.classList.add(_$_315c[160]),g==_$_315c[110]||g==_$_315c[161]||
|
|
133
|
+
g==_$_315c[152]?l.element.classList.add(_$_315c[162]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_315c[163],l.element.style.borderColor=h),g==_$_315c[152]&&(h=function(D,u){l[D]=document.createElement(_$_315c[32]);l[D].classList.add(_$_315c[164]);l[D].setAttribute(_$_315c[165],u);l.element.appendChild(l[D]);!1===_$_315c[166]in document.documentElement&&(l[D].style.display=_$_315c[52])},h(_$_315c[167],0),l.moveLeft.style.left=_$_315c[61],l.moveLeft.style.marginTop=
|
|
134
|
+
_$_315c[168],l.moveLeft.style.marginLeft=_$_315c[168],h(_$_315c[169],1),l.moveTop.style.left=_$_315c[61],l.moveTop.style.marginTop=_$_315c[168],l.moveTop.style.marginLeft=_$_315c[168],h(_$_315c[170],2),l.moveRight.style.right=_$_315c[61],l.moveRight.style.marginTop=_$_315c[168],l.moveRight.style.marginRight=_$_315c[168],h(_$_315c[171],3),l.moveDown.style.bottom=_$_315c[61],l.moveDown.style.marginLeft=_$_315c[168],l.moveDown.style.marginBottom=_$_315c[168]),this.content.appendChild(l.element));l.x1=
|
|
135
|
+
a;l.y1=c;l.x2=e;l.y2=f;l.element.style.top=_$_315c[172];l.element.style.left=_$_315c[172];l.active=0;h=[];for(x=a;x<=e;x++)h.push(x);x=this.options.freezeColumns||0;h=this.options.freezeRows||0;var z=this.visibleRows[h],A=this.visibleRows[this.visibleRows.length-1],y=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-1]||c>A||e<y&&a>=x||f<z&&c>=h?n=!0:(p=this.headers[a]&&this.headers[a].parentNode?this.headers[a].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(ia.isVisible.call(this,
|
|
136
|
+
e)||(e=Ra.call(this,e,null)),q=this.headers[e].offsetLeft):(q=this.thead.lastChild.lastChild.getAttribute(_$_315c[56]),q=x&&e<q?this.thead.lastChild.children[x].offsetLeft:this.thead.lastChild.lastChild.offsetLeft),q=q-p+parseInt(this.options.columns[e].width)-1,p+=this.table.offsetLeft,r=this.rows[c].element&&this.rows[c].element.parentNode?this.rows[c].element.offsetTop:0,this.rows[f].element&&this.rows[f].element.parentNode?(!1===this.rows[f].visible&&(f=Qa.call(this,e,f)),w=this.rows[f].element.offsetTop+
|
|
137
|
+
this.rows[f].element.offsetHeight,l.element.style.borderBottomWidth=_$_315c[3]):(this.tbody.lastChild?(n=this.tbody.lastChild.getAttribute(_$_315c[57]),w=h&&f<n?this.tbody.children[h].offsetTop:this.tbody.lastChild.offsetTop+this.tbody.lastChild.offsetHeight):w=0,n=!0,l.element.style.borderBottomWidth=_$_315c[61]),w=w-r-1,r+=this.table.offsetTop,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_315c[3],l.element.style.borderRightWidth=_$_315c[3],x=ca.getWidth.call(this),a=a<this.options.freezeColumns,
|
|
138
|
+
e=e<this.options.freezeColumns,a&&e||(a&&!e?(e=this.content.scrollLeft+x,e>p+q&&(q+=e-(p+q),l.element.style.borderRightWidth=_$_315c[61],n=!0)):(e=this.content.scrollLeft+x,e>p&&(e-=p,e>q?p=r=-2E3:(p=p+e+1,q-=e,l.element.style.borderLeftWidth=_$_315c[61]))))),this.options.freezeRows&&(l.element.style.borderTopWidth=_$_315c[3],l.element.style.borderBottomWidth=_$_315c[3],x=ja.getHeight.call(this),a=c<h,e=f<h,a&&e||(a&&!e?(c=this.content.scrollTop+x,c>r+w&&(w+=c-(r+w),l.element.style.borderBottomWidth=
|
|
139
|
+
_$_315c[61])):(c=this.content.scrollTop+x,c>r&&(e=c-r,e>w?p=r=-2E3:(r=r+e+1,w-=e,l.element.style.borderTopWidth=_$_315c[61]))))),l.element.style.top=r+_$_315c[59],l.element.style.left=p+_$_315c[59],l.element.style.width=q+_$_315c[59],l.element.style.height=w+_$_315c[59],l.t=r,l.l=p,l.w=q,l.h=w,g==_$_315c[152]&&(l.moveLeft.style.top=l.h/2+_$_315c[59],l.moveRight.style.top=l.h/2+_$_315c[59],l.moveTop.style.left=l.w/2+_$_315c[59],l.moveDown.style.left=l.w/2+_$_315c[59]),l.active=1);g==_$_315c[152]&&
|
|
140
|
+
(n?(this.corner.style.top=_$_315c[172],this.corner.style.left=_$_315c[172]):(this.corner.style.top=r+w-2+_$_315c[59],this.corner.style.left=p+q-2+_$_315c[59]));this.borders[g]=l},b=function(a,c){a.element.style.top=_$_315c[172];a.element.style.left=_$_315c[172];a.active=0;c&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_315c[11]]=function(a,c,e,f,g,h){d.call(this,a,c,e,f,g,h);g==_$_315c[152]&&(Ha.call(this,!0),L.call(this,_$_315c[128],{x1:a,y1:c,x2:e,y2:f}))};k.reset=function(a,c){a&&a!=_$_315c[152]||
|
|
141
|
+
(this.corner.style.top=_$_315c[172],this.corner.style.left=_$_315c[172],Ha.call(this,!1));if(a)this.borders[a]&&b(this.borders[a],c);else for(var e=Object.keys(this.borders),f=0;f<e.length;f++)b(this.borders[e[f]],c);a&&a!=_$_315c[152]||L.call(this,_$_315c[129])};k.refresh=function(a){var c=this.borders;if(a)c[a]&&null!=c[a].x1&&d.call(this,c[a].x1,c[a].y1,c[a].x2,c[a].y2,a);else{a=Object.keys(c);for(var e=0;e<a.length;e++)c[a[e]]&&null!=c[a[e]].x1&&d.call(this,c[a[e]].x1,c[a[e]].y1,c[a[e]].x2,c[a[e]].y2,
|
|
142
|
+
a[e])}this.edition&&(c=this.parent.input,na.position.call(this,c.x,c.y))};k.destroy=function(a){var c;this&&(c=this.borders[a])&&(c.element.remove(),delete this.borders[a])};return k}(),Xa=function(){var k=function(d){d.setGroup=k[_$_315c[11]];d.unsetGroup=k.unset};k[_$_315c[11]]=function(d,b,a){0==d&&(a=document.createElement(_$_315c[173]),a.classList.add(_$_315c[174]),this.thead.insertBefore(a,this.thead.firstChild),d=document.createElement(_$_315c[175]),d.innerHTML=_$_315c[176],a.appendChild(d),
|
|
143
|
+
d=document.createElement(_$_315c[175]),a.appendChild(d),b=this.headers[b])&&(b=b.querySelector(_$_315c[177]),b||(b=document.createElement(_$_315c[32]),b.classList.add(_$_315c[178]),b.innerText=_$_315c[179],d.appendChild(b)))};k.unset=function(d,b){};return k}(),Ca=function(){var k={start:function(d){if(!R.call(this.parent,this))return!1;if(null!==d.target.getAttribute(_$_315c[57])){var b=d.target.getAttribute(_$_315c[57]);k.event={y:parseInt(b),h:d.target.offsetHeight,p:d.pageY}}else null!==d.target.getAttribute(_$_315c[56])&&
|
|
144
|
+
(b=d.target.getAttribute(_$_315c[56]),k.event={x:parseInt(b),w:d.target.offsetWidth,p:d.pageX})},end:function(d){var b=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var c=this.getSelectedRows(!0);d=c.indexOf(parseInt(k.event.y));if(c.length&&-1<d)for(var e=0;e<c.length;e++)b.push(parseInt(this.rows[c[e]].element.offsetHeight));else c=[];-1==d?(c.push(k.event.y),b.push(k.event.h)):b[d]=k.event.h;this.setHeight(c,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_315c[180]));
|
|
145
|
+
c=this.getSelectedColumns();d=c.indexOf(parseInt(k.event.x));if(c.length&&-1<d)for(e=0;e<c.length;e++)b.push(parseInt(this.options.columns[c[e]].width));else c=[];-1==d?(c.push(k.event.x),b.push(k.event.w)):b[d]=k.event.w;this.setWidth(c,a,b)}k.event=null},update:function(d){null!=k.event.y?(d=d.pageY-k.event.p,0<k.event.h+d&&(this.rows[k.event.y].element.style.height=k.event.h+d+_$_315c[59],this.refreshBorders())):null!=k.event.x&&(d=d.pageX-k.event.p,0<k.event.w+d&&(this.colgroup[k.event.x].setAttribute(_$_315c[180],
|
|
146
|
+
k.event.w+d),this.options.columns[k.event.x].width=k.event.w+d),0<this.options.freezeColumns&&ca.refresh.call(this),this.refreshBorders())},cancel:function(){k.end.call(this)}};return k}();(function(){var k={start:function(d){var b=this.parent.helper;d=parseInt(d.target.getAttribute(_$_315c[56]));if(this.merged.cols[d])console.error(_$_315c[181]);else{k.event={x:d,d};this.headers[d].classList.add(_$_315c[182]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_315c[57]);
|
|
147
|
+
this.records[c][d].element.classList.add(_$_315c[182])}a=this.parent.element.getBoundingClientRect();d=this.headers[d].getBoundingClientRect();c=this.content.getBoundingClientRect();b.style.display=_$_315c[24];b.style.top=c.top-a.top+_$_315c[59];b.style.left=d.left-c.left+_$_315c[59];b.style.width=_$_315c[183];b.style.height=c.height+_$_315c[59];b.classList.add(_$_315c[184])}},end:function(){this.headers[k.event.x].classList.remove(_$_315c[182]);for(var d=0;d<this.tbody.children.length;d++){var b=
|
|
148
|
+
this.tbody.children[d].getAttribute(_$_315c[57]);this.records[b][k.event.x].element.classList.remove(_$_315c[182])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_315c[184]);this.parent.helper.style.display=_$_315c[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(d){var b=d.target.getAttribute(_$_315c[56]);if(null!=b)if(b=parseInt(b),this.merged.cols[b])console.error(_$_315c[181]);
|
|
149
|
+
else{d=d.target.clientWidth/2>d.offsetX;k.event.d=d?k.event.x<b?parseInt(b)-1:parseInt(b):k.event.x>b?parseInt(b)+1:parseInt(b);b=this.headers[b].getBoundingClientRect();var a=this.content.getBoundingClientRect();this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_315c[59]}}};return k})();var xa=function(){var k={start:function(d){if(R.call(this.parent,this)){this.resetSelection();var b=this.parent.helper;if(null!==d.target.getAttribute(_$_315c[57])){var a=parseInt(d.target.getAttribute(_$_315c[57]));
|
|
150
|
+
this.merged.rows[a]?console.error(_$_315c[185]):this.results?console.error(_$_315c[186]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_315c[182]),d=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$_315c[24],b.style.top=a.top-d.top+_$_315c[59],b.style.left=_$_315c[187],b.style.width=this.content.offsetWidth-50+_$_315c[59],b.style.height=_$_315c[183],b.classList.add(_$_315c[188]))}else if(null!==d.target.getAttribute(_$_315c[56]))if(a=
|
|
151
|
+
parseInt(d.target.getAttribute(_$_315c[56])),this.merged.cols[a])console.error(_$_315c[181]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_315c[182]);for(d=0;d<this.tbody.children.length;d++){var c=this.tbody.children[d].getAttribute(_$_315c[57]);this.records[c][a].element.classList.add(_$_315c[182])}d=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();c=this.content.getBoundingClientRect();b.style.display=_$_315c[24];b.style.top=c.top-d.top+_$_315c[59];
|
|
152
|
+
b.style.left=a.left-c.left+_$_315c[59];b.style.width=_$_315c[183];b.style.height=c.height+_$_315c[59];b.classList.add(_$_315c[184])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_315c[182]),null!=k.event.d&&k.event.y!=k.event.d&&(this.moveRow(k.event.y,k.event.d),this.updateSelectionFromCoords(0,k.event.d,this.options.columns.length-1,k.event.d)),this.parent.helper.classList.remove(_$_315c[188]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_315c[182]);
|
|
153
|
+
for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$_315c[57]);this.records[b][k.event.x].element.classList.remove(_$_315c[182])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_315c[184])}this.parent.helper.style.display=_$_315c[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(d){if(null!=k.event.y){var b=d.target.getAttribute(_$_315c[57]);
|
|
154
|
+
if(null!=b){var a=b=parseInt(b),c=d.target.clientHeight/2>d.offsetY;c?k.event.y<b&&(a=b-1):k.event.y>b&&(a=b+1);d=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(c?b.top:b.bottom)-a.top+_$_315c[59])}}else c=d.target.getAttribute(_$_315c[56]),null!=c&&(a=c=parseInt(c),(b=d.target.clientWidth/2>d.offsetX)?k.event.x<
|
|
155
|
+
c&&(a=c-1):k.event.x>c&&(a=c+1),d=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0)),d||(k.event.d=a,a=this.headers[c].getBoundingClientRect(),c=this.content.getBoundingClientRect(),this.parent.helper.style.left=(b?a.left:a.right)-c.left+_$_315c[59]))}};return k}(),sa=function(){var k=function(d){d.getMerge=k[_$_315c[58]];d.setMerge=k[_$_315c[11]];d.updateMerge=k.update;d.removeMerge=k.remove;d.destroyMerged=d.destroyMerge=k.destroy};k.isMerged=function(d,
|
|
156
|
+
b){var a=G.getColumnNameFromCoords(d,b);if(a=this.merged.cells[a])if(i=this.options.mergeCells[a])m&&void 0!==m[a]||(i[1]>t&&(t=i[1]),m&&(m[a]=this.records[b][d].element&&!this.records[b][d].merged?!0:!1))};k.getAffected=function(d){if(void 0!==this[d]){for(var b=d,a=this[d],c=[];this[b]==a;)c.push(b),b--;for(b=d+1;this[b]==a;)c.push(b),b++;c.sort(function(e,f){return e-f});return c}return!1};k[_$_315c[58]]=function(d){return d?this.options.mergeCells[d]:this.options.mergeCells};k[_$_315c[11]]=function(d,
|
|
157
|
+
b,a){if(!R.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var c,e=null,f={},g={},h={},n=!1;typeof d==_$_315c[25]?h[d]=[b,a]:typeof d==_$_315c[104]?h=d:((e=this.getHighlighted())?e=[G.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:F(_$_315c[189])}),e=!1),e&&(h[e[0]]=[e[1],e[2]]));b=Object.keys(h);if(b.length){for(a=0;a<b.length;a++){var l=b[a],p=h[b[a]][0],q=h[b[a]][1];p=parseInt(p);q=parseInt(q);if((!p||2>p)&&(!q||
|
|
158
|
+
2>q))console.log(F(_$_315c[190])+_$_315c[159]+l);else if(this.options.mergeCells[l])g[l]=[p,q],f[l]=this.options.mergeCells[l],k.update.call(this,l,p,q);else{e=G.getCoordsFromColumnName(l);for(var r=e[1];r<e[1]+q;r++)for(var w=e[0];w<e[0]+p;w++)d=G.getColumnNameFromCoords(w,r),(c=this.merged.cells[d])&&this.options.mergeCells[c]&&(f[c]=this.options.mergeCells[c],k.applyDestroy.call(this,c));g[l]=this.options.mergeCells[l]=[p,q];k.applyCreate.call(this,l);S.attached.call(this,e[0],e[1])||(n=e)}}Object.keys(g).length&&
|
|
159
|
+
(n&&I[_$_315c[65]].call(this,e[1],e[0]),T.call(this.parent,{worksheet:this,action:_$_315c[85],newValue:g,oldValue:f}),L.call(this,_$_315c[85],[g]),k.build.call(this),ka.refresh.call(this),ba.refresh.call(this),H.call(this.parent,_$_315c[191],this,g,f))}};k.update=function(d,b,a){var c=this.options.mergeCells;if(c[d]){var e=c[d][1];if(b!==c[d][0]||e!==a)k.applyDestroy.call(this,d),b&&a&&(c[d]=[b,a],k.applyCreate.call(this,d));k.build.call(this)}};k.remove=function(d,b){if(!R.call(this.parent,this))return!1;
|
|
160
|
+
b={};var a={},c={};typeof d==_$_315c[25]?c[d]=!0:typeof d==_$_315c[104]&&(c=d);d=Object.keys(c);for(c=0;c<d.length;c++)this.options.mergeCells[d[c]]&&(b[d[c]]=this.options.mergeCells[d[c]],a[d[c]]=!0,k.applyDestroy.call(this,d[c],!0));k.build.call(this);T.call(this.parent,{worksheet:this,action:_$_315c[86],newValue:a,oldValue:b});L.call(this,_$_315c[86],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=
|
|
161
|
+
a[d][0]||1,e=a[d][1]||1;d=G.getCoordsFromColumnName(d);if(!this.records[d[1]][d[0]].merged||1==b)if(a=S[_$_315c[58]].call(this,d[0],d[1])){a.classList.remove(_$_315c[67]);a.style.display=_$_315c[3];1<c?a.setAttribute(_$_315c[192],c):a.removeAttribute(_$_315c[192]);1<e?a.setAttribute(_$_315c[193],e):a.removeAttribute(_$_315c[193]);1==this.options.textOverflow&&(a.style.overflow=_$_315c[114]);for(var f=0;f<e;f++)for(var g=0;g<c;g++){b=d[0]+g;var h=d[1]+f;if(a=this.records[h][b])if(a.merged=[g,f,a.v,
|
|
162
|
+
c,e],0!=g||0!=f)a.element||S[_$_315c[58]].call(this,b,h),a.element.classList.add(_$_315c[67]),a.merged[3]=a.element.innerText,a.element.innerText=_$_315c[3],Q.call(this,b,h,_$_315c[3])}}}};k.applyDestroy=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=G.getCoordsFromColumnName(d),e=c[0];c=c[1];var f=a[d][0],g=a[d][1];delete this.options.mergeCells[d];for(d=0;d<g;d++)for(var h=0;h<f;h++)if(a=this.records[c+d][e+h])a.element&&(0==h&&0==d?(a.element.removeAttribute(_$_315c[192]),a.element.removeAttribute(_$_315c[193])):
|
|
163
|
+
(a.element.classList.remove(_$_315c[67]),1==b&&(Q.call(this,e+h,c+d,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(d,b,a,c){if(1==b)var e=[a];else{e=[];for(var f=a;f<a+c;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),n={};for(f=0;f<h.length;f++){a=G.getCoordsFromColumnName(h[f]);for(var l=a[d];l<a[d]+g[h[f]][d];l++)-1!==e.indexOf(l)&&(n[h[f]]||(n[h[f]]=[g[h[f]][0],g[h[f]][1]],1==b&&(n[h[f]][d]+=c)),0==b&&n[h[f]][d]--)}h=Object.keys(n);
|
|
164
164
|
for(f=0;f<h.length;f++)k.update.call(this,h[f],n[h[f]][0],n[h[f]][1]);k.build.call(this)};k.build=function(){var d=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(d)for(var b=Object.keys(d),a=0;a<b.length;a++){d[b[a]][0]=parseInt(d[b[a]][0]);d[b[a]][1]=parseInt(d[b[a]][1]);var c=G.getCoordsFromColumnName(b[a]),e=parseInt(d[b[a]][0]),f=parseInt(d[b[a]][1]);if(1<e)for(var g=0;g<e;g++)this.merged.cols[c[0]+g]=!0;if(1<f)for(var h=0;h<f;h++)this.merged.rows[c[1]+h]=!0;for(h=0;h<f;h++)for(g=
|
|
165
|
-
0;g<e;g++){var n=G.getColumnNameFromCoords(c[0]+g,c[1]+h);this.merged.cells[n]=b[a]}}};k.batch=function(d){var b=Object.keys(d);if(b.length)for(var a=0;a<b.length;a++)!1===d[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),Ea=function(){var k=function(d){d.getHeader=k[_$
|
|
166
|
-
a));return d?b:b.join(this.options.csvDelimiter)};k[_$
|
|
167
|
-
title:b});H.call(this.parent,_$
|
|
168
|
-
function(d){var b=this.options.columns[d],a=b.width||this.options.defaultColWidth,c=this.headers[d];b.align&&(c.style.textAlign=b.align);b.title?(c.innerText=b.title,c.setAttribute(_$
|
|
169
|
-
a)};return k}(),ha=function(){var k=function(b,a,c){var e=this.footers.content,f;e&&e[a]&&e[a][b]&&(f=e[a][b].element)&&(void 0===c&&(e=this.options.footers,c=e[a]&&e[a][b]?e[a][b]:_$
|
|
170
|
-
f.innerText=c:f.innerHTML=c)},d=function(b){b.getFooter=d[_$
|
|
171
|
-
a))};d.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++)k.call(this,c,a,b[a][c])};d.value=function(b,a,c){if(void 0===c)return this.options.footers[a][b];k.call(this,b,a,c);L.call(this,_$
|
|
172
|
-
_$
|
|
173
|
-
0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=[];var a=document.createElement(_$
|
|
174
|
-
0;c<b[a].length;c++){var e=ha.create.call(this,c,a);this.tfoot.children[a].appendChild(e)}};d.adjust=function(b,a,c){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==c){if(this.headers[b]&&this.headers[b].parentNode)var h=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,n=!0;for(c=0;c<f.length;c++){for(var l=f[c].splice(b),p=b;p<b+a;p++)f[c][p]=_$
|
|
175
|
-
this.tfoot.children[c].insertBefore(g[c][p].element,this.tfoot.children[c].children[b].nextSibling));g[c]=g[c].concat(l)}}else for(c=0;c<f.length;c++){for(p=b;p<b+a;p++)(h=this.footers.content[c][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[c].splice(b,a);e[c]=f[c].splice(b,a)}return e};return d}(),za=function(){var k=function(d){d.setNestedCell=k.cell;d.getNestedCell=k.cell;d.setNestedHeaders=k[_$
|
|
176
|
-
function(){return this.options.nestedHeaders};k[_$
|
|
177
|
-
L.call(this,_$
|
|
165
|
+
0;g<e;g++){var n=G.getColumnNameFromCoords(c[0]+g,c[1]+h);this.merged.cells[n]=b[a]}}};k.batch=function(d){var b=Object.keys(d);if(b.length)for(var a=0;a<b.length;a++)!1===d[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),Ea=function(){var k=function(d){d.getHeader=k[_$_315c[58]];d.setHeader=k[_$_315c[11]];d.getHeaders=k.all};k[_$_315c[58]]=function(d){var b;if(b=this.options.columns)return b[d].title||G.getColumnName(d)};k.all=function(d){for(var b=[],a=0;a<this.options.columns.length;a++)b.push(k[_$_315c[58]].call(this,
|
|
166
|
+
a));return d?b:b.join(this.options.csvDelimiter)};k[_$_315c[11]]=function(d,b){if(!R.call(this.parent,this))return!1;var a;if(a=this.options.columns[d]){var c=k[_$_315c[58]].call(this,d);if(void 0===b&&(b=prompt(F(_$_315c[194]),c),!b))return!1;a.title=b;if(a=this.headers[d])b?(a.innerHTML=b,a.setAttribute(_$_315c[195],b)):(a.innerHTML=G.getColumnName(d),a.removeAttribute(_$_315c[195]));T.call(this.parent,{worksheet:this,action:_$_315c[91],column:d,oldValue:c,newValue:b});L.call(this,_$_315c[91],{column:d,
|
|
167
|
+
title:b});H.call(this.parent,_$_315c[196],this,d,b,c)}};k.create=function(d){if(this.headers[d])return this.headers[d];var b=document.createElement(_$_315c[175]);b.classList.add(_$_315c[197]);b.setAttribute(_$_315c[56],d);var a=document.createElement(_$_315c[198]);this.headers[d]=b;this.colgroup[d]=a;this.options.nestedHeaders&&(b.style.top=this.thead.lastChild.offsetTop+_$_315c[59]);k.applyProperties.call(this,d);H.call(this.parent,_$_315c[199],this,d,b,this.options.columns[d]);return b};k.applyProperties=
|
|
168
|
+
function(d){var b=this.options.columns[d],a=b.width||this.options.defaultColWidth,c=this.headers[d];b.align&&(c.style.textAlign=b.align);b.title?(c.innerText=b.title,c.setAttribute(_$_315c[195],b.title)):(c.innerText=G.getColumnName(d),c.removeAttribute(_$_315c[195]));b.tooltip&&(c.title=b.tooltip);var e=this.options.filters;!0===b.filter&&(e=!0);!1===b.filter&&(e=!1);!0===e&&c.classList.add(_$_315c[200]);if(!1===b.visible||b.type==_$_315c[114])a=_$_315c[121],b.visible=!1;this.colgroup[d].setAttribute(_$_315c[180],
|
|
169
|
+
a)};return k}(),ha=function(){var k=function(b,a,c){var e=this.footers.content,f;e&&e[a]&&e[a][b]&&(f=e[a][b].element)&&(void 0===c&&(e=this.options.footers,c=e[a]&&e[a][b]?e[a][b]:_$_315c[3]),Z(c)&&1==this.parent.config.parseFormulas&&(c=Y.execute.call(this,c,b,null,!1)),this.options.applyMaskOnFooters&&(e=na[_$_315c[58]].call(this,b),c=v.editors.general.parseValue(b,a,c,this,e[1],f)),c instanceof Element||c instanceof HTMLDocument?(f.innerHTML=_$_315c[3],f.appendChild(c)):1==this.parent.config.stripHTML?
|
|
170
|
+
f.innerText=c:f.innerHTML=c)},d=function(b){b.getFooter=d[_$_315c[58]];b.setFooter=d[_$_315c[11]];b.resetFooter=d.reset;b.refreshFooter=d.refresh;b.getFooterValue=d.value;b.setFooterValue=d.value};d[_$_315c[58]]=function(){return this.options.footers};d[_$_315c[11]]=function(b){if(b){var a=this.options.footers;this.options.footers=b}this.options.footers!=a&&(ha.build.call(this),d.render.call(this),L.call(this,_$_315c[201],{data:this.options.footers}),H.call(this.parent,_$_315c[202],this,this.options.footers,
|
|
171
|
+
a))};d.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++)k.call(this,c,a,b[a][c])};d.value=function(b,a,c){if(void 0===c)return this.options.footers[a][b];k.call(this,b,a,c);L.call(this,_$_315c[203],{x:b,y:a,value:c});H.call(this.parent,_$_315c[204],this,b,a,c)};d.reset=function(){var b=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_315c[3];L.call(this,_$_315c[205],{});H.call(this.parent,
|
|
172
|
+
_$_315c[202],this,null,b)};d.create=function(b,a){var c=this.footers.content[a][b];if(c&&c.element)return c.element;c=this.footers.content[a][b]={};var e=this.options.columns[b].align;c.element=document.createElement(_$_315c[175]);c.element.setAttribute(_$_315c[56],b);c.element.setAttribute(_$_315c[57],a);e&&(c.element.style.textAlign=e);k.call(this,b,a);return c.element};d.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_315c[3];for(var b=
|
|
173
|
+
0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=[];var a=document.createElement(_$_315c[173]),c=document.createElement(_$_315c[175]);c.innerHTML=_$_315c[176];a.appendChild(c);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[b][a]||(this.options.footers[b][a]=_$_315c[3]),this.footers.content[b][a]||(this.footers.content[b][a]={})}}};d.render=function(){for(var b=this.options.footers,a=0;a<b.length;a++)for(var c=
|
|
174
|
+
0;c<b[a].length;c++){var e=ha.create.call(this,c,a);this.tfoot.children[a].appendChild(e)}};d.adjust=function(b,a,c){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==c){if(this.headers[b]&&this.headers[b].parentNode)var h=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,n=!0;for(c=0;c<f.length;c++){for(var l=f[c].splice(b),p=b;p<b+a;p++)f[c][p]=_$_315c[3];f[c]=f[c].concat(l);l=g[c].splice(b);for(p=b;p<b+a;p++)g[c][p]={element:d.create.call(this,p,c)},n&&(1==h?this.tfoot.children[c].appendChild(g[c][p].element):
|
|
175
|
+
this.tfoot.children[c].insertBefore(g[c][p].element,this.tfoot.children[c].children[b].nextSibling));g[c]=g[c].concat(l)}}else for(c=0;c<f.length;c++){for(p=b;p<b+a;p++)(h=this.footers.content[c][p].element)&&h.parentNode&&h.parentNode.removeChild(h);g[c].splice(b,a);e[c]=f[c].splice(b,a)}return e};return d}(),za=function(){var k=function(d){d.setNestedCell=k.cell;d.getNestedCell=k.cell;d.setNestedHeaders=k[_$_315c[11]];d.getNestedHeaders=k[_$_315c[58]];d.resetNestedHeaders=k.reset};k[_$_315c[58]]=
|
|
176
|
+
function(){return this.options.nestedHeaders};k[_$_315c[11]]=function(d){k.reset.call(this);this.options.nestedHeaders=d;k.build.call(this);I.call(this,!0,!0);ba.refresh.call(this);L.call(this,_$_315c[206],{data:d});H.call(this.parent,_$_315c[207],this,d)};k.reset=function(){var d=[],b=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$_315c[208])&&d.push(b[a]);if(d.length)for(;b=d.shift();)b.remove();this.nested=null;I.call(this,!0,!0);ba.refresh.call(this);
|
|
177
|
+
L.call(this,_$_315c[209]);H.call(this.parent,_$_315c[207],this,[])};k.cell=function(d,b,a){if(a){if(!R.call(this.parent,this))return!1;var c=this.options.nestedHeaders[b][d],e=this.nested.content[b][d].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(c.colspan=a.colspan,e.setAttribute(_$_315c[192],a.colspan),e.style.display=0==c.colspan?_$_315c[52]:_$_315c[3]);L.call(this,_$_315c[210],{x:d,y:b,properties:a});H.call(this.parent,_$_315c[211],
|
|
178
178
|
this,d,b,a)}else return this.nested.content[b][d].element};k.range=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0,c=0;c<d.length;c++){var e=parseInt(d[c].colspan);b[c]=[a,a+e-1];a+=e}return b};k.getColumns=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0;a<d.length;a++)for(var c=d[a].colspan,e=0;e<c;e++)b.push(a);return b};k.getAffected=function(d){var b=[],a=this.options.nestedHeaders;if(a){var c,e,f;for(e=0;e<a.length;e++)if((c=k.getColumns.call(this,e))&&void 0!==c[d]){var g=
|
|
179
|
-
k.range.call(this,e);for(f=g[c[d]][0];f<=g[c[d]][1];f++)b.push(f)}}return b};k.create=function(d,b){if(this.nested.content[b][d])return this.nested.content[b][d].element;var a=this.options.nestedHeaders[b][d]||{},c=this.nested.content[b][d]={};a.colspan||(a.colspan=1);a.align||(a.align=_$
|
|
180
|
-
a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return c.element=e};k.build=function(){this.nested||(this.nested={content:[]});var d,b,a=0;if(d=this.options.nestedHeaders){for(b=0;b<d.length;b++){this.nested.content[b]=[];var c=document.createElement(_$
|
|
181
|
-
a+_$
|
|
182
|
-
f,a,{colspan:g})}}else{c=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){c[a]=[];for(f=0;f<b;f++){var h=g[d+f];void 0!==h&&(typeof c[a][h]==_$
|
|
183
|
-
e,f){if(1===c.length){if(1<e||v.formula&&typeof v.formula.TREND!==_$
|
|
184
|
-
l=[]):q.push(p)):(p=void 0!==h&&this.options.columns[h].type===_$
|
|
185
|
-
return x[x.length-1]},h=function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$
|
|
186
|
-
parseInt(c),h=h.call(this,parseInt(p)-1,e)),0<e-l?(g=g.call(this,parseInt(l)),f=parseInt(e)):(g=parseInt(e),f=f.call(this,parseInt(q))),Math.abs(c-r)>Math.abs(e-l)?(g=parseInt(q),f=parseInt(l)):(n=parseInt(p),h=parseInt(r)),this.setBorder(n,g,h,f,_$
|
|
179
|
+
k.range.call(this,e);for(f=g[c[d]][0];f<=g[c[d]][1];f++)b.push(f)}}return b};k.create=function(d,b){if(this.nested.content[b][d])return this.nested.content[b][d].element;var a=this.options.nestedHeaders[b][d]||{},c=this.nested.content[b][d]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_315c[212]);a.title||(a.title=_$_315c[3]);var e=document.createElement(_$_315c[175]);e.setAttribute(_$_315c[213],d);e.setAttribute(_$_315c[214],b);e.setAttribute(_$_315c[192],a.colspan);e.setAttribute(_$_315c[215],
|
|
180
|
+
a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return c.element=e};k.build=function(){this.nested||(this.nested={content:[]});var d,b,a=0;if(d=this.options.nestedHeaders){for(b=0;b<d.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_315c[175]);c.innerHTML=_$_315c[176];var e=document.createElement(_$_315c[173]);e.classList.add(_$_315c[208]);e.appendChild(c);this.thead.insertBefore(e,this.thead.lastChild)}for(b=0;b<this.thead.children.length;b++)this.thead.children[b].firstChild.style.top=
|
|
181
|
+
a+_$_315c[59],a+=this.thead.children[b].offsetHeight;a=this.thead.offsetHeight-this.thead.lastChild.offsetHeight;for(b=0;b<this.headers.length;b++)this.headers[b].style.top=a+_$_315c[59]}};k.adjust=function(d,b,a,c){var e=this.options.nestedHeaders;if(e)if(1==a)if(c&&c.nested)for(a=0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:c.nested[a][f]});else for(a=0;a<e.length;a++){if((f=k.getColumns.call(this,a))&&e[a][f]){f=f[d];var g=parseInt(e[a][f].colspan)+b;k.cell.call(this,
|
|
182
|
+
f,a,{colspan:g})}}else{c=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){c[a]=[];for(f=0;f<b;f++){var h=g[d+f];void 0!==h&&(typeof c[a][h]==_$_315c[21]&&(c[a][h]=e[a][h].colspan),e[a][h].colspan--)}g=Object.keys(c[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return c}};return k}(),ea=function(){var k=function(c,e,f,g){Z(c)?c=Y.shiftFormula(c,e,f):g&&(c=jSuites.calendar.dateToNum(c),0>e||0>f?c--:c++,c=jSuites.calendar.numToDate(c));return c},d=function(c,
|
|
183
|
+
e,f){if(1===c.length){if(1<e||v.formula&&typeof v.formula.TREND!==_$_315c[105])f?c[0]--:c[0]++;return c}e=1;f=[];for(var g=[],h=0;h<c.length;h++)g.push(e++);for(h=0;h<c.length;h++)f.push(e++);return v.formula&&typeof v.formula.TREND==_$_315c[105]?v.formula.TREND(c,g,f):c},b=function(c,e,f,g,h){var n=null,l=[],p=null,q=[];for(n=0;n<c.length;n++){if(jSuites.isNumeric(c[n])&&(l.push(c[n]),jSuites.isNumeric(c[n+1])))continue;l.length?(p=d(l,c.length,g),Array.isArray(p)?(p.forEach(function(r){q.push(r)}),
|
|
184
|
+
l=[]):q.push(p)):(p=void 0!==h&&this.options.columns[h].type===_$_315c[216]?!0:!1,g&&(e*=-1,f*=-1),p=k(c[n],e*c.length,f*c.length,p),q.push(p))}return q},a=function(c,e){var f=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w--;for(var z=w;0<=z;z--)if(w=this.results?x[z]:z,this.rows[w]&&this.rows[w].element)return w;return 0},g=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w++;for(var z=w;z<x.length;z++)if(w=this.results?x[z]:z,this.rows[w]&&this.rows[w].element)return w;
|
|
185
|
+
return x[x.length-1]},h=function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_315c[67]))return w;return 0},n=function(w,x){for(;w<this.options.columns.length;w++)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_315c[67]))return w;return this.options.columns-1},l=this.getHighlighted(),p=l[0],q=l[1],r=l[2];l=l[3];c=parseInt(c);e=parseInt(e);null!=c&&null!=e&&(0<c-r?(n=n.call(this,parseInt(r)+1,e),h=parseInt(c)):(n=
|
|
186
|
+
parseInt(c),h=h.call(this,parseInt(p)-1,e)),0<e-l?(g=g.call(this,parseInt(l)),f=parseInt(e)):(g=parseInt(e),f=f.call(this,parseInt(q))),Math.abs(c-r)>Math.abs(e-l)?(g=parseInt(q),f=parseInt(l)):(n=parseInt(p),h=parseInt(r)),this.setBorder(n,g,h,f,_$_315c[161]))};a.execute=function(c){if(!R.call(this.parent,this))return!1;var e=this.getHighlighted(),f=Ia[_$_315c[58]].call(this,e,!1,!1),g=!0,h=!1,n=!1,l=this.borders.cloning;if(c)if(l&&l.active){c=l.x1;var p=l.y1,q=l.x2;l=l.y2;e[0]==c?(h=!0,e[1]>p&&
|
|
187
187
|
(n=!0)):e[0]>c&&(n=!0)}else return!1;else if(l=this.getSelected(),l.length)for(h=!0,c=l[0].x,q=l[l.length-1].x,p=parseInt(l[l.length-1].y)+1,l=parseInt(l[l.length-1].y);1==g;){if(this.options.data[l+1]){this.options.data[l+1][c-1]||this.options.data[l+1][q+1]||(g=!1);for(var r=c;r<=q;r++)this.options.data[l+1][r]&&(g=!1)}else g=!1;g&&l++}else return!1;var w=Ma.getFromSelection.call(this,e),x=r=0,z=0,A=0,y=[],D=[],u=!0,B=this;if(h)for(g=function(){D.push({x:r,y:x,value:y[A],style:w[A][z]});A++;void 0==
|
|
188
188
|
f[A]&&(A=0,u&&(y=b.call(B,y,0,1,n,r)))},r=c;r<=q;r++){u=void 0!==this.options.columns[r].autoIncrement?this.options.columns[r].autoIncrement:this.parent.config.autoIncrement;A=0;y=[];for(x=0;x<f.length;x++)y.push(f[x][z]);n&&y.reverse();u&&(y=b.call(B,y,0,1,n,r));if(n)for(x=l;x>=p;x--)g();else for(x=p;x<=l;x++)g();z++}else for(u=this.parent.config.autoIncrement,g=function(){D.push({x:r,y:x,value:y[z],style:w[A][z]});z++;void 0==f[A][z]&&(z=0,u&&(y=b(y,1,0,n)))},x=p;x<=l;x++){z=0;y=[];for(r=0;r<f[A].length;r++)y.push(f[A][r]);
|
|
189
|
-
n&&y.reverse();u&&(y=b(y,1,0,n));if(n)for(r=q;r>=c;r--)g();else for(r=c;r<=q;r++)g();A++}D.length&&this.setValue(D);e[0]<c&&(c=e[0]);e[1]<p&&(p=e[1]);e[2]>q&&(q=e[2]);e[3]>l&&(l=e[3]);this.resetBorders(_$
|
|
190
|
-
k[_$
|
|
191
|
-
void 0===e&&(e=this.dataType&&typeof c==_$
|
|
192
|
-
w+_$
|
|
193
|
-
0;h<=c;h++)f[h]&&(g[h]=f[h]);c=this.getPrimaryKey();if(!1!==c)for(c=qa.call(this,c),h=0;h<g.length;h++)a[h]||!1===c||(b=parseInt(g[h][c]),0<b&&(a[h]=b));return a};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$
|
|
194
|
-
this.insertRow(g);for(var h=0;h<this.options.data.length;h++){void 0===b[h]&&(b[h]={row:h,data:[]});for(var n=0;n<this.options.columns.length;n++)void 0===b[h].data[n]&&(b[h].data[n]=_$
|
|
195
|
-
a);oa[_$
|
|
196
|
-
k.refresh=function(b){if(typeof b!==_$
|
|
197
|
-
success:function(g){f.setData(g);jSuites.loading.hide()}})}};k.getRowData=function(b,a){if(typeof this.options.data[b]===_$
|
|
198
|
-
a,c){for(var e=[],f=0;f<this.options.columns.length;f++)typeof a[f]===_$
|
|
199
|
-
y:f,value:a[f]});e.length&&this.setValue(e,null,c)};k.copy=function(b){var a=this,c=this.getHighlighted(),e=function(){a.setBorder(c[0],c[1],c[2],c[3],_$
|
|
200
|
-
function(b,a,c){if(!R.call(this.parent,this))return!1;var e=this,f=function(){e.borders.copying&&(e.resetBorders(_$
|
|
201
|
-
q[1];r<=q[3];r++)if(!this.results||-1!=this.results.indexOf(r)){p[z]=[];x=0;for(w=q[0];w<=q[2];w++)g=G.getColumnNameFromCoords(w,r),p[z][x]=h&&h[g]?h[g]:_$
|
|
202
|
-
g[3];r++)if(!this.results||-1!=this.results.indexOf(r)){x=[];z=[];for(w=g[0];w<=g[2];w++)x.push(c[D][y]),p&&p[D]&&p[D][y]?z.push(p[D][y]):z.push(_$
|
|
203
|
-
f()}r=b+c[0].length-this.options.columns.length;0<r&&this.insertColumn(r);r=a+c.length-this.rows.length;0<r&&this.insertRow(r);z=x=b;y=A=a;D=null;this.results&&(h=this.results.indexOf(a));for(r=0;r<c.length;r++)for(w=0;w<c[r].length;w++){null!==n&&null!==l&&c[r][w][0]==_$
|
|
204
|
-
g.length&&(oa[_$
|
|
205
|
-
window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(a,this.options.csvFileName+_$
|
|
206
|
-
(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$
|
|
207
|
-
var c=d[0];b=d[1]}else c=d;return this.getProcessed(c,b,a)};return k}(),Ja=function(){var k=function(d){d.getDefinedNames=k[_$
|
|
208
|
-
c.push({index:f,value:d[e].value,oldValue:a})}T.call(this.parent,{worksheet:this,action:_$
|
|
209
|
-
Y.update.call(this,a[f[g]],d,b,c);h!==a[f[g]]&&(-1!==h.indexOf(_$
|
|
210
|
-
c)}}this.parent.historyCascade=!1}};k.build=function(){var d=Object.keys(this.config.definedNames);if(d&&d.length)if(1!==this.edition)this.config.definedNames={},console.log(_$
|
|
211
|
-
_$
|
|
212
|
-
l.indexOf(_$
|
|
213
|
-
(h={type:_$
|
|
214
|
-
g);var l=document.createTextNode(_$
|
|
215
|
-
function(n){e.call(g,!0)});g.val=function(n){if(void 0===n)return g.innerText;g.innerText=n};h.onchange&&(g.onchange=h.onchange);h.onupdate&&(g.onupdate=h.onupdate)};f.current=null;f.parse=function(g){for(var h=_$
|
|
216
|
-
r[w].trim().replace(/\$/g,_$
|
|
217
|
-
f.current.classList.remove(_$
|
|
218
|
-
g);f.current.innerText=_$
|
|
219
|
-
w=A};if(w.getAttribute(_$
|
|
220
|
-
this;if(g.ctrlKey){if(67==g.which||88==g.which)g=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$
|
|
221
|
-
g.target.getAttribute(_$
|
|
222
|
-
q=q==_$
|
|
223
|
-
l=Object.keys(h);if(l.length){for(var p={},q=0;q<l.length;q++){var r=l[q].replace(/!/g,_$
|
|
224
|
-
_$
|
|
225
|
-
_$
|
|
226
|
-
null}};b.execute=function(g,h,n,l,p){if(1==this.parent.processing)return null!==h&&null!==n&&this.parent.queue.push([this,h,n]),_$
|
|
227
|
-
O=null;p||(E=a(E));var U=E,aa=U.match(/[A-Z_]+[A-Z0-9_\.]*/g);aa&&aa.length&&(U=e.call(V.parent,aa,U,x));(aa=U.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&aa.length&&(U=c.call(V,aa,U));aa=[];U=d(U);for(var P=0;P<U.length;P++)U[P]&&k.test(U[P])&&aa.push(U[P]);if(aa){if(K&&-1<aa.indexOf(K.replace(_$
|
|
228
|
-
O):(N=K[0],P=V,K=O);if(typeof P==_$
|
|
229
|
-
x[aa[U]]=ua))}}}return E.substr(1)},x={},z={};try{g=w(g,h,n,this);if(g==_$
|
|
230
|
-
G.getColumnNameFromCoords(h,n);var B=Object.keys(this.formula);for(y=0;y<B.length;y++){var C=this.formula[B[y]].indexOf(u);if(0<=C)for(D=0;D<l.length;D++)C=this.formula[B[y]].indexOf(l[D]),-1==C&&this.formula[B[y]].push(l[D])}for(y=0;y<A.length;y++)for(D=0;D<A[y].length;D++)this.records[n+y][h+D].v=A[y][D],this.records[n+y][h+D].element&&(this.records[n+y][h+D].element.innerText=A[y][D],jSuites.isNumeric(A[y][D])?this.records[n+y][h+D].element.classList.add(_$
|
|
231
|
-
this.records[n][h].a=A;q=A[0][0];this.records[n][h].v=q}A=q}else this.records[n][h].v=A;return A}catch(E){return 1==this.parent.config.debugFormulas&&console.log(g,x,E),E&&E.error?E.error:_$
|
|
232
|
-
B=_$
|
|
233
|
-
A.split(_$
|
|
234
|
-
x.formula[z][w];-1==D.indexOf(_$
|
|
189
|
+
n&&y.reverse();u&&(y=b(y,1,0,n));if(n)for(r=q;r>=c;r--)g();else for(r=c;r<=q;r++)g();A++}D.length&&this.setValue(D);e[0]<c&&(c=e[0]);e[1]<p&&(p=e[1]);e[2]>q&&(q=e[2]);e[3]>l&&(l=e[3]);this.resetBorders(_$_315c[161],!0);this.updateSelectionFromCoords(c,p,q,l)};a.end=function(c){ea.event=!1;ea.execute.call(this,!0);ca.refresh.call(this)};a.cancel=function(c){ea.event=!1;a.reset.call(this,c)};a.reset=function(c){this.resetBorders(_$_315c[161],!0)};return a}(),Ia=function(){var k=function(b){b.getData=
|
|
190
|
+
k[_$_315c[58]];b.getJson=k[_$_315c[58]];b.setData=k[_$_315c[11]];b.loadData=k.load;b.getRowData=k.getRowData;b.setRowData=k.setRowData;b.getColumnData=k.getColumnData;b.setColumnData=k.setColumnData;b.updateData=k.update;b.refresh=k.refresh;b.data=k[_$_315c[58]];b.download=k.download;b.downloadCSV=k.downloadCSV;b.copy=k.copy;b.paste=k.paste;b.cut=function(){return b.copy(!0)}};k[_$_315c[58]]=function(b,a,c,e){!0===b&&(b=this.getHighlighted());var f=b?!0:!1,g=[],h=this.options.columns.length,n=this.options.data.length;
|
|
191
|
+
void 0===e&&(e=this.dataType&&typeof c==_$_315c[21]?1:0);for(var l=0;l<n;l++){var p=null;var q=e?{}:[];for(var r=0;r<h;r++){var w;if(!(w=!f)){w=b[1];var x=b[2],z=b[3];w=r>=b[0]&&r<=x&&l>=w&&l<=z?!0:!1}if(w&&(!f||!this.results||-1!=this.results.indexOf(l))){w=Q.call(this,r,l);if(a){if(f&&!1===this.rows[l].visible)continue;p=oa.processed.call(this,r,l);void 0!==p&&(w=p)}c&&w.match&&(w.match(c)||w.match(/\n/)||w.match(/"/))&&(w=w.replace(new RegExp(_$_315c[20],_$_315c[14]),_$_315c[217]),w=_$_315c[20]+
|
|
192
|
+
w+_$_315c[20]);e?jSuites.path.call(q,_$_315c[3]+qa.call(this,r),w):q.push(w);p=!0}}p&&(c?g.push(q.join(c)):g.push(q))}return c?g.join(_$_315c[10])+_$_315c[10]:g};k.parse=function(){for(var b,a={},c=0,e,f=[],g=this.options.data,h=0;h<g.length;h++)b=null,e=h,g[h].data&&(Array.isArray(g[h].data)||typeof g[h].data==_$_315c[104])&&(typeof g[h].id!==_$_315c[21]&&(b=parseInt(g[h].id)),typeof g[h].row!==_$_315c[21]&&(e=g[h].row),f[e]=g[h].data,g[h]=[]),e>c&&(c=e),b&&(a[e]=b);if(Object.keys(f).length)for(h=
|
|
193
|
+
0;h<=c;h++)f[h]&&(g[h]=f[h]);c=this.getPrimaryKey();if(!1!==c)for(c=qa.call(this,c),h=0;h<g.length;h++)a[h]||!1===c||(b=parseInt(g[h][c]),0<b&&(a[h]=b));return a};k.type=function(){for(var b=this.dataType=0;b<this.options.columns.length;b++)typeof this.options.columns[b].name!==_$_315c[21]&&(this.dataType=1)};k[_$_315c[11]]=function(b){b=k.standardize(b);var a={},c=[],e={};var f=Object.keys(b[0]).length-this.options.columns.length;0<f&&this.insertRow(f);var g=b.length-this.options.data.length;0<g&&
|
|
194
|
+
this.insertRow(g);for(var h=0;h<this.options.data.length;h++){void 0===b[h]&&(b[h]={row:h,data:[]});for(var n=0;n<this.options.columns.length;n++)void 0===b[h].data[n]&&(b[h].data[n]=_$_315c[3])}for(n=0;n<this.options.columns.length;n++){var l=qa.call(this,n);e[l]=n}for(h=0;h<b.length;h++){g=b[h].row;l=Object.keys(b[h].data);for(n=0;n<l.length;n++)f=null,void 0!==e[l[n]]?f=e[l[n]]:-1<l[n]&&(f=parseInt(l[n])),null!==f&&c.push({x:f,y:g,value:b[h].data[l[n]]});b[h].id&&(a[g]=b[h].id)}ya.setId.call(this,
|
|
195
|
+
a);oa[_$_315c[11]].call(this,c,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var b=k.parse.call(this),a=this.options.data.length;this.options.minDimensions[1]>a&&(a=this.options.minDimensions[1]);for(var c=0;c<a;c++){var e=b[c]?b[c]:null;ta.row.call(this,c,e)}}};k.load=function(b){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_315c[3];this.options.data=b;k.build.call(this);I.call(this,!0,!0);fa.update.call(this)};
|
|
196
|
+
k.refresh=function(b){if(typeof b!==_$_315c[21])for(var a=0;a<this.options.columns.length;a++){var c=this.records[b]&&this.records[b][a].element?this.records[b][a].element:null,e=na[_$_315c[58]].call(this,a,b);typeof e[0].updateCell==_$_315c[105]&&e[0].updateCell(c,Q.call(this,a,b),a,b,this,e[1]);c&&S.applyOverflow.call(this,c,a,b)}else if(this.options.url){var f=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_315c[75],dataType:_$_315c[76],
|
|
197
|
+
success:function(g){f.setData(g);jSuites.loading.hide()}})}};k.getRowData=function(b,a){if(typeof this.options.data[b]===_$_315c[21])return!1;if(a){if(this.dataType){a={};for(var c=0;c<this.options.columns.length;c++){var e=_$_315c[3]+qa.call(this,c),f=_$_315c[3]+oa.processed.call(this,c,b,!0);jSuites.path.call(a,e,f)}}else for(a=[],c=0;c<this.options.columns.length;c++)a.push(oa.processed.call(this,c,b,!0));return a}return JSON.parse(JSON.stringify(this.options.data[b]))};k.setRowData=function(b,
|
|
198
|
+
a,c){for(var e=[],f=0;f<this.options.columns.length;f++)typeof a[f]===_$_315c[21]&&(a[f]=_$_315c[3]),e.push({x:f,y:b,value:a[f]});e.length&&this.setValue(e,null,c)};k.getColumnData=function(b,a){if(typeof this.options.columns[b]===_$_315c[21])return!1;for(var c=[],e=0;e<this.options.data.length;e++){var f=a?oa.processed.call(this,b,e,!0):Q.call(this,b,e);c.push(f)}return c};k.setColumnData=function(b,a,c){for(var e=[],f=0;f<this.rows.length;f++)typeof a[f]===_$_315c[21]&&(a[f]=_$_315c[3]),e.push({x:b,
|
|
199
|
+
y:f,value:a[f]});e.length&&this.setValue(e,null,c)};k.copy=function(b){var a=this,c=this.getHighlighted(),e=function(){a.setBorder(c[0],c[1],c[2],c[3],_$_315c[110]);a.borders.copying.clear=1==b?!0:!1},f=k[_$_315c[58]].call(this,c,!0,_$_315c[218]),g=H.call(this.parent,_$_315c[219],this,c,f);if(g)f=g;else if(!1===g)return!1;navigator.clipboard?navigator.clipboard.writeText(f).then(e):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_315c[220]),e());return f};k.paste=
|
|
200
|
+
function(b,a,c){if(!R.call(this.parent,this))return!1;var e=this,f=function(){e.borders.copying&&(e.resetBorders(_$_315c[110],!0),e.borders.copying.clear=!1)},g=null,h=this.options.style,n=null,l=null,p=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];n=q[0];l=q[1];var r=jSuites.hash(c),w=jSuites.hash(k[_$_315c[58]].call(this,q,!0,_$_315c[218]));if(r!=w)f();else{var x=0,z=0;c=k[_$_315c[58]].call(this,q,!1,!1);for(r=
|
|
201
|
+
q[1];r<=q[3];r++)if(!this.results||-1!=this.results.indexOf(r)){p[z]=[];x=0;for(w=q[0];w<=q[2];w++)g=G.getColumnNameFromCoords(w,r),p[z][x]=h&&h[g]?h[g]:_$_315c[221],x++;z++}}}b=parseInt(b);a=parseInt(a);if(c){Array.isArray(c)||(c=G.parseCSV(c,_$_315c[218]));if(r=H.call(this.parent,_$_315c[222],this,c,b,a,p))c=r;else if(!1===r)return!1;100<c.length&&!this.options.pagination&&!I.limited.call(this)&&console.log(_$_315c[223]);if(g=this.getHighlighted()){x=[];z=[];var A=[];h=[];var y=0,D=0;for(r=g[1];r<=
|
|
202
|
+
g[3];r++)if(!this.results||-1!=this.results.indexOf(r)){x=[];z=[];for(w=g[0];w<=g[2];w++)x.push(c[D][y]),p&&p[D]&&p[D][y]?z.push(p[D][y]):z.push(_$_315c[3]),y++,y>=c[0].length&&(y=0);A.push(x);h.push(z);D++;D>=c.length&&(D=0)}0==A.length%c.length&&0==A[0].length%c[0].length&&(c=A,p=h)}h=null;g=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(r=q[1];r<=q[3];r++)for(w=q[0];w<=q[2];w++)(!this.results||this.results&&0<=this.results.indexOf(r))&&g.push({x:w,y:r,value:_$_315c[3],style:_$_315c[3]});
|
|
203
|
+
f()}r=b+c[0].length-this.options.columns.length;0<r&&this.insertColumn(r);r=a+c.length-this.rows.length;0<r&&this.insertRow(r);z=x=b;y=A=a;D=null;this.results&&(h=this.results.indexOf(a));for(r=0;r<c.length;r++)for(w=0;w<c[r].length;w++){null!==n&&null!==l&&c[r][w][0]==_$_315c[18]&&(c[r][w]=Y.shiftFormula(c[r][w],b-n,a-l));z=b+w;y=a+r;this.results&&(y=this.results[h+r]);var u={x:z,y,value:c[r][w]};p&&p[r]&&p[r][w]&&(u.style=p[r][w]);g.push(u);null===D&&ka.isSelected.call(this,z,y,q)&&(D=!0)}D&&f();
|
|
204
|
+
g.length&&(oa[_$_315c[11]].call(this,g,null,this.parent.config.forceUpdateOnPaste?!0:!1),H.call(this.parent,_$_315c[224],this,g),this.updateSelectionFromCoords(x,A,z,y))}};var d=function(b,a){if(this.parent.config.allowExport){void 0===a&&(a=!0);var c=_$_315c[3];if(1==b||1==this.parent.config.includeHeadersOnDownload)c+=this.getHeaders().replace(/\s+/gm,_$_315c[156])+_$_315c[10];c+=k[_$_315c[58]].call(this,null,a,this.options.csvDelimiter);a=new Blob([_$_315c[226]+c],{type:_$_315c[227]});window.navigator&&
|
|
205
|
+
window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(a,this.options.csvFileName+_$_315c[228]):(b=document.createElement(_$_315c[229]),a=URL.createObjectURL(a),b.href=a,b.setAttribute(_$_315c[230],this.options.csvFileName+_$_315c[228]),document.body.appendChild(b),b.click(),b.parentNode.removeChild(b))}else console.error(_$_315c[225])};k.downloadCSV=function(b,a){d.call(this,b,a)};k.download=function(b,a){v.render?v.render(this.parent):d.call(this,b,a)};k.standardize=function(b){b||
|
|
206
|
+
(b=[]);Array.isArray(b)||(b=[b]);void 0==b[0]||Array.isArray(b[0])||typeof b[0]==_$_315c[104]||(b=[b]);for(var a=[],c=0;c<b.length;c++){var e={};Array.isArray(b[c])||void 0==b[c].data?e.data=b[c]:e=b[c];e.row=void 0==b[c].row?c:b[c].row;a[e.row]=e}for(c=0;c<a.length;c++)b[c]=a[c]||{row:c,data:[]};return b};return k}(),Ya=function(){var k=function(d){d.getLabel=k[_$_315c[58]];d.getLabelFromCoords=k[_$_315c[58]]};k[_$_315c[58]]=function(d,b,a){if(typeof d==_$_315c[25]){d=G.getCoordsFromColumnName(d);
|
|
207
|
+
var c=d[0];b=d[1]}else c=d;return this.getProcessed(c,b,a)};return k}(),Ja=function(){var k=function(d){d.getDefinedNames=k[_$_315c[58]];d.setDefinedNames=k[_$_315c[11]]};k[_$_315c[11]]=function(d){if(d.length)if(1!==this.parent.edition)console.log(_$_315c[231]);else{for(var b=this.parent.config.definedNames,a,c=[],e=0;e<d.length;e++){var f=d[e].index.toUpperCase();a=b[f]?b[f]:null;d[e].value?(d[e].value=W(d[e].value),this.parent.config.definedNames[f]=d[e].value):b[f]&&delete this.parent.config.definedNames[f];
|
|
208
|
+
c.push({index:f,value:d[e].value,oldValue:a})}T.call(this.parent,{worksheet:this,action:_$_315c[101],records:c});L.call(this,_$_315c[101],{data:c});H.call(this.parent,_$_315c[232],this,c)}};k[_$_315c[58]]=function(d){var b=this.parent.config.definedNames;return d?b[d]:b};k.updateAll=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a,c=this.getWorksheetName();if(a=this.parent.config.definedNames){var e=[],f=Object.keys(a);if(f.length){for(var g=0;g<f.length;g++){var h=
|
|
209
|
+
Y.update.call(this,a[f[g]],d,b,c);h!==a[f[g]]&&(-1!==h.indexOf(_$_315c[233])&&(h=null),e.push({index:f[g],value:h}))}e.length&&k[_$_315c[11]].call(this,e)}}this.parent.historyCascade=!1}};k.updateWorksheetName=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a;if(a=this.parent.config.definedNames){var c=[],e=Object.keys(a);if(e.length){for(var f=0;f<e.length;f++){var g=Y.updateWorksheetName(a[e[f]],d,b);g!==a[e[f]]&&c.push({index:e[f],value:g})}c.length&&k[_$_315c[11]].call(this,
|
|
210
|
+
c)}}this.parent.historyCascade=!1}};k.build=function(){var d=Object.keys(this.config.definedNames);if(d&&d.length)if(1!==this.edition)this.config.definedNames={},console.log(_$_315c[231]);else for(var b=0;b<d.length;b++){var a=(_$_315c[3]+d[b]).toUpperCase(),c=W(this.config.definedNames[d[b]]);a!=d[b]&&delete this.config.definedNames[d[b]];this.config.definedNames[a]=c}};return k}(),ra=function(){var k=[_$_315c[234],_$_315c[235],_$_315c[236],_$_315c[237],_$_315c[238]],d=[_$_315c[239],_$_315c[179],
|
|
211
|
+
_$_315c[240],_$_315c[241],_$_315c[242],_$_315c[243],_$_315c[1],_$_315c[244],_$_315c[37],_$_315c[245],_$_315c[18],_$_315c[15],_$_315c[17],_$_315c[246]],b=[],a=function(){if(0<b.length){for(var g,h=0;h<b.length;h++)g=-1===b[h].indexOf(_$_315c[19])?this:J(b[h].split(_$_315c[19])[0]),ba.destroy.call(g,b[h]);b=[]}},c=function(g){a.call(this);for(var h=0,n=[],l,p,q,r=0;r<g.children.length;r++)if(l=g.children[r].getAttribute(_$_315c[247])){n[l]||(n[l]=k[h++],4<h&&(h=0));g.children[r].style.color=n[l];-1===
|
|
212
|
+
l.indexOf(_$_315c[19])?(p=this,q=l):(p=l.split(_$_315c[19]),q=p[1],p=J(p[0]));if(0<=q.indexOf(_$_315c[159])){var w=q.split(_$_315c[159]);q=G.getCoordsFromColumnName(w[0]);w=G.getCoordsFromColumnName(w[1])}else w=q=G.getCoordsFromColumnName(q);ka[_$_315c[11]].call(p,q[0],q[1],w[0],w[1],null,l,n[l]);b.push(l)}},e=function(g){this.worksheet&&(a.call(this.worksheet),typeof this.onchange==_$_315c[105]&&this.onchange.call(this,this.innerText,g),this.worksheet=null)},f=function(g,h){h&&typeof h!=_$_315c[105]||
|
|
213
|
+
(h={type:_$_315c[248],onchange:h});h.type===_$_315c[248]?(g.classList.add(_$_315c[249]),g.addEventListener(_$_315c[250],function(n){n=n.changedTouches&&n.changedTouches[0]?n.changedTouches[0].clientX:n.clientX;var l=this.getBoundingClientRect();24>l.width-(n-l.left)&&(f.current=g,g.classList.add(_$_315c[251]),g.classList.add(_$_315c[116]))})):(g.addEventListener(_$_315c[252],function(n){Z(g.innerText)&&(g.classList.add(_$_315c[116]),v.current&&setTimeout(function(){g.worksheet=v.current;f.parse.call(v.current,
|
|
214
|
+
g);var l=document.createTextNode(_$_315c[3]);g.appendChild(l);jSuites.focus(g)}))}),g.addEventListener(_$_315c[253],function(n){Z(g.innerText)?g.classList.add(_$_315c[116]):g.classList.contains(_$_315c[116])&&(g.classList.remove(_$_315c[116]),g.worksheet&&a.call(g.worksheet));n.preventDefault()}),g.addEventListener(_$_315c[111],function(n){27==n.which&&(g.innerText=_$_315c[3],e.call(g,!1))}));g.classList.add(_$_315c[254]);g.classList.add(_$_315c[253]);g.setAttribute(_$_315c[255],!0);g.addEventListener(_$_315c[256],
|
|
215
|
+
function(n){e.call(g,!0)});g.val=function(n){if(void 0===n)return g.innerText;g.innerText=n};h.onchange&&(g.onchange=h.onchange);h.onupdate&&(g.onupdate=h.onupdate)};f.current=null;f.parse=function(g){for(var h=_$_315c[3],n=_$_315c[3],l=window.getSelection(),p=document.createRange(),q=G.getCaretIndex.call(this.parent,g),r=Y.tokenize(g.innerText.replace(/(\r\n|\n|\r)/gm,_$_315c[3])),w=0;w<r.length;w++)r[w]&&Y.tokenIdentifier.test(r[w].trim())?(w==r.length-1&&(n=_$_315c[257]),h+=_$_315c[258]+n+_$_315c[259]+
|
|
216
|
+
r[w].trim().replace(/\$/g,_$_315c[3])+_$_315c[260]+r[w]+_$_315c[261]):h+=r[w];g.innerHTML=h;h=null;for(w=0;w<g.childNodes.length&&!(h=g.childNodes[w],n=h.tagName?h.innerText.length:h.length,0>=q-n);w++)q-=n;h&&(h.tagName?p.setStart(h.firstChild,q):(q>h.length&&(q=h.length),p.setStart(h,q)),l.removeAllRanges(),l.addRange(p));c.call(this,g)};f.close=function(g){a.call(this);g?g.classList.remove(_$_315c[116]):f.current&&(typeof f.current.onchange==_$_315c[105]&&f.current.onchange.call(f.current),f.current.classList.remove(_$_315c[251]),
|
|
217
|
+
f.current.classList.remove(_$_315c[116]),f.current.worksheet=null,f.current=null)};f.getName=function(g,h,n,l,p){g=G.getColumnNameFromCoords(g,h);n=G.getColumnNameFromCoords(n,l);p.ctrlKey&&(g=n);return g!==n?(p=g+_$_315c[159]+n,p=Y.getTokensFromRange.call(this,p),Y.getRangeFromTokens.call(this,p)):g};f.range=function(g,h,n,l,p){f.current.getAttribute(_$_315c[262])==_$_315c[263]&&(g=n,h=l);g=f.getName.call(this,g,h,n,l,p);h=document.createElement(_$_315c[264]);h.innerText=g;h.setAttribute(_$_315c[247],
|
|
218
|
+
g);f.current.innerText=_$_315c[3];f.current.appendChild(h);c.call(this,f.current);jSuites.focus(h);p.preventDefault()};f.update=function(g,h,n,l,p,q,r){q.getAttribute(_$_315c[262])==_$_315c[263]&&(g=n,h=l);var w=jSuites.getNode();if(w){var x=f.getName.call(this,g,h,n,l,p);this!==r&&(x=r.getWorksheetName()+_$_315c[19]+x);g=function(z){var A=document.createElement(_$_315c[264]);A.innerText=x;A.setAttribute(_$_315c[247],x);w.parentNode===q&&!1===z?w.parentNode.insertBefore(A,w.nextSibling):q.appendChild(A);
|
|
219
|
+
w=A};if(w.getAttribute(_$_315c[247]))p.ctrlKey?(q.appendChild(document.createTextNode(_$_315c[37])),g(!0)):(w.innerText=x,w.setAttribute(_$_315c[247],x));else{if(!w.innerText||w.innerText!==_$_315c[3]&&-1==d.indexOf(w.innerText.slice(-1))||w.nextElementSibling&&w.nextElementSibling.getAttribute(_$_315c[247]))return!1;g(!1)}jSuites.focus(w);c.call(this,q);p.preventDefault();typeof q.onupdate==_$_315c[105]&&q.onupdate.call(q,q.innerText);return!0}return!1};f.onkeydown=function(g){g.target.worksheet=
|
|
220
|
+
this;if(g.ctrlKey){if(67==g.which||88==g.which)g=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_315c[3]),navigator.clipboard?navigator.clipboard.writeText(g):(this.parent.textarea.value=g,this.parent.textarea.select(),document.execCommand(_$_315c[220]))}else if(36==g.which){var h=window.getSelection(),n=document.createRange();n.setStart(g.target,0);h.removeAllRanges();h.addRange(n)}else 35==g.which?jSuites.focus(g.target):187==g.which?!g.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_315c[3])&&
|
|
221
|
+
g.target.getAttribute(_$_315c[118])&&g.target.removeAttribute(_$_315c[118]):13==g.which&&g.target.blur()};f.palette=function(g){k=g};return f}(),Y=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),d=function(g){g=W(g);for(var h=_$_315c[3],n=[],l=0,p=0;p<g.length;p++){if(g[p]==_$_315c[20]||g[p]==_$_315c[157])l=0==l?1:0;var q;if(q=0==l)q=g[p],(q=q==_$_315c[239]||q==_$_315c[179]||q==_$_315c[240]||q==_$_315c[241]||q==_$_315c[242]||q==_$_315c[12])||(q=g[p],
|
|
222
|
+
q=q==_$_315c[243]||q==_$_315c[265]||q==_$_315c[1]||q==_$_315c[2]||q==_$_315c[244]||q==_$_315c[266]||q==_$_315c[37]||q==_$_315c[245]||q==_$_315c[18]||q==_$_315c[15]||q==_$_315c[17]||q==_$_315c[246]);q?(h&&(n.push(h),h=_$_315c[3]),n.push(g[p])):h+=g[p]}h&&n.push(h);for(p=0;p<n.length;p++)0==l&&(n[p]=n[p].trim());return n},b=function(g){g.setFormula=b[_$_315c[11]];g.updateFormula=b.update;g.executeFormula=b.execute;g.resetArray=b.resetArray;g.formula=[];g.tracking=[]};b.run=function(g,h){var n=_$_315c[3],
|
|
223
|
+
l=Object.keys(h);if(l.length){for(var p={},q=0;q<l.length;q++){var r=l[q].replace(/!/g,_$_315c[39]);0<r.indexOf(_$_315c[39])&&(r=r.split(_$_315c[39]),p[r[0]]=!0)}r=Object.keys(p);for(q=0;q<r.length;q++)n+=_$_315c[267]+r[q]+_$_315c[268];for(q=0;q<l.length;q++)r=l[q].replace(/!/g,_$_315c[39]),null===h[l[q]]||jSuites.isNumeric(h[l[q]])||(p=h[l[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(h[l[q]]=c(p,h[l[q]])),n=0<r.indexOf(_$_315c[39])?n+(r+_$_315c[269]+h[l[q]]+
|
|
224
|
+
_$_315c[270]):n+(_$_315c[267]+r+_$_315c[269]+h[l[q]]+_$_315c[270])}g=g.replace(/\$/g,_$_315c[3]);(p=g.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(g=c(p,g));g=g.replace(/!/g,_$_315c[39]);g=(new Function(n+_$_315c[271]+g))();null===g&&(g=0);return g};b[_$_315c[11]]=function(){};var a=function(g){g=W(g,!0);return g.replace(/\$/g,_$_315c[3])},c=function(g,h){for(var n=0;n<g.length;n++){var l=b.getTokensFromRange.call(this,g[n]);h=h.replace(g[n],_$_315c[244]+l.join(_$_315c[37])+
|
|
225
|
+
_$_315c[266])}return h},e=function(g,h,n){var l=this.config.definedNames;if(l&&0<Object.keys(l).length){for(var p=0;p<g.length;p++)g[p]&&l&&l[g[p]]&&(h=h.replace(g[p],l[g[p]]),n&&(n[g[p]]=l[g[p]]));return a(h)}return h};b.resetArray=function(g,h){var n;if(n=this.records[h][g].a){for(var l=0;l<n.length;l++)for(var p=0;p<n[l].length;p++)this.options.data[h+l][g+p]||(this.records[h+l][g+p].v=_$_315c[3],this.records[h+l][g+p].element&&(this.records[h+l][g+p].element.innerText=_$_315c[3]));this.records[h][g].a=
|
|
226
|
+
null}};b.execute=function(g,h,n,l,p){if(1==this.parent.processing)return null!==h&&null!==n&&this.parent.queue.push([this,h,n]),_$_315c[3];if(typeof this.parent.config.onbeforeformula==_$_315c[105]){var q=H.call(this.parent,_$_315c[272],this,g,h,n);if(!1===q)return g;q&&(g=q)}var r=[],w=function(E,K,N,V){if(void 0!=K&&void 0!=N){var O=G.getColumnNameFromCoords(K,N);K=V.getWorksheetName()+_$_315c[39]+O;r[K]||(r[K]=0);r[K]++;if(3<r[K])throw{error:_$_315c[273],message:_$_315c[274],reference:K};}else K=
|
|
227
|
+
O=null;p||(E=a(E));var U=E,aa=U.match(/[A-Z_]+[A-Z0-9_\.]*/g);aa&&aa.length&&(U=e.call(V.parent,aa,U,x));(aa=U.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&aa.length&&(U=c.call(V,aa,U));aa=[];U=d(U);for(var P=0;P<U.length;P++)U[P]&&k.test(U[P])&&aa.push(U[P]);if(aa){if(K&&-1<aa.indexOf(K.replace(_$_315c[39],_$_315c[19])))throw{error:_$_315c[275],message:_$_315c[276]};for(U=0;U<aa.length;U++){K=aa[U].split(_$_315c[19]);K[1]?(N=K[1],P=J(K[0]),K=V.getWorksheetName()+_$_315c[39]+
|
|
228
|
+
O):(N=K[0],P=V,K=O);if(typeof P==_$_315c[21]||typeof P.formula==_$_315c[21])throw{error:_$_315c[277],message:_$_315c[278]};K&&(P.formula[N]||(P.formula[N]=[]),0>P.formula[N].indexOf(K)&&P.formula[N].push(K));if(!x[aa[U]]){N=G.getCoordsFromColumnName(N);K=N[0];N=N[1];var ua=P.records[N]&&void 0!==P.records[N][K].v?P.records[N][K].v:Q.call(P,K,N);x[aa[U]]||(Z(ua)?x[aa[U]]=w(ua,K,N,P):(ua===_$_315c[3]||null===ua||void 0===ua?ua=null:jSuites.isNumeric(ua)||(ua=_$_315c[20]+ua+_$_315c[20],z[aa[U]]=_$_315c[72]),
|
|
229
|
+
x[aa[U]]=ua))}}}return E.substr(1)},x={},z={};try{g=w(g,h,n,this);if(g==_$_315c[3])return _$_315c[3];0==g.indexOf(_$_315c[279])&&(p=!0);var A=p?b.run(g,x):v.formula(g,x,h,n,this,z);if(!1!==l&&void 0!=h&&void 0!=n)if(A instanceof Date)this.records[n][h].v=jSuites.calendar.dateToNum(A);else if(Array.isArray(A)){l=[];q=null;for(var y=0;y<A.length;y++)for(var D=0;D<A[y].length;D++){(0<D||0<y)&&this.options.data[n+y][h+D]!==_$_315c[3]&&(q=_$_315c[280]);var u=G.getColumnNameFromCoords(h+D,n+y);l.push(u)}if(!q){u=
|
|
230
|
+
G.getColumnNameFromCoords(h,n);var B=Object.keys(this.formula);for(y=0;y<B.length;y++){var C=this.formula[B[y]].indexOf(u);if(0<=C)for(D=0;D<l.length;D++)C=this.formula[B[y]].indexOf(l[D]),-1==C&&this.formula[B[y]].push(l[D])}for(y=0;y<A.length;y++)for(D=0;D<A[y].length;D++)this.records[n+y][h+D].v=A[y][D],this.records[n+y][h+D].element&&(this.records[n+y][h+D].element.innerText=A[y][D],jSuites.isNumeric(A[y][D])?this.records[n+y][h+D].element.classList.add(_$_315c[281]):this.records[n+y][h+D].element.classList.remove(_$_315c[281]));
|
|
231
|
+
this.records[n][h].a=A;q=A[0][0];this.records[n][h].v=q}A=q}else this.records[n][h].v=A;return A}catch(E){return 1==this.parent.config.debugFormulas&&console.log(g,x,E),E&&E.error?E.error:_$_315c[277]}};b.update=function(g,h,n,l){var p=null,q=null,r=this.getWorksheetName(),w=function(D){n&&n[D]&&(D=_$_315c[233]);h[D]&&(D=h[D]);return D},x=function(D,u){if(-1===u.indexOf(_$_315c[282]))return D;u=u.split(_$_315c[282]);if(3===u.length){u=_$_315c[282];var B=_$_315c[282]}else u[0]===_$_315c[3]?(u=_$_315c[282],
|
|
232
|
+
B=_$_315c[3]):(u=_$_315c[3],B=_$_315c[282]);return u+D.match(/[A-Z]+/g)+B+D.match(/[0-9]+/g)};g=W(g,!0);g=d(g);for(var z=0;z<g.length;z++)if(g[z]&&k.test(g[z])){if(-1==g[z].indexOf(_$_315c[19])){if(q=g[z],p=_$_315c[3],l&&l!=r)continue}else if(q=g[z].split(_$_315c[19]),p=q[0],q=q[1],l&&l!=p)continue;var A=q;if(0<=q.indexOf(_$_315c[159])){q=b.getTokensFromRange.call(this,q);for(var y=0;y<q.length;y++)q[y]=w(q[y]);q=b.getRangeFromTokens.call(this,q);q!==_$_315c[233]&&-1!==A.indexOf(_$_315c[282])&&(A=
|
|
233
|
+
A.split(_$_315c[159]),q=q.split(_$_315c[159]),q=x(q[0],A[0])+_$_315c[159]+x(q[1],A[1]))}else-1!==A.indexOf(_$_315c[282])?(q=w(q.replace(/\$/g,_$_315c[3])),q=x(q,A)):q=w(q);p&&(q=p+_$_315c[19]+q);g[z]=q}return g.join(_$_315c[3])};b.getChain=function(g){if(void 0===g)return[];var h=[],n=[],l=[],p=function(w){if(0<=w.indexOf(_$_315c[39])){var x=w.split(_$_315c[39]),z=x.pop(),A=x.join(_$_315c[39]);x=J(A)}else x=this,A=x.getWorksheetName(),z=w;if(x.formula[z]&&!l[w]){var y=!1;l[w]=!0;for(w=0;w<x.formula[z].length;w++){var D=
|
|
234
|
+
x.formula[z][w];-1==D.indexOf(_$_315c[39])&&(D=A+_$_315c[39]+D);if(!n[D]){var u=x.getValue(D);Z(u)?h.push([D,u,b.getTokens.call(x,u,A)]):(y=!0,x.formula[z][w]=null);p.call(x,D);n[D]=!0}}1==y&&(x.formula[z]=x.formula[z].filter(function(B){return null!=B}))}},q=Object.keys(g);for(g=0;g<q.length;g++)p.call(this,q[g]);q=0;for(g=h.length-1;0<=g;g--){for(var r=0;r<g;r++)if(0<=h[r][2].indexOf(h[g][0])){h.splice(r,0,h.splice(g,1)[0]);g=h.length;break}q++;if(1E6<q){console.error(_$_315c[283]);break}}n=[];
|
|
235
235
|
for(g=0;g<h.length;g++)n[h[g][0]]=h[g][1];return n};b.updateAll=function(g,h){var n,l,p,q,r,w={},x=this.getWorksheetName();for(r=0;r<v.spreadsheet.length;r++){var z=v.spreadsheet[r].worksheets;for(p=0;p<z.length;p++){var A=z[p].getWorksheetName();for(l=0;l<z[p].options.data.length;l++)for(n=0;n<z[p].options.data[l].length;n++)if((q=z[p].options.data[l][n])&&Z(q)){var y=b.update.call(z[p],q,g,h,x);y!=q&&(w[A]||(w[A]=[]),w[A].push({x:n,y:l,value:y,force:!0}))}}}z=Object.keys(w);for(n=0;n<z.length;n++)if(w[z[n]].length){p=
|
|
236
|
-
J(z[n]);for(l=0;l<w[z[n]].length;l++)Q.call(p,w[z[n]][l].x,w[z[n]][l].y,w[z[n]][l].value);L.call(p,_$
|
|
237
|
-
v.spreadsheet[D].worksheets,B=0;B<u.length;B++)if(u[B].getWorksheetName()!==A)for(n=Object.keys(u[B].formula),p=0;p<n.length;p++){z=[];q=u[B].formula[n[p]];for(r=0;r<q.length;r++)y=q[r].split(_$
|
|
238
|
-
y=Y.execute.call(g,q,l,p,!1),y!==g.records[p][l].v&&(w[h]||(w[h]=[]),w[h].push({x:l,y:p,value:q,force:!0}));z=Object.keys(w);if(z.length)for(n=0;n<z.length;n++)p=J(z[n]),w[z[n]]=oa.applyValues.call(p,w[z[n]]),oa.setValueChained.call(p,w[z[n]])};b.updateWorksheetName=function(g,h,n){for(var l=d(g),p=0;p<l.length;p++)g=l[p].split(_$
|
|
239
|
-
g[0]+_$
|
|
240
|
-
function(g,h,n){var l=_$
|
|
241
|
-
p[1].split(_$
|
|
242
|
-
if(p[0]<=q[0]){g=p[0];var r=q[0]}else g=q[0],r=p[0];if(null===p[1]&&null==q[1]){var w=0;p=0;h.options&&h.options.data&&(p=h.options.data.length-1)}else p[1]<=q[1]?(w=p[1],p=q[1]):(w=q[1],p=p[1]);for(h=w;h<=p;h++)for(w=g;w<=r;w++)l.push(n+G.getColumnNameFromCoords(w,h));return l};b.getRangeFromTokens=function(g){g=g.filter(function(l){return l!=_$
|
|
243
|
-
(h=g[n].split(_$
|
|
244
|
-
(n=c.call(this,g,n));if(g=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(n=0;n<g.length;n++)-1==g[n].indexOf(_$
|
|
245
|
-
qa;d.value=Q;d.getValue=k[_$
|
|
246
|
-
null!=d&&null!=b&&(c=a?k.processed.call(this,d,b):Q.call(this,d,b));return c};k[_$
|
|
247
|
-
void 0!==p.style&&(r=p.style));p={x:c,y:e,value:q,force:a};null!==r&&(p.style=r);g.push(p)};if(d&&Array.isArray(d))for(var n=0;n<d.length;n++)h(d[n],b);else if(typeof d==_$
|
|
248
|
-
{worksheet:l,action:_$
|
|
249
|
-
this.options.columns[c].type==_$
|
|
250
|
-
function(d,b,a){var c=Q.call(this,d,b);if(null===c)return null;var e=na[_$
|
|
251
|
-
c).substr(0,1)==_$
|
|
252
|
-
c[0],c[1],a[g[e]],!0),d.w=b,d.value=d.v=b.records[c[1]][c[0]].v,d.cell=g[e],d.f=a[g[e]],f.push(d);f.length&&H.call(this.parent,_$
|
|
253
|
-
!0:!1};k[_$
|
|
236
|
+
J(z[n]);for(l=0;l<w[z[n]].length;l++)Q.call(p,w[z[n]][l].x,w[z[n]][l].y,w[z[n]][l].value);L.call(p,_$_315c[131],{data:w[z[n]]})}w=[];n=Object.keys(this.formula);z=[];l=[];for(p=0;p<n.length;p++)if(y=n[p],q=this.formula[y],h&&h[y])for(r=0;r<q.length;r++)g[q[r]]&&(q[r]=g[q[r]]),l[q[r]]=!0;else{A=[];for(r=0;r<q.length;r++)h&&h[q[r]]||(g[q[r]]&&(q[r]=g[q[r]]),l[q[r]]=!0,A.push(q[r]));A.length&&(g[y]&&(y=g[y]),z[y]=A)}this.formula=z;A=this.getWorksheetName();for(var D=0;D<v.spreadsheet.length;D++)for(var u=
|
|
237
|
+
v.spreadsheet[D].worksheets,B=0;B<u.length;B++)if(u[B].getWorksheetName()!==A)for(n=Object.keys(u[B].formula),p=0;p<n.length;p++){z=[];q=u[B].formula[n[p]];for(r=0;r<q.length;r++)y=q[r].split(_$_315c[39]),y[0]==A&&y[1]?h&&h[y[1]]||(g[y[1]]&&(y[1]=g[y[1]]),z.push(y[0]+_$_315c[39]+y[1])):z.push(q[r]);u[B].formula[n[p]]=z}z=Object.keys(l);for(n=0;n<z.length;n++)y=z[n].split(_$_315c[39]),y[1]?(q=y[1],g=J(y[0]),h=y[0]):(q=y[0],g=this,h=x),y=G.getCoordsFromColumnName(q),l=y[0],p=y[1],q=g.options.data[p][l],
|
|
238
|
+
y=Y.execute.call(g,q,l,p,!1),y!==g.records[p][l].v&&(w[h]||(w[h]=[]),w[h].push({x:l,y:p,value:q,force:!0}));z=Object.keys(w);if(z.length)for(n=0;n<z.length;n++)p=J(z[n]),w[z[n]]=oa.applyValues.call(p,w[z[n]]),oa.setValueChained.call(p,w[z[n]])};b.updateWorksheetName=function(g,h,n){for(var l=d(g),p=0;p<l.length;p++)g=l[p].split(_$_315c[19]),g[1]&&(g[0]=g[0].replace(new RegExp(_$_315c[157],_$_315c[14]),_$_315c[3]),g[0].toUpperCase()==h.toUpperCase()&&(g[0]=n,0<=g[0].indexOf(_$_315c[156])&&(g[0]=_$_315c[157]+
|
|
239
|
+
g[0]+_$_315c[157]),l[p]=g.join(_$_315c[19])));return l.join(_$_315c[3])};b.updateWorksheetNames=function(g,h){var n,l;for(l=0;l<v.spreadsheet.length;l++){var p=v.spreadsheet[l].worksheets;for(var q=0;q<p.length;q++){var r=[];for(var w=0;w<p[q].options.data.length;w++)for(var x=0;x<p[q].options.data[w].length;x++)if((n=p[q].options.data[w][x])&&Z(n)){var z=b.updateWorksheetName(n,g,h);z!=n&&(r.push({x,y:w,value:z,force:!0}),Q.call(p[q],x,w,z))}r.length&&L.call(p[q],_$_315c[131],{data:r})}}};var f=
|
|
240
|
+
function(g,h,n){var l=_$_315c[3],p=_$_315c[3],q=g.split(_$_315c[282]);if(3===q.length)return g;2===q.length&&(q[0]?(n=0,p=_$_315c[282]):(h=0,l=_$_315c[282]),g=q.join(_$_315c[3]));g=G.getCoordsFromColumnName(g);h=g[0]+h;g=g[1]+n;return g=0>h||0>g?_$_315c[233]:l+G.getColumnName(h)+p+(g+1)};b.shiftFormula=function(g,h,n){g=d(g,!0);for(var l,p,q=0;q<g.length;q++)k.test(g[q])&&(p=-1==g[q].indexOf(_$_315c[19])?[_$_315c[3],g[q]]:g[q].split(_$_315c[19]),-1==p[1].indexOf(_$_315c[159])?p[1]=f(p[1],h,n):(l=
|
|
241
|
+
p[1].split(_$_315c[159]),p[1]=f(l[0],h,n)+_$_315c[159]+f(l[1],h,n)),g[q]=p[0]?p.join(_$_315c[19]):p[1]);return g.join(_$_315c[3])};b.getTokensFromRange=function(g){var h=this,n=_$_315c[3],l=_$_315c[3];0<=g.indexOf(_$_315c[19])?l=_$_315c[19]:0<=g.indexOf(_$_315c[39])&&(l=_$_315c[39]);g=g.replace(/\$/g,_$_315c[3]);l&&(n=g.split(l),g=n.pop(),n=n.join(_$_315c[39]),h=J(n),n+=l);if(-1==g.indexOf(_$_315c[159]))return[n+g];l=[];g=g.split(_$_315c[159]);var p=G.getCoordsFromColumnName(g[0]),q=G.getCoordsFromColumnName(g[1]);
|
|
242
|
+
if(p[0]<=q[0]){g=p[0];var r=q[0]}else g=q[0],r=p[0];if(null===p[1]&&null==q[1]){var w=0;p=0;h.options&&h.options.data&&(p=h.options.data.length-1)}else p[1]<=q[1]?(w=p[1],p=q[1]):(w=q[1],p=p[1]);for(h=w;h<=p;h++)for(w=g;w<=r;w++)l.push(n+G.getColumnNameFromCoords(w,h));return l};b.getRangeFromTokens=function(g){g=g.filter(function(l){return l!=_$_315c[233]});for(var h=_$_315c[3],n=0;n<g.length;n++)0<=g[n].indexOf(_$_315c[19])?(h=g[n].split(_$_315c[19]),g[n]=h.pop(),h=h[0]+_$_315c[19]):0<=g[n].indexOf(_$_315c[39])&&
|
|
243
|
+
(h=g[n].split(_$_315c[39]),g[n]=h.pop(),h=h.join(_$_315c[39])+_$_315c[39]);g.sort(function(l,p){l=G.getCoordsFromColumnName(l);p=G.getCoordsFromColumnName(p);return l[1]>p[1]?1:l[1]<p[1]?-1:l[0]>p[0]?1:l[0]<p[0]?-1:0});return g.length?h+(g[0]+_$_315c[159]+g[g.length-1]):_$_315c[233]};b.getTokens=function(g,h){var n=a(g);g.replace(/!/g,_$_315c[39]);(g=n.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&g.length&&(n=e.call(this.parent,g,n));(g=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&g.length&&
|
|
244
|
+
(n=c.call(this,g,n));if(g=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(n=0;n<g.length;n++)-1==g[n].indexOf(_$_315c[39])&&h&&(g[n]=h+_$_315c[39]+g[n]);return g};b.tracking=function(g,h){for(var n=this.tracking,l=[],p=0;p<n.length;p++)h&&h[n[p]]||(g[n[p]]?l.push(g[n[p]]):l.push(n[p]));for(p=0;p<l.length;p++)(g=this.getValue(l[p]))&&Z(g)?this.setValue(l[p],g):l.splice(p,1);this.tracking=l};b.tokenIdentifier=k;b.tokenize=d;return b}(),oa=function(){var k=function(d){d.name=
|
|
245
|
+
qa;d.value=Q;d.getValue=k[_$_315c[58]];d.getValueFromCoords=k.getFromCoords;d.setValue=k[_$_315c[11]];d.setValueFromCoords=k.setFromCoords;d.setCheckRadioValue=k.setCheckRadio;d.getProcessed=k.processed};k[_$_315c[58]]=function(d,b){var a=this;if(typeof d==_$_315c[104]){var c=d.x;d=d.y}else 0<=d.indexOf(_$_315c[39])&&(a=d.split(_$_315c[39]),d=a.pop(),a=J(a.join(_$_315c[39]))),d=G.getCoordsFromColumnName(d),c=d[0],d=d[1];return k.getFromCoords.call(a,c,d,b)};k.getFromCoords=function(d,b,a){var c=null;
|
|
246
|
+
null!=d&&null!=b&&(c=a?k.processed.call(this,d,b):Q.call(this,d,b));return c};k[_$_315c[11]]=function(d,b,a){if(!R.call(this.parent,this))return!1;var c=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(p,q){var r=null;typeof p==_$_315c[25]?(f=G.getCoordsFromColumnName(p),c=f[0],e=f[1]):p.tagName?(c=p.getAttribute(_$_315c[56]),e=p.getAttribute(_$_315c[57])):p.element&&p.element.tagName?(c=p.element.getAttribute(_$_315c[56]),e=p.element.getAttribute(_$_315c[57])):(c=p.x,e=p.y,void 0!==p.value&&(q=p.value),
|
|
247
|
+
void 0!==p.style&&(r=p.style));p={x:c,y:e,value:q,force:a};null!==r&&(p.style=r);g.push(p)};if(d&&Array.isArray(d))for(var n=0;n<d.length;n++)h(d[n],b);else if(typeof d==_$_315c[104]&&void 0==d.x&&void 0==d.tagName)for(b=Object.keys(d),n=0;n<b.length;n++)h(b[n],d[b[n]]);else h(d,b);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,g);this.refreshBorders();var l=this;setTimeout(function(){ba.refresh.call(l)},250);if(g.length){T.call(this.parent,
|
|
248
|
+
{worksheet:l,action:_$_315c[96],records:g,selection:this.selectedCell});d=this.getPrimaryKey();if(!1!==d)for(n=0;n<g.length;n++)g[n].x===d&&g[n].value&&X.call(this,g[n]);L.call(this,_$_315c[96],{data:g});fa.update.call(this,!0);H.call(this.parent,_$_315c[284],this,g)}}};k.setFromCoords=function(d,b,a,c){var e=[];e.push({x:d,y:b,value:a});k[_$_315c[11]].call(this,e,null,c)};k.setCheckRadio=function(){for(var d=[],b=this.getSelected(),a=0;a<b.length;a++){var c=b[a].x,e=b[a].y;if(!this.options.columns[c].readOnly&&
|
|
249
|
+
this.options.columns[c].type==_$_315c[285]){var f=Q.call(this,c,e)?!1:!0;d.push({x:c,y:e,value:f})}}d.length&&k[_$_315c[11]].call(this,d)};k.applyValues=function(d){for(var b,a,c=this.options.style||{},e=[],f={},g=0;g<d.length;g++)if(b=d[g],a=this.updateCell(b.x,b.y,b.value,b.force),void 0!==a.value){if(void 0!==b.style){var h=G.getColumnNameFromCoords(b.x,b.y);a.style=f[h]=b.style;a.oldStyle=c&&c[h]?c[h]:_$_315c[221]}e.push(a)}0<Object.keys(f).length&&Ma.update.call(this,f);return e};k.processed=
|
|
250
|
+
function(d,b,a){var c=Q.call(this,d,b);if(null===c)return null;var e=na[_$_315c[58]].call(this,d,b),f=e[1];f.type!=_$_315c[114]&&f.type!=_$_315c[286]&&f.type!=_$_315c[287]&&f.type!=_$_315c[288]&&f.type!=_$_315c[289]&&0!=f.process&&(!0===a||f.type!=_$_315c[290]&&f.type!=_$_315c[291]&&f.type!=_$_315c[292])&&(f.type==_$_315c[285]?c=e[0][_$_315c[58]](f,c,a):this.records[b][d].element?c=1==this.parent.config.stripHTML?this.records[b][d].element.innerText:this.records[b][d].element.innerHTML:((_$_315c[3]+
|
|
251
|
+
c).substr(0,1)==_$_315c[18]&&(c=this.executeFormula(c,d,b,!1)),e[0]&&typeof e[0][_$_315c[58]]==_$_315c[105]&&(c=e[0][_$_315c[58]](f,c,a))));return c};k.setValueChained=function(d){for(var b,a=[],c,e=0;e<d.length;e++)b=d[e],c=G.getColumnNameFromCoords(b.x,b.y),a[c]=b.value;a=Y.getChain.call(this,a);var f=[],g=Object.keys(a);for(e=0;e<g.length;e++)0<=g[e].indexOf(_$_315c[39])?(b=g[e].split(_$_315c[39]),c=b.pop(),b=J(b.join(_$_315c[39]))):(c=g[e],b=this),c=G.getCoordsFromColumnName(c),d=S.update.call(b,
|
|
252
|
+
c[0],c[1],a[g[e]],!0),d.w=b,d.value=d.v=b.records[c[1]][c[0]].v,d.cell=g[e],d.f=a[g[e]],f.push(d);f.length&&H.call(this.parent,_$_315c[293],this,f)};return k}(),S=function(){var k=function(d){d.getCell=k[_$_315c[58]];d.getCellFromCoords=k[_$_315c[58]];d.updateCell=k.update;d.updateCells=k.updateAll;d.getSelected=k.selected;d.isAttached=k.attached};k.attached=function(d,b){return this.records[b]&&this.records[b][d]&&this.records[b][d].element&&this.records[b][d].element.parentNode&&this.records[b][d].element.parentNode.parentNode?
|
|
253
|
+
!0:!1};k[_$_315c[58]]=function(d,b){typeof d==_$_315c[25]&&(b=G.getCoordsFromColumnName(d),d=b[0],b=b[1]);d=parseInt(d);b=parseInt(b);if(this.records[b]&&this.records[b][d]&&this.records[b][d].element)return this.records[b][d].element;var a=Q.call(this,d,b);null===a&&(a=_$_315c[3]);return S.create.call(this,d,b,a)};k.getFromCoords=function(d,b,a){if(!d||null===d[0])return null;var c=[],e=d[0],f=d[1],g=d[2];d=d[3];for(a&&(a=this.results?G.invert(this.results):null);f<=d;f++)for(var h=e;h<=g;h++)if(!a||
|
|
254
254
|
a[f])b?c.push(G.getColumnNameFromCoords(h,f)):c.push(this.records[f][h]);return c};k.selected=function(d,b){return k.getFromCoords.call(this,this.getHighlighted(),d,b)};k.getSelectedColumns=function(){var d=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)d.push(a);return d};k.updateAll=function(d){for(var b=this.getPrimaryKey(),a=[],c=0;c<d.length;c++)void 0!==d[c].id?(X.call(this,d[c]),a.push({id:d[c].id,y:d[c].y}),!1!==b&&k.update.call(this,b,d[c].y,d[c].id,!0)):a.push(k.update.call(this,
|
|
255
|
-
d[c].x,d[c].y,d[c].value,d[c].force));L.call(this,_$
|
|
256
|
-
g;f.value=h;e&&k.applyOverflow.call(this,e,d,b);c[1]&&typeof c[1].render==_$
|
|
257
|
-
ta.cell.call(this,d,b,a);this.records[b][d].element=c;!a&&this.records[b][d].v&&(c.innerText=this.records[b][d].v);e[1]&&typeof e[1].render==_$
|
|
255
|
+
d[c].x,d[c].y,d[c].value,d[c].force));L.call(this,_$_315c[130],[a])};k.update=function(d,b,a,c){var e=this.records[b];if(e=e&&e[d]?e[d]:null){e=e.element;var f={x:d,y:b};if(c||!e||1!=e.classList.contains(_$_315c[26])){c=H.call(this.parent,_$_315c[294],this,e,d,b,a);if(!1===c)return f;void 0!==c&&(a=c);c=na[_$_315c[58]].call(this,d,b);if(typeof c[0].updateCell==_$_315c[105]){var g=c[0].updateCell(e,a,d,b,this,c[1]);void 0!==g&&(a=g)}g=Q.call(this,d,b);if(g!==a){var h=Q.call(this,d,b,a);f.oldValue=
|
|
256
|
+
g;f.value=h;e&&k.applyOverflow.call(this,e,d,b);c[1]&&typeof c[1].render==_$_315c[105]&&c[1].render(e,a,d,b,this,c[1]);H.call(this.parent,_$_315c[295],this,e,d,b,f.value,f.oldValue)}}}else return!1;return f};k.create=function(d,b,a){var c=document.createElement(_$_315c[175]);c.setAttribute(_$_315c[56],d);c.setAttribute(_$_315c[57],b);var e=na[_$_315c[58]].call(this,d,b);if(e[0]&&typeof e[0].createCell==_$_315c[105]){var f=e[0].createCell(c,a,d,b,this,e[1]);void 0!==f&&(a=f)}Q.call(this,d,b,a);this.records[b][d]||
|
|
257
|
+
ta.cell.call(this,d,b,a);this.records[b][d].element=c;!a&&this.records[b][d].v&&(c.innerText=this.records[b][d].v);e[1]&&typeof e[1].render==_$_315c[105]&&e[1].render(c,a,d,b,this,e[1]);k.applyProperties.call(this,c,d,b);k.applyOverflow.call(this,c,d,b);H.call(this.parent,_$_315c[296],this,c,d,b,a);return c};k.getAttributes=function(d,b,a){a[d]||(a[d]={});d==_$_315c[297]?a[d][b]=this.getValue(b):d==_$_315c[298]?this.merged.cells&&(b=this.merged.cells[b])&&(a[d][b]=this.options.mergeCells[b]):this.options[d]&&
|
|
258
258
|
this.options[d][b]&&(a[d][b]=this.options[d][b])};k.setAttributes=function(d){d&&d.style&&this.setStyle(d.style);d&&d.comments&&this.setComments(d.comments);d&&d.meta&&this.setMeta(d.meta);d&&d.cells&&this.setProperty(d.cells);d&&d.mergeCells&&this.setMerge(d.mergeCells);d&&d.values&&k.batch.call(this,d.values);d&&d.formulas&&k.batch.call(this,d.formulas,!0)};k.applyProperties=function(d,b,a){var c=G.getColumnNameFromCoords(b,a),e=this.options.columns,f=this.options.style,g=this.options.comments,
|
|
259
|
-
h=this.options.cells,n=this.options.rows,l=null,p=!1;e[b]&&(e[b].readonly||e[b].readOnly)&&(p=!0);n&&n[a]&&(n[a].readonly||n[a].readOnly)&&(p=!0);if(f&&f[c]){var q=(q=d.getAttribute(_$
|
|
260
|
-
d.classList.remove(_$
|
|
261
|
-
p);this.records[a][b].readonly?d.classList.add(_$
|
|
262
|
-
0;e<c.length;e++){if(0<=c[e].indexOf(_$
|
|
263
|
-
k.setCells;b.getProperties=k[_$
|
|
264
|
-
function(b,a){var c=null;void 0!==a&&(a=G.getColumnNameFromCoords(b,a),this.options.cells.hasOwnProperty(a)&&(c=this.options.cells[a]));c||(c=this.options.columns[b]);if(!c)c={type:_$
|
|
265
|
-
f),void 0!==e&&Q.call(this,b,a,e),S.applyProperties.call(this,g,b,a)))};k[_$
|
|
266
|
-
e.push({x:f[0],y:f[1],value:b[a[c]]})}if(Array.isArray(e))for(c=0;c<e.length;c++){var g=e[c];b=g.x;var h=g.y,n=k[_$
|
|
267
|
-
h),g.oldValue=this.options.cells&&this.options.cells[n]?this.options.cells[n]:_$
|
|
268
|
-
a,c,e){a=typeof b==_$
|
|
269
|
-
n.value.type?(n=n.value,p=null,n&&n.type&&(p=v.editors[n.type]),d.call(this,g,h,p,l,b)):(n=this.records[h][g].element)&&typeof l.updateCell==_$
|
|
270
|
-
_$
|
|
271
|
-
c[b].element.offsetHeight?c[b].element.offsetHeight:this.options.defaultRowHeight||v.defaultRowHeight||24);return a};d[_$
|
|
272
|
-
this.rows[b]||ta.row.call(this,b);var c=document.createElement(_$
|
|
273
|
-
a.innerHTML=e;a.setAttribute(_$
|
|
274
|
-
da.attached.call(this,a)?(c=da.create.call(this,b),b>a?this.tbody.insertBefore(c,this.rows[a].element):this.tbody.insertBefore(c,this.rows[a].element.nextSibling)):da.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);L.call(this,_$
|
|
275
|
-
fa.references.call(this);I.call(this,!0,!0);fa.update.call(this);H.call(this.parent,_$
|
|
276
|
-
this,a,h,c))return console.log(_$
|
|
277
|
-
e[p].data[D])),g.push({x:D,y:A,value:l[n],force:!0});r.push({id:y,data:l});p++}this.rows=this.rows.concat(w);this.records=this.records.concat(z);Array.prototype.push.apply(this.options.data,x);for(A=b;A<h+b;A++)this.results&&(this.rows[A].results=!0),q.push(this.records[A]);this.merged.rows[b]&&sa.updateConfig.call(this,1,1,b-1,h);L.call(this,_$
|
|
278
|
-
rowNumber:a,numOfRows:h,insertBefore:c,data:r});fa.references.call(this);f||ka[_$
|
|
279
|
-
(b=this.options.data.length-1,a=1));var f=this.options.data.length-1;if(void 0==b||b>f||0>b)b=f;a||(a=1);b+a>=this.options.data.length&&(a=this.options.data.length-b,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));if(!1===H.call(this.parent,_$
|
|
280
|
-
_$
|
|
281
|
-
this.rows.splice(b,a);g=this.records.splice(b,a);this.options.data.splice(b,a);sa.updateConfig.call(this,1,0,b,a);this.results&&(this.results=Aa.refresh.call(this));L.call(this,_$
|
|
282
|
-
a){Array.isArray(a)||(a=[a]);for(var c,e,f=Object.keys(a),g=0;g<f.length;g++)if(c=a[f[g]],e=this.options.columns[c])this.colgroup[c]&&(this.colgroup[c].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$
|
|
283
|
-
!0);b.hideColumn=k.bind(b,!1)};d[_$
|
|
284
|
-
return b};d.move=function(b,a){if(!R.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$
|
|
285
|
-
a)){Ea.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],e);e=(b>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],e);for(var f=0;f<this.tbody.children.length;f++)c=this.tbody.children[f].getAttribute(_$
|
|
286
|
-
if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(b>a?this.footers.content[f][a].element:this.footers.content[f][a].element.nextSibling)||null,this.tfoot.children[f].insertBefore(ha.create.call(this,b,f),e)}else if(ia.attached.call(this,b)){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(f=0;f<this.tbody.children.length;f++)c=parseInt(this.tbody.children[f].getAttribute(_$
|
|
259
|
+
h=this.options.cells,n=this.options.rows,l=null,p=!1;e[b]&&(e[b].readonly||e[b].readOnly)&&(p=!0);n&&n[a]&&(n[a].readonly||n[a].readOnly)&&(p=!0);if(f&&f[c]){var q=(q=d.getAttribute(_$_315c[122]))?q+(_$_315c[246]+f[c]):f[c];d.setAttribute(_$_315c[122],q)}g&&g[c]&&(typeof g[c]===_$_315c[25]?d.setAttribute(_$_315c[299],g[c]):d.classList.add(_$_315c[300]));if(h&&h[c])if(!1===h[c].locked&&!0===this.options.selectUnLockedCells?d.classList.add(_$_315c[301]):d.classList.remove(_$_315c[301]),h[c].zebra?d.classList.add(_$_315c[302]):
|
|
260
|
+
d.classList.remove(_$_315c[302]),typeof h[c].wrap!==_$_315c[21]&&((l=h[c].wrap)?d.classList.add(_$_315c[303]):d.classList.remove(_$_315c[303])),!0===h[c].readonly||!0===h[c].readOnly)p=!0;else if(!1===h[c].readonly||!1===h[c].readOnly)p=!1;null===l&&(e[b]&&e[b].wrap?d.classList.add(_$_315c[303]):d.classList.remove(_$_315c[303]));d.style.textAlign||(f=null,h&&h[c]&&h[c].align?f=h[c].align:e&&e[b].align&&(f=e[b].align),f&&(d.style.textAlign=f));void 0==this.records[a][b].readonly&&p&&(this.records[a][b].readonly=
|
|
261
|
+
p);this.records[a][b].readonly?d.classList.add(_$_315c[26]):d.classList.remove(_$_315c[26])};k.applyOverflow=function(d,b,a){1==this.options.textOverflow&&0<b&&(b==this.options.columns.length-1&&(d.style.overflow=_$_315c[114]),this.records[a][b-1]&&this.records[a][b-1].element&&(this.records[a][b-1].element.style.overflow=this.options.data[a][b]==_$_315c[3]&&this.headers[b-1]&&this.headers[b-1].offsetWidth?_$_315c[3]:_$_315c[114]))};k.batch=function(d,b){var a=[],c=Object.keys(d);if(c.length)for(var e=
|
|
262
|
+
0;e<c.length;e++){if(0<=c[e].indexOf(_$_315c[39])){var f=c[e].split(_$_315c[39]);var g=J(f[0]);var h=f[1];f=f[0]}else g=this,h=c[e],f=this.getWorksheetName();h=G.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],d[c[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==b&&(c=Object.keys(a),c.length))for(e=0;e<c.length;e++)g=J(c[e]),L.call(g,_$_315c[131],a[c[e]])};return k}(),La=function(){var k=function(b){b.getColumnOptions=k[_$_315c[58]];b.setColumnOptions=k[_$_315c[11]];b.getCells=k.getCells;b.setCells=
|
|
263
|
+
k.setCells;b.getProperties=k[_$_315c[58]];b.setProperties=k[_$_315c[11]];b.getProperty=k[_$_315c[58]];b.setProperty=k[_$_315c[11]];b.resetProperty=k[_$_315c[11]];b.updateProperty=k.update;b.getOptions=k[_$_315c[58]]};k.getCells=function(b){return b?this.options.cells[b]:this.options.cells};k.setCells=function(b,a){if(!R.call(this.parent,this))return!1;if(typeof b==_$_315c[25])this.options.cells[b]=a;else{a=Object.keys(b);for(var c=0;c<a.length;c++)this.options.cells[a[c]]=b[a[c]]}};k[_$_315c[58]]=
|
|
264
|
+
function(b,a){var c=null;void 0!==a&&(a=G.getColumnNameFromCoords(b,a),this.options.cells.hasOwnProperty(a)&&(c=this.options.cells[a]));c||(c=this.options.columns[b]);if(!c)c={type:_$_315c[72]};else if(!c.type||typeof c.type==_$_315c[25]&&!v.editors[c.type])c.type=_$_315c[72];return c};var d=function(b,a,c,e,f){var g=this.records[a][b].element;g&&(e&&typeof e.destroyCell==_$_315c[105]&&e.destroyCell(g,b,a,this),c&&typeof c.createCell==_$_315c[105]&&(e=Q.call(this,b,a),e=c.createCell(g,e,b,a,this,
|
|
265
|
+
f),void 0!==e&&Q.call(this,b,a,e),S.applyProperties.call(this,g,b,a)))};k[_$_315c[11]]=function(b,a,c){if(!R.call(this.parent,this))return!1;this.edition&&this.closeEditor(this.edition,!1);var e=[];if(Array.isArray(b))e=b;else if(jSuites.isNumeric(b)&&jSuites.isNumeric(a))b={x:b,y:a},typeof c==_$_315c[104]&&(b.value=c),e.push(b);else if(typeof a===_$_315c[104])b={x:b,value:a},e.push(b);else if(typeof b==_$_315c[104]&&void 0===a)for(a=Object.keys(b),c=0;c<a.length;c++){var f=G.getCoordsFromColumnName(a[c]);
|
|
266
|
+
e.push({x:f[0],y:f[1],value:b[a[c]]})}if(Array.isArray(e))for(c=0;c<e.length;c++){var g=e[c];b=g.x;var h=g.y,n=k[_$_315c[58]].call(this,b,h);a=g.value;f=v.editors[n.type];var l=null;a&&a.type&&(l=v.editors[a.type]);if(typeof h===_$_315c[21])for(g.oldValue=n,parseInt(a.width)||(a.width=this.options.defaultColWidth||100),a.type&&v.editors[a.type]||(a.type=_$_315c[72]),this.options.columns[b]=a,Ea.applyProperties.call(this,b),g=0;g<this.records.length;g++)d.call(this,b,g,l,f,a);else n=G.getColumnNameFromCoords(b,
|
|
267
|
+
h),g.oldValue=this.options.cells&&this.options.cells[n]?this.options.cells[n]:_$_315c[3],a?(this.options.cells||(this.options.cells={}),this.options.cells[n]=a):(delete this.options.cells[n],a=k[_$_315c[58]].call(this,b,h),l=v.editors[a.type]),d.call(this,b,h,l,f,a)}else return console.error(_$_315c[283]),!1;this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_315c[97],records:e});L.call(this,_$_315c[97],{data:e});H.call(this.parent,_$_315c[304],this,e);return!0};k.update=function(b,
|
|
268
|
+
a,c,e){a=typeof b==_$_315c[25]||typeof b==_$_315c[22]?[{x:b,y:a,value:c}]:b;c=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var f=0;f<a.length;f++){var g=a[f].x,h=a[f].y,n=a[f],l=e,p=G.getColumnNameFromCoords(g,h);(b=this.options.cells[p])?n.oldValue=Object.assign({},b):(n.oldValue=null,b=this.options.cells[p]=Object.assign({},this.options.columns[g]));p=Object.keys(n.value);for(var q=0;q<p.length;q++)b[p[q]]=n.value[p[q]];l||typeof h===_$_315c[21]||(l=k[_$_315c[58]].call(this,g,h),l=v.editors[l.type],
|
|
269
|
+
n.value.type?(n=n.value,p=null,n&&n.type&&(p=v.editors[n.type]),d.call(this,g,h,p,l,b)):(n=this.records[h][g].element)&&typeof l.updateCell==_$_315c[105]&&(p=Q.call(this,g,h),p=l.updateCell(n,p,g,h,this,b),void 0!==p&&Q.call(this,g,h,p),S.applyProperties.call(this,n,g,h)))}T.call(this.parent,{worksheet:this,action:_$_315c[98],records:a});L.call(this,_$_315c[98],{data:c});H.call(this.parent,_$_315c[304],this,a)};return k}(),da=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);for(var c,e=b?
|
|
270
|
+
_$_315c[3]:_$_315c[52],f=Object.keys(a),g=0;g<f.length;g++)if(c=this.rows[a[f[g]]])c.element&&(c.element.style.display=e),c.visible=b;I.call(this,!0);this.resetBorders()},d=function(b){b.getRow=d[_$_315c[58]];b.moveRow=d.move;b.insertRow=d.add;b.deleteRow=d.del;b.getSelectedRows=d.selected;b.showRow=k.bind(b,!0);b.hideRow=k.bind(b,!1)};d.height=function(b){var a=0,c=this.rows,e=this.options.rows||{};c[b]&&!1!==c[b].visible&&(a=c[b].height?c[b].height:e[b]&&e[b].height?parseInt(e[b].height):c[b].element&&
|
|
271
|
+
c[b].element.offsetHeight?c[b].element.offsetHeight:this.options.defaultRowHeight||v.defaultRowHeight||24);return a};d[_$_315c[58]]=function(b){return this.rows[b]};d.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};d.selected=function(b){var a=[],c=this.getHighlighted();if(c)for(var e=c[1];e<=c[3];e++)this.rows[e]&&(b?a.push(e):a.push(this.rows[e].element));return a};d.create=function(b,a){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;
|
|
272
|
+
this.rows[b]||ta.row.call(this,b);var c=document.createElement(_$_315c[173]);c.setAttribute(_$_315c[57],b);this.rows[b].element=c;var e=null,f=this.options.rows;f[b]&&!a&&(f[b].style&&c.setAttribute(_$_315c[122],f[b].style),f[b].height&&(c.style.height=parseInt(f[b].height)+_$_315c[59]),f[b].title&&(e=f[b].title),0==f[b].visible&&(this.rows[b].visible=!1),f[b].id&&(this.rows[b].id=f[b].id));0==this.rows[b].visible&&(c.style.display=_$_315c[52]);e||(e=parseInt(b+1));a=document.createElement(_$_315c[175]);
|
|
273
|
+
a.innerHTML=e;a.setAttribute(_$_315c[57],b);a.className=_$_315c[305];c.appendChild(a);H.call(this.parent,_$_315c[306],this,b,c);return c};d.move=function(b,a){if(!R.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.rows[a]||!this.rows[b])return console.error(_$_315c[307]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.rows[b]?c=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(c=!0):this.merged.rows[a+1]&&(c=!0));c&&this.destroyMerged()}this.resetBorders();
|
|
274
|
+
da.attached.call(this,a)?(c=da.create.call(this,b),b>a?this.tbody.insertBefore(c,this.rows[a].element):this.tbody.insertBefore(c,this.rows[a].element.nextSibling)):da.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);L.call(this,_$_315c[83],{f:b,t:a});T.call(this.parent,{worksheet:this,action:_$_315c[83],oldValue:b,newValue:a});
|
|
275
|
+
fa.references.call(this);I.call(this,!0,!0);fa.update.call(this);H.call(this.parent,_$_315c[308],this,b,a)};d.add=function(b,a,c,e,f){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_315c[309]),!1;var g=[];if(0<b)var h=parseInt(b);else h=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=Ia.standardize(e);c=c?!0:!1;b=this.options.data?this.options.data.length-1:0;if(void 0==a||a>b||0>a)a=b,c=!1;h||(h=1);if(!1===H.call(this.parent,_$_315c[310],
|
|
276
|
+
this,a,h,c))return console.log(_$_315c[311]),!1;ba.reset.call(this);b=c?a:a+1;for(var n,l,p=0,q=[],r=[],w=this.rows.splice(b),x=this.options.data?this.options.data.splice(b):[],z=this.records.splice(b),A=b;A<h+b;A++){var y=e[p]&&e[p].id?e[p].id:ya.next.call(this);ta.row.call(this,A,y);l=this.dataType?{}:[];for(var D=0;D<this.options.columns.length;D++)n=qa.call(this,D),l[n]=_$_315c[3],e&&e[p]&&e[p].data&&(typeof e[p].data[n]!==_$_315c[21]?l[n]=e[p].data[n]:typeof e[p].data[D]!==_$_315c[21]&&(l[n]=
|
|
277
|
+
e[p].data[D])),g.push({x:D,y:A,value:l[n],force:!0});r.push({id:y,data:l});p++}this.rows=this.rows.concat(w);this.records=this.records.concat(z);Array.prototype.push.apply(this.options.data,x);for(A=b;A<h+b;A++)this.results&&(this.rows[A].results=!0),q.push(this.records[A]);this.merged.rows[b]&&sa.updateConfig.call(this,1,1,b-1,h);L.call(this,_$_315c[79],{numOfRows:h,rowNumber:a,insertBefore:c?1:0,data:r});this.results&&(this.results=Aa.refresh.call(this));T.call(this.parent,{worksheet:this,action:_$_315c[79],
|
|
278
|
+
rowNumber:a,numOfRows:h,insertBefore:c,data:r});fa.references.call(this);f||ka[_$_315c[11]].call(this,0,b,this.options.columns.length-1,h+b-1);I.call(this,!0,!0);g.length&&oa.applyValues.call(this,g);fa.update.call(this);H.call(this.parent,_$_315c[312],this,a,h,q,c)};d.del=function(b,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_315c[313]),!1;var c={},e=[];void 0==b&&(a=this.getSelectedRows(),a[0]?(b=parseInt(a[0].getAttribute(_$_315c[57])),a=a.length):
|
|
279
|
+
(b=this.options.data.length-1,a=1));var f=this.options.data.length-1;if(void 0==b||b>f||0>b)b=f;a||(a=1);b+a>=this.options.data.length&&(a=this.options.data.length-b,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));if(!1===H.call(this.parent,_$_315c[314],this,b,a))return console.log(_$_315c[315]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);for(var g=b;g<b+a;g++)for(var h=0;h<this.options.columns.length;h++)f=G.getColumnNameFromCoords(h,g),S.getAttributes.call(this,
|
|
280
|
+
_$_315c[316],f,c),S.getAttributes.call(this,_$_315c[122],f,c),S.getAttributes.call(this,_$_315c[317],f,c),S.getAttributes.call(this,_$_315c[318],f,c),S.getAttributes.call(this,_$_315c[298],f,c),S.getAttributes.call(this,_$_315c[297],f,c),e[f]=!0;if(f=Y.getChain.call(this,c.values))c.formulas=f;for(g=b;g<b+a;g++)da.attached.call(this,g)&&this.rows[g].element.remove(),this.options.rows&&this.options.rows[g]&&(this.options.rows[g]=null);f=[];for(g=b;g<b+a;g++)f.push({id:this.getRowId(g),row:g,data:this.getRowData(g)});
|
|
281
|
+
this.rows.splice(b,a);g=this.records.splice(b,a);this.options.data.splice(b,a);sa.updateConfig.call(this,1,0,b,a);this.results&&(this.results=Aa.refresh.call(this));L.call(this,_$_315c[80],{rowNumber:b,numOfRows:a,data:f});T.call(this.parent,{worksheet:this,action:_$_315c[80],rowNumber:b,numOfRows:a,insertBefore:1,data:f,attributes:c});fa.references.call(this,e);I.call(this,!0,!0);fa.update.call(this,!0);H.call(this.parent,_$_315c[319],this,b,a,g,f,c)}};return d}(),ia=function(){var k=function(b,
|
|
282
|
+
a){Array.isArray(a)||(a=[a]);for(var c,e,f=Object.keys(a),g=0;g<f.length;g++)if(c=a[f[g]],e=this.options.columns[c])this.colgroup[c]&&(this.colgroup[c].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$_315c[59]:_$_315c[61]),e.visible=b;I.call(this,!0);this.resetBorders()},d=function(b){b.getColumn=d[_$_315c[58]];b.getColumnIdByName=d.getByName;b.getPrimaryKey=d.getPrimaryKey;b.getSelectedColumns=d.selected;b.moveColumn=d.move;b.insertColumn=d.add;b.deleteColumn=d.del;b.showColumn=k.bind(b,
|
|
283
|
+
!0);b.hideColumn=k.bind(b,!1)};d[_$_315c[58]]=function(b){return this.options.columns[b]||!1};d.attached=function(b){return this.headers[b]&&this.headers[b].parentNode?!0:!1};d.getByName=function(b){for(var a=this.options.columns,c=0;c<a.length;c++)if(a[c].name==b)return c;return!1};d.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};d.selected=function(){var b=[],a=this.getHighlighted();if(a)for(var c=a[0];c<=a[2];c++)b.push(c);
|
|
284
|
+
return b};d.move=function(b,a){if(!R.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$_315c[320]),!1;if(!this.options.columns[a])return console.error(_$_315c[321]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.cols[b]?c=!0:this.merged.cols[a]&&(b>a?this.merged.cols[a-1]&&(c=!0):this.merged.cols[a+1]&&(c=!0));c&&this.destroyMerged()}ba.reset.call(this);this.options.freezeColumns&&ca.applyReset.call(this);if(ia.attached.call(this,
|
|
285
|
+
a)){Ea.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],e);e=(b>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],e);for(var f=0;f<this.tbody.children.length;f++)c=this.tbody.children[f].getAttribute(_$_315c[57]),e=(b>a?this.records[c][a].element:this.records[c][a].element.nextSibling)||null,this.tbody.children[f].insertBefore(S[_$_315c[58]].call(this,b,c),e);
|
|
286
|
+
if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(b>a?this.footers.content[f][a].element:this.footers.content[f][a].element.nextSibling)||null,this.tfoot.children[f].insertBefore(ha.create.call(this,b,f),e)}else if(ia.attached.call(this,b)){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(f=0;f<this.tbody.children.length;f++)c=parseInt(this.tbody.children[f].getAttribute(_$_315c[57])),this.tbody.children[f].removeChild(this.records[c][b].element);
|
|
287
287
|
if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][b].element)}this.options.columns.splice(a,0,this.options.columns.splice(b,1)[0]);this.headers.splice(a,0,this.headers.splice(b,1)[0]);this.colgroup.splice(a,0,this.colgroup.splice(b,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(a,0,this.options.data[f].splice(b,1)[0]),this.records[f].splice(a,0,this.records[f].splice(b,1)[0]);if(this.options.footers)for(f=
|
|
288
|
-
0;f<this.options.footers.length;f++)this.options.footers[f].splice(a,0,this.options.footers[f].splice(b,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(b,1)[0]);L.call(this,_$
|
|
289
|
-
!1;var n=[];if(0<b)var l=parseInt(b);else if(l=1,Array.isArray(b)&&!f)if(Array.isArray(b[0]))f=b;else{f=[];for(var p=0;p<b.length;p++)f[p]=[b[p]]}f||(f=[]);c=c?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,c=!1;l||(l=1);if(!1===H.call(this.parent,_$
|
|
290
|
-
(e[p]={}),e[p].type||(e[p].type=_$
|
|
291
|
-
q,l,1);za.adjust.call(this,a,l,1,g);r=null;for(var w,x=0;x<this.options.data.length;x++){this.dataType||(r=this.options.data[x].splice(q));w=this.records[x].splice(q);g=0;for(b=q;b<l+q;b++)p=f[x]&&f[x][g]?f[x][g]:_$
|
|
292
|
-
columnNumber:a,insertBefore:c?1:0,properties:e,data:f});T.call(this.parent,{worksheet:this,action:_$
|
|
293
|
-
!1;var c={},e=[];if(1<this.options.columns.length){void 0==b&&(a=this.getSelectedColumns(!0),a.length?(b=parseInt(a[0]),a=parseInt(a.length)):(b=this.options.columns.length-1,a=1));var f=this.options.columns.length-1;if(void 0==b||b>f||0>b)b=f;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,console.error(_$
|
|
294
|
-
f=null;var g=[],h=[],n=[];var l=0;for(var p=b;p<b+a;p++)ia.attached.call(this,p)&&(this.colgroup[p].parentNode.removeChild(this.colgroup[p]),this.headers[p].parentNode.removeChild(this.headers[p])),n[l]=this.options.columns[p],l++;for(var q=0;q<this.options.data.length;q++)for(p=b;p<b+a;p++)l=G.getColumnNameFromCoords(p,q),S.getAttributes.call(this,_$
|
|
295
|
-
S.getAttributes.call(this,_$
|
|
296
|
-
a)),g[q]=this.records[q].splice(b,a);ha.adjust.call(this,b,a,0);(p=za.adjust.call(this,b,a,0))&&(f={nested:p});sa.updateConfig.call(this,0,0,b,a);L.call(this,_$
|
|
297
|
-
return!1===a[b].visible||a[b].type===_$
|
|
298
|
-
this.options.cells[e].align)var g=this.options.cells[e].align;else this.options.columns[f].align&&(g=this.options.columns[f].align);g&&(this.records[c][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(c){c.getStyle=a[_$
|
|
299
|
-
0;h<g.length;h++){if(typeof c[h]==_$
|
|
300
|
-
(this.options.style={});var h=this.options.style,n=null,l=[],p=[],q={};p=function(x,z,A){if(!q[x]&&(h[x]?l=h[x].split(_$
|
|
301
|
-
this.records[A[1]][A[0]]&&this.records[A[1]][A[0]].element&&(this.records[A[1]][A[0]].element.style[z]=q[x][z]);q[x][z]||delete q[x][z]};k={};d={};if(e)if(typeof c==_$
|
|
302
|
-
w[e][0].trim()&&p.call(this,f[r],w[e][0].trim(),w[e][1].trim()));l={};p=Object.keys(q);if(p.length){for(r=0;r<p.length;r++){l[p[r]]||(l[p[r]]=[]);c=Object.keys(q[p[r]]);for(e=0;e<c.length;e++)l[p[r]].push(c[e]+_$
|
|
303
|
-
oldValue:d,newValue:k});L.call(this,_$
|
|
304
|
-
f=0;f<e.length;f++){d[e[f]]=this.options.style[e[f]]||_$
|
|
305
|
-
n&&(this.records[g][h].element.style.textAlign=n)}}L.call(this,_$
|
|
306
|
-
{};a[d]=b}else a=d;if(b=H.call(this.parent,_$
|
|
307
|
-
b):this.records[f[1]][f[0]].element.removeAttribute(_$
|
|
308
|
-
b,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof d==_$
|
|
309
|
-
this,a))}};k.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){if(this.options.meta){typeof d==_$
|
|
310
|
-
-1:a>c?-1:a<c?1:0:a===_$
|
|
311
|
-
g[h]=[h,f];h=typeof this.parent.config.sorting===_$
|
|
312
|
-
h;Ha.call(this,!1);ba.reset.call(this);L.call(this,_$
|
|
313
|
-
this.records[d[a]];this.records=b;b=[];for(a=0;a<d.length;a++)b[a]=this.rows[d[a]];this.rows=b;fa.references.call(this);this.tbody.innerHTML=_$
|
|
314
|
-
this.headers[a[0]].classList.add(a[1]?_$
|
|
315
|
-
b=document.createElement(_$
|
|
316
|
-
this.pageNumber))};k.whichPage=function(d){if(0<this.options.pagination)return this.rows[d]?(this.results&&(d=this.results.indexOf(parseInt(d))),Math.ceil((parseInt(d)+1)/parseInt(this.options.pagination))-1):null;console.log(_$
|
|
317
|
-
parseInt(this.options.pagination);if(c){if(null==d||-1==d)d=Math.ceil((this.results?this.results:this.rows).length/c)-1;if(!1===H.call(this.parent,_$
|
|
318
|
-
this.results?this.results.length:this.rows.length;if(d){d=Math.ceil(d/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>d?d:10;else 5>d-this.pageNumber?(b=d-9,a=d,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var c=document.createElement(_$
|
|
319
|
-
this.pageNumber==b-1&&c.classList.add(_$
|
|
320
|
-
k[_$
|
|
321
|
-
d+_$
|
|
322
|
-
k.refresh.call(this);I.call(this,!0);ba.refresh.call(this);T.call(this.parent,{worksheet:this,action:_$
|
|
323
|
-
this.rows[b].element.firstChild.style.top=_$
|
|
324
|
-
k.event;null!==d.d&&this.setFreezeRows(d.d);this.parent.helper.style.display=_$
|
|
325
|
-
ca=function(){var k=function(d){d.setFreezeColumns=k[_$
|
|
326
|
-
k.headers=function(){var d=Ba.call(this)?50:0,b;if(b=this.options.freezeColumns)for(var a=0;a<b;a++){if(this.headers[a]){this.headers[a].classList.add(_$
|
|
327
|
-
k.refresh=function(){if(0<this.options.freezeColumns){k.headers.call(this);for(var d=0;d<this.visibleRows.length;d++)k.update.call(this,this.visibleRows[d])}};k[_$
|
|
328
|
-
{worksheet:this,action:_$
|
|
329
|
-
this.tfoot.children[a].children[b].style.left=_$
|
|
330
|
-
d.style.height=this.content.offsetHeight+_$
|
|
331
|
-
a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$
|
|
332
|
-
this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(c=0;c<this.rows.length;c++)Q.call(this,f,c)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},b=function(){};b.build=function(){var a=this;this.content=document.createElement(_$
|
|
333
|
-
!1});this.table=document.createElement(_$
|
|
334
|
-
document.createElement(_$
|
|
335
|
-
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$
|
|
336
|
-
this.table.classList.add(_$
|
|
337
|
-
this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$
|
|
338
|
-
parseInt(this.options.tableHeight)+_$
|
|
339
|
-
g.getAttribute(_$
|
|
340
|
-
(g.x=r,g.element&&g.element.setAttribute(_$
|
|
341
|
-
f,l);k.call(this,_$
|
|
288
|
+
0;f<this.options.footers.length;f++)this.options.footers[f].splice(a,0,this.options.footers[f].splice(b,1)[0]),this.footers.content[f].splice(a,0,this.footers.content[f].splice(b,1)[0]);L.call(this,_$_315c[84],{f:b,t:a});T.call(this.parent,{worksheet:this,action:_$_315c[84],oldValue:b,newValue:a});fa.references.call(this);I.call(this,!0,!0);fa.update.call(this);H.call(this.parent,_$_315c[322],this,b,a)};d.add=function(b,a,c,e,f,g,h){if(!R.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_315c[323]),
|
|
289
|
+
!1;var n=[];if(0<b)var l=parseInt(b);else if(l=1,Array.isArray(b)&&!f)if(Array.isArray(b[0]))f=b;else{f=[];for(var p=0;p<b.length;p++)f[p]=[b[p]]}f||(f=[]);c=c?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,c=!1;l||(l=1);if(!1===H.call(this.parent,_$_315c[324],this,a,l,c))return console.log(_$_315c[325]),!1;ba.reset.call(this);this.options.freezeColumns&&ca.applyReset.call(this);if(1==this.dataType)var q=parseInt((_$_315c[3]+Date.now()).substr(-8));e||(e=[]);for(p=0;p<l;p++)e[p]||
|
|
290
|
+
(e[p]={}),e[p].type||(e[p].type=_$_315c[72]),e[p].width||(e[p].width=this.options.defaultColWidth),e[p].type!=_$_315c[74]&&e[p].type!=_$_315c[326]||e[p].source||(e[p].source=[]),1==this.dataType&&typeof e[p].name==_$_315c[21]&&(e[p].name=_$_315c[327]+(q+p));q=c?a:a+1;this.options.columns=G.injectArray(this.options.columns,q,e);p=this.headers.splice(q);var r=this.colgroup.splice(q);for(b=q;b<l+q;b++)Ea.create.call(this,b);this.headers=this.headers.concat(p);this.colgroup=this.colgroup.concat(r);ha.adjust.call(this,
|
|
291
|
+
q,l,1);za.adjust.call(this,a,l,1,g);r=null;for(var w,x=0;x<this.options.data.length;x++){this.dataType||(r=this.options.data[x].splice(q));w=this.records[x].splice(q);g=0;for(b=q;b<l+q;b++)p=f[x]&&f[x][g]?f[x][g]:_$_315c[3],Q.call(this,b,x,p),n.push({x:b,y:x,value:p}),ta.cell.call(this,b,x),g++;this.dataType||(this.options.data[x]=this.options.data[x].concat(r));this.records[x]=this.records[x].concat(w)}this.merged.cols[q]&&sa.updateConfig.call(this,0,1,q-1,l);L.call(this,_$_315c[81],{numOfColumns:l,
|
|
292
|
+
columnNumber:a,insertBefore:c?1:0,properties:e,data:f});T.call(this.parent,{worksheet:this,action:_$_315c[81],columnNumber:a,numOfColumns:l,insertBefore:c,properties:e,data:f});fa.references.call(this);h||ka[_$_315c[11]].call(this,q,0,l+q-1,this.rows.length-1);I.call(this,!0,!0);n.length&&oa.applyValues.call(this,n);fa.update.call(this);H.call(this.parent,_$_315c[328],this,a,l,[],c)};d.del=function(b,a){if(!R.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_315c[329]),
|
|
293
|
+
!1;var c={},e=[];if(1<this.options.columns.length){void 0==b&&(a=this.getSelectedColumns(!0),a.length?(b=parseInt(a[0]),a=parseInt(a.length)):(b=this.options.columns.length-1,a=1));var f=this.options.columns.length-1;if(void 0==b||b>f||0>b)b=f;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,console.error(_$_315c[330])));if(!1===H.call(this.parent,_$_315c[331],this,b,a))return console.log(_$_315c[332]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);
|
|
294
|
+
f=null;var g=[],h=[],n=[];var l=0;for(var p=b;p<b+a;p++)ia.attached.call(this,p)&&(this.colgroup[p].parentNode.removeChild(this.colgroup[p]),this.headers[p].parentNode.removeChild(this.headers[p])),n[l]=this.options.columns[p],l++;for(var q=0;q<this.options.data.length;q++)for(p=b;p<b+a;p++)l=G.getColumnNameFromCoords(p,q),S.getAttributes.call(this,_$_315c[316],l,c),S.getAttributes.call(this,_$_315c[122],l,c),S.getAttributes.call(this,_$_315c[317],l,c),S.getAttributes.call(this,_$_315c[318],l,c),
|
|
295
|
+
S.getAttributes.call(this,_$_315c[298],l,c),S.getAttributes.call(this,_$_315c[297],l,c),e[l]=!0,this.records[q][p].element&&0<=Array.prototype.indexOf.call(this.rows[q].element.children,this.records[q][p].element)&&this.records[q][p].element.parentNode.removeChild(this.records[q][p].element);if(p=Y.getChain.call(this,c.values))c.formulas=p;this.options.columns.splice(b,a);this.headers.splice(b,a);this.colgroup.splice(b,a);for(q=0;q<this.options.data.length;q++)this.dataType||(h[q]=this.options.data[q].splice(b,
|
|
296
|
+
a)),g[q]=this.records[q].splice(b,a);ha.adjust.call(this,b,a,0);(p=za.adjust.call(this,b,a,0))&&(f={nested:p});sa.updateConfig.call(this,0,0,b,a);L.call(this,_$_315c[82],{columnNumber:b,numOfColumns:a});T.call(this.parent,{worksheet:this,action:_$_315c[82],columnNumber:b,numOfColumns:a,insertBefore:1,data:h,properties:n,attributes:c,extra:f});fa.references.call(this,e);I.call(this,!0,!0);fa.update.call(this,!0);H.call(this.parent,_$_315c[333],this,b,a,g,n,c)}}};d.isVisible=function(b){var a=this.options.columns;
|
|
297
|
+
return!1===a[b].visible||a[b].type===_$_315c[114]||a[b].width===_$_315c[61]||a[b].width===_$_315c[121]?!1:!0};return d}(),Ma=function(){var k={},d={},b=function(c){if(typeof c==_$_315c[25]){var e=c;c=G.getCoordsFromColumnName(c);var f=c[0];c=c[1]}else f=c.x,c=c.y,e=G.getColumnNameFromCoords(f,c);if(this.records[c]&&this.records[c][f]&&this.records[c][f].element){d[e]=this.options.style[e];this.records[c][f].element.setAttribute(_$_315c[122],_$_315c[3]);if(this.options.cells&&this.options.cells[e]&&
|
|
298
|
+
this.options.cells[e].align)var g=this.options.cells[e].align;else this.options.columns[f].align&&(g=this.options.columns[f].align);g&&(this.records[c][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(c){c.getStyle=a[_$_315c[58]];c.setStyle=a[_$_315c[11]];c.resetStyle=a.reset};a[_$_315c[58]]=function(c){var e=this.options.style;if(!e)return!1;if(c){if(typeof c==_$_315c[25])return e[c];var f=[],g=Object.keys(c);if(0<g.length)for(var h=
|
|
299
|
+
0;h<g.length;h++){if(typeof c[h]==_$_315c[25])var n=e&&e[c[h]]?e[c[h]]:_$_315c[3];else n=G.getColumnNameFromCoords(c[h].x,c[h].y),n=e&&e[n]?e[n]:_$_315c[3];f.push(n)}return f}return this.options.style};a.getFromSelection=function(c){var e,f,g=this.options.style,h=0,n=[];for(f=c[1];f<=c[3];f++){var l=0;n[h]=[];for(e=c[0];e<=c[2];e++){var p=G.getColumnNameFromCoords(e,f);n[h][l++]=g&&g[p]?g[p]:_$_315c[3]}h++}return n};a[_$_315c[11]]=function(c,e,f,g){if(!R.call(this.parent,this))return!1;this.options.style||
|
|
300
|
+
(this.options.style={});var h=this.options.style,n=null,l=[],p=[],q={};p=function(x,z,A){if(!q[x]&&(h[x]?l=h[x].split(_$_315c[246]):(h[x]=_$_315c[3],l=[]),q[x]={},l.length))for(var y=0;y<l.length;y++)l[y]&&l[y].trim()&&(n=l[y].split(_$_315c[159]),q[x][n[0].trim()]=n[1].trim());d[x]||(d[x]=[]);k[x]||(k[x]=[]);q[x][z]||(q[x][z]=_$_315c[3]);d[x].push([z+_$_315c[159]+q[x][z]]);q[x][z]=q[x][z]&&q[x][z]==A&&!g?_$_315c[3]:A;k[x].push([z+_$_315c[159]+q[x][z]]);A=G.getCoordsFromColumnName(x);this.records[A[1]]&&
|
|
301
|
+
this.records[A[1]][A[0]]&&this.records[A[1]][A[0]].element&&(this.records[A[1]][A[0]].element.style[z]=q[x][z]);q[x][z]||delete q[x][z]};k={};d={};if(e)if(typeof c==_$_315c[25])p.call(this,c,e,f);else{if(c&&c.length)for(var r=0;r<c.length;r++){var w=G.getColumnNameFromCoords(c[r].x,c[r].y);p.call(this,w,e,f)}}else for(f=Object.keys(c),r=0;r<f.length;r++)if(w=c[f[r]])for(typeof w==_$_315c[25]&&(w=w.split(_$_315c[246])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_315c[25]&&(w[e]=w[e].split(_$_315c[159])),
|
|
302
|
+
w[e][0].trim()&&p.call(this,f[r],w[e][0].trim(),w[e][1].trim()));l={};p=Object.keys(q);if(p.length){for(r=0;r<p.length;r++){l[p[r]]||(l[p[r]]=[]);c=Object.keys(q[p[r]]);for(e=0;e<c.length;e++)l[p[r]].push(c[e]+_$_315c[139]+q[p[r]][c[e]]);this.options.style[p[r]]=l[p[r]].join(_$_315c[334])}p=Object.keys(k);for(r=0;r<p.length;r++)k[p[r]]=k[p[r]].join(_$_315c[246]);p=Object.keys(d);for(r=0;r<p.length;r++)d[p[r]]=d[p[r]].join(_$_315c[246]);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_315c[87],
|
|
303
|
+
oldValue:d,newValue:k});L.call(this,_$_315c[87],[k]);H.call(this.parent,_$_315c[335],this,k,d)}};a.reset=function(c){if(!R.call(this.parent,this))return!1;if(c){d={};if(Array.isArray(c))for(var e=0;e<c.length;e++)b.call(this,c[e]);else b.call(this,c);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_315c[88],cells:c,oldValue:d});L.call(this,_$_315c[88],[c]);H.call(this.parent,_$_315c[337],this,c)}else console.error(_$_315c[336])};a.update=function(c){k={};d={};for(var e=Object.keys(c),
|
|
304
|
+
f=0;f<e.length;f++){d[e[f]]=this.options.style[e[f]]||_$_315c[3];k[e[f]]=this.options.style[e[f]]=c[e[f]];var g=G.getCoordsFromColumnName(e[f]),h=g[0];g=g[1];if(this.records[g]&&this.records[g][h]&&this.records[g][h].element&&(this.records[g][h].element.setAttribute(_$_315c[122],c[e[f]]),!this.records[g][h].element.style.textAlign)){var n=null;this.options.cells&&this.options.cells[e[f]]&&this.options.cells[e[f]].align?n=this.options.cells[e[f]].align:this.options.columns[h].align&&(n=this.options.columns[h].align);
|
|
305
|
+
n&&(this.records[g][h].element.style.textAlign=n)}}L.call(this,_$_315c[88],[e]);L.call(this,_$_315c[87],[k]);H.call(this.parent,_$_315c[335],this,k,d)};return a}(),Za=function(){var k=function(d){d.getComments=k[_$_315c[58]];d.setComments=k[_$_315c[11]]};k[_$_315c[58]]=function(d){return d&&typeof d==_$_315c[25]?this.options.comments&&this.options.comments[d]?this.options.comments[d]:!1:this.options.comments};k[_$_315c[11]]=function(d,b){if(!R.call(this.parent,this))return!1;if(typeof d==_$_315c[25]){var a=
|
|
306
|
+
{};a[d]=b}else a=d;if(b=H.call(this.parent,_$_315c[338],this,a))a=b;else if(!1===b)return!1;this.options.comments||(this.options.comments={});d={};var c=Object.keys(a);if(c.length){for(var e=0;e<c.length;e++){var f=G.getCoordsFromColumnName(c[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(d[c[e]]=this.options.comments[c[e]]||_$_315c[3],(b=a[c[e]])?this.options.comments[c[e]]=b:delete this.options.comments[c[e]],this.records[f[1]][f[0]].element&&(b?this.records[f[1]][f[0]].element.setAttribute(_$_315c[299],
|
|
307
|
+
b):this.records[f[1]][f[0]].element.removeAttribute(_$_315c[299])))}T.call(this.parent,{worksheet:this,action:_$_315c[92],newValue:a,oldValue:d});L.call(this,_$_315c[92],[a]);H.call(this.parent,_$_315c[339],this,a,d)}};return k}(),$a=function(){var k=function(d){d.getMeta=k[_$_315c[58]];d.setMeta=k[_$_315c[11]];d.resetMeta=k.reset};k[_$_315c[58]]=function(d,b){if(d){if(this.options.meta[d])return b?this.options.meta[d][b]:this.options.meta[d]}else return this.options.meta};k[_$_315c[11]]=function(d,
|
|
308
|
+
b,a){if(!R.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof d==_$_315c[25]&&b){a||(a=_$_315c[3]);var c={};c[d]={};c[d][b]=a;d=c}b=Object.keys(d);if(b.length){a={};for(c=0;c<b.length;c++){this.options.meta[b[c]]||(this.options.meta[b[c]]={});a[b[c]]||(a[b[c]]={});for(var e=Object.keys(d[b[c]]),f=0;f<e.length;f++)this.options.meta[b[c]][e[f]]=d[b[c]][e[f]],a[b[c]][e[f]]=d[b[c]][e[f]]}Object.keys(a).length&&(L.call(this,_$_315c[340],[a]),H.call(this.parent,_$_315c[341],
|
|
309
|
+
this,a))}};k.reset=function(d){if(!R.call(this.parent,this))return!1;if(d){if(this.options.meta){typeof d==_$_315c[25]&&(d=[d]);for(var b=0;b<d.length;b++)this.options.meta[d[b]]&&delete this.options.meta[d[b]]}}else d={},this.options.meta=d;L.call(this,_$_315c[342],d);H.call(this.parent,_$_315c[343],this,d)};return k}(),ab=function(){var k=function(d){d.orderBy=k.execute};k.handler=function(d,b){return function(a,c){a=a[1];c=c[1];return d?a===_$_315c[3]&&c!==_$_315c[3]?1:a!==_$_315c[3]&&c===_$_315c[3]?
|
|
310
|
+
-1:a>c?-1:a<c?1:0:a===_$_315c[3]&&c!==_$_315c[3]?1:a!==_$_315c[3]&&c===_$_315c[3]?-1:a>c?1:a<c?-1:0}};k.execute=function(d,b,a,c){if(0<=d){b=null==b?this.headers[d].classList.contains(_$_315c[344])?1:0:b?1:0;for(var e,f,g=[],h=0;h<this.options.data.length;h++)e=La[_$_315c[58]].call(this,d,h),f=this.records[h][d].v,f=e.type==_$_315c[286]||e.type==_$_315c[291]||e.type==_$_315c[292]||e.type==_$_315c[345]||e.type==_$_315c[22]||e.type==_$_315c[346]?Number(f):jSuites.isNumeric(f)?Number(f):f.toLowerCase(),
|
|
311
|
+
g[h]=[h,f];h=typeof this.parent.config.sorting===_$_315c[105]?this.parent.config.sorting(b,d):k.handler(b,d);g.sort(h);e=a?!0:!1;if(!a)for(a=[],h=0;h<g.length;h++)a[h]=g[h][0];if(h=H.call(this.parent,_$_315c[347],this,d,b,a))a=h;else if(!1===h)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(F(_$_315c[348])))this.destroyMerged();else return!1;if(a.length<g.length)for(h=0;h<g.length;h++)-1==a.indexOf(g[h][0])&&a.push(g[h][0]);g=[];for(h=0;h<a.length;h++)g[a[h]]=
|
|
312
|
+
h;Ha.call(this,!1);ba.reset.call(this);L.call(this,_$_315c[95],{column:d,direction:b,order:a});T.call(this.parent,{worksheet:this,action:_$_315c[95],column:d,newValue:a,oldValue:g,direction:b,previousState:k.getState.call(this)});k.update.call(this,a);k.arrow.call(this,d,b,c);ba.refresh.call(this);H.call(this.parent,_$_315c[349],this,d,b,a);return!0}};k.update=function(d){for(var b=[],a=0;a<d.length;a++)b[a]=this.options.data[d[a]];for(a=0;a<d.length;a++)this.options.data[a]=b[a];b=[];for(a=0;a<d.length;a++)b[a]=
|
|
313
|
+
this.records[d[a]];this.records=b;b=[];for(a=0;a<d.length;a++)b[a]=this.rows[d[a]];this.rows=b;fa.references.call(this);this.tbody.innerHTML=_$_315c[3];I.call(this,!0,!0);this.searchInput&&this.searchInput.value?wa.update.call(this,null):la.update.call(this)};k.arrow=function(d,b,a){for(var c=0;c<this.headers.length;c++)this.headers[c].classList.remove(_$_315c[350]),this.headers[c].classList.remove(_$_315c[344]);void 0===a?this.headers[d].classList.add(b?_$_315c[350]:_$_315c[344]):Array.isArray(a)&&
|
|
314
|
+
this.headers[a[0]].classList.add(a[1]?_$_315c[350]:_$_315c[344])};k.getState=function(){for(var d=0;d<this.headers.length;d++){if(this.headers[d].classList.contains(_$_315c[350]))return[d,1];if(this.headers[d].classList.contains(_$_315c[344]))return[d,0]}return null};return k}(),Da=function(){var k=function(d){d.whichPage=k.whichPage;d.quantityOfPages=k.quantityOfPages;d.page=k[_$_315c[11]];d.updatePagination=k.update};k.build=function(){this.pageNumber=0;var d=document.createElement(_$_315c[32]),
|
|
315
|
+
b=document.createElement(_$_315c[32]);this.pagination=document.createElement(_$_315c[32]);this.pagination.classList.add(_$_315c[351]);this.pagination.appendChild(d);this.pagination.appendChild(b);this.options.pagination||(this.pagination.style.display=_$_315c[52]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_315c[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_315c[11]].call(this,
|
|
316
|
+
this.pageNumber))};k.whichPage=function(d){if(0<this.options.pagination)return this.rows[d]?(this.results&&(d=this.results.indexOf(parseInt(d))),Math.ceil((parseInt(d)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_315c[352]);return!1};k.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_315c[352]);return!1};k[_$_315c[11]]=function(d,b){var a=this.pageNumber,c=
|
|
317
|
+
parseInt(this.options.pagination);if(c){if(null==d||-1==d)d=Math.ceil((this.results?this.results:this.rows).length/c)-1;if(!1===H.call(this.parent,_$_315c[354],this,d,a,c))return!1;this.pageNumber=d;I.update.call(this);ha.refresh.call(this);typeof b==_$_315c[105]&&b.call(this);H.call(this.parent,_$_315c[355],this,d,a,c)}else console.error(_$_315c[353])};k.update=function(){this.pagination.children[0].innerHTML=_$_315c[3];this.pagination.children[1].innerHTML=_$_315c[3];if(this.options.pagination){var d=
|
|
318
|
+
this.results?this.results.length:this.rows.length;if(d){d=Math.ceil(d/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>d?d:10;else 5>d-this.pageNumber?(b=d-9,a=d,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var c=document.createElement(_$_315c[32]);c.className=_$_315c[357];c.innerHTML=_$_315c[15];c.title=1;this.pagination.children[1].appendChild(c)}for(;b<=a;b++)c=document.createElement(_$_315c[32]),c.className=_$_315c[357],c.innerHTML=b,this.pagination.children[1].appendChild(c),
|
|
319
|
+
this.pageNumber==b-1&&c.classList.add(_$_315c[358]);a<d&&(c=document.createElement(_$_315c[32]),c.className=_$_315c[357],c.innerHTML=_$_315c[17],c.title=d,this.pagination.children[1].appendChild(c));this.pagination.children[0].innerHTML=F(_$_315c[359],[this.pageNumber+1,d])}else this.pagination.children[0].innerHTML=F(_$_315c[356]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_315c[59],this.table.style.top=0)}};return k}(),ja=function(){var k=function(d){d.setFreezeRows=
|
|
320
|
+
k[_$_315c[11]];d.resetFreezeRows=k.reset};k.update=function(d){var b,a;if(a=this.options.freezeRows)for(var c=this.thead.offsetHeight,e=0;e<a;e++){if(b=this.records[e][d].element)b.classList.add(_$_315c[360]),b.style.top=c+_$_315c[59];c+=parseInt(this.rows[e].element.offsetHeight)}};k.headers=function(){var d=this.thead.offsetHeight,b;if(b=this.options.freezeRows)for(var a=0;a<b;a++)this.rows[a]&&this.rows[a].element&&(this.rows[a].element.firstChild.classList.add(_$_315c[360]),this.rows[a].element.firstChild.style.top=
|
|
321
|
+
d+_$_315c[59],d+=parseInt(this.rows[a].element.offsetHeight));else k.reset.call(this)};k.refresh=function(){if(0<this.options.freezeRows){k.headers.call(this);for(var d=0;d<this.visibleCols.length;d++)k.update.call(this,this.visibleCols[d])}};k[_$_315c[11]]=function(d){k.applyReset.call(this);var b=this.options.freezeRows;this.options.freezeRows=d;this.options.freezeRowControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_315c[361]):this.thead.lastChild.firstChild.classList.remove(_$_315c[361]);
|
|
322
|
+
k.refresh.call(this);I.call(this,!0);ba.refresh.call(this);T.call(this.parent,{worksheet:this,action:_$_315c[94],newValue:d,oldValue:b});L.call(this,_$_315c[94],{row:d})};k.reset=function(){k[_$_315c[11]].call(this,0)};k.getHeight=function(d){d=d?0:this.thead.offsetHeight;if(0<this.options.freezeRows)for(var b=0;b<this.options.freezeRows;b++)d+=parseInt(da.height.call(this,b));return d};k.applyReset=function(){for(var d,b=0;b<this.options.freezeRows;b++)if(this.rows[b].element){this.rows[b].element.firstChild.classList.remove(_$_315c[360]);
|
|
323
|
+
this.rows[b].element.firstChild.style.top=_$_315c[3];for(var a=0;a<this.options.columns.length;a++)if(d=this.records[b][a].element)d.classList.remove(_$_315c[360]),d.style.top=_$_315c[3]}};k.start=function(d,b){d=this.parent.helper;k.event={y:b,d:b};this.content.scrollTop=0;b=this.content.offsetTop+k.getHeight.call(this);d.style.display=_$_315c[24];d.style.top=b+_$_315c[59];d.style.left=_$_315c[61];d.style.width=this.content.offsetWidth+_$_315c[59];d.style.height=_$_315c[183]};k.end=function(d){d=
|
|
324
|
+
k.event;null!==d.d&&this.setFreezeRows(d.d);this.parent.helper.style.display=_$_315c[3];k.event=null};k.cancel=function(){k.event.d=null;k.end.call(this,!1)};k.move=function(d){var b=d.target.getAttribute(_$_315c[57]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientHeight/2>d.offsetY)?b:b+1;this.merged.rows[a]&&0<a||(k.event.d=a,a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(d?b.top:b.bottom)-a.top+_$_315c[59])}};return k}(),
|
|
325
|
+
ca=function(){var k=function(d){d.setFreezeColumns=k[_$_315c[11]];d.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);for(var d=0;d<this.rows.length;d++)this.rows[d].element&&k.update.call(this,d)}};k.update=function(d){var b,a;if(a=this.options.freezeColumns){var c=Ba.call(this)?50:0;if(this.rows[d].element)for(var e=0;e<a;e++){if(b=this.records[d][e].element)b.classList.add(_$_315c[60]),b.style.left=c+_$_315c[59];ia.isVisible.call(this,e)&&(c+=parseInt(this.options.columns[e].width))}}};
|
|
326
|
+
k.headers=function(){var d=Ba.call(this)?50:0,b;if(b=this.options.freezeColumns)for(var a=0;a<b;a++){if(this.headers[a]){this.headers[a].classList.add(_$_315c[60]);this.headers[a].style.left=d+_$_315c[59];if(this.options.footers)for(var c=0;c<this.options.footers.length;c++)this.footers.content[c][a].element.classList.add(_$_315c[60]),this.footers.content[c][a].element.style.left=d+_$_315c[59];!1!==this.options.columns[a].visible&&(d+=parseInt(this.options.columns[a].width))}}else k.reset.call(this)};
|
|
327
|
+
k.refresh=function(){if(0<this.options.freezeColumns){k.headers.call(this);for(var d=0;d<this.visibleRows.length;d++)k.update.call(this,this.visibleRows[d])}};k[_$_315c[11]]=function(d){k.applyReset.call(this);var b=this.options.freezeColumns;this.options.freezeColumns=d;this.options.freezeColumnControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_315c[362]):this.thead.lastChild.firstChild.classList.remove(_$_315c[362]);k.width.call(this);I.call(this,!0);ba.refresh.call(this);T.call(this.parent,
|
|
328
|
+
{worksheet:this,action:_$_315c[93],newValue:d,oldValue:b});L.call(this,_$_315c[93],{column:d})};k.reset=function(){k[_$_315c[11]].call(this,0)};k.applyReset=function(){for(var d,b=1;b<=this.options.freezeColumns;b++){if(d=this.thead.lastChild)d.children[b].classList.remove(_$_315c[60]),d.children[b].style.left=_$_315c[3];for(var a=0;a<this.rows.length;a++)if(d=this.rows[a].element)d.children[b].classList.remove(_$_315c[60]),d.children[b].style.left=_$_315c[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[b].classList.remove(_$_315c[60]),
|
|
329
|
+
this.tfoot.children[a].children[b].style.left=_$_315c[3]}};k.getWidth=function(d){d=d?0:Ba.call(this)?50:0;if(0<this.options.freezeColumns)for(var b=0;b<this.options.freezeColumns;b++)ia.isVisible.call(this,b)&&(d+=parseInt(this.options.columns[b].width));return d};k.start=function(d,b){d=this.parent.helper;k.event={x:b,d:b};this.content.scrollLeft=0;b=k.getWidth.call(this);d.style.display=_$_315c[24];d.style.top=this.content.offsetTop+_$_315c[59];d.style.left=b+_$_315c[59];d.style.width=_$_315c[183];
|
|
330
|
+
d.style.height=this.content.offsetHeight+_$_315c[59];this.thead.lastChild.firstChild.classList.remove(_$_315c[362])};k.end=function(d){d=k.event;null!==d.d&&this.setFreezeColumns(d.d);this.parent.helper.style.display=_$_315c[3];k.event=null};k.cancel=function(){k.event.d=null;k.end.call(this,!1)};k.move=function(d){var b=d.target.getAttribute(_$_315c[56]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientWidth/2>d.offsetX)?b:b+1;this.merged.cols[a]&&0<a||(k.event.d=a,b=this.headers[b].getBoundingClientRect(),
|
|
331
|
+
a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_315c[59])}};return k}(),fa=function(){var k=function(a,c){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[c&&void 0!=c[f[g]]?c[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},d=function(){if(0<this.options.minSpareRows){for(var a=0,c=this.rows.length-1;0<=c;c--){for(var e=!1,f=0;f<this.options.columns.length;f++)Q.call(this,f,c)&&(e=!0);if(e)break;else a++}0<
|
|
332
|
+
this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(f=this.options.columns.length-1;0<=f;f--){e=!1;for(c=0;c<this.rows.length;c++)Q.call(this,f,c)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},b=function(){};b.build=function(){var a=this;this.content=document.createElement(_$_315c[32]);this.content.classList.add(_$_315c[363]);this.content.addEventListener(_$_315c[364],function(e){if(!a.edition)return e.preventDefault(),
|
|
333
|
+
!1});this.table=document.createElement(_$_315c[365]);this.thead=document.createElement(_$_315c[366]);this.tbody=document.createElement(_$_315c[367]);this.tfoot=document.createElement(_$_315c[368]);!1===this.options.gridline&&this.table.classList.add(_$_315c[369]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_315c[370]);var c=document.createElement(_$_315c[198]);c.setAttribute(_$_315c[180],_$_315c[371]);this.colgroupContainer.appendChild(c);this.headerContainer=
|
|
334
|
+
document.createElement(_$_315c[173]);c=document.createElement(_$_315c[175]);c.classList.add(_$_315c[372]);if(1==this.parent.edition)this.options.freezeRowControl&&!this.options.freezeRows&&c.classList.add(_$_315c[361]),this.options.freezeColumnControl&&!this.options.freezeColumns&&c.classList.add(_$_315c[362]);else if(this.options.freezeRowControl||this.options.freezeColumnControl)this.options.freezeRowControl=!1,this.options.freezeColumnControl=!1,console.log(_$_315c[373]);this.headerContainer.appendChild(c);
|
|
335
|
+
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_315c[374]);this.table.setAttribute(_$_315c[375],_$_315c[121]);this.table.setAttribute(_$_315c[376],_$_315c[121]);this.table.setAttribute(_$_315c[377],_$_315c[378]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.defaultColAlign&&this.table.classList.add(_$_315c[379]+this.options.defaultColAlign);this.options.textOverflow||
|
|
336
|
+
this.table.classList.add(_$_315c[380]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_315c[381]);this.corner=document.createElement(_$_315c[32]);this.corner.className=_$_315c[382];this.corner.setAttribute(_$_315c[377],_$_315c[383]);this.corner.setAttribute(_$_315c[384],_$_315c[385]);0==this.options.selectionCopy&&(this.corner.style.display=_$_315c[52]);this.scrollX=I.build.call(a,_$_315c[386]);this.scrollY=I.build.call(a,_$_315c[387]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);
|
|
337
|
+
this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$_315c[68]),this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.width=parseInt(this.options.tableWidth)+_$_315c[59],this.options.pagination?this.content.classList.add(_$_315c[388]):this.content.style.height=
|
|
338
|
+
parseInt(this.options.tableHeight)+_$_315c[59]);this.options.resize&&(this.content.style.resize=this.options.resize);this.options.freezeColumns>this.options.columns.length&&console.error(_$_315c[389]);wa.build.call(this);za.build.call(this);Da.build.call(this);Ia.build.call(this);sa.build.call(this);ha.build.call(this);la.onload.call(this);d.call(this);I.call(this)};b.references=function(a){var c=[],e=[],f=null,g=null,h=null,n=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=
|
|
339
|
+
g.getAttribute(_$_315c[56]),h!=f&&(g.setAttribute(_$_315c[56],f),g.getAttribute(_$_315c[195])||(g.innerHTML=G.getColumnName(f)));for(var l=0;l<this.rows.length;l++)g=this.rows[l],n=g.y,n!=l&&(g.y=l,c[n]=l,g.element&&(g.element.setAttribute(_$_315c[57],l),g.element.children[0].setAttribute(_$_315c[57],l),f=this.options.rows&&this.options.rows[n]&&this.options.rows[n].title?this.options.rows[n].title:l+1,g.element.children[0].innerHTML=f));var p=function(r,w){g=this.records[w][r];h=g.x;n=g.y;h!=r&&
|
|
340
|
+
(g.x=r,g.element&&g.element.setAttribute(_$_315c[56],r));n!=w&&(g.y=w,g.element&&g.element.setAttribute(_$_315c[57],w));if(h!=r||n!=w){var x=G.getColumnNameFromCoords(h,n);r=G.getColumnNameFromCoords(r,w);e[x]=r}};if(a){l=function(r,w){r&&r[w]&&delete r[w]};var q=Object.keys(a);for(f=0;f<q.length;f++)l(this,q[f]),l(this.options.meta,q[f]),l(this.options.cells,q[f]),l(this.options.style,q[f]),l(this.options.comments,q[f])}for(l=0;l<this.rows.length;l++)for(f=0;f<this.options.columns.length;f++)p.call(this,
|
|
341
|
+
f,l);k.call(this,_$_315c[390],c);k.call(this,_$_315c[316],e);k.call(this,_$_315c[317],e);k.call(this,_$_315c[122],e);k.call(this,_$_315c[318],e);k.call(this,_$_315c[298],e);this.options.mergeCells&&sa.build.call(this);H.call(this.parent,_$_315c[391],this,e,a);Y.tracking.call(this,e,a);Y.updateAll.call(this,e,a);Ja.updateAll.call(this,e,a);H.call(this.parent,_$_315c[392],this,e,a);return e};b.update=function(a){a&&d.call(this);if(typeof this.parent.config.updateTable==_$_315c[105])for(var c=0;c<this.rows.length;c++)for(var e=
|
|
342
342
|
0;e<this.options.columns.length;e++)a=this.records[c][e],this.parent.config.updateTable.call(this,this,a.element,e,c,Q.call(this,e,c),a.r?a.r:a.v);ha.refresh.call(this)};return b}(),ta=function(){var k={spreadsheet:function(d,b){var a={name:null,config:{},el:d,element:d,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Ga.spreadsheet.call(a,b);a.config.license&&(v.license=a.config.license);d.spreadsheet=a;d.jspreadsheet=d.jexcel=a.worksheets;
|
|
343
|
-
v.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var c=a.config.tabs;typeof c!==_$
|
|
344
|
-
h)};jSuites.tabs(d,c);d.classList.add(_$
|
|
345
|
-
e.appendChild(na.build(a));e.appendChild(Ta(a));a.textarea=document.createElement(_$
|
|
346
|
-
pa.moveWorksheet;a.getWorksheet=pa.getWorksheet;a.getWorksheetActive=pa.getWorksheetActive;a.getWorksheetInstance=pa.getWorksheetInstance;a.getConfig=function(){var f=a.config;f.worksheets=[];for(var g=0;g<a.worksheets.length;g++)f.worksheets.push(a.worksheets[g].getConfig());return f};a.fullscreen=Oa;a.progress=Pa;a.dispatch=H;a.setHistory=T;a.resetHistory=T.reset;a.undo=T.undo;a.redo=T.redo;a.setToolbar=ma[_$
|
|
347
|
-
e;Ja.build.call(a);b.plugins&&va.call(a,b.plugins);a.setPlugins=function(f){va.call(a,f)};d=Object.keys(v.extensions);if(d.length)for(c=0;c<d.length;c++)if(typeof v.extensions[d[c]].oninit==_$
|
|
348
|
-
La(a);Ga.worksheet.call(a,b);!v.license&&a.options.license&&(v.license=a.options.license);d.element.jexcel=d.element.jexcel?d.worksheets:a;va.execute.call(a.parent,_$
|
|
349
|
-
_$
|
|
350
|
-
this.records[d]||(this.records[d]=[]);this.options.data[d]||(this.options.data[d]=this.dataType?{}:[]);for(b=0;b<this.options.columns.length;b++)k.cell.call(this,b,d)},cell:function(d,b,a){typeof a==_$
|
|
351
|
-
b[a]==_$
|
|
352
|
-
this))return!1;if(b){if(Array.isArray(d)){a||(a=[]);for(var c=0;c<d.length;c++){a[c]||(a[c]=this.options.columns[d[c]].width);var e=Array.isArray(b)&&b[c]?b[c]:b;this.options.columns[d[c]].width=e;this.colgroup[d[c]]&&this.colgroup[d[c]].setAttribute(_$
|
|
353
|
-
newValue:b});L.call(this,_$
|
|
354
|
-
a+_$
|
|
355
|
-
L.call(this,_$
|
|
356
|
-
f[_$
|
|
357
|
-
this.options.columns.length;h++)g[h]=this.options.columns[h].filters||null;return g};f.open=function(g){d=parseInt(g);if(this.headers[d].classList.contains(_$
|
|
358
|
-
n.children[1].textContent=_$
|
|
359
|
-
this,d,a))&&(a=g);void 0!==a[_$
|
|
360
|
-
d,g)}this.parent.filter.style.display=_$
|
|
361
|
-
(p=!1)}p&&n.push(l)}return n};f.update=function(){Aa.reset.call(this);this.resetSelection();this.resetBorders();var g=wa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$
|
|
362
|
-
g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$
|
|
363
|
-
Object.keys(a);if(g=this.options.columns[d].filters)for(l=0;l<e.length;l++)a[e[l]].selected=!1,0<=g.indexOf(e[l])&&(a[e[l]].selected=!0);else for(l=0;l<e.length;l++)a[e[l]].selected=!0;h.firstChild.checked=g?!1:!0}for(l=c=0;l<e.length;l++)200>l&&(g=c++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$
|
|
364
|
-
(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$
|
|
365
|
-
_$
|
|
366
|
-
p++}}});return l};f.updateDOM=function(g,h,n){var l=this.headers,p=function(q){1==h?l[q].classList.add(_$
|
|
367
|
-
1==h&&f.update.call(this)};return f}(),Aa=function(){var k={};k[_$
|
|
368
|
-
c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$
|
|
369
|
-
c.options.pagination;e.appendChild(document.createTextNode(F(_$
|
|
370
|
-
return e},b=function(c,e){var f=this.merged.rows;if(f[e]){for(;0<e&&f[e-1];)e--;for(;f[e];)c.push(e++)}else c.push(e)},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,e){null===c?c=this.searchInput.value||_$
|
|
371
|
-
{};for(h=0;h<e.length;h++)q[e[h]]=!0}else q=null;for(h=0;h<this.rows.length;h++){p=!1;if(!q||q[h])for(g=0;g<this.options.columns.length;g++){n=_$
|
|
372
|
-
var e=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$
|
|
373
|
-
Aa.reset.call(this);I.update.call(this);ha.refresh.call(this)};a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$
|
|
374
|
-
_$
|
|
375
|
-
_$
|
|
376
|
-
h.push({title:F(_$
|
|
377
|
-
e==_$
|
|
378
|
-
d.selectedCell[1],q)})}}),h.push({type:_$
|
|
379
|
-
onclick:function(){d.setHeader(f)}}),d.options.data.length||(h.push({type:_$
|
|
380
|
-
parseInt(a),1)}}),h.push({title:F(_$
|
|
381
|
-
g),r=prompt(F(_$
|
|
382
|
-
function(){k.show.call(d.parent)};d.hideToolbar=function(){k.hide.call(d.parent)};d.refreshToolbar=function(){k.update.call(d.parent,d,d.selectedCell)}};k[_$
|
|
383
|
-
_$
|
|
384
|
-
null,a.options.maxWidth=b,a.refresh()),a.update(d))};k.build=function(){for(var d=k[_$
|
|
385
|
-
function(c,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,n){(g=v.current.getSelected(!1,!0))&&v.current.setStyle(g,f.k,n)},onopen:function(h){var n;v.current.cursor?(n=v.current.cursor.style[f.k])?h.color.select(h.color.toHex(n)):h.color.select(_$
|
|
386
|
-
_$
|
|
387
|
-
b.push({type:_$
|
|
388
|
-
f,g){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$
|
|
389
|
-
g.options.defaultColAlign||_$
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
g==_$
|
|
394
|
-
|
|
395
|
-
g=document.createElement(_$
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
function(){
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
d
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
h[a].
|
|
411
|
-
(b.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
v.current.
|
|
423
|
-
(v.current.closeEditor(v.current.edition,!0),
|
|
424
|
-
u.which)
|
|
425
|
-
u.
|
|
426
|
-
|
|
427
|
-
1==v.current.
|
|
428
|
-
v.current.
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
v.current.
|
|
433
|
-
1;var E=v.current.options.data.length-1;if(C[3]==_$
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
C[3]!==_$
|
|
437
|
-
|
|
438
|
-
1==e)xa.event?xa.update.call(v.current,u):Ca.event?Ca.update.call(v.current,u):ca.event?ca.move.call(v.current,u):ja.event?ja.move.call(v.current,u):
|
|
439
|
-
v.current.options.
|
|
440
|
-
v.current.options.
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
u);else if(null!==D)
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
_$
|
|
455
|
-
f,
|
|
456
|
-
|
|
457
|
-
f
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
e,f,
|
|
464
|
-
|
|
465
|
-
Array.isArray(c)||(c=(_$
|
|
466
|
-
0;c
|
|
467
|
-
a.
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
e,f,g
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
function(c,e,f,g,h
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
c.
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
b.
|
|
487
|
-
|
|
488
|
-
c,f,g,n
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
c.
|
|
343
|
+
v.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var c=a.config.tabs;typeof c!==_$_315c[104]&&(c={allowCreate:c?!0:!1,hideHeaders:c?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});c.maxWidth||(c.maxWidth=d.offsetWidth-50+_$_315c[59]);c.animation=void 0==c.animation?!0:c.animation;c.onbeforecreate=function(){a.createWorksheet();return!1};c.onclick=function(f,g,h,n,l){0<=h&&a.openWorksheet(h,!0)};c.onchangeposition=function(f,g,h){a.updateWorksheet(g,
|
|
344
|
+
h)};jSuites.tabs(d,c);d.classList.add(_$_315c[393]);1==b.fullscreen&&d.classList.add(_$_315c[23]);var e=document.createElement(_$_315c[32]);a.toolbar=document.createElement(_$_315c[32]);a.toolbar.className=_$_315c[394];e.appendChild(a.toolbar);a.filter=la.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_315c[32]);a.helper.className=_$_315c[395];e.appendChild(a.helper);a.loading=document.createElement(_$_315c[32]);a.loading.classList.add(_$_315c[396]);e.appendChild(a.loading);
|
|
345
|
+
e.appendChild(na.build(a));e.appendChild(Ta(a));a.textarea=document.createElement(_$_315c[397]);a.textarea.className=_$_315c[398];a.textarea.tabIndex=_$_315c[399];e.appendChild(a.textarea);c.position===_$_315c[400]?d.insertBefore(e,d.children[0]):d.insertBefore(e,d.children[1]);d.appendChild(Na.call(a,v.license));a.createWorksheet=pa.createWorksheet;a.deleteWorksheet=pa.deleteWorksheet;a.renameWorksheet=pa.renameWorksheet;a.updateWorksheet=pa.updateWorksheet;a.openWorksheet=pa.openWorksheet;a.moveWorksheet=
|
|
346
|
+
pa.moveWorksheet;a.getWorksheet=pa.getWorksheet;a.getWorksheetActive=pa.getWorksheetActive;a.getWorksheetInstance=pa.getWorksheetInstance;a.getConfig=function(){var f=a.config;f.worksheets=[];for(var g=0;g<a.worksheets.length;g++)f.worksheets.push(a.worksheets[g].getConfig());return f};a.fullscreen=Oa;a.progress=Pa;a.dispatch=H;a.setHistory=T;a.resetHistory=T.reset;a.undo=T.undo;a.redo=T.redo;a.setToolbar=ma[_$_315c[11]];a.getToolbar=ma[_$_315c[58]];a.showToolbar=ma.show;a.hideToolbar=ma.hide;a.tools=
|
|
347
|
+
e;Ja.build.call(a);b.plugins&&va.call(a,b.plugins);a.setPlugins=function(f){va.call(a,f)};d=Object.keys(v.extensions);if(d.length)for(c=0;c<d.length;c++)if(typeof v.extensions[d[c]].oninit==_$_315c[105])v.extensions[d[c]].oninit(a,b);return a},worksheet:function(d,b){var a={};d.worksheets.push(a);a.parent=d;Ga(a);Va(a);ka(a);ba(a);na(a);Ia(a);Xa(a);sa(a);Ma(a);Ya(a);oa(a);Y(a);S(a);da(a);ia(a);$a(a);Za(a);Ea(a);ha(a);za(a);wa(a);la(a);ma(a);ya(a);bb(a);cb(a);Da(a);pa(a);ca(a);ja(a);Wa(a);ab(a);Ja(a);
|
|
348
|
+
La(a);Ga.worksheet.call(a,b);!v.license&&a.options.license&&(v.license=a.options.license);d.element.jexcel=d.element.jexcel?d.worksheets:a;va.execute.call(a.parent,_$_315c[401],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_315c[402]+pa.nextName());var c=this.options.worksheetName;J(c)&&console.log(_$_315c[403]+c+_$_315c[404]);J(c,a);this.element=d.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_315c[114]&&(f.style.display=
|
|
349
|
+
_$_315c[52])});this.element.classList.add(_$_315c[405]);this.element.jexcel=this;fa.build.call(this);va.execute.call(this.parent,_$_315c[406],[this]);this.options.data&&500<this.options.data.length&&!I.limited.call(this)&&!this.options.pagination&&console.error(_$_315c[407])};return a},row:function(d,b){this.rows[d]||(this.rows[d]={element:null,y:d});b&&(this.rows[d].id=b,ya[_$_315c[11]].call(this,b));this.options.rows&&this.options.rows[d]&&this.options.rows[d].height&&(this.rows[d].height=parseInt(this.options.rows[d].height));
|
|
350
|
+
this.records[d]||(this.records[d]=[]);this.options.data[d]||(this.options.data[d]=this.dataType?{}:[]);for(b=0;b<this.options.columns.length;b++)k.cell.call(this,b,d)},cell:function(d,b,a){typeof a==_$_315c[21]&&(a=Q.call(this,d,b),null===a||void 0===a)&&(a=_$_315c[3],Q.call(this,d,b,a));this.records[b][d]||(this.records[b][d]={element:null,x:d,y:b},Z(a)||(this.records[b][d].v=a))},bind:function(d){for(var b=Object.keys(Fa),a=0;a<b.length;a++)(b[a]==_$_315c[408]?window:d).addEventListener(b[a],Fa[b[a]],
|
|
351
|
+
b[a]==_$_315c[409]||b[a]==_$_315c[410]||b[a]==_$_315c[411]?{passive:!1}:{})},unbind:function(d){for(var b=Object.keys(Fa),a=0;a<b.length;a++)(b[a]==_$_315c[408]?window:d).removeEventListener(b[a],Fa[b[a]])}};return k}(),bb=function(){var k=function(d){d.getWidth=k[_$_315c[58]];d.setWidth=k[_$_315c[11]]};k[_$_315c[58]]=function(d){var b=this.options.columns;if(typeof d===_$_315c[21]){d=[];for(var a=0;a<b.length;a++)d.push(b[a].width)}else d=b[d].width;return d};k[_$_315c[11]]=function(d,b,a){if(!R.call(this.parent,
|
|
352
|
+
this))return!1;if(b){if(Array.isArray(d)){a||(a=[]);for(var c=0;c<d.length;c++){a[c]||(a[c]=this.options.columns[d[c]].width);var e=Array.isArray(b)&&b[c]?b[c]:b;this.options.columns[d[c]].width=e;this.colgroup[d[c]]&&this.colgroup[d[c]].setAttribute(_$_315c[180],e)}}else a||(a=this.options.columns[d].width),this.options.columns[d].width=b,this.colgroup[d]&&this.colgroup[d].setAttribute(_$_315c[180],b);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_315c[89],column:d,oldValue:a,
|
|
353
|
+
newValue:b});L.call(this,_$_315c[89],{column:d,width:b,oldWidth:a});H.call(this.parent,_$_315c[412],this,d,b,a);I.call(this,!0)}};return k}(),cb=function(){var k=function(b){b.getHeight=k[_$_315c[58]];b.setHeight=k[_$_315c[11]]};k[_$_315c[58]]=function(b){if(void 0===b){b=[];for(var a=0;a<this.rows.length;a++){var c=da.height.call(this,a);c&&(b[a]=c)}}else b=da.height.call(this,b);return b};var d=function(b,a){a=parseInt(a);var c=da.height.call(this,b);this.rows[b].element&&(this.rows[b].element.style.height=
|
|
354
|
+
a+_$_315c[59]);this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].height=a;this.rows[b].height=a;return c};k[_$_315c[11]]=function(b,a,c){if(!R.call(this.parent,this))return!1;var e,f=typeof c==_$_315c[21]?!0:!1;if(a){if(Array.isArray(b))for(!0===f&&(c=[]),e=0;e<b.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;d.call(this,b[e],g);1==f&&c.push(f)}else e=d.call(this,b,a),1==f&&(c=e);this.refreshBorders();T.call(this.parent,{worksheet:this,action:_$_315c[90],row:b,oldValue:c,newValue:a});
|
|
355
|
+
L.call(this,_$_315c[90],{row:b,height:a,oldHeight:c});H.call(this.parent,_$_315c[413],this,b,a,c);I.call(this,!0)}};return k}(),la=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_315c[414]);g.element.innerHTML=g.value;var n=document.createElement(_$_315c[253]);n.type=_$_315c[285];n.value=h;n.o=g;g.element.insertBefore(n,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},d=null,b=null,a=[],c=0,e=null,f=function(g){g.setFilter=
|
|
356
|
+
f[_$_315c[11]];g.getFilter=f[_$_315c[58]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return b};f[_$_315c[11]]=function(g,h){var n=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(n&&n.classList.add(_$_315c[415]),g.filters=h):(n&&n.classList.remove(_$_315c[415]),g.filters=null);f.update.call(this)};f[_$_315c[58]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var h=0;h<
|
|
357
|
+
this.options.columns.length;h++)g[h]=this.options.columns[h].filters||null;return g};f.open=function(g){d=parseInt(g);if(this.headers[d].classList.contains(_$_315c[200])){b=!0;var h=this.parent.element.getBoundingClientRect(),n=this.headers[d].getBoundingClientRect();g=n.left-h.left;var l=n.top-h.top+n.height;n=this.parent.filter;h=h.left+h.width;n.style.display=_$_315c[24];g+n.offsetWidth>h&&(g=h-(n.offsetWidth+18));n.style.top=l+_$_315c[59];n.style.left=g+_$_315c[59];n.children[0].focus();g=n.children[1].selectAll;
|
|
358
|
+
n.children[1].textContent=_$_315c[3];n.children[1].appendChild(g);g.children[0].checked=this.options.columns[d].filters?!1:!0;g=wa.execute.call(this,null,d);g=G.invert(g);n=[];for(h=0;h<this.rows.length;h++)if(g[h]){l=_$_315c[3]+Q.call(this,d,h);var p=_$_315c[3]+oa.processed.call(this,d,h,!0);l.substr(0,1)==_$_315c[18]&&(l=p);n.push([l,p])}n.sort(function(q,r){return q[0]>r[0]?1:q[0]<r[0]?-1:0});a=[];for(h=0;h<n.length;h++)a[n[h][0]]={value:n[h][1],element:null};(g=H.call(this.parent,_$_315c[417],
|
|
359
|
+
this,d,a))&&(a=g);void 0!==a[_$_315c[3]]&&(delete a[_$_315c[3]],a[_$_315c[3]]={value:_$_315c[243]+F(_$_315c[418])+_$_315c[265],element:null});f.search.call(this,_$_315c[3])}else console.log(_$_315c[416])};f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(a).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[d].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_315c[11]].call(this,
|
|
360
|
+
d,g)}this.parent.filter.style.display=_$_315c[3];this.parent.filter.children[0].value=_$_315c[3];d=null;b=!1;a=null;c=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);Aa.reset.call(this);f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,n=[],l=0;l<this.options.data.length;l++){for(var p=!0,q=0;q<h.length;q++)if(h[q].filters&&g!==q){var r=_$_315c[3]+Q.call(this,q,l),w=_$_315c[3]+this.getLabelFromCoords(q,l,!0);-1==h[q].filters.indexOf(r)&&-1==h[q].filters.indexOf(w)&&
|
|
361
|
+
(p=!1)}p&&n.push(l)}return n};f.update=function(){Aa.reset.call(this);this.resetSelection();this.resetBorders();var g=wa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_315c[105]){var h=f[_$_315c[58]].call(this),n=H.call(this.parent,_$_315c[419],this,h,g);if(n)g=n;else if(!1===n)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&Aa[_$_315c[11]].call(this,g);ha.refresh.call(this);I.call(this,!0);H.call(this.parent,_$_315c[420],this,h,g)};f.show=function(g){f.updateDOM.call(this,
|
|
362
|
+
g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$_315c[421]);for(var n=Object.keys(a),l=0;l<n.length;l++)a[n[l]]&&(_$_315c[3]+a[n[l]].value).match(g)?(e.push(n[l]),a[n[l]].selected=!0):a[n[l]].selected=!1;e.length&&this.options.columns[d].filters&&(h.firstChild.checked=!0,h.appendChild(h.currentSelection))}else{e=
|
|
363
|
+
Object.keys(a);if(g=this.options.columns[d].filters)for(l=0;l<e.length;l++)a[e[l]].selected=!1,0<=g.indexOf(e[l])&&(a[e[l]].selected=!0);else for(l=0;l<e.length;l++)a[e[l]].selected=!0;h.firstChild.checked=g?!1:!0}for(l=c=0;l<e.length;l++)200>l&&(g=c++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_315c[32]);g.className=_$_315c[422];g.onclick=function(p){p.target.tagName==_$_315c[423]&&p.target.o&&(p.target.o.selected=p.target.checked);p=!0;for(var q=1;q<this.children.length;q++)this.children[q].children[0].checked||
|
|
364
|
+
(p=!1);this.children[0].children[0].checked=p};var h=document.createElement(_$_315c[253]);h.type=_$_315c[72];h.placeholder=F(_$_315c[424]);h.classList.add(_$_315c[425]);h.classList.add(_$_315c[254]);var n=document.createElement(_$_315c[253]);n.type=_$_315c[426];n.value=_$_315c[427];n.className=_$_315c[428];var l=document.createElement(_$_315c[32]);l.className=_$_315c[429];l.appendChild(h);l.appendChild(g);l.appendChild(n);g.currentSelection=document.createElement(_$_315c[414]);g.currentSelection.innerHTML=
|
|
365
|
+
_$_315c[430]+F(_$_315c[431]);g.selectAll=document.createElement(_$_315c[414]);g.selectAll.innerHTML=_$_315c[432]+F(_$_315c[433])+_$_315c[265];g.selectAll.onclick=function(){for(var p=this.children[0].checked,q=1;q<this.parentNode.children.length;q++)this.parentNode.children[q].children[0].checked=p;if(1==p)for(q=0;q<e.length;q++)a[e[q]].selected=!0;else for(p=Object.keys(a),q=0;q<p.length;q++)a[p[q]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(p){for(p=0;c<e.length-1&&10>p;){var q=c++;g.appendChild(k(q));
|
|
366
|
+
p++}}});return l};f.updateDOM=function(g,h,n){var l=this.headers,p=function(q){1==h?l[q].classList.add(_$_315c[200]):(this.options.columns[q].filters=null,l[q].classList.remove(_$_315c[415]),1==n&&l[q].classList.remove(_$_315c[200]))};if(g)p.call(this,g);else for(g=0;g<l.length;g++)p.call(this,g)};f.onload=function(){var g,h=!1;if(g=this.options.columns)for(var n=0;n<g.length;n++)Array.isArray(g[n].filters)&&0<g[n].filters.length&&this.headers[n]&&(this.headers[n].classList.add(_$_315c[415]),h=!0);
|
|
367
|
+
1==h&&f.update.call(this)};return f}(),Aa=function(){var k={};k[_$_315c[11]]=function(d){for(var b=0;b<d.length;b++)this.rows[d[b]].results=!0;this.results=d};k.reset=function(){for(var d=0;d<this.rows.length;d++)!0===this.rows[d].results&&delete this.rows[d].results;this.results=null};k.refresh=function(){for(var d=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&d.push(b);return d};return k}(),wa=function(){var k=function(c){var e=document.createElement(_$_315c[32]);if(0<c.options.pagination&&
|
|
368
|
+
c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$_315c[434]);c.paginationDropdown.classList.add(_$_315c[435]);c.paginationDropdown.onchange=function(){c.options.pagination=parseInt(this.value);c.page(0)};for(var f=0;f<c.options.paginationOptions.length;f++){var g=document.createElement(_$_315c[436]);g.value=c.options.paginationOptions[f];g.innerHTML=c.options.paginationOptions[f];c.paginationDropdown.appendChild(g)}c.paginationDropdown.value=
|
|
369
|
+
c.options.pagination;e.appendChild(document.createTextNode(F(_$_315c[437])));e.appendChild(c.paginationDropdown);e.appendChild(document.createTextNode(F(_$_315c[438])))}return e},d=function(c){var e=document.createElement(_$_315c[32]);e.innerHTML=F(_$_315c[424])+_$_315c[139];c.searchInput=document.createElement(_$_315c[253]);c.searchInput.classList.add(_$_315c[439]);c.searchInput.classList.add(_$_315c[254]);c.searchInput.oninput=function(){this.parentNode.classList.add(_$_315c[440])};e.appendChild(c.searchInput);
|
|
370
|
+
return e},b=function(c,e){var f=this.merged.rows;if(f[e]){for(;0<e&&f[e-1];)e--;for(;f[e];)c.push(e++)}else c.push(e)},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,e){null===c?c=this.searchInput.value||_$_315c[3]:c!==this.searchInput.value&&(this.searchInput.value=c);this.pageNumber=0;var f=[],g=null,h=null,n=null,l=null,p=null;e=la.execute.call(this,e);if(c)try{c=new RegExp(c,_$_315c[421]);if(e&&e.length){var q=
|
|
371
|
+
{};for(h=0;h<e.length;h++)q[e[h]]=!0}else q=null;for(h=0;h<this.rows.length;h++){p=!1;if(!q||q[h])for(g=0;g<this.options.columns.length;g++){n=_$_315c[3]+Q.call(this,g,h);if(n.match(c)){p=!0;break}l=_$_315c[3]+this.getLabelFromCoords(g,h);if(l.match(c)){p=!0;break}}1==p&&b.call(this,f,h)}}catch(r){}else f=e;if(f.length){for(h=0;h<this.rows.length;h++)!0===this.rows[h].results&&f.push(h);f.sort(function(r,w){return r-w})}return f};a.update=function(c){Aa.reset.call(this);this.resetSelection();this.resetBorders();
|
|
372
|
+
var e=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$_315c[105]){var f=H.call(this.parent,_$_315c[441],this,c,e);if(f)e=f;else if(!1===f)return!1}this.pageNumber=0;e&&e.length<this.rows.length&&Aa[_$_315c[11]].call(this,e);ha.refresh.call(this);I.call(this,!0);H.call(this.parent,_$_315c[442],this,c,e);this.searchInput.parentNode.classList.remove(_$_315c[440])};a.refresh=function(){I.update.call(this);ha.refresh.call(this)};a.reset=function(){this.searchInput.value=_$_315c[3];
|
|
373
|
+
Aa.reset.call(this);I.update.call(this);ha.refresh.call(this)};a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_315c[3]};a.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_315c[52]};a.build=function(){this.searchContainer=document.createElement(_$_315c[32]);this.searchContainer.classList.add(_$_315c[443]);this.searchContainer.appendChild(k(this));this.searchContainer.appendChild(d(this));0==this.options.search&&(this.searchContainer.style.display=
|
|
374
|
+
_$_315c[52]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return a}(),Ta=function(){var k=function(d){d.contextmenu=document.createElement(_$_315c[32]);d.contextmenu.className=_$_315c[444];jSuites.contextmenu(d.contextmenu,{onclick:function(b,a,c){b.close()}});return d.contextmenu};k.open=function(d,b){if(b[0]===_$_315c[445])var a=b[1],c=b[2];else b[0]===_$_315c[446]?(a=null,c=b[1]):b[0]===_$_315c[447]&&(a=b[1],c=null);var e=k[_$_315c[58]](this,a,c,d,b[0],b[1],b[2]);if(typeof this.parent.config.contextMenu==
|
|
375
|
+
_$_315c[105]){var f=this.parent.config.contextMenu(this,a,c,d,e,b[0],b[1],b[2]);if(f)e=f;else if(!1===f)return!1}d.preventDefault();f=va.execute.call(this.parent,_$_315c[106],[this,a,c,d,e,b[0],b[1],b[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(d,e)};k.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};k[_$_315c[58]]=function(d,b,a,c,e,f,g){var h=[],n=d.parent.config,l=-1!=navigator.userAgent.indexOf(_$_315c[448])?_$_315c[449]:_$_315c[450];e==_$_315c[451]&&(1==n.allowRenameWorksheet&&
|
|
376
|
+
h.push({title:F(_$_315c[452]),onclick:function(){var q=prompt(F(_$_315c[452]),c.target.innerText);q&&d.parent.renameWorksheet(f,q)}}),1==n.allowDeleteWorksheet&&h.push({title:F(_$_315c[453]),onclick:function(){confirm(F(_$_315c[454]),c.target.innerText)&&d.parent.deleteWorksheet(f)}}),h.push({type:_$_315c[455]}));e==_$_315c[456]&&(h.push({title:F(_$_315c[457]),onclick:function(){var q=prompt(F(_$_315c[457]),c.target.innerText);d.setNestedCell(f,g,{title:q})}}),h.push({type:_$_315c[455]}));if(e==_$_315c[447]||
|
|
377
|
+
e==_$_315c[446]||e==_$_315c[445]||e==_$_315c[456])h.push({title:F(_$_315c[458]),icon:_$_315c[459],shortcut:l+_$_315c[460],onclick:function(){d.cut()}}),h.push({title:F(_$_315c[461]),icon:_$_315c[462],shortcut:l+_$_315c[463],onclick:function(){d.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:F(_$_315c[464]),icon:_$_315c[465],shortcut:l+_$_315c[466],onclick:function(){d.selectedCell&&navigator.clipboard.readText().then(function(q){q&&d.paste(d.selectedCell[0],
|
|
378
|
+
d.selectedCell[1],q)})}}),h.push({type:_$_315c[455]});e==_$_315c[447]&&(1==d.options.allowInsertColumn&&h.push({title:F(_$_315c[467]),onclick:function(){d.insertColumn(1,parseInt(f),1)}}),1==d.options.allowInsertColumn&&h.push({title:F(_$_315c[468]),onclick:function(){d.insertColumn(1,parseInt(f),0)}}),1==d.options.allowDeleteColumn&&h.push({title:F(_$_315c[469]),onclick:function(){d.deleteColumn(d.getSelectedColumns().length?void 0:parseInt(b))}}),1==d.options.allowRenameColumn&&h.push({title:F(_$_315c[470]),
|
|
379
|
+
onclick:function(){d.setHeader(f)}}),d.options.data.length||(h.push({type:_$_315c[455]}),h.push({title:F(_$_315c[471]),onclick:function(){d.insertRow(0)}})),1==d.options.columnSorting&&(h.push({type:_$_315c[455]}),h.push({title:F(_$_315c[472]),onclick:function(){d.orderBy(f,0)}}),h.push({title:F(_$_315c[473]),onclick:function(){d.orderBy(f,1)}}),h.push({type:_$_315c[455]})));if(e==_$_315c[445]||e==_$_315c[446])1==d.options.allowInsertRow&&(h.push({title:F(_$_315c[474]),onclick:function(){d.insertRow(1,
|
|
380
|
+
parseInt(a),1)}}),h.push({title:F(_$_315c[475]),onclick:function(){d.insertRow(1,parseInt(a))}})),1==d.options.allowDeleteRow&&h.push({title:F(_$_315c[476]),onclick:function(){d.deleteRow(d.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_315c[455]});if(e==_$_315c[445]&&1==d.options.allowComments){var p=d.records[g][f].element.getAttribute(_$_315c[299])||_$_315c[3];h.push({title:p?F(_$_315c[477]):F(_$_315c[478]),icon:_$_315c[479],onclick:function(){var q=G.getColumnNameFromCoords(f,
|
|
381
|
+
g),r=prompt(F(_$_315c[480]),p);r&&d.setComments(q,r)}});p&&h.push({title:F(_$_315c[481]),onclick:function(){var q=G.getColumnNameFromCoords(f,g);d.setComments(q,_$_315c[3])}});h.push({type:_$_315c[455]})}n.allowExport&&h.push({title:F(_$_315c[482]),icon:_$_315c[483],shortcut:l+_$_315c[484],onclick:function(){d.download()}});n.about&&h.push({title:F(_$_315c[485]),icon:_$_315c[486],onclick:function(){!0===n.about?alert(M().print()):alert(n.about)}});return h};return k}(),ma=function(){var k=function(d){d.showToolbar=
|
|
382
|
+
function(){k.show.call(d.parent)};d.hideToolbar=function(){k.hide.call(d.parent)};d.refreshToolbar=function(){k.update.call(d.parent,d,d.selectedCell)}};k[_$_315c[11]]=function(d){this.toolbar.innerHTML=_$_315c[3];this.config.toolbar=k[_$_315c[58]].call(this,d);k.show.call(this)};k[_$_315c[58]]=function(d){d||(d=this.config.toolbar);var b=k.getDefault(d);d?Array.isArray(d)?d={items:d}:typeof d===_$_315c[105]&&(d=d({items:b})):d={};typeof d!==_$_315c[104]&&(d={});d.items||(d.items=b);typeof d.responsive==
|
|
383
|
+
_$_315c[21]&&(d.responsive=!0,d.bottom=!1,d.maxWidth=this.element.offsetWidth);return d};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$_315c[3];this.element.classList.add(_$_315c[487])};k.hide=function(){this.toolbar.style.display=_$_315c[52];this.element.classList.remove(_$_315c[487])};k.update=function(d,b){var a=this.toolbarInstance;a&&(a.options.responsive&&(b=this.config.fullscreen?d.element.offsetWidth:d.options.tableWidth?parseInt(d.options.tableWidth):
|
|
384
|
+
null,a.options.maxWidth=b,a.refresh()),a.update(d))};k.build=function(){for(var d=k[_$_315c[58]].call(this),b=0;b<d.items.length;b++)if(d.items[b].type==_$_315c[434]){if(!d.items[b].options&&d.items[b].v){d.items[b].options=[];for(var a=0;a<d.items[b].v.length;a++)d.items[b].options.push(d.items[b].v[a]);d.items[b].k&&(d.items[b].onchange=function(c,e,f,g){v.current.setStyle(v.current.getSelected(!1,!0),f.k,g)})}}else d.items[b].type==_$_315c[290]?(d.items[b].type=_$_315c[488],d.items[b].onclick=
|
|
385
|
+
function(c,e,f){if(!f.color){var g=null;jSuites.color(f,{onchange:function(h,n){(g=v.current.getSelected(!1,!0))&&v.current.setStyle(g,f.k,n)},onopen:function(h){var n;v.current.cursor?(n=v.current.cursor.style[f.k])?h.color.select(h.color.toHex(n)):h.color.select(_$_315c[3]):h.color.select(_$_315c[3])}});f.color.open()}}):!d.items[b].onclick&&d.items[b].k&&(d.items[b].onclick=function(){var c=v.current.getSelected(!1,!0);c&&c.length&&v.current.setStyle(c,this.k,this.v)});(b=va.execute.call(this,
|
|
386
|
+
_$_315c[107],[d]))&&(d=b[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,d);this.toolbarInstance.application=this;d=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[d])};k.item=function(d){this.isEditable()?d.classList.remove(_$_315c[489]):d.classList.add(_$_315c[489])};k.getDefault=function(d){var b=[];b.push({content:_$_315c[490],onclick:function(){v.current&&v.current.undo()}});b.push({content:_$_315c[491],onclick:function(){v.current&&v.current.redo()}});b.push({content:_$_315c[483],
|
|
387
|
+
onclick:function(){v.current&&v.current.download()}});b.push({type:_$_315c[492]});b.push({type:_$_315c[434],width:_$_315c[493],options:[_$_315c[494],_$_315c[495],_$_315c[496]],render:function(c){return _$_315c[497]+c+_$_315c[260]+c+_$_315c[498]},onchange:function(c,e,f,g){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_315c[499],g)},updateState:function(c,e,f,g){k.item.call(g,f)}});b.push({type:_$_315c[434],width:_$_315c[500],content:_$_315c[501],options:[_$_315c[502],_$_315c[503],_$_315c[504],
|
|
388
|
+
_$_315c[505],_$_315c[506]],render:function(c){return _$_315c[507]+c+_$_315c[260]+c+_$_315c[498]},onchange:function(c,e,f,g){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_315c[508],g)},updateState:function(c,e,f,g){k.item.call(g,f)}});b.push({type:_$_315c[434],options:[_$_315c[509],_$_315c[510],_$_315c[511],_$_315c[512]],render:function(c){return _$_315c[513]+c+_$_315c[514]},onchange:function(c,e,f,g){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_315c[515],g.split(_$_315c[516])[2])},
|
|
389
|
+
updateState:function(c,e,f,g){(c=g.selectedCell)&&c.length&&g.records[c[1]][c[0]].element&&(c=this.picker.options.data.indexOf(_$_315c[517]+(g.records[c[1]][c[0]].element.style.textAlign||g.options.defaultColAlign||_$_315c[212])),f.picker.setValue(c));k.item.call(g,f)}});b.push({type:_$_315c[488],content:_$_315c[518],k:_$_315c[519],v:_$_315c[520],updateState:function(c,e,f,g){k.item.call(g,f)}});b.push({type:_$_315c[290],content:_$_315c[521],k:_$_315c[290],updateState:function(c,e,f,g){k.item.call(g,
|
|
390
|
+
f)}});b.push({type:_$_315c[290],content:_$_315c[522],k:_$_315c[523],updateState:function(c,e,f,g){k.item.call(g,f)}});if(d===_$_315c[524]||typeof d===_$_315c[105]){var a=[_$_315c[525],_$_315c[526],_$_315c[400]];b.push({type:_$_315c[434],options:[_$_315c[527],_$_315c[528],_$_315c[529]],render:function(c){return _$_315c[513]+c+_$_315c[514]},value:1,onchange:function(c,e,f,g,h){v.current&&v.current.setStyle(v.current.getSelected(!1,!0),_$_315c[530],a[h])},updateState:function(c,e,f,g){(c=g.selectedCell)&&
|
|
391
|
+
c.length&&g.records[c[1]][c[0]].element&&(c=a.indexOf(g.records[c[1]][c[0]].element.style.verticalAlign||_$_315c[526]),f.picker.setValue(c));k.item.call(g,f)}});b.push({content:_$_315c[531],onclick:function(c,e,f){v.current&&(c=v.current.getHighlighted())&&c.length&&(e=v.helpers.getColumnNameFromCoords(c[0],c[1]),v.current.records[c[1]][c[0]].merged?v.current.removeMerge(e):v.current.setMerge(e,c[2]-c[0]+1,c[3]-c[1]+1))},tooltip:F(_$_315c[532]),updateState:function(c,e,f,g){k.item.call(g,f)}})}b.push({type:_$_315c[434],
|
|
392
|
+
data:[_$_315c[533],_$_315c[534],_$_315c[535],_$_315c[536],_$_315c[537],_$_315c[538],_$_315c[539],_$_315c[540],_$_315c[541],_$_315c[542]],columns:5,render:function(c){return _$_315c[513]+c+_$_315c[514]},right:!0,onchange:function(c,e,f,g,h){if(c=v.current.getHighlighted()){f=e.thickness||1;e=e.color||_$_315c[543];h={};for(var n=c[0],l=c[1],p=c[2],q=c[3],r=c[1];r<=c[3];r++)for(var w=c[0];w<=c[2];w++){var x=G.getColumnNameFromCoords(w,r);h[x]||(h[x]=_$_315c[3]);h[x]=g!=_$_315c[538]&&g!=_$_315c[534]||
|
|
393
|
+
w!=n?(g==_$_315c[535]||g==_$_315c[537])&&w>n?h[x]+(_$_315c[544]+f+_$_315c[545]+e+_$_315c[334]):g==_$_315c[533]?h[x]+(_$_315c[544]+f+_$_315c[545]+e+_$_315c[334]):h[x]+_$_315c[546]:h[x]+(_$_315c[544]+f+_$_315c[545]+e+_$_315c[334]);h[x]=g!=_$_315c[533]&&g!=_$_315c[540]&&g!=_$_315c[534]||w!=p?h[x]+_$_315c[548]:h[x]+(_$_315c[547]+f+_$_315c[545]+e+_$_315c[334]);h[x]=g!=_$_315c[539]&&g!=_$_315c[534]||r!=l?(g==_$_315c[535]||g==_$_315c[536])&&r>l?h[x]+(_$_315c[549]+f+_$_315c[545]+e+_$_315c[334]):g==_$_315c[533]?
|
|
394
|
+
h[x]+(_$_315c[549]+f+_$_315c[545]+e+_$_315c[334]):h[x]+_$_315c[550]:h[x]+(_$_315c[549]+f+_$_315c[545]+e+_$_315c[334]);h[x]=g!=_$_315c[533]&&g!=_$_315c[541]&&g!=_$_315c[534]||r!=q?h[x]+_$_315c[552]:h[x]+(_$_315c[551]+f+_$_315c[545]+e+_$_315c[334])}Object.keys(h)&&v.current.setStyle(h,null,null,!0)}},onload:function(c,e){var f=document.createElement(_$_315c[32]),g=document.createElement(_$_315c[32]);f.appendChild(g);var h=jSuites.color(g,{closeOnChange:!1,onchange:function(n,l){n.parentNode.children[1].style.color=
|
|
395
|
+
l;e.color=l}});g=document.createElement(_$_315c[488]);g.classList.add(_$_315c[553]);g.innerHTML=_$_315c[554];g.onclick=function(){h.open()};f.appendChild(g);c.children[1].appendChild(f);g=document.createElement(_$_315c[32]);jSuites.picker(g,{type:_$_315c[434],data:[1,2,3,4,5],render:function(n){return _$_315c[555]+n+_$_315c[556]},onchange:function(n,l,p,q){e.thickness=q},width:_$_315c[557]});c.children[1].appendChild(g);g=document.createElement(_$_315c[32]);g.style.flex=_$_315c[558];c.children[1].appendChild(g)},
|
|
396
|
+
updateState:function(c,e,f,g){k.item.call(g,f)}});b.push({type:_$_315c[492]});b.push({content:_$_315c[23],onclick:function(c,e,f){f.children[0].innerText==_$_315c[23]?(v.current.fullscreen(!0),f.children[0].innerText=_$_315c[559]):(v.current.fullscreen(!1),f.children[0].innerText=_$_315c[23])},tooltip:_$_315c[560],updateState:function(c,e,f,g){f.children[0].innerText=1==g.parent.config.fullscreen?_$_315c[559]:_$_315c[23]}});b.push({content:_$_315c[561],onclick:function(c,e,f){v.current&&v.current.parent.tools.search?
|
|
397
|
+
v.current.parent.tools.search.open(!0):f.children[0].innerText==_$_315c[561]?(wa.show.call(v.current),f.children[0].innerText=_$_315c[562]):(wa.hide.call(v.current),f.children[0].innerText=_$_315c[561])},tooltip:_$_315c[563],updateState:function(c,e,f,g){f.children[0].innerText=1==g.options.search?_$_315c[562]:_$_315c[561]}});return b};return k}(),pa=function(){var k=function(d){d.createWorksheet=function(b){return d.parent.createWorksheet(b)};d.deleteWorksheet=function(b){return d.parent.deleteWorksheet(b)};
|
|
398
|
+
d.renameWorksheet=function(b,a){return d.parent.renameWorksheet(b,a)};d.moveWorksheet=function(b,a){return d.parent.moveWorksheet(b,a)};d.openWorksheet=function(){return d.parent.openWorksheet(d.parent.getWorksheet(d))};d.getWorksheet=function(b){return d.parent.getWorksheet(b)};d.getWorksheetActive=function(){return d.parent.getWorksheetActive()};d.getWorksheetName=function(){return d.options.worksheetName.toUpperCase()}};k.nextName=function(){var d=1,b,a=v.spreadsheet;if(a.length)for(var c=0;c<
|
|
399
|
+
a.length;c++){var e=a[c].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&(b=e[f].options.worksheetName.match(/(\d+)/))&&(b=parseInt(b[0])+1,b>d&&(d=b))}return d};k.createWorksheet=function(d){if(!R.call(this))return!1;d||(d={});var b=this.worksheets.length,a=H.call(this,_$_315c[564],d,b);if(typeof a===_$_315c[104])d=a;else if(!1===a)return!1;d.data||d.minDimensions||(d.minDimensions=[8,8]);d.worksheetId||(d.worksheetId=jSuites.guid().substring(0,8));d.worksheetName||
|
|
400
|
+
(d.worksheetName=_$_315c[402]+k.nextName());if(J(d.worksheetName))jSuites.notification({error:_$_315c[558],message:_$_315c[565]});else return a=ta.worksheet(this,d),a.onload(),v.current&&v.current.resetSelection(),v.current=a,L.call(a,_$_315c[566],[d]),ma.update.call(this,v.current),H.call(this,_$_315c[567],a,d,b),a};k.deleteWorksheet=function(d){var b=this.worksheets[d];if(!R.call(this,b))return!1;J(b.options.worksheetName,null);this.element.tabs.deleteElement(d);this.worksheets.splice(d,1);L.call(b,
|
|
401
|
+
_$_315c[568],[d]);H.call(this,_$_315c[569],b,d)};k.renameWorksheet=function(d,b){var a=this.worksheets[d];if(!R.call(this,a))return!1;var c=a.options.worksheetName;if(c.toLowerCase()==b.toLowerCase())return!1;b=b.replace(/[^0-9A-Za-z_\s^]+/gi,_$_315c[3]);Number(b)==b&&(b=_$_315c[402]+Number(b));J(b)?alert(_$_315c[570]):(J(c,null),this.element.tabs.rename(d,b),a.options.worksheetName=b,J(b,a),T.call(this,{worksheet:a,action:_$_315c[99],index:d,oldValue:c,newValue:b}),L.call(a,_$_315c[99],{worksheet:d,
|
|
402
|
+
newValue:b}),Ja.updateWorksheetName.call(a,c,b),Y.updateWorksheetNames.call(a,c,b),H.call(this,_$_315c[571],a,d,b,c))};k.updateWorksheet=function(d,b){var a=this.worksheets;if(!R.call(this))return!1;this.worksheets.splice(b,0,a.splice(d,1)[0]);T.call(this,{worksheet:a[b],action:_$_315c[100],f:d,t:b});L.call(a[b],_$_315c[100],{f:d,t:b});H.call(this,_$_315c[572],a[b],d,b)};k.moveWorksheet=function(d,b){this.element.tabs.move(d,b)};k.openWorksheet=function(d){var b=this.worksheets[d];!b||v.current&&
|
|
403
|
+
v.current==b||(this.element.tabs.getActive()!=d?this.element.tabs.open(d):this.element.tabs.setBorder(d),v.current&&v.current.resetSelection(),v.current=b,I.update.call(b),k.state.call(this,d),ma.update.call(this,v.current),H.call(this,_$_315c[573],b,d))};k.getWorksheet=function(d){if(d&&typeof d==_$_315c[104]){if(d=this.worksheets.indexOf(d),0<=d)return d}else for(var b=0;b<this.worksheets.length;b++)if(d===this.worksheets[b].options.worksheetId)return b;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};
|
|
404
|
+
k.getWorksheetInstance=function(d){return d===_$_315c[3]||typeof d==_$_315c[25]?(d=k.getWorksheet.call(this,d),!1===d?!1:this.worksheets[d]):this.worksheets[d]};k.state=function(d){try{if(typeof localStorage!==_$_315c[21]){var b=this.config.cloud?this.config.cloud:this.element.id;if(b)if(typeof d!==_$_315c[21])localStorage.setItem(_$_315c[379]+b,d);else{var a=parseInt(localStorage.getItem(_$_315c[379]+b));k.openWorksheet.call(this,a)}}}catch(c){}};return k}(),G=function(){var k={getCaretIndex:function(d){var b=
|
|
405
|
+
0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(b=a.getRangeAt(0),a=b.cloneRange(),a.selectNodeContents(d),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(d){for(var b=[],a=Object.keys(d),c=0;c<a.length;c++)b[d[a[c]]]=a[c];return b},getColumnName:function(d){var b=_$_315c[3];701<d?(b+=String.fromCharCode(64+parseInt(d/676)),b+=String.fromCharCode(64+parseInt(d%676/26))):25<d&&(b+=String.fromCharCode(64+parseInt(d/26)));return b+=
|
|
406
|
+
String.fromCharCode(65+d%26)},getColumnNameFromCoords:function(d,b){return k.getColumnName(parseInt(d))+(parseInt(b)+1)},getCoordsFromColumnName:function(d){if(!d)return[];d=(_$_315c[3]+d).replace(new RegExp(/\$/),_$_315c[3]);var b=/^[a-zA-Z]+/.exec(d);if(b){for(var a=0,c=0;c<b[0].length;c++)a+=parseInt(b[0].charCodeAt(c)-64)*Math.pow(26,b[0].length-1-c);a--;0>a&&(a=0);d=parseInt(/[0-9]+$/.exec(d))||null;0<d&&d--;return[a,d]}}};k.shiftFormula=Y.shiftFormula;k.updateWorksheetName=Y.updateWorksheetName;
|
|
407
|
+
k.createFromTable=function(d,b){if(d.tagName!=_$_315c[574])console.log(_$_315c[575]);else{b||(b={});b.columns=[];b.data=[];var a=d.querySelectorAll(_$_315c[576]);if(a.length)for(var c=0;c<a.length;c++){var e=a[c].style.width;e||(e=a[c].getAttribute(_$_315c[180]));e&&(b.columns[c]||(b.columns[c]={}),b.columns[c].width=e)}e=function(A){var y=A.getBoundingClientRect();y=50<y.width?y.width:50;b.columns[c]||(b.columns[c]={});A.getAttribute(_$_315c[577])?b.columns[c].type=A.getAttribute(_$_315c[577]):b.columns[c].type=
|
|
408
|
+
_$_315c[72];b.columns[c].width=y+_$_315c[59];b.columns[c].title=A.innerHTML;A.style.textAlign&&(b.columns[c].align=A.style.textAlign);A.classList.contains(_$_315c[578])&&(b.columns[c].readOnly=!0);if(y=A.getAttribute(_$_315c[579]))b.columns[c].name=y;if(y=A.getAttribute(_$_315c[580]))b.columns[c].id=y};var f=[],g=d.querySelectorAll(_$_315c[581]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(c=0;c<g[a].children.length;c++){var n={title:g[a].children[c].innerText,colspan:g[a].children[c].getAttribute(_$_315c[192])||
|
|
409
|
+
1};h.push(n)}f.push(h)}g=g[g.length-1].children;for(c=0;c<g.length;c++)e(g[c])}n=0;var l={},p={},q={},r={},w=null;h=d.querySelectorAll(_$_315c[582]);for(a=0;a<h.length;a++)if(b.data[n]=[],1!=b.parseTableFirstRowAsHeader||g.length||0!=a){for(c=0;c<h[a].children.length;c++){var x=h[a].children[c].getAttribute(_$_315c[583]);x?x.substr(0,1)!=_$_315c[18]&&(x=_$_315c[18]+x):x=h[a].children[c].innerHTML;b.data[n].push(x);x=G.getColumnNameFromCoords(c,a);(w=h[a].children[c].getAttribute(_$_315c[584]))&&(r[x]=
|
|
410
|
+
w);w=parseInt(h[a].children[c].getAttribute(_$_315c[192]))||0;var z=parseInt(h[a].children[c].getAttribute(_$_315c[193]))||0;if(w||z)l[x]=[w||1,z||1];if(w=h[a].children[c].style&&h[a].children[c].style.display==_$_315c[52])h[a].children[c].style.display=_$_315c[3];(w=h[a].children[c].getAttribute(_$_315c[122]))&&(q[x]=w);h[a].children[c].classList.contains(_$_315c[585])&&(q[x]=q[x]?q[x]+_$_315c[586]:_$_315c[587])}h[a].style&&h[a].style.height&&(p[a]={height:h[a].style.height});n++}else for(c=0;c<
|
|
411
|
+
h[a].children.length;c++)e(h[a].children[c]);0<Object.keys(f).length&&(b.nestedHeaders=f);0<Object.keys(q).length&&(b.style=q);0<Object.keys(l).length&&(b.mergeCells=l);0<Object.keys(p).length&&(b.rows=p);0<Object.keys(r).length&&(b.classes=r);h=d.querySelectorAll(_$_315c[588]);if(h.length){d=[];for(a=0;a<h.length;a++){e=[];for(c=0;c<h[a].children.length;c++)e.push(h[a].children[c].innerText);d.push(e)}0<Object.keys(d).length&&(b.footers=d)}if(1==b.parseTableAutoCellType)for(d=[],c=0;c<b.columns.length;c++){f=
|
|
412
|
+
e=!0;d[c]=[];for(a=0;a<b.data.length;a++)if(x=b.data[a][c],d[c][x]||(d[c][x]=0),d[c][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$_315c[239]||x.substr(7,1)!=_$_315c[239])f=!1}else f=!1;a=Object.keys(d[c]).length;f?b.columns[c].type=_$_315c[216]:1==e&&1<a&&a<=parseInt(.1*b.data.length)&&(b.columns[c].type=_$_315c[74],b.columns[c].source=Object.keys(d[c]))}return b}};k.injectArray=function(d,b,a){return d.slice(0,b).concat(a).concat(d.slice(b))};k.parseCSV=function(d,b){b=b||_$_315c[37];
|
|
413
|
+
for(var a=0,c=0,e=[[]],f=0,g=null,h=!1,n=!1,l=0;l<d.length;l++)if(e[c]||(e[c]=[]),e[c][a]||(e[c][a]=_$_315c[3]),d[l]!=_$_315c[589])if(d[l]!=_$_315c[590]&&d[l]!=b||0!=h&&1!=n&&g){d[l]==_$_315c[20]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!n&&d[l]==_$_315c[20]){d[l+1]==_$_315c[20]?(h=!0,e[c][a]+=d[l],l++):n=!0;continue}e[c][a]+=d[l]}else{g=null;n=h=!1;if(e[c][a][0]==_$_315c[20]){var p=e[c][a].trim();p[p.length-1]==_$_315c[20]&&(e[c][a]=p.substr(1,p.length-2))}d[l]==_$_315c[590]?(a=
|
|
414
|
+
0,c++):(a++,a>f&&(f=a))}for(d=0;d<e.length;d++)for(l=0;l<=f;l++)void 0===e[d][l]&&(e[d][l]=_$_315c[3]);return e};k.getTokensFromRange=Y.getTokensFromRange;k.getRangeFromTokens=Y.getRangeFromTokens;k.getCoordsFromRange=function(d){-1!==d.indexOf(_$_315c[19])&&(d=d.split(_$_315c[19]),d=d[1]);d=d.split(_$_315c[159]);d[1]||(d[1]=d[0]);var b=G.getCoordsFromColumnName(d[0]);d=G.getCoordsFromColumnName(d[1]);return[b[0],b[1],d[0],d[1]]};return k}(),Fa=function(){var k={},d=null,b=null,a=null,c=null,e=!1,
|
|
415
|
+
f=null,g=null,h=null,n=function(u){function B(P){P.className&&(P.classList.contains(_$_315c[393])&&(K=P),P.classList.contains(_$_315c[405])&&(N=P),P.classList.contains(_$_315c[591])&&(V=P));P.parentNode&&P.parentNode.classList&&P.parentNode.classList.contains(_$_315c[374])&&(P.tagName==_$_315c[592]?C=1:P.tagName==_$_315c[593]?C=2:P.tagName==_$_315c[594]&&(C=3));P.parentNode&&!K&&B(P.parentNode)}var C=null,E=null,K=null,N=null,V=null,O=null,U=null,aa=null;B(u.target);if(null!==V)return!1;if(K)if(u.target.classList.contains(_$_315c[372]))E=
|
|
416
|
+
_$_315c[595];else if(u.target.classList.contains(_$_315c[382]))E=_$_315c[161];else if(u.target.classList.contains(_$_315c[305]))E=_$_315c[446],O=parseInt(u.target.getAttribute(_$_315c[57]));else if(u.target.parentNode&&u.target.parentNode.classList&&u.target.parentNode.classList.contains(_$_315c[208]))O=u.target.getAttribute(_$_315c[213]),U=u.target.getAttribute(_$_315c[214]),null===O?E=_$_315c[595]:(E=_$_315c[456],O=parseInt(O),U=parseInt(U));else if(u.target.parentNode&&u.target.parentNode.classList&&
|
|
417
|
+
u.target.parentNode.classList.contains(_$_315c[174]))E=_$_315c[596];else if(u.target.classList.contains(_$_315c[178]))E=_$_315c[596];else if(u.target.parentNode&&u.target.parentNode.classList&&u.target.parentNode.classList.contains(_$_315c[597]))E=_$_315c[451],O=Array.prototype.indexOf.call(u.target.parentNode.children,u.target);else if(1==C)E=_$_315c[447],O=u.target.clientWidth-u.offsetX,u.target.classList.contains(_$_315c[200])&&3<O&&20>O&&(E=_$_315c[598]),O=u.target.getAttribute(_$_315c[56]);else if(2==
|
|
418
|
+
C){if(u=l(u,K))E=_$_315c[445],O=u[0],U=u[1],aa=u[2]}else if(3==C){if(O=u.target.getAttribute(_$_315c[56]),U=u.target.getAttribute(_$_315c[57]),O||U)E=_$_315c[599]}else C||jSuites.findElement(u.target,_$_315c[600])&&(E=_$_315c[107]);return[K,N,C,E,O,U,aa]},l=function(u,B){if(u.changedTouches&&u.changedTouches[0]){var C=u.changedTouches[0].clientX;u=u.changedTouches[0].clientY}else C=u.clientX,u=u.clientY;B=B.spreadsheet.config.root?B.spreadsheet.config.root:document;if(B.elementsFromPoint)var E=B.elementsFromPoint(C,
|
|
419
|
+
u);else B.msElementsFromPoint&&(E=B.msElementsFromPoint(C,u));for(B=0;B<E.length;B++)if(C=E[B].getAttribute(_$_315c[56]),u=E[B].getAttribute(_$_315c[57]),null!=C&&null!=u)return C=parseInt(C),u=parseInt(u),[C,u,E[B]];return!1},p=function(u){var B=n(u);if(!1===B)return!1;B[0]?B[1]?v.current&&document.activeElement.classList.contains(_$_315c[116])?document.activeElement.worksheet||(document.activeElement.worksheet=B[1].jexcel):v.current!=B[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=
|
|
420
|
+
B[1].jexcel):v.current||(u=B[0].tabs.getActive(),0<=u&&(v.current=B[0].spreadsheet.worksheets[u])):v.current&&!jSuites.findElement(u.target,_$_315c[254])&&(v.current.resetSelection(!0),v.current=null);return B};k.input=function(u){if(u.target.tagName==_$_315c[601]&&u.target.classList.contains(_$_315c[116])){var B=null;u.target.worksheet?B=u.target.worksheet:v.current&&(B=v.current);B&&ra.parse.call(B,u.target)}};k.keydown=function(u){if(v.current){u.target.tagName==_$_315c[601]&&u.target.classList.contains(_$_315c[116])&&
|
|
421
|
+
ra.onkeydown.call(v.current,u);if(27==u.which){if(v.current.edition){v.current.closeEditor(v.current.edition,!1);u.preventDefault();return}if(xa.event){xa.cancel.call(v.current,u);u.preventDefault();return}if(ea.event){ea.cancel.call(v.current,u);return}if(1==la.isVisible()){la.close.call(v.current,!1);u.preventDefault();return}}if(u.target.classList.contains(_$_315c[425])){var B=u.target;f&&clearTimeout(f);f=setTimeout(function(){la.search.call(v.current,B.value);f=null},500)}else if(u.target.classList.contains(_$_315c[439]))B=
|
|
422
|
+
u.target,f&&clearTimeout(f),f=setTimeout(function(){v.current.search(B.value);f=null},400);else if(!u.target.classList.contains(_$_315c[254]))if(v.current.edition){var C=v.current.edition.getAttribute(_$_315c[56]);13==u.which?v.current.options.columns[C].type==_$_315c[216]?v.current.closeEditor(v.current.edition,!0):v.current.options.columns[C].type!=_$_315c[74]&&v.current.options.columns[C].type!=_$_315c[602]&&v.current.options.columns[C].type!=_$_315c[479]&&(u.altKey?v.current.parent.input.classList.contains(_$_315c[603])||
|
|
423
|
+
document.execCommand(_$_315c[604],!1,_$_315c[605]):(v.current.closeEditor(v.current.edition,!0),v.current.parent.config.moveDownOnEnter&&v.current.down(),u.preventDefault())):9==u.which?(v.current.closeEditor(v.current.edition,!0),v.current.right(),u.preventDefault()):39!=u.which&&37!=u.which&&38!=u.which&&40!=u.which||v.current.parent.input.selected||(v.current.closeEditor(v.current.edition,!0),37==u.which?v.current.left(u.shiftKey,u.ctrlKey):39==u.which?v.current.right(u.shiftKey,u.ctrlKey):38==
|
|
424
|
+
u.which?v.current.up(u.shiftKey,u.ctrlKey):40==u.which&&v.current.down(u.shiftKey,u.ctrlKey),u.preventDefault())}else{if((u.ctrlKey||u.metaKey)&&!u.shiftKey){if(65==u.which){v.current.selectAll();u.preventDefault();return}if(83==u.which){v.current.download();u.preventDefault();return}if(89==u.which){v.current.parent.redo();u.preventDefault();return}if(90==u.which){v.current.parent.undo();u.preventDefault();return}if(70==u.which&&v.current.parent.tools.search){v.current.parent.tools.search.open(!0);
|
|
425
|
+
u.preventDefault();return}}if(v.current.selectedCell)if(33==u.which)0<v.current.options.pagination?Da.pageUp.call(v.current):u.altKey?I.pageLeft.call(v.current):I.pageUp.call(v.current);else if(34==u.which)0<v.current.options.pagination?Da.pageDown.call(v.current):u.altKey?I.pageRight.call(v.current):I.pageDown.call(v.current);else if(37==u.which)v.current.left(u.shiftKey,u.ctrlKey),u.preventDefault();else if(39==u.which)v.current.right(u.shiftKey,u.ctrlKey),u.preventDefault();else if(38==u.which)v.current.up(u.shiftKey,
|
|
426
|
+
u.ctrlKey),u.preventDefault();else if(40==u.which)v.current.down(u.shiftKey,u.ctrlKey),u.preventDefault();else if(36==u.which)v.current.first(u.shiftKey,u.ctrlKey),u.preventDefault();else if(35==u.which)v.current.last(u.shiftKey,u.ctrlKey),u.preventDefault();else if(32==u.which)v.current.setCheckRadioValue(),u.preventDefault();else if(46==u.which||8==u.which)v.current.isEditable()&&v.current.setValue(v.current.getSelected(!1,!0),_$_315c[3]);else if(13==u.which)u.shiftKey?v.current.up():(1==v.current.options.allowManualInsertRow&&
|
|
427
|
+
v.current.selectedCell[1]==(v.current.results?v.current.results[v.current.results.length-1]:v.current.rows.length-1)&&v.current.insertRow(null,null,null,null,u),v.current.selectedCell&&v.current.down()),u.preventDefault();else if(9==u.which)u.shiftKey?v.current.left():(C=v.current.selectedCell[0],v.current.right(),1==v.current.options.allowInsertColumn&&1==v.current.options.allowManualInsertColumn&&v.current.selectedCell[0]==C&&(v.current.insertColumn(null,null,null,null,null,null,u),v.current.right())),
|
|
428
|
+
u.preventDefault();else if((u.ctrlKey||u.metaKey)&&!u.shiftKey)67==u.which?(v.current.copy(),u.preventDefault()):88==u.which?(v.current.cut(),u.preventDefault()):86==u.which?u.target.classList.contains(_$_315c[254])||k.paste(u):189==u.which&&(1==v.current.options.allowDeleteRow&&h[3]==_$_315c[446]?(ka.isValid.call(v.current,v.current.selectedCell)&&v.current.deleteRow(),u.preventDefault()):1==v.current.options.allowDeleteColumn&&h[3]==_$_315c[447]&&(ka.isValid.call(v.current,v.current.selectedCell)&&
|
|
429
|
+
v.current.deleteColumn(),u.preventDefault()));else if(v.current.isEditable()){C=v.current.selectedCell[1];var E=v.current.selectedCell[0];v.current.options.columns[E].type!=_$_315c[26]&&(32==u.keyCode?v.current.options.columns[E].type==_$_315c[285]||v.current.options.columns[E].type==_$_315c[287]?u.preventDefault():v.current.openEditor(v.current.records[C][E].element,!0,u):113==u.keyCode?v.current.openEditor(v.current.records[C][E].element,!1,u):1!=u.key.length&&u.key!=_$_315c[606]||u.altKey||u.ctrlKey||
|
|
430
|
+
v.current.records[C]&&v.current.openEditor(v.current.records[C][E].element,!0,u))}}}};var q=[0,0],r=function(u){e&&I.limited.call(v.current)&&(g&&(clearTimeout(g),g=null),g=setTimeout(function(){if(e){var B=q[0],C=q[1],E=v.current.content.getBoundingClientRect();50>E.height-(C-E.top)?I.down.call(v.current):80>C-E.top&&I.up.call(v.current);50>E.width-(B-E.left)?I.right.call(v.current):80>B-E.left&&I.left.call(v.current);r(u)}g=null},100))},w=function(u,B,C,E,K,N,V){if(document.activeElement.classList.contains(_$_315c[116])&&
|
|
431
|
+
ra.update.call(v.current,u,B,C,E,K,document.activeElement,V))return!1;if(v.current.edition)v.current.closeEditor(v.current.edition,!0);else if(c&&c!==N)return!1;v.current!==V&&(v.current.resetSelection(),v.current=V);ra.current?ra.range.call(v.current,u,B,C,E,K):ka[_$_315c[11]].call(v.current,u,B,C,E,K)};k.mousedown=function(u){u=u||window.event;var B=u.buttons?u.buttons:u.button?u.button:u.which;if(v.current)if(1==la.isVisible()&&(jSuites.findElement(u.target,_$_315c[429])||la.close.call(v.current,
|
|
432
|
+
!1)),v.current.edition){if(jSuites.findElement(u.target,_$_315c[123]))return!1}else if(jSuites.findElement(u.target,_$_315c[254]))return!1;var C=p(u);if(!1===C)return!1;h=C;if(1<B)if(C[3]==_$_315c[445]){if(v.current.isSelected(C[4],C[5]))return!1}else if(C[3]==_$_315c[446]){if(v.current.isSelected(0,C[4]))return!1}else if(C[3]==_$_315c[447]&&v.current.isSelected(C[4],0))return!1;if(v.current){if(C[3]==_$_315c[161])v.current.isEditable()&&(ea.event=!0);else if(C[3]==_$_315c[598])la.open.call(v.current,
|
|
433
|
+
C[4]);else{if(1==C[2])if(d)d.style.cursor==_$_315c[607]?xa.start.call(v.current,u):d.style.cursor==_$_315c[608]?Ca.start.call(v.current,u):d.style.cursor==_$_315c[609]&&(!0===d.column?ca.start.call(v.current,u,0):!1===d.column?ja.start.call(v.current,u,0):ca.start.call(v.current,u,parseInt(C[4])+1));else{B=v.current.options.columns.length-1;var E=v.current.options.data.length-1;if(C[3]==_$_315c[595])w(0,0,B,E,u,C[3],C[1].jexcel),a=b=0;else if(C[3]==_$_315c[456]){var K=za.range.call(v.current,C[5])[C[4]];
|
|
434
|
+
K[1]>B&&(K[1]=B);w(K[0],0,K[1],E,u,C[3],C[1].jexcel);b=K[0];a=0}else C[4]&&((u.shiftKey||u.ctrlKey)&&null!=b&&null!=a?w(b,0,C[4],E,u,C[3],C[1].jexcel):(C[3]==_$_315c[447]&&b==C[4]&&1==v.current.options.allowRenameColumn&&(g=setTimeout(function(){v.current.setHeader(C[4])},800)),w(C[4],0,C[4],E,u,C[3],C[1].jexcel),b=C[4],a=0))}if(2==C[2])if(C[3]==_$_315c[446])d?d.style.cursor==_$_315c[607]?xa.start.call(v.current,u):d.style.cursor==_$_315c[610]?Ca.start.call(v.current,u):d.style.cursor==_$_315c[609]&&
|
|
435
|
+
ja.start.call(v.current,u,parseInt(C[4])+1):(B=v.current.options.columns.length-1,E=parseInt(C[4]),(u.shiftKey||u.ctrlKey)&&null!=b&&null!=a?w(0,a,B,E,u,C[3],C[1].jexcel):(w(0,E,B,E,u,C[3],C[1].jexcel),b=0,a=E));else if(C[3]==_$_315c[445]){B=parseInt(C[4]);E=parseInt(C[5]);if(!v.current.edition&&(K=v.current.options.columns[C[4]].type,u.target.tagName==_$_315c[611]&&(K==_$_315c[288]||K==_$_315c[289])&&u.target.parentNode.classList.contains(_$_315c[150]))){var N=u.target.innerText;K==_$_315c[288]&&
|
|
436
|
+
(N=_$_315c[612]+N);window.open(N,_$_315c[613])}(u.shiftKey||u.ctrlKey)&&v.current.selectedCell?w(v.current.selectedCell[0],v.current.selectedCell[1],B,E,u,C[3],C[1].jexcel):(w(B,E,B,E,u,C[3],C[1].jexcel),b=B,a=E)}}c=C[3];typeof C[3]!==_$_315c[21]&&H.call(v.current.parent,_$_315c[614],v.current,C[3],C[4],C[5],u);e=!0;C[3]!==_$_315c[445]&&C[3]!==_$_315c[161]||r(u)}else e=!1};k.mouseup=function(u){v.current&&(xa.event?xa.end.call(v.current,u):Ca.event?Ca.end.call(v.current,u):ca.event?ca.end.call(v.current,
|
|
437
|
+
u):ja.event?ja.end.call(v.current,u):ea.event?ea.end.call(v.current,u):u.target.classList.contains(_$_315c[428])?la.close.call(v.current,!0):v.current.edition&&u.target.classList.contains(_$_315c[615])&&50>u.target.clientWidth-u.offsetX&&50>u.offsetY?na.close.call(v.current,null,!0):u.target.classList.contains(_$_315c[357])&&(u=u.target.innerText==_$_315c[15]?0:u.target.innerText==_$_315c[17]?u.target.getAttribute(_$_315c[299])-1:u.target.innerText-1,Da[_$_315c[11]].call(v.current,parseInt(u))));
|
|
438
|
+
g&&(clearTimeout(g),g=null);e=c=!1;ra.current&&ra.close.call(v.current)};k.mousemove=function(u){u=u||window.event;if(u.changedTouches&&u.changedTouches[0]){var B=u.changedTouches[0].clientX;var C=u.changedTouches[0].clientY}else B=u.clientX,C=u.clientY;q=[B,C];if(v.current)if(B=u.target.getAttribute(_$_315c[56]),C=u.target.getAttribute(_$_315c[57]),1==e)xa.event?xa.update.call(v.current,u):Ca.event?Ca.update.call(v.current,u):ca.event?ca.move.call(v.current,u):ja.event?ja.move.call(v.current,u):
|
|
439
|
+
v.current.options.tableOverflow&&(u=v.current.content,(u.w&&u.w!==u.offsetWidth||u.h&&u.h!==u.offsetHeight)&&v.current.setViewport(u.offsetWidth,u.offsetHeight),u.w=u.offsetWidth,u.h=u.offsetHeight);else{var E=u.target.getBoundingClientRect();d&&(d.style.cursor=_$_315c[3],d=null);1==v.current.options.editable&&u.target&&(u.target.classList.contains(_$_315c[372])?v.current.options.freezeRowControl&&!v.current.options.freezeRows&&5>E.height-(u.clientY-E.top)?(d=u.target,d.style.cursor=_$_315c[609],
|
|
440
|
+
d.column=!1):v.current.options.freezeColumnControl&&!v.current.options.freezeColumns&&5>E.width-(u.clientX-E.left)&&(d=u.target,d.style.cursor=_$_315c[609],d.column=!0):u.target.classList.contains(_$_315c[305])?v.current.options.freezeRowControl&&v.current.options.freezeRows==parseInt(C)+1&&5>E.height-(u.clientY-E.top)?(d=u.target,d.style.cursor=_$_315c[609]):1==v.current.options.rowDrag&&6>E.width-(u.clientX-E.left)?(d=u.target,d.style.cursor=_$_315c[607]):1==v.current.options.rowResize&&6>E.height-
|
|
441
|
+
(u.clientY-E.top)&&(d=u.target,d.style.cursor=_$_315c[610]):u.target.classList.contains(_$_315c[197])&&(v.current.options.freezeColumnControl&&v.current.options.freezeColumns==parseInt(B)+1&&5>E.width-(u.clientX-E.left)?(d=u.target,d.style.cursor=_$_315c[609]):1==v.current.options.columnResize&&6>E.width-(u.clientX-E.left)?(d=u.target,d.style.cursor=_$_315c[608]):1==v.current.options.columnDrag&&6>E.height-(u.clientY-E.top)&&(d=u.target,d.style.cursor=_$_315c[607])))}};k.mouseover=function(u){u=u||
|
|
442
|
+
window.event;if(v.current&&1==e){var B=n(u);if(B[0]){if(!document.activeElement.classList.contains(_$_315c[116])&&B[1]&&v.current!=B[1].jexcel&&v.current)return!1;if(!(xa.event||Ca.event||ca.event||ja.event))if(ea.event){var C=u.target.getAttribute(_$_315c[56]),E=u.target.getAttribute(_$_315c[57]);v.current.borders.cloning&&(v.current.borders.cloning.active=0);v.current.isSelected(C,E)?ea.reset.call(v.current):null!==C&&null!==E&&ea.call(v.current,C,E)}else null!==b&&null!==a&&(1==B[2]&&(C=b,B[3]==
|
|
443
|
+
_$_315c[447]&&(C=u.target.getAttribute(_$_315c[56])),E=v.current.options.data.length-1,w(b,0,C,E,u,B[3],B[1].jexcel),g&&(clearTimeout(g),g=null)),2==B[2]&&(B[3]==_$_315c[446]?(C=v.current.options.columns.length-1,E=parseInt(u.target.getAttribute(_$_315c[57])),w(0,a,C,E,u,B[3],B[1].jexcel)):B[3]==_$_315c[445]&&(C=B[4],E=B[5],w(b,a,C,E,u,B[3],B[1].jexcel))))}}};k.dblclick=function(u){if(v.current)if(u.target.classList.contains(_$_315c[382]))ea.execute.call(v.current,!1);else{var B=n(u);1==B[2]?1==v.current.options.columnSorting&&
|
|
444
|
+
(u=u.target.getAttribute(_$_315c[56]))&&v.current.orderBy(u):2==B[2]&&v.current.isEditable()&&!v.current.edition&&B[6]&&v.current.openEditor(B[6],null,u)}};k.paste=function(u){if(!u.target.classList.contains(_$_315c[254])&&v.current&&v.current.selectedCell&&!v.current.edition){var B=u.clipboardData||window.clipboardData;B&&(v.current.paste(v.current.selectedCell[0],v.current.selectedCell[1],B.getData(_$_315c[72])),u&&u.preventDefault())}};k.contextmenu=function(u){var B=p(u);!1!==B&&(B[1]||(B=h),
|
|
445
|
+
v.current&&!v.current.edition&&(B=Array.prototype.slice.call(B,3),Ta.open.call(v.current,u,B)))};var x=null,z=null,A=null,y=null,D=null;k.touchstart=function(u){var B=n(u);B[0]?B[1]&&v.current!=B[1].jexcel&&(v.current&&v.current.resetSelection(),v.current=B[1].jexcel):v.current&&(v.current.resetSelection(),v.current=null);v.current&&!v.current.edition?B[3]==_$_315c[161]?v.current.isEditable()&&(ea.event=!0):u.target&&u.target.classList.contains(_$_315c[164])?D=parseInt(u.target.getAttribute(_$_315c[165])):
|
|
446
|
+
B[3]==_$_315c[445]?(y=B,x===u.target&&z?v.current.openEditor(u.target,!1,u):(z=setTimeout(function(){x=z=y=null},400),A=setTimeout(function(){k.contextmenu(u);A=null},800)),x=u.target):y=null:y=null};k.touchmove=function(u){if(v.current){var B=null,C=null,E=null,K=null;if(u.changedTouches&&u.changedTouches[0]){var N=u.changedTouches[0].clientX;var V=u.changedTouches[0].clientY}else N=u.clientX,V=u.clientY;if(V=document.elementFromPoint(N,V))if(N=V.getAttribute(_$_315c[56]),V=V.getAttribute(_$_315c[57]),
|
|
447
|
+
null!==N&&null!==V&&ea.event)v.current.isSelected(N,V)||(ea.call(v.current,N,V),r(u)),u.preventDefault();else if(null!==D){N=parseInt(N);V=parseInt(V);var O=v.current.selectedCell;0==D?N<=O[2]&&(B=N,E=O[2],C=O[1],K=O[3]):2==D?N>=O[0]&&(B=O[0],C=O[1],E=N,K=O[3]):1==D?V<=O[3]&&(B=O[0],C=V,E=O[2],K=O[3]):3==D&&V>=O[1]&&(B=O[0],C=O[1],E=O[2],K=V);null!==B&&v.current.updateSelectionFromCoords(B,C,E,K);u.preventDefault()}else y=null;A&&clearInterval(A)}};k.touchend=function(u){if(ea.event)ea.end.call(v.current,
|
|
448
|
+
u);else if(null!==D)D=null;else if(y){u=null;if(y[3]===_$_315c[445]){var B=y[4];var C=y[5];var E=B;u=C}else y[3]===_$_315c[446]?(B=0,C=y[4],E=v.current.options.columns.length-1,u=C):y[3]===_$_315c[447]&&(B=y[4],C=0,E=B,u=v.current.rows.length-1);null!=B&&v.current.updateSelectionFromCoords(B,C,E,u)}A&&clearInterval(A)};k.resize=function(){v.current&&1==v.current.parent.config.fullscreen&&I.call(v.current,!0)};return k}(),v=function(k,d,b){if(k){if(k.tagName==_$_315c[574]){d=v.helpers.createFromTable(k,
|
|
449
|
+
d);var a=document.createElement(_$_315c[32]);k.parentNode.insertBefore(a,k);k.parentNode.removeChild(k);k=a}d||(d={});v.defaultRowHeight||(a=document.createElement(_$_315c[32]),a.innerHTML=_$_315c[617],document.body.appendChild(a),v.defaultRowHeight=a.querySelector(_$_315c[175]).offsetHeight,a.parentNode.removeChild(a));var c=[];if(d.cloud&&!b)return typeof v.cloud==_$_315c[105]?v.cloud.load(d,function(f){if((f=v(k,f,!0))&&f.length)for(var g=0;g<f.length;g++)c.push(f[g])}):console.error(_$_315c[618]),
|
|
450
|
+
c;if(k.spreadsheet)e=k.spreadsheet,Ga[_$_315c[11]].call(e,d);else var e=ta.spreadsheet(k,d);e.processing=!0;1==e.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[e.name]=function(){for(var f=0;f<e.worksheets.length;f++)typeof e.worksheets[f].onload==_$_315c[105]&&(e.worksheets[f].onload(),e.worksheets[f].onload=null);e.processing=!1;if(Array.isArray(e.queue)&&0<e.queue.length)for(;f=e.queue.shift();)f[0].updateCell(f[1],f[2],Q.call(f[0],f[1],f[2]),!0);e.config.toolbar&&ma.show.call(e);
|
|
451
|
+
for(f=0;f<e.worksheets.length;f++)ha.refresh.call(e.worksheets[f]);H.call(e,_$_315c[619],e);pa.state.call(e);for(f=0;f<e.worksheets.length;f++)fa.update.call(e.worksheets[f]);jSuites.loading.hide()};Array.isArray(d.worksheets)&&(d=d.worksheets);if(Array.isArray(d)){for(b=0;b<d.length;b++)ta.worksheet(e,d[b]);c=e.worksheets}else c=ta.worksheet(e,d);jSuites.ajax.pending(e.name)||(jSuites.ajax.oncomplete[e.name](),jSuites.ajax.oncomplete[e.name]=null);return c}console.error(_$_315c[616])};v.defaultRowHeight=
|
|
452
|
+
null;v.license=null;v.setLicense=function(k){v.license=k};v.spreadsheet=[];v.picker=ra;v.setDictionary=function(k){jSuites.setDictionary(k)};v.extensions={};v.setExtensions=function(k){for(var d=Object.keys(k),b=0;b<d.length;b++)typeof k[d[b]]===_$_315c[105]&&(v[d[b]]=k[d[b]],v.extensions[d[b]]=k[d[b]],v.license&&typeof v[d[b]].license==_$_315c[105]&&v[d[b]].license.call(v,v.license))};v.destroy=function(k,d){if(k.spreadsheet){d&&ta.unbind(k);d=v.spreadsheet.indexOf(k.spreadsheet);v.spreadsheet.splice(d,
|
|
453
|
+
1);for(d=0;d<k.spreadsheet.worksheets.length;d++)J(k.spreadsheet.worksheets[d].options.worksheetName,null);k.spreadsheet=null;k.jexcel=null;k.innerHTML=_$_315c[3];k.classList.remove(_$_315c[620]);k.classList.remove(_$_315c[393])}};v.version=M;v.helpers=G;v.events=Fa;typeof formula!==_$_315c[21]&&(v.formula=formula);v.editors=function(){var k={},d=function(b,a){return 1==b[a]||b.options&&1==b.options[a]?!0:b[a]==_$_315c[263]||b.options&&b.options[a]==_$_315c[263]?!0:!1};k.createEditor=function(b,a,
|
|
454
|
+
c,e){e.parent.input.setAttribute(_$_315c[124],!1);b==_$_315c[253]?(b=document.createElement(_$_315c[253]),b.type=_$_315c[72],b.value=c):b=document.createElement(_$_315c[32]);b.style.width=a.offsetWidth-2+_$_315c[59];b.style.height=a.offsetHeight-1+_$_315c[59];e.parent.input.appendChild(b);return b};k.createDialog=function(b,a,c,e,f,g){b=k.createEditor(_$_315c[32],b,a,f);b.classList.add(_$_315c[621]);b.classList.add(_$_315c[615]);800>window.innerWidth?(f.parent.input.style.top=_$_315c[61],f.parent.input.style.left=
|
|
455
|
+
_$_315c[61]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=-f.parent.input.offsetHeight));return b};k.general=function(){var b={},a=function(e){return(_$_315c[3]+e)[0]==_$_315c[18]?!0:!1},c=function(e){if(e.format||e.mask||e.locale){var f={};e.mask?f.mask=e.mask:e.format?f.mask=e.format:f.locale=e.locale;e.options&&(f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};b.createCell=function(e,
|
|
456
|
+
f,g,h,n,l){return b.updateCell(e,f,g,h,n,l)};b.updateCell=function(e,f,g,h,n,l){g=parseInt(g);h=parseInt(h);if(e){var p=c(l),q=null;f===_$_315c[3]||a(f)||typeof f===_$_315c[22]||typeof f!=_$_315c[25]||f.trim()===_$_315c[3]||(p?(p=jSuites.mask.extract(f,p,!0))&&p.value!==_$_315c[3]&&(q=p.value):1==(!1===n.parent.config.autoCasting||!1===l.autoCasting?!1:!0)&&(l.type==_$_315c[22]||l.type==_$_315c[346]||l.type==_$_315c[345]?(p=jSuites.mask.extract(f,l,!0))&&p.value!==_$_315c[3]&&(q=p.value):jSuites.isNumeric(Number(f))&&
|
|
457
|
+
(q=Number(f))));null!==q&&(f=q);f=b.parseValue(g,h,f,n,l,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_315c[3],e.appendChild(f)):l.rotate?(e.firstChild&&e.firstChild.classList.contains(_$_315c[27])?n=e.firstChild:(n=document.createElement(_$_315c[28]),n.classList.add(_$_315c[27])),n.style.transform=_$_315c[29]+parseInt(270-l.rotate)+_$_315c[30],n.innerHTML=f,e.appendChild(n)):1==n.parent.config.stripHTML?e.innerText=f:e.innerHTML=f;if(null!==q)return q}};b.openEditor=function(e,
|
|
458
|
+
f,g,h,n,l){var p=n.parent.input;p.onblur=function(){p.classList.contains(_$_315c[116])||n.closeEditor(e,!0)};if(l.type==_$_315c[22]||l.type==_$_315c[346]||l.type==_$_315c[345])p.classList.add(_$_315c[603]),a(f)||l.inputmode||(l.inputmode=_$_315c[622]);g=null;a(f)||(l.inputmode&&p.setAttribute(_$_315c[120],l.inputmode),(g=c(l))?l.disabledMaskOnEdition||(l.mask?(h=l.mask.split(_$_315c[246]),p.setAttribute(_$_315c[118],h[0])):l.locale&&p.setAttribute(_$_315c[623],l.locale),g.input=p,p.mask=g,jSuites.mask.render(f,
|
|
459
|
+
g,!1)):f&&l.type==_$_315c[345]&&(f*=100));if(!g||l.disabledMaskOnEdition)n.parent.config.stripHTML?p.innerText=f:p.innerHTML=f,jSuites.focus(p)};b.closeEditor=function(e,f,g,h,n,l){e=n.parent.input;f=f?e.innerText:_$_315c[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_315c[3]):l.type==_$_315c[345]&&(f+=_$_315c[624],e.classList.remove(_$_315c[625]));return f};b.parseValue=function(e,f,g,h,n,l){1==h.parent.config.parseFormulas&&(h.resetArray(e,f),a(g)&&(g=h.executeFormula(g,e,f)));g instanceof Element||g instanceof
|
|
460
|
+
HTMLDocument||(l&&(!n.rotate&&jSuites.isNumeric(g)?l.classList.add(_$_315c[281]):l.classList.remove(_$_315c[281])),n&&!a(g)&&(e=c(n))&&(e.mask?(f=e.mask.split(_$_315c[246]),0>g&&f[1]?(l&&-1!==f[1].indexOf(_$_315c[626])&&l.classList.add(_$_315c[627]),l=-1===f[1].indexOf(_$_315c[239])?jSuites.mask.render(-1*g,e,!0):jSuites.mask.render(g,e,!0)):(e.mask=f[0],l&&l.classList.remove(_$_315c[627]),l=jSuites.mask.render(g,e,!0))):l=jSuites.mask.render(g,e,!0),l&&(g=l)));return g};b[_$_315c[58]]=function(e,
|
|
461
|
+
f){var g;return(g=c(e))?jSuites.mask.render(f,g,!0):e.type==_$_315c[345]?100*parseFloat(f):f};b.destroyCell=function(e){e.classList.remove(_$_315c[281])};return b}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var b={},a=null;b.updateCell=function(c,e,f,g,h,n){c&&(f=document.createElement(_$_315c[32]),f.classList.add(_$_315c[628]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,c.innerHTML=_$_315c[3],c.appendChild(f))};b.createCell=b.updateCell;
|
|
462
|
+
b.openEditor=function(c,e,f,g,h,n){var l=n&&n.options?n.options:{};l.focus=!0;l.value=e;l.border=!1;l.height=_$_315c[629];l.toolbar=!1;a=k.createDialog(c,e,f,g,h,n);a=jSuites.editor(a,l)};b.closeEditor=function(c,e,f,g,h,n){return e?a.getData():_$_315c[3]};return b}();k.dropdown=function(){var b={createCell:function(a,c,e,f,g,h){h.render==_$_315c[630]?a.classList.add(_$_315c[631]):a.classList.add(_$_315c[632]);if(a=b.updateCell(a,c,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_315c[632])},
|
|
463
|
+
updateCell:function(a,c,e,f,g,h){if(a){var n=b.getItem(a,c,e,f,g,h);n?a.innerHTML=n:c?(c=b.fromLabel(a,c,e,f,g,h),c.length?(n=b.getItem(a,c,e,f,g,h),a.innerHTML=n):a.innerHTML=_$_315c[3]):a.innerHTML=_$_315c[3];return c}},openEditor:function(a,c,e,f,g,h){var n=k.createEditor(_$_315c[32],a,c,g),l=h.delimiter||_$_315c[246];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_315c[105]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_315c[105]&&(h=h.filterOptions(g,a,
|
|
464
|
+
e,f,c,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));d(h,_$_315c[633])&&(e.multiple=!0);d(h,_$_315c[73])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};d(h,_$_315c[633])?c&&(e.value=(_$_315c[3]+c).split(l)):e.value=c;jSuites.dropdown(n,e)},closeEditor:function(a,c,e,f,g,h){for(var n=g.parent.input.children[0],l=h.delimiter||_$_315c[246],p=n.dropdown.getText(!0),q=n.dropdown.getValue(!0),r=0;r<q.length;r++)!1===
|
|
465
|
+
b.getItem(a,q[r],e,f,g,h)&&h.source.push({id:q[r],name:p[r]});n.dropdown.close(!0);if(c)return q.join(l)},fromLabel:function(a,c,e,f,g,h){a=h.delimiter||_$_315c[246];e=[];f=[];Array.isArray(c)||(c=(_$_315c[3]+c).split(a));for(g=0;g<c.length;g++)f[c[g].trim()]=!0;c=Object.keys(f);!d(h,_$_315c[633])&&1<Object.keys(c).length&&(f=[],f[c[0]]=!0);for(c=0;c<h.source.length;c++)f[h.source[c].name]&&e.push(h.source[c].id);return e.join(a)},getItem:function(a,c,e,f,g,h){f=h.delimiter||_$_315c[246];a=[];e=[];
|
|
466
|
+
Array.isArray(c)||(c=(_$_315c[3]+c).split(f));for(f=0;f<c.length;f++)e[c[f].trim()]=!0;f=Object.keys(e);!d(h,_$_315c[633])&&1<Object.keys(f).length&&(c=[],c[f[0]]=!0,e=c);if(h.source&&typeof h.source[0]!==_$_315c[104])for(c=0;c<h.source.length;c++)f=h.source[c],h.source[c]={id:f,name:f};for(c=0;c<h.source.length;c++)typeof e[h.source[c].id]!==_$_315c[21]&&a.push(h.render==_$_315c[290]?h.source[c].color:h.render==_$_315c[634]?h.source[c].image:h.source[c].name);if(a.length){if(typeof h.render!==_$_315c[21]){for(c=
|
|
467
|
+
0;c<a.length;c++)e=c,f=a[c],f=h.render==_$_315c[290]?_$_315c[635]+f+_$_315c[636]:h.render==_$_315c[634]?_$_315c[635]+f+_$_315c[636]:h.render==_$_315c[630]?_$_315c[638]+(h.source[c].color||_$_315c[637])+_$_315c[639]+f+_$_315c[640]:void 0,a[e]=f;return a.join(_$_315c[3])}for(c=0;c<a.length;c++)a[c]=(_$_315c[3]+a[c]).replace(_$_315c[15],_$_315c[13]);return a.join(_$_315c[334])}return!1}};b[_$_315c[58]]=function(a,c){for(var e=0;e<a.source.length;e++)if(a.source[e].id==c)return a.render==_$_315c[290]?
|
|
468
|
+
a.source[e].color:a.render==_$_315c[634]?a.source[e].image:a.source[e].name};return b}();k.autocomplete=k.dropdown;k.calendar=function(){var b={},a=null;b.updateCell=function(c,e,f,g,h,n){if(c){f=e;n=b.getFormat(n);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_315c[3]+e;g.substr(4,1)==_$_315c[239]&&g.substr(7,1)==_$_315c[239]?g=!0:(g=g.split(_$_315c[239]),g=4==g[0].length&&g[0]==Number(g[0])&&2==g[1].length&&g[1]==Number(g[1])?!0:!1);g||(g=jSuites.calendar.extractDateFromString(e,n))&&
|
|
469
|
+
(f=g);if(f=jSuites.calendar.getDateString(f,n))return c.innerText=f,e;c.innerText=_$_315c[3];return _$_315c[3]}};b.createCell=b.updateCell;b.openEditor=function(c,e,f,g,h,n){n=Object.create(n);typeof n.filterOptions==_$_315c[105]&&(n=n.filterOptions(h,c,f,g,e,n));f=n.options||{};f.opened=!0;f.onclose=function(l,p){h.closeEditor(c,!0)};typeof n.timepicker!==_$_315c[21]&&(f.time=d(n,_$_315c[641])?!0:!1);typeof f.readonly!==_$_315c[21]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;
|
|
470
|
+
a=k.createEditor(_$_315c[253],c,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};b.closeEditor=function(c,e,f,g,h){c=a.calendar.close(!0,a.value?!0:!1);c=a.value?c:_$_315c[3];if(e)return c};b.getFormat=function(c){return c&&c.format?c.format:c&&c.options&&c.options.format?c.options.format:_$_315c[642]};b[_$_315c[58]]=function(c,e){c=b.getFormat(c);return jSuites.calendar.getDateString(e,c)};return b}();k.color=function(){var b={},a=null;b.updateCell=function(c,e,f,g,h,n){c&&
|
|
471
|
+
(n.render==_$_315c[643]?(f=document.createElement(_$_315c[32]),f.className=_$_315c[290],f.style.backgroundColor=e,c.innerText=_$_315c[3],c.appendChild(f)):(c.style.color=e,c.innerText=e))};b.createCell=b.updateCell;b.openEditor=function(c,e,f,g,h,n){n=Object.create(n);typeof n.filterOptions==_$_315c[105]&&(n=n.filterOptions(h,c,f,g,e,n));f=n.options||{};f.value=e;f.onclose=function(l,p){h.closeEditor(c,!0)};a=k.createEditor(_$_315c[253],c,e,h);a=jSuites.color(a,f);a.open()};b.closeEditor=function(c,
|
|
472
|
+
e,f,g,h,n){c=a.close(!0);if(e)return c};b[_$_315c[58]]=function(c,e){c=document.createElement(_$_315c[32]);c.style.width=_$_315c[644];c.style.height=_$_315c[34];c.style.backgroundColor=e;return c.outerHTML};return b}();k.checkbox=function(){var b={createCell:function(a,c,e,f,g,h){c=c&&c!=_$_315c[645]&&c!=_$_315c[646]?!0:!1;e=document.createElement(_$_315c[253]);e.type=_$_315c[285];e.checked=c;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_315c[647],
|
|
473
|
+
_$_315c[647]);a.innerHTML=_$_315c[3];a.appendChild(e);return c},updateCell:function(a,c){c=c&&c!=_$_315c[645]&&c!=_$_315c[646]?!0:!1;a&&(a.children[0].checked=c);return c},openEditor:function(a,c,e,f,g){c=a.children[0].checked?!1:!0;g.setValue(a,c);return!1},closeEditor:function(a,c){return!1}};b[_$_315c[58]]=function(a,c){return 1==c||1==c||c==_$_315c[263]?jSuites.translate(_$_315c[263]):jSuites.translate(_$_315c[645])};return b}();k.radio=function(){var b={createCell:function(a,c,e,f,g,h){a.getAttribute(_$_315c[56]);
|
|
474
|
+
e=document.createElement(_$_315c[253]);e.type=_$_315c[287];e.checked=1==c||1==c||c==_$_315c[263]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_315c[647],_$_315c[647]);a.innerHTML=_$_315c[3];a.appendChild(e)},updateCell:function(a,c,e,f,g){c=1==c||1==c||c==_$_315c[263]||c==_$_315c[648]?!0:!1;a&&(a.children[0].checked=c);if(1==c){a=[];for(var h=0;h<g.options.data.length;h++)f!=h&&g.options.data[h][e]&&a.push({x:e,y:h,value:0});a.length&&g.setValue(a)}return c},
|
|
475
|
+
openEditor:function(a,c,e,f,g){return!1},closeEditor:function(a,c){return!1}};b[_$_315c[58]]=function(a,c){return 1==c||1==c||c==_$_315c[263]?_$_315c[263]:_$_315c[645]};return b}();k.autonumber=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,n){(e=parseInt(e))||0<parseInt(c.innerText)&&(e=parseInt(c.innerText));n.sequence||(n.sequence=0);e?b.isValid(e,f,g,h)||(e=_$_315c[277]):e=n.sequence+1;e>n.sequence&&(n.sequence=e);return c.innerText=e};b.updateCell=b.createCell;b.openEditor=function(c,
|
|
476
|
+
e,f,g,h,n){a=k.createEditor(_$_315c[253],c,e,h);a.onblur=function(){h.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=function(c,e,f,g,h){return e?a.value:_$_315c[3]};b.isValid=function(c,e,f,g){for(var h,n=0;n<g.options.data.length;n++)if(h=g.value(e,n),h==c&&n!=f)return!1;return!0};return b}();k.progressbar=function(){var b={},a=null;b.createCell=function(c,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(c.children[0]&&c.children[0].tagName==_$_315c[601])var f=c.children[0];else f=
|
|
477
|
+
document.createElement(_$_315c[32]),f.classList.add(_$_315c[291]),c.innerText=_$_315c[3],c.classList.add(_$_315c[649]),c.appendChild(f);f.style.width=parseInt(e)+_$_315c[624];f.setAttribute(_$_315c[299],parseInt(e)+_$_315c[624])};b.destroyCell=function(c){c.classList.remove(_$_315c[649])};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,n){a=k.createEditor(_$_315c[253],c,e,h);a.type=_$_315c[22];a.setAttribute(_$_315c[650],0);a.setAttribute(_$_315c[651],100);a.onblur=function(){h.closeEditor(c,
|
|
478
|
+
!0)};a.focus();a.value=e};b.closeEditor=function(c,e,f,g,h){return e?a.value:_$_315c[3]};return b}();k.rating=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,n){return b.setCell(c,e,n)};b.destroyCell=function(c){c.classList.remove(_$_315c[652])};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,n){a=k.createEditor(_$_315c[253],c,e,h);a.type=_$_315c[22];a.setAttribute(_$_315c[650],0);a.setAttribute(_$_315c[651],5);a.onblur=function(){h.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=
|
|
479
|
+
function(c,e,f,g,h,n){return e?a.value:_$_315c[3]};b.setCell=function(c,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(c){f=f&&f.color?f.color:_$_315c[627];var g=document.createElement(_$_315c[32]);g.setAttribute(_$_315c[299],parseInt(e)+_$_315c[653]);g.classList.add(_$_315c[292]);for(var h=0;h<e;h++){var n=document.createElement(_$_315c[488]);n.className=_$_315c[553];n.style.color=f;n.innerHTML=_$_315c[654];g.appendChild(n)}c.innerHTML=_$_315c[3];c.className=_$_315c[652];c.appendChild(g)}return e};
|
|
480
|
+
return b}();k.email=function(){var b={createCell:function(a,c,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_315c[611]?e=a.children[0]:(e=document.createElement(_$_315c[229]),a.innerText=_$_315c[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_315c[655],h.options.url)),e.innerText=c)}};b.updateCell=b.createCell;b.openEditor=function(a,c,e,f,g,h){g.parent.input.classList.add(_$_315c[603]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=
|
|
481
|
+
c;jSuites.focus(g.parent.input)};b.closeEditor=function(a,c,e,f,g){g.parent.input.classList.remove(_$_315c[603]);return c?g.parent.input.innerText.replace(new RegExp(/\n/,_$_315c[14]),_$_315c[3]):_$_315c[3]};return b}();k.url=k.email;k.image=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,n){if(c)if(e)if(c.children&&c.children[0]&&c.children[0].tagName==_$_315c[656])c.children[0].src=e;else{var l=document.createElement(_$_315c[49]);n.render==_$_315c[657]&&l.classList.add(_$_315c[657]);
|
|
482
|
+
n.options&&(l.style.maxWidth=_$_315c[658],n.options.absolute&&(c.classList.add(_$_315c[659]),l.setAttribute(_$_315c[660],-1),l.classList.add(_$_315c[254]),l.classList.add(_$_315c[661]),l.settings=function(){h.openEditor(c,e,f,g,h,n)},l.dblclick=function(){h.openEditor(c,!0)},l[_$_315c[662]]=function(){h.setValueFromCoords(f,g,_$_315c[3])},l.refresh=function(p){if(!p){p=parseInt(l.style.top)||0;var q=parseInt(l.style.left)||0,r=parseInt(l.style.width)||40,w=parseInt(l.style.height)||40,x=c.getAttribute(_$_315c[56]),
|
|
483
|
+
z=c.getAttribute(_$_315c[57]);h.updateProperty([{x,y:z,value:{top:p,left:q,width:r,height:w}}],null,null,!0)}}),n.options.width&&(l.style.width=parseInt(n.options.width)+_$_315c[59]),n.options.height&&(l.style.height=parseInt(n.options.height)+_$_315c[59]),n.top&&(l.style.top=parseInt(n.top)+_$_315c[59]),n.left&&(l.style.left=parseInt(n.left)+_$_315c[59]),n.width&&(l.style.width=parseInt(n.width)+_$_315c[59]),n.height&&(l.style.height=parseInt(n.height)+_$_315c[59]));l.src=e;c.innerHTML=_$_315c[3];
|
|
484
|
+
c.appendChild(l)}else c.innerHTML=_$_315c[3]};b.updateCell=b.createCell;b.openEditor=function(c,e,f,g,h,n){(n&&n.options?n.options:{}).value=e;a=k.createDialog(c,e,f,g,h,n);e&&(c=document.createElement(_$_315c[49]),c.src=e,c.classList.add(_$_315c[663]),c.style.width=_$_315c[658],a.appendChild(c));jSuites.image(a,n)};b.closeEditor=function(c,e,f,g,h,n){if(e&&(c=a.children[0]))return c.tagName==_$_315c[656]?c.src:_$_315c[3]};b[_$_315c[58]]=function(c,e){return _$_315c[664]+e+_$_315c[665]};return b}();
|
|
485
|
+
k.html=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_315c[666]);var f=document.createElement(_$_315c[32]);f.innerHTML=e;c.appendChild(f)};b.updateCell=function(c,e){c&&(c.firstChild.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_315c[666])};b.openEditor=function(c,e,f,g,h,n){var l=n&&n.options?n.options:{};l.focus=!0;l.value=e;l.border=!1;l.height=_$_315c[629];e=k.createDialog(c,e,f,g,h,n);a=jSuites.editor(e,l);a.close=function(){h.closeEditor(c,!0)};jSuites.tracking(a,
|
|
486
|
+
!0)};b.closeEditor=function(c,e,f,g,h,n){jSuites.tracking(a,!1);c=a.getData();if(e)return c};return b}();k.hidden=function(){return{createCell:function(b,a,c,e,f){b.innerText=a},updateCell:function(b,a,c,e,f){b&&(b.innerText=a)},openEditor:function(b,a,c,e,f){return!1},closeEditor:function(b,a){return!1}}}();k.tags=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_315c[667]);b.updateCell(c,e)};b.updateCell=function(c,e){c&&(c.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_315c[667])};
|
|
487
|
+
b.openEditor=function(c,e,f,g,h,n){var l=n&&n.options?n.options:{};l.value=e;a=k.createDialog(c,e,f,g,h,n);c=document.createElement(_$_315c[32]);c.style.margin=_$_315c[34];c.style.marginRight=_$_315c[668];a.appendChild(c);a=jSuites.tags(c,l);c.focus();jSuites.focus(c)};b.closeEditor=function(c,e,f,g,h,n){c=a.getValue();if(e)return c};return b}();k.record=function(){var b={},a=null;b.createCell=function(c,e,f,g,h,n){c.classList.add(_$_315c[632]);var l;(l=h.parent.getWorksheetInstance(n.worksheetId))?
|
|
488
|
+
l.rows?b.updateCell(c,e,f,g,h,n):(c.innerText=_$_315c[277],h.parent.queue.push([h,f,g])):(c.innerText=_$_315c[277],h.parent.queue.push([h,f,g]))};b.destroyCell=function(c){c.classList.remove(_$_315c[632])};b.updateCell=function(c,e,f,g,h,n){c&&(typeof n.worksheetId==_$_315c[21]?c.innerText=_$_315c[277]:c.innerHTML=b.getValue(c,e,f,g,h,n))};b.openEditor=function(c,e,f,g,h,n){var l=n.delimiter||_$_315c[246];n=Object.create(n);n.options||(n.options={});typeof n.filter==_$_315c[105]&&(n.source=n.filter(h.el,
|
|
489
|
+
c,f,g,n.source));typeof n.filterOptions==_$_315c[105]&&(n=n.filterOptions(h,c,f,g,e,n));f=n.options;f.data=b.getSource(h,n);d(n,_$_315c[633])&&(f.multiple=!0);d(n,_$_315c[73])&&(f.autocomplete=!0);f.format=!0;f.opened=!0;f.width=c.offsetWidth-2;f.onclose=function(){h.closeEditor(c,!0)};d(n,_$_315c[633])?e&&(f.value=(_$_315c[3]+e).split(l)):f.value=e;a=k.createEditor(_$_315c[32],c,e,h);a=jSuites.dropdown(a,f)};b.closeEditor=function(c,e,f,g,h,n){c=n.delimiter||_$_315c[246];f=a.getValue(!0);a.close(!0);
|
|
490
|
+
if(e)return f.join(c)};b.getValue=function(c,e,f,g,h,n){c=[];if(typeof n.worksheetId==_$_315c[25]&&(h=h.parent.getWorksheetInstance(n.worksheetId))){f=n.worksheetColumn?n.worksheetColumn:0;0<=n.worksheetImage&&(f=n.worksheetImage);if(e==_$_315c[3]||0==e||null==e||void 0==e)return _$_315c[3];e=(_$_315c[3]+e).split(_$_315c[246]);for(g=0;g<e.length;g++){var l=e[g].trim();var p=h.name(f);l=h.getRowById(l);p=!1===l?_$_315c[669]:l[p];0<=n.worksheetImage&&(p=_$_315c[670]+p+_$_315c[671]);c.push(p)}return 0<=
|
|
491
|
+
n.worksheetImage?c.join(_$_315c[3]):c.join(_$_315c[334])}return _$_315c[277]};b.getSource=function(c,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_315c[25]&&(g=c.parent.getWorksheetInstance(e.worksheetId));if(g){var h,n=[];for(c=0;c<g.rows.length;c++)if(h=g.value(f,c))h={id:g.getRowId(c),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,c)),n.push(h)}else console.error(_$_315c[672]+e.worksheetId);return n};b[_$_315c[58]]=function(c,e){for(var f=0;f<
|
|
492
|
+
c.source.length;f++)if(c.source[f].id==e)return c.render==_$_315c[290]?c.source[f].color:c.render==_$_315c[634]?c.source[f].image:c.source[f].name};return b}();return k}();typeof jQuery!==_$_315c[21]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(d){var b=k(this)[_$_315c[58]](0);if(b.jspreadsheet){if(typeof arguments[0]==_$_315c[22])var a=arguments[0],c=2;else a=0,c=1;return b.jspreadsheet[a][d].apply(b.jspreadsheet[a],Array.prototype.slice.call(arguments,c))}return v(k(this)[_$_315c[58]](0),
|
|
492
493
|
arguments[0])}}(jQuery);return v});
|