jspreadsheet 8.1.5 → 8.1.7
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.d.ts +3 -3
- package/dist/index.js +424 -421
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v8.1.
|
|
2
|
+
* Jspreadsheet v8.1.7
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -15,14 +15,14 @@ if (! jSuites && typeof(require) === 'function') {
|
|
|
15
15
|
var jSuites = require('jsuites');
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(
|
|
19
|
-
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(
|
|
20
|
-
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(
|
|
21
|
-
$jscomp.polyfill=function(
|
|
22
|
-
$jscomp.polyfillIsolated=function(
|
|
23
|
-
$jscomp.global.Symbol(
|
|
24
|
-
$jscomp.iteratorFromArray=function(
|
|
25
|
-
var _$
|
|
18
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(C){var H=0;return function(){return H<C.length?{done:!1,value:C[H++]}:{done:!0}}};$jscomp.arrayIterator=function(C){return{next:$jscomp.arrayIteratorImpl(C)}};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.SIMPLE_FROUND_POLYFILL=!1;$jscomp.ISOLATE_POLYFILLS=!1;$jscomp.FORCE_POLYFILL_PROMISE=!1;$jscomp.FORCE_POLYFILL_PROMISE_WHEN_NO_UNHANDLED_REJECTION=!1;
|
|
19
|
+
$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(C,H,K){if(C==Array.prototype||C==Object.prototype)return C;C[H]=K.value;return C};$jscomp.getGlobal=function(C){C=["object"==typeof globalThis&&globalThis,C,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var H=0;H<C.length;++H){var K=C[H];if(K&&K.Math==Math)return K}throw Error("Cannot find global object");};$jscomp.global=$jscomp.getGlobal(this);
|
|
20
|
+
$jscomp.IS_SYMBOL_NATIVE="function"===typeof Symbol&&"symbol"===typeof Symbol("x");$jscomp.TRUST_ES6_POLYFILLS=!$jscomp.ISOLATE_POLYFILLS||$jscomp.IS_SYMBOL_NATIVE;$jscomp.polyfills={};$jscomp.propertyToPolyfillSymbol={};$jscomp.POLYFILL_PREFIX="$jscp$";var $jscomp$lookupPolyfilledValue=function(C,H){var K=$jscomp.propertyToPolyfillSymbol[H];if(null==K)return C[H];K=C[K];return void 0!==K?K:C[H]};
|
|
21
|
+
$jscomp.polyfill=function(C,H,K,S){H&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(C,H,K,S):$jscomp.polyfillUnisolated(C,H,K,S))};$jscomp.polyfillUnisolated=function(C,H,K,S){K=$jscomp.global;C=C.split(".");for(S=0;S<C.length-1;S++){var P=C[S];if(!(P in K))return;K=K[P]}C=C[C.length-1];S=K[C];H=H(S);H!=S&&null!=H&&$jscomp.defineProperty(K,C,{configurable:!0,writable:!0,value:H})};
|
|
22
|
+
$jscomp.polyfillIsolated=function(C,H,K,S){var P=C.split(".");C=1===P.length;S=P[0];S=!C&&S in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var Z=0;Z<P.length-1;Z++){var N=P[Z];if(!(N in S))return;S=S[N]}P=P[P.length-1];K=$jscomp.IS_SYMBOL_NATIVE&&"es6"===K?S[P]:null;H=H(K);null!=H&&(C?$jscomp.defineProperty($jscomp.polyfills,P,{configurable:!0,writable:!0,value:H}):H!==K&&(void 0===$jscomp.propertyToPolyfillSymbol[P]&&(K=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[P]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
|
+
$jscomp.global.Symbol(P):$jscomp.POLYFILL_PREFIX+K+"$"+P),$jscomp.defineProperty(S,$jscomp.propertyToPolyfillSymbol[P],{configurable:!0,writable:!0,value:H})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(C){C={next:C};C[Symbol.iterator]=function(){return this};return C};
|
|
24
|
+
$jscomp.iteratorFromArray=function(C,H){C instanceof String&&(C+="");var K=0,S=!1,P={next:function(){if(!S&&K<C.length){var Z=K++;return{value:H(Z,C[Z]),done:!1}}S=!0;return{done:!0,value:void 0}}};P[Symbol.iterator]=function(){return P};return P};$jscomp.polyfill("Array.prototype.values",function(C){return C?C:function(){return $jscomp.iteratorFromArray(this,function(H,K){return K})}},"es8","es3");
|
|
25
|
+
var _$_9989=["use strict","{","}","","8.1.7","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","=","undefined","number","fullscreen","block","string","readonly","jss_hidden_index","div","right","10px","pointer","/v8",",","localhost",".","v8"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license","Your license is expired","jspreadsheet","img","/jspreadsheet/","logo.png",
|
|
26
26
|
"none","status","data-x","data-y","px","X","goto","jss_scroll","jss_control","hidden","jss_freezed","get","colspan","center","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge","setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setProperty","orderBy","setValue","renameWorksheet","moveWorksheet",
|
|
27
27
|
"onundo","onredo","object","function","contextMenu","toolbar","Jspreadsheet: cursor not in the viewport","oneditionstart","oncreateeditor","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","onevent","setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave",
|
|
28
28
|
"persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","selection","onselection"," ","'","'!","!",":","jss_border","cloning","jss_border_","15","-2000px","#ccc","transparent","0px","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",
|
|
@@ -31,422 +31,425 @@ var _$_519c=["use strict","{","}","","8.1.4","Base","https://jspreadsheet.com","
|
|
|
31
31
|
"#SPILL!","#REF!","$","Something went wrong","onafterchanges","checkbox","autonumber","radio","email","url","color","progressbar","rating","onbeforechange","onchange","oncreatecell","values","mergeCells",";","title","jss_unlocked","oncreaterow","jss_row","Jspreadsheet: Invalid origin or destination","onmoverow","Jspreadsheet: Insert row is not enabled in the table configuration","onbeforeinsertrow","onbeforeinsertrow returned false","oninsertrow","Jspreadsheet: Delete row is not enabled in the table configuration",
|
|
32
32
|
"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","col_","oninsertcolumn","Jspreadsheet: Delete column is not enabled in the table configuration","Jspreadsheet: it is not possible to delete the last column","onbeforedeletecolumn","onbeforedeletecolumn returned false",
|
|
33
33
|
"ondeletecolumn","Jspreadsheet: Column does not exists.","; ","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","onbeforechangepage","onchangepage","No records found","jss_page","jss_page_selected",
|
|
34
|
-
"Showing page {0} of {1} entries","jss_content","wheel","selectstart","table","thead","tbody","tfoot","colgroup","50","jss_selectall","jss","cellpadding","cellspacing","unselectable","yes","jss_wrap","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","Y","jss_table","jss_table_container","
|
|
34
|
+
"Showing page {0} of {1} entries","jss_content","wheel","selectstart","table","thead","tbody","tfoot","colgroup","50","jss_selectall","jss","cellpadding","cellspacing","unselectable","yes","jss_wrap","jss_overflow","jss_locked","jss_corner","on","onselectstart","return false","Y","jss_table","jss_table_container","Freeze columns cannot be greater than the number of available columns","rows","jss_container","jss_toolbar","jss_helper","jss_loading","textarea","jss_textarea","-1","bottom","Defined names are only available on the Premium edition.",
|
|
35
35
|
"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","touchend","onresizecolumn","onresizerow","label","jss_filters_active","Jspreadsheet: the filter is not enabled.","Blanks","onbeforefilter","onfilter","gi","jss_filters_options","INPUT","Search","jss_filters_search","button","Ok","jss_filters_apply",
|
|
36
36
|
"jss_filters",'<input type="checkbox"> ',"Add current selection to filter",'<input type="checkbox"> (',"Select all","select","jss_pagination_dropdown","option","Show","entries","jss_search","onbeforesearch","onsearch","jss_search_container","jss_contextmenu","Mac","⌘","Ctrl","tabs","Rename this worksheet","Delete this worksheet","Are you sure?","line","nested","Rename this cell","header","row","cell","Cut","content_cut"," + X","Copy","content_copy"," + C","Paste","content_paste"," + V","Insert a new column before",
|
|
37
|
-
"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 comments","Add comments","notes","Comments","Clear comments","Save as","save"," + S","About","info","with-toolbar","i","undo","redo","divisor","
|
|
37
|
+
"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 comments","Add comments","notes","Comments","Clear comments","Save as","save"," + S","About","info","with-toolbar","i","undo","redo","divisor","120px","Verdana","Arial","Courier New",'<span style="font-family:',"</span>","font-family","48px","format_size","x-small","small","medium","large",
|
|
38
38
|
"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_bold","font-weight","bold","format_color_text","format_color_fill","background-color","height","50px","Normal","Medium","Large","Extra","jss_row_medium","jss_row_large","jss_row_extra","fullscreen_exit","Toggle Fullscreen","border_all","border_outer","border_inner","border_horizontal","border_vertical","border_left",
|
|
39
39
|
"border_top","border_right","border_bottom","border_clear","black","border-left: ","px solid ","border-left: ; ","border-right: ","border-right: ; ","border-top: ","border-top: ; ","border-bottom: ","border-bottom: ; ","material-icons","color_lens",'<div style="height: ','px; width: 50px; background-color: black;"></div>',"80px","1","search","search_off","Toggle Search","onbeforecreateworksheet","There is one existing worksheet with the same name.","createWorksheet","oncreateworksheet","deleteWorksheet",
|
|
40
40
|
"ondeleteworksheet","It was not possible to rename worksheet due conflict name","onrenameworksheet","onmoveworksheet","onopenworksheet","jss_","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",
|
|
41
|
-
"data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","Cloud plugin not loaded.","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>","<",
|
|
42
|
-
"YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","absolute","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
43
|
-
(function(
|
|
44
|
-
{version:_$
|
|
45
|
-
c[k].name:k},
|
|
46
|
-
a=this.parent.element,d=this;else b=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$
|
|
47
|
-
c){if(typeof k===_$
|
|
48
|
-
this.refreshBorders()},
|
|
49
|
-
l(e));for(var
|
|
50
|
-
new Date;
|
|
51
|
-
_$
|
|
52
|
-
|
|
53
|
-
1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(
|
|
54
|
-
this.scrollX.style.display=this.width>e?_$
|
|
55
|
-
function(){if(a.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$
|
|
56
|
-
(d=a.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-5))),this.tbody.textContent=_$
|
|
57
|
-
!1;a.event=!0;a.update.call(e,h,d);a.event=!1};return f};a.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$
|
|
58
|
-
g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):this.rows[g].element&&this.rows[g].element.offsetHeight?f+parseInt(this.rows[g].element.offsetHeight):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return a}(),
|
|
59
|
-
b=this.records[h][g].element);h=this.content.getBoundingClientRect();l=b.getBoundingClientRect();var
|
|
60
|
-
!b.classList.contains(_$
|
|
61
|
-
0<this.options.pagination&&
|
|
62
|
-
c.renderY.call(this,a);c.adjustX.call(this,!1,!0);c.adjustY.call(this,!1,!0);
|
|
63
|
-
b,g);
|
|
64
|
-
h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$
|
|
65
|
-
(this.rows[b].height=
|
|
66
|
-
this.options.footers.length;d++)e=
|
|
67
|
-
0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$
|
|
68
|
-
b,e);if(g.children.length)for(;g.children[f+1];)g.removeChild(g.lastChild);if(0<f){for(var h=0;h<f;h++)g.appendChild(
|
|
69
|
-
_$
|
|
70
|
-
b);var d=this.results?this.results.indexOf(b):b;0<d&&(this.results?d=this.results[d-1]:d--,c.renderY.call(this,d,!0));
|
|
71
|
-
c.pageUp=function(b,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$
|
|
72
|
-
!1);d&&d.preventDefault();
|
|
73
|
-
e+=
|
|
74
|
-
(b=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=
|
|
41
|
+
"data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:","_blank","onclick","jclose","col-resize","row-resize","move","TD","Cloud plugin not loaded.","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>","<",
|
|
42
|
+
"timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","absolute","jfile",'<img src="','" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
43
|
+
(function(C,H){typeof exports===_$_9989[84]&&typeof module!==_$_9989[13]?module.exports=H():typeof define===_$_9989[85]&&define.amd?define(H):C.jspreadsheet=C.jexcel=H()})(this,function(){_$_9989[0];var C=function(k,c){k=jSuites.translate(k);if(c&&c.length)for(var b=0;b<c.length;b++)k=k.replace(_$_9989[1]+b+_$_9989[2],c[b]);return k},H=function(k,c){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_9989[3]).toUpperCase();if(void 0===c)return window[k]?window[k]:null;window[k]=c},K=function(){var k=
|
|
44
|
+
{version:_$_9989[4],edition:_$_9989[5],host:_$_9989[6],license:_$_9989[7],print:function(){return[_$_9989[8]+this.edition+_$_9989[9]+this.version+_$_9989[10]+this.host+_$_9989[10]+this.license]}};return function(){return k}}(),S=function(k){var c=parseInt(k.y);if(k.id)var b=parseInt(k.id);else k.value&&(b=parseInt(k.value));0<b&&(this.rows[c].id=b,sa[_$_9989[11]].call(this,b))},P=function(k){return(_$_9989[3]+k).substr(0,1)===_$_9989[12]},Z=function(k){var c=this.options.columns;return c[k]&&c[k].name?
|
|
45
|
+
c[k].name:k},N=function(k,c,b){var a;if(a=this.options.data[c]){var d=0<=k?Z.call(this,k):k;typeof b===_$_9989[13]?b=typeof d===_$_9989[14]?a[k]:jSuites.path.call(a,_$_9989[3]+d):(typeof d===_$_9989[14]?a[k]=b:jSuites.path.call(a,_$_9989[3]+d,b),!P(b)&&this.records[c][k]&&(this.records[c][k].v=b))}else b=null;return b},Q=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Ia.call(this))?7<=k?!0:!1:!0},Ja=function(k){var c=_$_9989[15];if(this.parent)var b=this.parent.config,
|
|
46
|
+
a=this.parent.element,d=this;else b=this.config,a=this.element,d=t.current?t.current:null;typeof k===_$_9989[13]&&(k=!a.classList.contains(c));k?(a.classList.add(c),b.fullscreen=!0):(a.classList.remove(c),b.fullscreen=!1);d&&(d.tbody.innerHTML=_$_9989[3],G.call(d),T.refresh.call(d),fa.update.call(d.parent,d))},Ka=function(k){var c=this.loading;null===k&&(k=c.style.display==_$_9989[16]?!0:!1);c.style.display=k?_$_9989[16]:_$_9989[3];setTimeout(function(){c.style.display=_$_9989[3]},1E3)},Fa=function(k,
|
|
47
|
+
c){if(typeof k===_$_9989[17]){var b=E.getCoordsFromColumnName(k);b=this.records[b[1]][b[0]];if(b.element)k=b.element;else return typeof c===_$_9989[13]?b.readonly:b.readonly=c?!0:!1}b=_$_9989[18];k=k.classList;if(typeof c===_$_9989[13])return k.contains(b)?!0:!1;c?k.add(b):k.remove(b)},xa=function(k){var c=_$_9989[19],b=this.table.classList;if(typeof k==_$_9989[13])return b.contains(c)?!1:!0;k?b.remove(c):b.add(c);0<this.options.freezeColumns&&ma[_$_9989[11]].call(this,this.options.freezeColumns);
|
|
48
|
+
this.refreshBorders()},Ia=function(k){if(void 0===k)return this.status;var c=document.createElement(_$_9989[20]);c.style.textAlign=_$_9989[21];c.style.fontSize=_$_9989[22];c.style.cursor=_$_9989[23];c.onclick=function(){window.location.href=K().host+_$_9989[24]};var b=null,a=[74,50,48,50,48,33].join(_$_9989[3]);(function(e){b=1;try{if(e){var f=window.atob(e);f=f.split(_$_9989[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=a;var h=f[1],l=jSuites.sha512,m=_$_9989[3],n=_$_9989[3];128<e.length&&(e=
|
|
49
|
+
l(e));for(var p=0;128>p;p++){var q=e[p]?e[p].charCodeAt(0):0;m+=String.fromCharCode(54^q);n+=String.fromCharCode(92^q)}var v=l(n+l(m+h));if(g!=v)b=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var u=window.location.hostname||_$_9989[26],w=u.split(_$_9989[27]);u=u.split(_$_9989[27]);2<u.length&&!jSuites.isNumeric(u[u.length-1])&&w.shift();w=w.join(_$_9989[27]);u=u.join(_$_9989[27]);if(-1==f[1].domain.indexOf(w)&&-1==f[1].domain.indexOf(u))b=4;else if(f[1].scope&&0<=f[1].scope.indexOf(_$_9989[28])){u=
|
|
50
|
+
new Date;w=parseInt(u.getTime()/1E3);var y=K();f[1].date<w?(b=f[1].date+2592E3<w&&!f[1].plan||f[1].date+15552E3<w?6:7,y.license=f[1].name+_$_9989[29]):(b=8,y.license=_$_9989[30]+f[1].name,y.edition=3==f[1].plan||6==f[1].plan?_$_9989[31]:_$_9989[5])}else b=5}else b=4}else b=2}}catch(x){}})(k);k=_$_9989[3];if(1==b)k=_$_9989[32];else if(2==b||3==b||4==b)k=_$_9989[33];else if(5==b)k=_$_9989[34];else if(6==b||7==b)k=_$_9989[35];c.appendChild(document.createTextNode(k));if(8>b)try{if(typeof sessionStorage!==
|
|
51
|
+
_$_9989[13]&&!sessionStorage.getItem(_$_9989[36])){sessionStorage.setItem(_$_9989[36],!0);var d=document.createElement(_$_9989[37]);d.src=K().host+_$_9989[38]+_$_9989[39];d.style.display=_$_9989[40];c.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_9989[41],{value:b,writable:!1,configurable:!1,enumerable:!1,extensible:!1});K().edition===_$_9989[31]&&(this.edition=1);return c},T=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_9989[42]),e=this.edition.getAttribute(_$_9989[43]);
|
|
52
|
+
da.position.call(this,d,e)}},c=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&ha.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},b=function(){var d=this.tbody.lastChild.getAttribute(_$_9989[43]),e=this.scrollY.scrollHeight-this.content.offsetHeight-this.scrollY.scrollTop;this.content.scrollTop=d!=(this.results?this.rows[this.results[this.results.length-1]].y:this.rows[this.rows.length-
|
|
53
|
+
1].y)&&e?0:this.content.scrollHeight;k.call(this)},a=function(){if(G.limited.call(this)){var d=ma.getWidth.call(this),e=this.content.offsetWidth,f=this.content.offsetHeight;this.width=a.width.call(this)+(d?d:1);this.height=a.height.call(this);this.tfoot.offsetHeight&&(this.height+=this.tfoot.offsetHeight+26);this.scrollX.firstChild.style.width=this.width+_$_9989[44];this.scrollY.firstChild.style.height=this.height+_$_9989[44];this.scrollX.style.width=e+_$_9989[44];this.scrollY.style.height=f+_$_9989[44];
|
|
54
|
+
this.scrollX.style.display=this.width>e?_$_9989[3]:_$_9989[40];this.scrollY.style.display=this.height>f?_$_9989[3]:_$_9989[40]}else this.scrollX.style.display=_$_9989[40],this.scrollY.style.display=_$_9989[40]};a.refresh=function(){this.scrollY.scrollTop=0;this.scrollX.scrollLeft=0;a.call(this)};a.updateX=function(){if(a.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$_9989[42]));a.setX.call(this,a.width.call(this,d));c.call(this)};a.updateY=
|
|
55
|
+
function(){if(a.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));a.setY.call(this,a.height.call(this,d));b.call(this)}};a.setX=function(d){a.ignore=!0;this.scrollX.scrollLeft=d};a.setY=function(d){a.ignore=!0;this.scrollY.scrollTop=d};a.update=function(d,e){e==_$_9989[45]?(d=a.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),G.reset.call(this),G[_$_9989[46]].call(this,null,d),c.call(this)):
|
|
56
|
+
(d=a.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-5))),this.tbody.textContent=_$_9989[3],G[_$_9989[46]].call(this,d),b.call(this))};a.build=function(d){var e=this,f=document.createElement(_$_9989[20]),g=document.createElement(_$_9989[20]);f.className=_$_9989[47]+d;g.className=_$_9989[48]+d;f.appendChild(g);d==_$_9989[45]?f.style.height=_$_9989[22]:f.style.width=_$_9989[22];f.onscroll=function(h){if(a.ignore)return a.ignore=
|
|
57
|
+
!1;a.event=!0;a.update.call(e,h,d);a.event=!1};return f};a.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$_9989[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};a.height=function(d,e){var f=0,g=0;this.options.defaultRowHeight||(this.options.defaultRowHeight=26);for(var h=this.results?this.results:this.rows,l=0;l<h.length;l++){g=l;this.results&&(g=h[l]);if(d===
|
|
58
|
+
g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):this.rows[g].element&&this.rows[g].element.offsetHeight?f+parseInt(this.rows[g].element.offsetHeight):f+parseInt(this.options.defaultRowHeight));if(f>=e)return g}return e?g:f};return a}(),G=function(){var k=function(b,a){var d=this.thead.clientHeight;a||(a=1);var e=!1,f=!1,g=b.getAttribute(_$_9989[42]),h=b.getAttribute(_$_9989[43]);var l=this.records[h][g];l.merged&&(g-=l.merged[0],h-=l.merged[1],
|
|
59
|
+
b=this.records[h][g].element);h=this.content.getBoundingClientRect();l=b.getBoundingClientRect();var m=ma.getWidth.call(this),n=h.left+m,p=h.left+h.width;g=h.top+d;var q=h.top+h.height;var v=0;h=l.top;h>=g&&h<=q||(v++,e=!0);h=l.top+l.height;h>=g&&h<=q||v++;if(v>=a)return 2>a&&(a=this.content.scrollTop,0==e?q-g>l.height&&(this.content.scrollTop+=h-q+3,T.ignore=!0,this.scrollY.scrollTop+=h-q+3):(this.content.scrollTop=b.offsetTop-d,T.ignore=!0,this.scrollY.scrollTop-=a-this.content.scrollTop)),!1;if(!m||
|
|
60
|
+
!b.classList.contains(_$_9989[50]))if(v=0,g=l.left,g>=n&&g<=p||(v++,f=!0),g=l.left+l.width,g>=n&&g<p||v++,v>=a)return 2>a&&(a=this.content.scrollLeft,0==f?p-n>l.width&&(this.content.scrollLeft+=g-p+3,T.ignore=!0,this.scrollX.scrollLeft+=g-p+3):(this.content.scrollLeft=b.offsetLeft-n-50,T.ignore=!0,this.scrollX.scrollLeft-=a-this.content.scrollLeft)),!1;return!0},c=function(){var b=0;this.results&&(b=this.results[0]);c.reset.call(this,!0);c.renderX.call(this,0);c.renderY.call(this,b);ma.headers.call(this);
|
|
61
|
+
0<this.options.pagination&&ta.update.call(this);X.update.call(this);this.refreshBorders();T.call(this)};c.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};c.refresh=function(){if(!this.tbody.lastChild)return!1;var b=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_9989[42]))+1,a=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43]));this.results?(a=this.results.indexOf(a),a<this.results.length-1&&a++,a=this.results[a]):a++;c.renderX.call(this,b);
|
|
62
|
+
c.renderY.call(this,a);c.adjustX.call(this,!1,!0);c.adjustY.call(this,!1,!0);T.call(this)};c.renderX=function(b,a,d){var e=this.options.columns,f=0,g=[],h=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?f=this.content.offsetWidth:1==this.options.tableOverflow&&(f=parseInt(this.options.tableWidth));var l=this.headerContainer.offsetWidth||0;for(d||(d=0);e[b]&&(!f||l<f||0<d);){!1!==e[b].visible&&e[b].type!==_$_9989[49]&&(l+=parseInt(e[b].width));0<d&&d--;var m=ba.getWidth.call(this,
|
|
63
|
+
b,g);m>d&&(d=m);a?(c.renderColumn.call(this,b,h),b--):(c.renderColumn.call(this,b),b++)}ba.batch.call(this,g)};c.renderY=function(b,a,d){var e=0,f=[];1==this.parent.config.fullscreen?e=this.content.offsetHeight:1==this.options.tableOverflow&&(e=parseInt(this.options.tableHeight));e&&(e-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&(e-=this.tfoot.offsetHeight+14));var g=this.tbody.offsetHeight;var h=this.options.freezeColumns||0,l=parseInt(this.headerContainer.lastChild.getAttribute(_$_9989[42]));
|
|
64
|
+
h=this.headerContainer.children[h+1]?parseInt(this.headerContainer.children[h+1].getAttribute(_$_9989[42])):l;var m=this.results?this.results.indexOf(b):b,n=parseInt(this.options.pagination)||0,p=this.tbody.children.length||0,q=!1;for(d||(d=0);this.options.data&&this.options.data[b]&&(!n||p<n||0<d)&&(!e||g<=e||0<d);){var v=c.renderRow.call(this,b,h,l);a?(this.tbody.insertBefore(v,this.tbody.firstChild),m--):(this.tbody.appendChild(v),m++);this.rows[b].height?(v.offsetHeight!==this.rows[b].height&&
|
|
65
|
+
(this.rows[b].height=v.offsetHeight,q=!0),g+=this.rows[b].height):(g+=this.rows[b].height=v.offsetHeight,q=!0);0<d&&d--;b=ba.getHeight.call(this,b,f);b>d&&(d=b);b=this.results?this.results[m]:m;p++}ba.batch.call(this,f);q&&T.call(this)};c.renderColumn=function(b,a,d){this.headers[b]||Ba.create.call(this,b);if(this.options.nestedHeaders)for(d=0;d<this.options.nestedHeaders.length;d++){var e=pa.getColumns.call(this,d);void 0!==e[b]&&pa.renderCell.call(this,e[b],d,a)}if(this.options.footers)for(d=0;d<
|
|
66
|
+
this.options.footers.length;d++)e=aa.create.call(this,b,d),null===a?this.tfoot.children[d].appendChild(e):this.tfoot.children[d].insertBefore(e,this.tfoot.children[d].children[a]);null===a?(this.headerContainer.appendChild(this.headers[b]),this.colgroupContainer.appendChild(this.colgroup[b])):(this.headerContainer.insertBefore(this.headers[b],this.headerContainer.children[a]),this.colgroupContainer.insertBefore(this.colgroup[b],this.colgroupContainer.children[a]));if(this.tbody.children.length)for(d=
|
|
67
|
+
0;d<this.tbody.children.length;d++)e=parseInt(this.tbody.children[d].getAttribute(_$_9989[43])),(e=M[_$_9989[51]].call(this,b,e))&&(null===a?this.tbody.children[d].appendChild(e):this.tbody.children[d].insertBefore(e,this.tbody.children[d].children[a]))};c.renderRow=function(b,a,d,e){var f=this.options.freezeColumns||0;null==a&&(a=parseInt(this.headerContainer.children[f+1].getAttribute(_$_9989[42])));null==d&&(d=parseInt(this.headerContainer.lastChild.getAttribute(_$_9989[42])));var g=za.create.call(this,
|
|
68
|
+
b,e);if(g.children.length)for(;g.children[f+1];)g.removeChild(g.lastChild);if(0<f){for(var h=0;h<f;h++)g.appendChild(M[_$_9989[51]].call(this,h,b));ma.update.call(this,b)}for(h=a;h<=d;h++)a=M[_$_9989[51]].call(this,h,b,e),g.appendChild(a);return g};c.resetY=function(){if(this.options.pagination){this.pageNumber||(this.pageNumber=0);var b=this.options.pagination*this.pageNumber}else b=0;var a=0;if(this.merged.rows[b]){for(a=this.options.pagination;this.merged.rows[b]&&0<=b;)b--;b++}this.tbody.textContent=
|
|
69
|
+
_$_9989[3];this.results&&this.results.length&&(b=this.results[b]);(!this.results||0<this.results.length)&&G.renderY.call(this,b,0,a);0<this.options.pagination&&ta.update.call(this);T.call(this);this.refreshBorders()};c[_$_9989[46]]=function(b,a){if(null!==b&&0<=b)if(0<this.options.pagination)this.page(this.whichPage(b));else if(this.rows[b]||(b=this.options.data.length-1),!za.attached.call(this,b)){if(this.merged.rows[b]){for(;this.merged.rows[b]&&0<=b;)b--;b++}this.tbody.textContent=_$_9989[3];c.renderY.call(this,
|
|
70
|
+
b);var d=this.results?this.results.indexOf(b):b;0<d&&(this.results?d=this.results[d-1]:d--,c.renderY.call(this,d,!0));T.updateY.call(this)}if(null!==a&&0<=a&&(this.options.columns[a]||(a=this.options.columns.length-1),b||(b=c.getY.call(this)),!M.attached.call(this,a,b))){if(this.merged.cols[a]){for(d=b=0;d<this.rows.length;d++)this.records[d][a].merged&&(b=this.records[d][a].merged[0]);a-=b}c.reset.call(this);c.renderX.call(this,a);0<a&&c.renderX.call(this,a-1,!0);T.updateX.call(this)}this.refreshBorders()};
|
|
71
|
+
c.pageUp=function(b,a,d){var e=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));if(a){b=null;var f=this.results?this.results[0]:0}else this.results?(f=this.results.indexOf(e),0<f&&f--,f=this.results[f]):(f=e,0<f&&f--);if(f<e){if(null==b)this.tbody.textContent=_$_9989[3];else{e=b;if(this.options.mergeCells){var g=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43]));e+=ba.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.lastChild)}c.renderY.call(this,f,!a,b);c.adjustY.call(this,
|
|
72
|
+
!1);d&&d.preventDefault();T.updateY.call(this)}this.refreshBorders()};c.pageDown=function(b,a,d){var e=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43]));if(a){b=null;var f=this.results?this.results[this.results.length-1]:this.rows.length-1}else this.results?(f=this.results.indexOf(e),f<this.results.length-1&&f++,f=this.results[f]):(f=e,e<this.options.data.length-1&&f++);if(f>e){if(null==b)this.tbody.textContent=_$_9989[3];else{e=b;if(this.options.mergeCells){var g=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));
|
|
73
|
+
e+=ba.getHeight.call(this,g)}for(g=0;g<e;g++)this.tbody.removeChild(this.tbody.firstChild)}c.renderY.call(this,f,a,b);c.adjustY.call(this,!0);d&&d.preventDefault();T.updateY.call(this)}this.refreshBorders()};c.removeColumns=function(b,a){var d=null===a?this.headerContainer.lastChild:this.headerContainer.children[a];if(d)d=parseInt(d.getAttribute(_$_9989[42]));else return!1;if(this.options.mergeCells){for(var e=0,f=d,g=0;g<b;g++){var h=ba.getWidth.call(this,f);h>e&&(e=h);null===a?f--:f++}b+=e}b>=this.headerContainer.children.length&&
|
|
74
|
+
(b=this.headerContainer.children.length-1);if((e=this.options.nestedHeaders)&&e.length)for(f=0;f<e.length;f++)for(h=pa.getColumns.call(this,f),g=0;g<b;g++)if(void 0!==h[d+g]&&this.nested.content[f][h[d+g]]){var l=this.nested.content[f][h[d+g]].element,m=l.getAttribute(_$_9989[52]);0<m&&m--;0<m?l.setAttribute(_$_9989[52],m):l.parentNode&&this.thead.children[f].removeChild(l)}for(g=0;g<b;g++)null===a?(this.headerContainer.removeChild(this.headerContainer.lastChild),this.colgroupContainer.removeChild(this.colgroupContainer.lastChild)):
|
|
75
75
|
this.headerContainer.children[a]&&(this.headerContainer.removeChild(this.headerContainer.children[a]),this.colgroupContainer.removeChild(this.colgroupContainer.children[a]));for(f=0;f<this.tbody.children.length;f++)for(g=0;g<b;g++)null===a?this.tbody.children[f].removeChild(this.tbody.children[f].lastChild):this.tbody.children[f].children[a]&&this.tbody.children[f].removeChild(this.tbody.children[f].children[a]);for(f=0;f<this.tfoot.children.length;f++)for(g=0;g<b;g++)null===a?this.tfoot.children[f].removeChild(this.tfoot.children[f].lastChild):
|
|
76
|
-
this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};c.pageLeft=function(b,a){var d=this.options.freezeColumns||0;if(a){b=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$
|
|
77
|
-
1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$
|
|
78
|
-
c.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$
|
|
79
|
-
f===e&&(b?g--:g++,c.renderX.call(this,g,b));if(!0===a){b=[];for(d+=1;d<this.thead.lastChild.children.length;d++)k.call(this,this.tbody.firstChild.children[d],2)||b.push(d);b.length&&c.removeColumns.call(this,b.length,b[0])}};c.adjustY=function(b,a){if(b)var d=this.rows.length-1,e=parseInt(this.tbody.lastChild.getAttribute(_$
|
|
80
|
-
e==d&&(this.results?(d=this.results.indexOf(f),f=b?this.results[d-1]:this.results[d+1]):b?f--:f++,c.renderY.call(this,f,b));if(!0===a){b=[];for(a=0;a<this.tbody.children.length;a++)this.tbody.children[a].children[1]&&(k.call(this,this.tbody.children[a].children[1],2)||b.push(this.tbody.children[a].firstChild.getAttribute(_$
|
|
81
|
-
d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$
|
|
82
|
-
_$
|
|
83
|
-
1,e),
|
|
84
|
-
(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var
|
|
85
|
-
(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,1,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.down=function(b,a,d){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:{var g=e,h=f,l=h,
|
|
86
|
-
this.rows[
|
|
87
|
-
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=
|
|
88
|
-
d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,0,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.first=function(b,a){a?c.up.call(this,b,!0,!0):c.left.call(this,b,!0,!0)};c.last=function(b,a){a?c.down.call(this,b,!0,!0):c.right.call(this,b,!0,!0)};return c}(),
|
|
89
|
-
function(){
|
|
90
|
-
this.options.tableHeight);this.tbody.innerHTML=_$
|
|
91
|
-
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:_$
|
|
92
|
-
filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0},c={application:_$
|
|
93
|
-
allowRenameWorksheet:!0,allowMoveWorksheet:!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,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,
|
|
94
|
-
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,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,
|
|
95
|
-
onsearch:null,onbeforefilter:null,onfilter:null,oncreatecell:null,oncreaterow:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,wordWrap:!0,about:!0,license:null,worksheets: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==_$
|
|
96
|
-
(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$
|
|
97
|
-
{type:_$
|
|
98
|
-
jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$
|
|
99
|
-
group:f.parent.name,success:function(g){g=
|
|
100
|
-
g)}}):a.call(f)};d[_$
|
|
101
|
-
(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));
|
|
102
|
-
this.history[this.historyIndex--];if(c){this.ignoreHistory=!0;var b=c.worksheet;b.openWorksheet();var a=[];if(c.action==_$
|
|
103
|
-
c.data,c.extra),
|
|
104
|
-
_$
|
|
105
|
-
_$
|
|
106
|
-
c.action==_$
|
|
107
|
-
c.newValue):c.action==_$
|
|
108
|
-
|
|
109
|
-
function(c,b){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=0;d<a.length;d++)if(typeof this.plugins[a[d]][c]==_$
|
|
110
|
-
c]};k.open=function(c,b,a){if(!
|
|
111
|
-
!1;
|
|
112
|
-
this.edition=c,f.classList.add(_$
|
|
113
|
-
a.element.innerText==_$
|
|
114
|
-
(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);
|
|
115
|
-
(e.setAttribute(_$
|
|
116
|
-
b.target.classList.add(_$
|
|
117
|
-
k.getId;c.setRowId=k.setId;c.getRowById=k.getRowById};k[_$
|
|
118
|
-
if(c.length){for(var d=0;d<c.length;d++)b=a[c[d]],this.rows[c[d]].id=b,k[_$
|
|
119
|
-
a[g]||(a[g]={id:h,row:g,data:{}});f=
|
|
120
|
-
h)return!1;if(h=
|
|
121
|
-
l.success?typeof e===_$
|
|
122
|
-
k=-1==k.indexOf(_$
|
|
123
|
-
d=a[0],e=a[1],f=a[2];a=a[3];k=k?_$
|
|
124
|
-
k.all;c.isSelected=k.isSelected;c.getHighlighted=k.getHighlighted;c.getRange=k.getRange};k.getHighlighted=function(){var c=this.borders;return(c=c.main)?[c.x1,c.y1,c.x2,c.y2]:null};k.isSelected=function(c,b,a){if(!a&&(a=this.getHighlighted(),!a))return!1;var d=a[0],e=a[1],f=a[2];a=a[3];f||(f=d);a||(a=e);return null==c?b>=e&&b<=a:null==b?c>=d&&c<=f:c>=d&&
|
|
125
|
-
this.resetBorders(_$
|
|
126
|
-
c,b,a,d))return!1;if(null!=c){if(parseInt(c)<parseInt(a))var h=parseInt(c),l=parseInt(a);else h=parseInt(a),l=parseInt(c);if(parseInt(b)<parseInt(d))var
|
|
127
|
-
h&&(h=
|
|
128
|
-
t.current,this.selectedCell))};k.fromElements=function(c,b,a){var d=c.getAttribute(_$
|
|
129
|
-
var a=this.options.worksheetName;a=-1!=a.indexOf(_$
|
|
130
|
-
this.borders[g];else{var l={};l.element=document.createElement(_$
|
|
131
|
-
this.rows[d].element.offsetTop:0,
|
|
132
|
-
this.thead.lastChild.children[1].style.display==_$
|
|
133
|
-
this.headers[
|
|
134
|
-
this.rows[x].element.offsetHeight,l.element.style.borderBottomColor=g==_$
|
|
135
|
-
e>h&&(e-=h,e>
|
|
136
|
-
_$
|
|
137
|
-
a!=_$
|
|
138
|
-
k[_$
|
|
139
|
-
function(c,b){};return k}(),
|
|
140
|
-
this.getSelectedRows(!0);c=d.indexOf(parseInt(k.event.y));if(d.length&&-1<c)for(var e=0;e<d.length;e++)b.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==c?(d.push(k.event.y),b.push(k.event.h)):b[c]=k.event.h;this.setHeight(d,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$
|
|
141
|
-
|
|
142
|
-
return k}(),
|
|
143
|
-
b.style.display=_$
|
|
144
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
145
|
-
this.content.getBoundingClientRect();this.parent.helper.style.left=(c?b.left:b.right)-a.left+_$
|
|
146
|
-
a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$
|
|
147
|
-
this.tbody.children[c].getAttribute(_$
|
|
148
|
-
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(_$
|
|
149
|
-
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$
|
|
150
|
-
|
|
151
|
-
this.parent.helper.style.left=(b?a.left:a.right)-d.left+_$
|
|
152
|
-
|
|
153
|
-
b,a){if(!
|
|
154
|
-
|
|
155
|
-
(l&&
|
|
156
|
-
{},d={};typeof c==_$
|
|
157
|
-
c=
|
|
158
|
-
_$
|
|
159
|
-
e+h,d+c,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(c,b,a,d){if(1==b)var e=[a];else{e=[];for(var f=a;f<a+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=
|
|
160
|
-
l[h[f]][1]);k.build.call(this)};k.build=function(){var c=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(c)for(var b=Object.keys(c),a=0;a<b.length;a++){for(var d=
|
|
161
|
-
0;a<b.length;a++)!1===c[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),
|
|
162
|
-
if(a=this.options.columns[c]){var d=k[_$
|
|
163
|
-
f=document.createElement(_$
|
|
164
|
-
this.headers[c]=f;this.colgroup[c]=d};return k}(),
|
|
165
|
-
1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},c=function(b){b.getFooter=c[_$
|
|
166
|
-
G.call(this,_$
|
|
167
|
-
null;this.footers.content=null;this.tfoot.innerHTML=_$
|
|
168
|
-
a);this.options.columns[b].type==_$
|
|
169
|
-
(this.options.footers[b][a]=_$
|
|
170
|
-
f[d].splice(b),
|
|
171
|
-
return c}(),
|
|
172
|
-
b=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$
|
|
173
|
-
a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$
|
|
174
|
-
a=0;a<c.length;a++)for(var d=c[a].colspan,e=0;e<d;e++)b.push(a);return b};k.create=function(c,b){if(this.nested.content[b][c])return this.nested.content[b][c].element;var a=this.options.nestedHeaders[b][c]||{},d=this.nested.content[b][c]={};a.colspan||(a.colspan=1);a.align||(a.align=_$
|
|
175
|
-
e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var c=0;c<this.options.nestedHeaders.length;c++){this.nested.content[c]=[];var b=document.createElement(_$
|
|
176
|
-
a=0;a<b.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){c=this.thead.lastChild.children[d].getAttribute(_$
|
|
177
|
-
c&&0<this.options.freezeColumns&&(d.classList.add(_$
|
|
178
|
-
a)){d[a]=[];for(f=0;f<b;f++){var h=g[c+f];typeof d[a][h]==_$
|
|
179
|
-
p++;for(var
|
|
180
|
-
b=parseInt(b);null!=c&&null!=b&&(0<c-
|
|
181
|
-
d.length)c=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],
|
|
182
|
-
|
|
183
|
-
(y=new Date(
|
|
184
|
-
d,e))};k.end=function(c){
|
|
185
|
-
c.cut=function(){return c.copy(!0)}};k[_$
|
|
186
|
-
q,p);void 0!==l&&(
|
|
187
|
-
_$
|
|
188
|
-
var b={},a=[],d={};var e=Object.keys(c[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=c.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===c[g]&&(c[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)c[g].data[h]||(c[g].data[h]=_$
|
|
189
|
-
d[l[h]]?e=d[l[h]]:-1<l[h]&&(e=parseInt(l[h])),null!==e&&a.push({x:e,y:f,value:c[g].data[l[h]]});c[g].id&&(b[f]=c[g].id)}
|
|
190
|
-
this.resetSelection();this.tbody.innerText=_$
|
|
191
|
-
jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$
|
|
192
|
-
c,!0));return b}return JSON.parse(JSON.stringify(this.options.data[c]))};k.setRowData=function(c,b,a){for(var d=[],e=0;e<this.options.columns.length;e++)typeof b[e]===_$
|
|
193
|
-
b,a){for(var d=[],e=0;e<this.rows.length;e++)typeof b[e]===_$
|
|
194
|
-
e,this.parent.textarea.select(),document.execCommand(_$
|
|
195
|
-
q,!0,_$
|
|
196
|
-
_$
|
|
197
|
-
this.results&&0<=this.results.indexOf(
|
|
198
|
-
|
|
199
|
-
null,b,this.options.csvDelimiter);b=new Blob([_$
|
|
200
|
-
(c=[c]);void 0==c[0]||Array.isArray(c[0])||typeof c[0]==_$
|
|
201
|
-
function(c){c.getDefinedNames=k[_$
|
|
202
|
-
a[e[g]],c,b,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$
|
|
203
|
-
_$
|
|
204
|
-
|
|
205
|
-
(a.call(f.worksheet),typeof f.onchange==_$
|
|
206
|
-
_$
|
|
207
|
-
function(f,g,h,l,
|
|
208
|
-
|
|
209
|
-
else{if(
|
|
210
|
-
document.execCommand(_$
|
|
211
|
-
_$
|
|
212
|
-
|
|
213
|
-
p[
|
|
214
|
-
_$
|
|
215
|
-
p
|
|
216
|
-
E);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
k.test(h[
|
|
221
|
-
h)return[];var l=[],
|
|
222
|
-
|
|
223
|
-
(
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
[],
|
|
227
|
-
|
|
228
|
-
_$
|
|
229
|
-
|
|
230
|
-
h.replace(/!/g,_$
|
|
231
|
-
k.getFromCoords;c.setValue=k[_$
|
|
232
|
-
k[_$
|
|
233
|
-
|
|
234
|
-
c=this.getPrimaryKey();if(!1!==c)for(l=0;l<g.length;l++)g[l].x===c&&g[l].value&&
|
|
235
|
-
y:e,value:f})}}c.length&&k[_$
|
|
236
|
-
c,b),f=e[1];f.type!=_$
|
|
237
|
-
_$
|
|
238
|
-
c.updateCell=k.update;c.updateCells=k.updateAll;c.getSelected=k.selected;c.getCells=k.getCells;c.setCells=k.setCells;c.isAttached=k.attached};k.attached=function(c,b){return this.records[b]&&this.records[b][c]&&this.records[b][c].element&&this.records[b][c].element.parentNode&&this.records[b][c].element.parentNode.parentNode?!0:!1};k[_$
|
|
239
|
-
this.records[b][c].element)return this.records[b][c].element;var d=
|
|
240
|
-
function(){var c=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)c.push(a);return c};k.updateAll=function(c){for(var b=this.getPrimaryKey(),a=[],d=0;d<c.length;d++)void 0!==c[d].id?(
|
|
241
|
-
{x:c,y:b};else{d=
|
|
242
|
-
c);e.setAttribute(_$
|
|
243
|
-
a[c][b]=this.getValue(b):c==_$
|
|
244
|
-
function(c,b,a,d){if(!d){d=
|
|
245
|
-
this.options.columns[b];c.style.textAlign||(c.style.textAlign=f.align?f.align:this.options.defaultColAlign);!1===this.records[a][b].readonly||1!=this.records[a][b].readonly&&1!=f.readOnly&&1!=f.readonly||c.classList.add(_$
|
|
246
|
-
1].offsetWidth?_$
|
|
247
|
-
this.options.cells};k.setCells=function(c,b){if(!
|
|
248
|
-
c[_$
|
|
249
|
-
this.rows[b]||
|
|
250
|
-
this.options.rows[b].id));
|
|
251
|
-
d=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[a].element)?(d=
|
|
252
|
-
0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);
|
|
253
|
-
!1;var f=[];if(0<b)var g=parseInt(b);else g=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=
|
|
254
|
-
e[
|
|
255
|
-
(h=this.results[this.results.length-1]);e=!1;
|
|
256
|
-
|
|
257
|
-
this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$
|
|
258
|
-
a[0]?(b=parseInt(a[0].getAttribute(_$
|
|
259
|
-
parseInt(this.tbody.firstChild.getAttribute(_$
|
|
260
|
-
b;
|
|
261
|
-
this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var
|
|
262
|
-
for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$
|
|
263
|
-
b.deleteColumn=c.del;b.getProperties=c.properties;b.setProperties=c.properties;b.getProperty=c.properties;b.setProperty=c.properties;b.showColumn=k.bind(b,!0);b.hideColumn=k.bind(b,!1)};c[_$
|
|
264
|
-
function(b,a){var d=this.options.columns[b];Object.keys(this.options.cells).length&&void 0!==a&&(b=
|
|
265
|
-
!1;if(!this.options.columns[a])return console.error(_$
|
|
266
|
-
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++){var g=this.tbody.children[f].getAttribute(_$
|
|
267
|
-
null,this.tfoot.children[f].insertBefore(
|
|
76
|
+
this.tfoot.children[f].removeChild(this.tfoot.children[f].children[a])};c.pageLeft=function(b,a){var d=this.options.freezeColumns||0;if(a){b=null;var e=d}else e=parseInt(this.thead.lastChild.children[d+1].getAttribute(_$_9989[42]))-1;e>=d&&(null==b?c.reset.call(this):c.removeColumns.call(this,b,null),c.renderX.call(this,e,!a,b),c.adjustX.call(this,!1),T.updateX.call(this));this.refreshBorders()};c.pageRight=function(b,a){var d=this.options.freezeColumns||0;if(a){b=null;var e=this.options.columns.length-
|
|
77
|
+
1}else e=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_9989[42]))+1;e<this.options.columns.length&&(null==b?c.reset.call(this):c.removeColumns.call(this,b,d+1),c.renderX.call(this,e,a,b),c.adjustX.call(this,!0),T.updateX.call(this));this.refreshBorders()};c.reset=function(b){1<this.headerContainer.children.length&&(b=b?0:this.options.freezeColumns||0,c.removeColumns.call(this,this.headerContainer.children.length-(b+1),b+1))};c.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$_9989[42]))};
|
|
78
|
+
c.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]))};c.adjustX=function(b,a){var d=this.options.freezeColumns||0;if(b)var e=this.options.columns.length-1,f=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_9989[42])),g=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_9989[42]));else e=d,f=parseInt(this.tbody.firstChild.children[d+1].getAttribute(_$_9989[42])),g=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_9989[42]));
|
|
79
|
+
f===e&&(b?g--:g++,c.renderX.call(this,g,b));if(!0===a){b=[];for(d+=1;d<this.thead.lastChild.children.length;d++)k.call(this,this.tbody.firstChild.children[d],2)||b.push(d);b.length&&c.removeColumns.call(this,b.length,b[0])}};c.adjustY=function(b,a){if(b)var d=this.rows.length-1,e=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43])),f=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));else d=0,e=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43])),f=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43]));
|
|
80
|
+
e==d&&(this.results?(d=this.results.indexOf(f),f=b?this.results[d-1]:this.results[d+1]):b?f--:f++,c.renderY.call(this,f,b));if(!0===a){b=[];for(a=0;a<this.tbody.children.length;a++)this.tbody.children[a].children[1]&&(k.call(this,this.tbody.children[a].children[1],2)||b.push(this.tbody.children[a].firstChild.getAttribute(_$_9989[43])));if(b.length)for(a=0;a<b.length;a++)this.rows[b[a]].element.remove()}};c.isVisible=k;return c}(),La=function(k,c,b,a){for(var d=this.options.columns,e=k,f,g=null;k<
|
|
81
|
+
d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$_9989[49]){f=this.records[c]&&this.records[c][k].v===_$_9989[3]?!1:!0;null===g&&(g=f);if(this.records[c]&&this.records[c][k].element&&this.records[c][k].element.style.display==_$_9989[40]){if(this.records[c][k].merged){if(k==k+this.records[c][k].merged[0]&&(e=k,!b))break;f=!1}}else{if(b&&f!==g&&!a)break;if(b)e=k;else return k}g=f}return e},Ma=function(k,c,b,a){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==
|
|
82
|
+
_$_9989[49]){f=this.records[c]&&this.records[c][k].v===_$_9989[3]?!1:!0;null===g&&(g=f);if(this.records[c]&&this.records[c][k].element&&this.records[c][k].element.style.display==_$_9989[40]){if(this.records[c][k].merged){e=k-this.records[c][k].merged[0];if(!b)break;f=!0}}else{if(b&&f!==g&&!a)break;if(b)e=k;else return k}g=f}return e},Sa=function(){var k=function(b,a,d,e){1==b||3==b?za.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==b?G.pageUp.call(this,1,e):G.pageDown.call(this,
|
|
83
|
+
1,e),za.attached.call(this,d)||G[_$_9989[46]].call(this,d))):M.attached.call(this,a,d)||(0==b?G.pageLeft.call(this,1,e):G.pageRight.call(this,1,e),M.attached.call(this,a,d)||G[_$_9989[46]].call(this,d,a))},c=function(b){b.up=c.up;b.down=c.down;b.right=c.right;b.left=c.left;b.last=c.last;b.first=c.first};c.up=function(b,a,d){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:{var g=e,h=f,l=h,m=null;if(this.results&&
|
|
84
|
+
(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var n=this.results?this.results[h]:h;if(!1!==this.rows[n].visible){var p=this.records[n][g].v===_$_9989[3]?!1:!0;null===m&&(m=p);if(this.records[n][g].element&&this.records[n][g].element.style.display==_$_9989[40]){if(this.records[n][g].merged){l=n-this.records[n][g].merged[1];if(!a)break;p=!0}}else if(a&&p!==m&&!d){d=l;break a}else if(a)l=this.records[n][g].merged?n-this.records[n][g].merged[1]:n;else{d=n;break a}m=p}}d=l}d!=f&&(f=d,b?
|
|
85
|
+
(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,1,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.down=function(b,a,d){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:{var g=e,h=f,l=h,m=null;if(this.results){h=this.results.indexOf(h);if(-1==h){d=l;break a}var n=this.results.length-1}else n=this.rows.length-1;for(;h<n;){h++;var p=this.results?this.results[h]:h;if(!1!==
|
|
86
|
+
this.rows[p].visible){var q=this.records[p][g].v===_$_9989[3]?!1:!0;null===m&&(m=q);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_9989[40]){if(this.records[p][g].merged){if(!this.records[p][g].merged[1]&&(l=p,!a))break;q=!0}}else if(a&&q!==m&&!d){d=l;break a}else if(a)l=p;else{d=p;break a}m=q}}d=l}d!=f&&(f=d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,3,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.right=function(b,a,d){if(b)var e=
|
|
87
|
+
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=La.call(this,e,f,a,d);d!=e&&(e=d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,2,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.left=function(b,a,d){if(b)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ma.call(this,e,f,a,d);d!=e&&(e=
|
|
88
|
+
d,b?(b=this.selectedCell[0],d=this.selectedCell[1]):(b=e,d=f,e=b,f=d),k.call(this,0,e,f,a),this.updateSelectionFromCoords(b,d,e,f))};c.first=function(b,a){a?c.up.call(this,b,!0,!0):c.left.call(this,b,!0,!0)};c.last=function(b,a){a?c.down.call(this,b,!0,!0):c.right.call(this,b,!0,!0)};return c}(),Ta=function(){return function(k){k.save=Na;k.fullscreen=Ja;k.setReadOnly=Fa;k.getReadOnly=Fa;k.isReadOnly=Fa;k.setPlugins=function(c){na.call(this.parent,c)};k.showIndex=function(){xa.call(this,!0)};k.hideIndex=
|
|
89
|
+
function(){xa.call(this,!1)};k[_$_9989[46]]=G[_$_9989[46]];k.undo=function(){U.undo.call(k.parent)};k.redo=function(){U.redo.call(k.parent)};k.isEditable=function(){return Q.call(k.parent,k)};k.dispatch=function(){return F.apply(this.parent,arguments)};k.setViewport=function(c,b){this.options.tableOverflow=!0;c=parseInt(c);b=parseInt(b);this.content.style.overflow=_$_9989[49];100<c&&(this.options.tableWidth=c+_$_9989[44],this.content.style.maxWidth=this.options.tableWidth);100<b&&(this.options.tableHeight=
|
|
90
|
+
parseInt(b)+_$_9989[44],this.content.style.maxHeight=this.options.tableHeight);this.tbody.innerHTML=_$_9989[3];G.call(this);T.refresh.call(this);fa.update.call(this.parent,this)}}}(),Ca=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:_$_9989[53],minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_9989[36],csvHeaders:!0,csvDelimiter:_$_9989[25],
|
|
91
|
+
columnSorting:!0,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:_$_9989[54],tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_9989[3],
|
|
92
|
+
worksheetName:null,worksheetState:null,filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0},c={application:_$_9989[55],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,editorFormulas:!0,autoIncrement:!0,autoCasting:!0,stripHTML:!1,
|
|
93
|
+
tabs:!1,allowDeleteWorksheet:!0,allowRenameWorksheet:!0,allowMoveWorksheet:!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,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresizerow:null,onresizecolumn:null,
|
|
94
|
+
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,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,
|
|
95
|
+
onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,oncreatecell:null,oncreaterow:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,wordWrap:!0,about:!0,license:null,worksheets: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==_$_9989[17]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=
|
|
96
|
+
this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_9989[13]){var f=this.options.data[0].data&&0<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=
|
|
97
|
+
_$_9989[56]):this.options.columns[g]={type:_$_9989[56]},this.options.columns[g].type==_$_9989[57]&&(this.options.columns[g].type=_$_9989[58],this.options.columns[g].autocomplete=!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=this.options.defaultColWidth),this.options.columns[g].type!=_$_9989[58]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==
|
|
98
|
+
_$_9989[58]&&this.options.columns[g].url&&jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_9989[59],dataType:_$_9989[60],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_9989[51]];e.setConfig=d[_$_9989[11]]};d.spreadsheet=function(e){this.config=b(e,c);1!=this.config.secureFormulas&&console.log(_$_9989[61])};d.worksheet=function(e){var f=this;f.options=b(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,
|
|
99
|
+
method:_$_9989[59],dataType:_$_9989[56],group:f.parent.name,success:function(g){g=E.parseCSV(g,f.options.csvDelimiter);if(1==f.options.csvHeaders&&0<g.length)for(var h=g.shift(),l=0;l<h.length;l++)f.options.columns[l]||(f.options.columns[l]={type:_$_9989[56],align:f.options.defaultColAlign,width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_9989[13]&&(f.options.columns[l].title=h[l]);a.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_9989[59],dataType:_$_9989[60],
|
|
100
|
+
group:f.parent.name,success:function(g){a.call(f,g)}}):a.call(f)};d[_$_9989[51]]=function(){return this.options};d[_$_9989[11]]=function(e){typeof e==_$_9989[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_9989[13]&&(this.options[f[g]]=e[f[g]]);!0===e.filters?ca.show.call(this):!1===e.filters&&ca.hide.call(this);!0===e.search?qa.show.call(this):!1===e.search&&qa.hide.call(this);!0===e.toolbar?fa.show.call(this.parent):!1===e.toolbar&&fa.hide.call(this.parent);
|
|
101
|
+
e.minDimensions&&e.minDimensions[0]&&(f=parseInt(e.minDimensions[0])-this.headers.length,0<f&&this.insertColumn(f),f=parseInt(e.minDimensions[1])-this.rows.length,0<f&&this.insertRow(f));L.call(this,_$_9989[62],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof c[f[g]]!==_$_9989[13]&&(this.config[f[g]]=e[f[g]])};return d}(),U=function(k){k=function(c){if(1!=this.ignoreHistory){var b=++this.historyIndex;this.history=this.history.slice(0,b+1);this.history[b]=c}};k.undo=
|
|
102
|
+
function(){if(0<=this.historyIndex)var c=this.history[this.historyIndex--];if(c){this.ignoreHistory=!0;var b=c.worksheet;b.openWorksheet();var a=[];if(c.action==_$_9989[63])b.deleteRow(c.insertBefore?c.rowNumber:c.rowNumber+1,c.numOfRows);else if(c.action==_$_9989[64])b.insertRow(c.numOfRows,c.rowNumber,1,c.data),M.setAttributes.call(b,c.attributes);else if(c.action==_$_9989[65])b.deleteColumn(c.insertBefore?c.columnNumber:c.columnNumber+1,c.numOfColumns);else if(c.action==_$_9989[66])b.insertColumn(c.numOfColumns,
|
|
103
|
+
c.columnNumber,1,c.properties,c.data,c.extra),M.setAttributes.call(b,c.attributes);else if(c.action==_$_9989[67])b.moveRow(c.newValue,c.oldValue);else if(c.action==_$_9989[68])b.moveColumn(c.newValue,c.oldValue);else if(c.action==_$_9989[69])b.removeMerge(c.newValue,!0),b.setMerge(c.oldValue);else if(c.action==_$_9989[70])b.setMerge(c.oldValue);else if(c.action==_$_9989[71])b.setStyle(c.oldValue,null,null,1);else if(c.action==_$_9989[72])b.setStyle(c.oldValue);else if(c.action==_$_9989[73])b.setWidth(c.column,
|
|
104
|
+
c.oldValue);else if(c.action==_$_9989[74])b.setHeight(c.row,c.oldValue);else if(c.action==_$_9989[75])b.setHeader(c.column,c.oldValue);else if(c.action==_$_9989[76])b.setComments(c.oldValue);else if(c.action==_$_9989[77])b.setProperty(c.column,c.oldValue);else if(c.action==_$_9989[78])b.orderBy(c.column,c.direction?0:1,c.oldValue);else if(c.action==_$_9989[79]){for(var d=0;d<c.records.length;d++){var e={x:c.records[d].x,y:c.records[d].y,value:c.records[d].oldValue};c.records[d].oldStyle&&(e.style=
|
|
105
|
+
c.records[d].oldStyle);a.push(e)}b.setValue(a)}else c.action==_$_9989[80]?b.renameWorksheet(c.index,c.oldValue):c.action==_$_9989[81]&&b.moveWorksheet(c.t,c.f);c.selection&&b.updateSelectionFromCoords(c.selection);this.ignoreHistory=!1;F.call(this,_$_9989[82],b,c)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var c=this.history[++this.historyIndex];if(c){this.ignoreHistory=!0;var b=c.worksheet;b.openWorksheet();c.action==_$_9989[63]?b.insertRow(c.numOfRows,c.rowNumber,c.insertBefore,
|
|
106
|
+
c.data):c.action==_$_9989[64]?b.deleteRow(c.rowNumber,c.numOfRows):c.action==_$_9989[65]?b.insertColumn(c.numOfColumns,c.columnNumber,c.insertBefore,c.properties,c.data):c.action==_$_9989[66]?b.deleteColumn(c.columnNumber,c.numOfColumns):c.action==_$_9989[67]?b.moveRow(c.oldValue,c.newValue):c.action==_$_9989[68]?b.moveColumn(c.oldValue,c.newValue):c.action==_$_9989[69]?b.setMerge(c.newValue):c.action==_$_9989[70]?b.removeMerge(c.newValue):c.action==_$_9989[71]?b.setStyle(c.newValue,null,null,1):
|
|
107
|
+
c.action==_$_9989[72]?b.resetStyle(c.cells):c.action==_$_9989[73]?b.setWidth(c.column,c.newValue):c.action==_$_9989[74]?b.setHeight(c.row,c.newValue):c.action==_$_9989[75]?b.setHeader(c.column,c.newValue):c.action==_$_9989[76]?b.setComments(c.newValue):c.action==_$_9989[77]?b.setProperty(c.column,c.newValue):c.action==_$_9989[78]?b.orderBy(c.column,c.direction,c.newValue):c.action==_$_9989[79]?b.setValue(c.records):c.action==_$_9989[80]?b.renameWorksheet(c.index,c.newValue):c.action==_$_9989[81]&&
|
|
108
|
+
b.moveWorksheet(c.f,c.t);c.selection&&b.updateSelectionFromCoords(c.selection);this.ignoreHistory=!1;F.call(this,_$_9989[83],b,c)}};return k}(),na=function(){var k=function(c){var b=null;if(Array.isArray(c))b=c;else if(typeof c==_$_9989[84]){b=[];var a=Object.keys(c);for(var d=0;d<a.length;d++)b.push({name:a[d],plugin:c[a[d]],options:{}})}if(b&&b.length)for(d=0;d<b.length;d++){if(b[d].name&&b[d].plugin){var e=b[d].name;var f=b[d].plugin;var g=b[d].options}typeof f===_$_9989[85]&&(this.plugins[e]=
|
|
109
|
+
f.call(t,this,g,this.config),typeof f.license==_$_9989[85]&&t.license&&f.license(t.license))}};k.execute=function(c,b){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var d=0;d<a.length;d++)if(typeof this.plugins[a[d]][c]==_$_9989[85]){var e=this.plugins[a[d]][c].apply(this.plugins[a[d]],b);e&&(c==_$_9989[86]&&(b[4]=e),c==_$_9989[87]&&(b[0]=e))}return b}};return k}(),da=function(){var k=function(c){c.getEditor=k[_$_9989[51]];c.openEditor=k.open;c.closeEditor=k.close};k[_$_9989[51]]=
|
|
110
|
+
function(c,b){c=Ga.getOptions.call(this,c,b);return[c.type&&typeof c.type==_$_9989[84]?c.type:t.editors[c.type],c]};k.open=function(c,b,a){if(!Q.call(this.parent,this))return!1;if(1!=c.classList.contains(_$_9989[18])){var d=parseInt(c.getAttribute(_$_9989[42])),e=parseInt(c.getAttribute(_$_9989[43]));if(!0===this.options.locked){var f=E.getColumnNameFromCoords(d,e);if(!this.options.cells||!this.options.cells[f]||!1!==this.options.cells[f].locked)return!1}if(f=this.records[e][d].merged)d-=f[0],e-=
|
|
111
|
+
f[1],c=this.records[e][d].element;if(!M.attached.call(this,d,e)){if(this.results&&0<this.results.length)return console.error(_$_9989[88]),!1;G[_$_9989[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;f.innerText=_$_9989[3];F.call(this.parent,_$_9989[89],this,c,d,e);b=1==b?_$_9989[3]:N.call(this,d,e);var g=k[_$_9989[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_9989[85]&&(!1===g[0].openEditor(c,b,d,e,this,g[1],a)?h=!1:F.call(this.parent,_$_9989[90],this,c,d,e,f,g[1]));h&&(1==
|
|
112
|
+
this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_9989[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_9989[49])),this.edition=c,f.classList.add(_$_9989[91]),1==this.parent.config.editorFormulas&&P(b)&&(f.classList.add(_$_9989[92]),ka.parse.call(this,f),c=document.createTextNode(_$_9989[3]),f.appendChild(c),jSuites.focus(f)))}};k.close=function(c,b){null===c&&(c=this.edition);this.parent.input.classList.contains(_$_9989[92])&&ka.close.call(this,this.parent.input);var a,
|
|
113
|
+
d=parseInt(c.getAttribute(_$_9989[42])),e=parseInt(c.getAttribute(_$_9989[43]));1==this.options.textOverflow&&(a=this.records[e][d+1])&&a.element&&a.element.innerText==_$_9989[3]&&(this.records[e][d].element.style.overflow=_$_9989[3]);a=k[_$_9989[51]].call(this,d,e);if(1==b){var f=null;if(typeof a[0].closeEditor==_$_9989[85]){var g=a[0].closeEditor(c,!0,d,e,this,a[1]);void 0!==g&&(f=g)}null!==f&&N.call(this,d,e)!=f&&this.setValue(c,f)}else a[0].closeEditor(c,!1,d,e,this,a[1]);F.call(this.parent,_$_9989[93],
|
|
114
|
+
this,c,d,e,f,b);a[1]&&typeof a[1].render==_$_9989[85]&&a[1].render.call(this,c,this.records[e][d].v,d,e,this,a[1]);a=this.parent.input;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);da.build(this.parent);a.removeAttribute(_$_9989[94]);a.removeAttribute(_$_9989[95]);a.removeAttribute(_$_9989[96]);this.edition=a.mask=null;this.refreshBorders()};k.position=function(c,b){var a=null;if(a=this.records[b][c].element){var d=this.parent.element.getBoundingClientRect();
|
|
115
|
+
a=a.getBoundingClientRect();var e=this.parent.input;e.x=c;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$_9989[97]:(e.setAttribute(_$_9989[98],_$_9989[3]),c=a.top-d.top+1,b=a.left-d.left+1,e.style.top=c+_$_9989[44],e.style.left=b+_$_9989[44],e.style.minWidth=a.width-1+_$_9989[44],e.style.minHeight=a.height-1+_$_9989[44],setTimeout(function(){e.focus()},0))}};k.build=function(c){c.input||(c.input=document.createElement(_$_9989[20]));c.input.className=_$_9989[99];c.input.setAttribute(_$_9989[100],
|
|
116
|
+
!0);c.input.innerText=_$_9989[3];c.input.oninput=function(b){t.current.parent.config.editorFormulas=!0;P(b.target.innerText)?b.target.classList.add(_$_9989[92]):b.target.classList.contains(_$_9989[92])&&ka.close.call(t.current,this)};return c.input};return k}(),F=function(k){if(!this.ignoreEvents){if(typeof this.config.onevent==_$_9989[85])var c=this.config.onevent.apply(this,arguments);typeof this.config[k]==_$_9989[85]&&(c=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)));na.execute.call(this,
|
|
117
|
+
_$_9989[101],arguments)}return c},sa=function(){var k=function(c){c.sequence=0;c.getNextSequence=k.next;c.getRowId=k.getId;c.setRowId=k.setId;c.getRowById=k.getRowById};k[_$_9989[51]]=function(){return this.sequence};k[_$_9989[11]]=function(c,b){if(c>this.sequence||b)this.sequence=c};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(c){if(this.rows[c]&&this.rows[c].id)return this.rows[c].id;var b=this.getPrimaryKey();if(!1!==
|
|
118
|
+
b)return N.call(this,b,c)};k.setId=function(c,b){if(void 0!==b&&0<=parseInt(c)){var a={};a[c]=b}else a=c;c=Object.keys(a);if(c.length){for(var d=0;d<c.length;d++)b=a[c[d]],this.rows[c[d]].id=b,k[_$_9989[11]].call(this,b);L.call(this,_$_9989[102],[a]);F.call(this.parent,_$_9989[103],this,a)}};k.getRowById=function(c,b){for(var a=0;a<this.rows.length;a++)if(k.getId.call(this,a)==c)return!0===b?this.rows[a]:this.options.data[a];return!1};return k}(),Na=function(){var k=function(b){for(var a=[],d={},
|
|
119
|
+
e=0;e<b.length;e++){var f=b[e].x,g=b[e].y,h=sa.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=sa.next.call(this))d[g]=h;a[g]||(a[g]={id:h,row:g,data:{}});f=Z.call(this,f);a[g].data[f]=b[e].value}sa.setId.call(this,d);return a.filter(function(l){return null!=l})},c=function(b){var a=b[0];if(0<=[_$_9989[104],_$_9989[105],_$_9989[102],_$_9989[106]].indexOf(a))return!1;var d={};a==_$_9989[79]||a==_$_9989[107]?(a=_$_9989[108],d[a]=k.call(this,b[1].data)):Array.isArray(b[1])&&1==b[1].length?d[a]=b[1][0]:
|
|
120
|
+
d[a]=b[1];return d};return function(b,a,d,e){var f=this.parent,g=this;d=null;var h=c.call(this,a);if(h)a=h;else if(!1===h)return!1;if(h=F.call(f,_$_9989[109],f,g,a))a=h;else if(!1===h)return!1;Ka.call(f,!0);jSuites.ajax({url:b,method:_$_9989[110],dataType:_$_9989[60],data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_9989[111],_$_9989[112]+d)},success:function(l){f.element.classList.contains(_$_9989[113])&&f.element.classList.remove(_$_9989[113]);l&&(l.message&&
|
|
121
|
+
(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_9989[114]+l.message):jSuites.notification(l)),l.success?typeof e===_$_9989[85]?e(l):l.data&&Array.isArray(l.data)&&M.updateAll.call(g,l.data):l.error&&(alert(_$_9989[115]),window.open(window.location.href,_$_9989[116])));F.call(f,_$_9989[117],f,g,a,l)},error:function(){f.element.classList.add(_$_9989[113])}})}}(),L=function(){return function(){na.execute.call(this.parent,_$_9989[118],[this,arguments[0],arguments[1]]);
|
|
122
|
+
if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var c=this.parent.worksheets.indexOf(this);k=this.parent.config.server;k=-1==k.indexOf(_$_9989[119])?k+(_$_9989[120]+c):k+(_$_9989[121]+c)}else this.options.persistence&&(k=typeof this.options.persistence==_$_9989[17]?this.options.persistence:this.options.url);k&&Na.call(this,k,arguments)}}}(),Da=function(k){if(this.selectedCell){var c=this.selectedCell[0],b=this.selectedCell[1];this.records&&this.records[b]&&this.records[b][c]&&
|
|
123
|
+
this.records[b][c].element||(this.selectedCell=this.getHighlighted(),c=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),d=a[0],e=a[1],f=a[2];a=a[3];k=k?_$_9989[122]:_$_9989[123];if(this.records[b]&&this.records[b][c]&&this.records[b][c].element)this.records[b][c].element.classList[k](_$_9989[124]);for(c=d;c<=f;c++)if(this.headers[c])this.headers[c].classList[k](_$_9989[125]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[k](_$_9989[125])}},
|
|
124
|
+
ya=function(){var k=function(c){c.resetSelection=k.reset;c.updateSelection=k.fromElements;c.updateSelectionFromCoords=k[_$_9989[11]];c.selectAll=k.all;c.isSelected=k.isSelected;c.getHighlighted=k.getHighlighted;c.getRange=k.getRange};k.getHighlighted=function(){var c=this.borders;return(c=c.main)?[c.x1,c.y1,c.x2,c.y2]:null};k.isSelected=function(c,b,a){if(!a&&(a=this.getHighlighted(),!a))return!1;var d=a[0],e=a[1],f=a[2];a=a[3];f||(f=d);a||(a=e);return null==c?b>=e&&b<=a:null==b?c>=d&&c<=f:c>=d&&
|
|
125
|
+
c<=f&&b>=e&&b<=a};k.reset=function(){if(this.selectedCell)c=1,this.edition&&da.close.call(this,this.edition,!0),this.resetBorders(_$_9989[126],!0),this.resetBorders(_$_9989[127],!0),this.selectedCell=null,1==c&&F.call(this.parent,_$_9989[128],this);else var c=0;return c};k.refresh=function(){this.selectedCell&&k[_$_9989[11]].call(this,this.selectedCell)};k.isValid=function(c,b,a,d){return!(c>=this.options.columns.length||b>=this.rows.length||a>=this.options.columns.length||d>=this.rows.length)};k[_$_9989[11]]=
|
|
126
|
+
function(c,b,a,d,e,f,g){f||(f=_$_9989[126]);Array.isArray(c)&&(d=c[3],a=c[2],b=c[1],c=c[0]);null==a&&(a=c);null==d&&(d=b);if(!k.isValid.call(this,c,b,a,d))return!1;if(null!=c){if(parseInt(c)<parseInt(a))var h=parseInt(c),l=parseInt(a);else h=parseInt(a),l=parseInt(c);if(parseInt(b)<parseInt(d))var m=parseInt(b),n=parseInt(d);else m=parseInt(d),n=parseInt(b);var p;var q={};if(this.options.mergeCells){for(var v=m;v<=n;v++)for(var u=h;u<=l;u++)if(p=this.records[v][u].merged)p=E.getColumnNameFromCoords(u-
|
|
127
|
+
p[0],v-p[1]),q[p]=!0;v=Object.keys(q);if(v.length)for(u=0;u<v.length;u++)p=E.getCoordsFromColumnName(v[u]),q=this.options.mergeCells[v[u]],p[0]<h&&(h=p[0]),p[0]+q[0]-1>l&&(l=p[0]+q[0]-1),p[1]<m&&(m=p[1]),p[1]+q[1]-1>n&&(n=p[1]+q[1]-1)}}f==_$_9989[126]&&(this.selectedCell?(Da.call(this,!1),p=1):p=0,this.selectedCell=[c,b,a,d],this.records[d][a].element&&G.isVisible.call(this,this.records[d][a].element),da.position.call(this,c,b),0==p&&F.call(this.parent,_$_9989[129],this));ha[_$_9989[11]].call(this,
|
|
128
|
+
h,m,l,n,f,g);f==_$_9989[126]&&(na.execute.call(this.parent,_$_9989[130],[this,h,m,l,n,e]),F.call(this.parent,_$_9989[131],this,h,m,l,n,e),fa.update.call(this.parent,t.current,this.selectedCell))};k.fromElements=function(c,b,a){var d=c.getAttribute(_$_9989[42]);c=c.getAttribute(_$_9989[43]);if(b){var e=b.getAttribute(_$_9989[42]);b=b.getAttribute(_$_9989[43])}else e=d,b=c;this.updateSelectionFromCoords(d,c,e,b,a)};k.all=function(){k[_$_9989[11]].call(this,0,0,this.options.columns.length-1,this.records.length-
|
|
129
|
+
1)};k.getRange=function(){var c=this.selectedCell;if(!c)return _$_9989[3];var b=E.getColumnNameFromCoords(c[0],c[1]);c=E.getColumnNameFromCoords(c[2],c[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_9989[132])?_$_9989[133]+a+_$_9989[134]:a+_$_9989[135];return b==c?a+b:a+t.helpers.getRangeFromTokens(t.helpers.getTokensFromRange(b+_$_9989[136]+c))};return k}(),ha=function(){var k=function(a){a.borders=[];a.setBorder=k[_$_9989[11]];a.getBorder=k[_$_9989[51]];a.resetBorders=k.reset;a.refreshBorders=
|
|
130
|
+
k.refresh};k[_$_9989[51]]=function(a){return this.borders[a]};var c=function(a,d,e,f,g,h){g||(g=0);if(!ya.isValid.call(this,a,d,e,f))return!1;if(this.borders[g])l=this.borders[g];else{var l={};l.element=document.createElement(_$_9989[20]);l.element.classList.add(_$_9989[137]);g==_$_9989[127]||g==_$_9989[138]||g==_$_9989[126]?l.element.classList.add(_$_9989[139]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_9989[140],l.element.style.borderColor=h);this.content.appendChild(l.element)}l.x1=
|
|
131
|
+
a;l.y1=d;l.x2=e;l.y2=f;h=this.headers[a]?this.headers[a].offsetLeft:0;var m=this.headers[e]?this.headers[e].offsetLeft:0,n=this.rows[d].element?this.rows[d].element.offsetTop:0,p=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$_9989[141];l.element.style.left=_$_9989[141];l.active=0;var q=this.options.freezeColumns||0,v=!1,u=null,w=null,y=null,x=null;this.tbody.firstChild&&(w=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43])),x=parseInt(this.tbody.lastChild.getAttribute(_$_9989[43])));
|
|
132
|
+
this.thead.lastChild&&(u=parseInt(this.thead.lastChild.children[q+1].getAttribute(_$_9989[42])),y=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_9989[42])),this.thead.lastChild.children[1].style.display==_$_9989[40]&&(u=La.call(this,u,w)),this.thead.lastChild.lastChild.style.display==_$_9989[40]&&(y=Ma.call(this,y,x)));null==u||e<u&&a>=q||a>y||f<w||d>x||(h?l.element.style.borderLeftColor=l.color?l.color:_$_9989[3]:(h=this.thead.lastChild.children[q+1].offsetLeft,l.element.style.borderLeftColor=
|
|
133
|
+
g==_$_9989[127]?_$_9989[142]:_$_9989[143]),m?(m+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_9989[3]):(e>y?(m=this.headers[y].offsetLeft+this.headers[y].offsetWidth,v=!0):m=this.thead.lastChild.children[q].offsetLeft+this.thead.lastChild.children[q].offsetWidth,l.element.style.borderRightColor=g==_$_9989[127]?_$_9989[142]:_$_9989[143]),m=m-h-1,n?l.element.style.borderTopColor=l.color?l.color:_$_9989[3]:(n=this.tbody.firstChild.offsetTop,l.element.style.borderTopColor=
|
|
134
|
+
g==_$_9989[127]?_$_9989[142]:_$_9989[143]),p?(p+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_9989[3]):(p=this.rows[x].element.offsetTop+this.rows[x].element.offsetHeight,l.element.style.borderBottomColor=g==_$_9989[127]?_$_9989[142]:_$_9989[143],v=!0),p=p-n-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_9989[3],l.element.style.borderRightWidth=_$_9989[3],d=0<this.content.scrollLeft?ma.getWidth.call(this):0)&&(a=a<this.options.freezeColumns,
|
|
135
|
+
e=e<this.options.freezeColumns,a&&e||!a&&e||(a&&!e?(e=d+this.content.scrollLeft,e>h+m&&(l.element.style.borderRightWidth=_$_9989[144],m+=e-(h+m))):(e=d+this.content.scrollLeft,e>h&&(e-=h,e>m?h=n=-2E3:(h=h+e+1,m-=e,l.element.style.borderLeftWidth=_$_9989[144]))))),l.element.style.top=n+_$_9989[44],l.element.style.left=h+_$_9989[44],l.element.style.width=m+_$_9989[44],l.element.style.height=p+_$_9989[44],l.t=n,l.l=h,l.w=m,l.h=p,l.active=1);g==_$_9989[126]&&(l.active&&1!=v?(this.corner.style.top=n+p-
|
|
136
|
+
2+_$_9989[44],this.corner.style.left=h+m-2+_$_9989[44]):(this.corner.style.top=_$_9989[141],this.corner.style.left=_$_9989[141]));this.borders[g]=l},b=function(a,d){a.element.style.top=_$_9989[141];a.element.style.left=_$_9989[141];a.active=0;d&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};k[_$_9989[11]]=function(a,d,e,f,g,h){c.call(this,a,d,e,f,g,h);g==_$_9989[126]&&(Da.call(this,!0),L.call(this,_$_9989[104],{x1:a,y1:d,x2:e,y2:f}))};k.reset=function(a,d){a&&a!=_$_9989[126]||(this.corner.style.top=
|
|
137
|
+
_$_9989[141],this.corner.style.left=_$_9989[141],Da.call(this,!1));if(a)this.borders[a]&&b(this.borders[a],d);else{d=Object.keys(this.borders);for(var e=0;e<d.length;e++)b(this.borders[d[e]])}a&&a!=_$_9989[126]||L.call(this,_$_9989[105])};k.refresh=function(a){var d=this.borders;if(a)d[a]&&null!=d[a].x1&&c.call(this,d[a].x1,d[a].y1,d[a].x2,d[a].y2,a);else{a=Object.keys(d);for(var e=0;e<a.length;e++)d[a[e]]&&null!=d[a[e]].x1&&c.call(this,d[a[e]].x1,d[a[e]].y1,d[a[e]].x2,d[a[e]].y2,a[e])}this.edition&&
|
|
138
|
+
(d=this.parent.input,da.position.call(this,d.x,d.y))};k.destroy=function(a){var d;if(d=this.borders[a])d.element.remove(),delete this.borders[a]};return k}(),Ua=function(){var k=function(c){c.setGroup=k[_$_9989[11]];c.unsetGroup=k.unset};k[_$_9989[11]]=function(c,b,a){0==c&&(a=document.createElement(_$_9989[145]),a.classList.add(_$_9989[146]),this.thead.insertBefore(a,this.thead.firstChild),c=document.createElement(_$_9989[147]),c.innerHTML=_$_9989[148],a.appendChild(c),c=document.createElement(_$_9989[147]),
|
|
139
|
+
a.appendChild(c),b=this.headers[b])&&(b=b.querySelector(_$_9989[149]),b||(b=document.createElement(_$_9989[20]),b.classList.add(_$_9989[150]),b.innerText=_$_9989[151],c.appendChild(b)))};k.unset=function(c,b){};return k}(),va=function(){var k={start:function(c){if(!Q.call(this.parent,this))return!1;if(null!==c.target.getAttribute(_$_9989[43])){var b=c.target.getAttribute(_$_9989[43]);k.event={y:parseInt(b),h:c.target.offsetHeight,p:c.pageY}}else null!==c.target.getAttribute(_$_9989[42])&&(b=c.target.getAttribute(_$_9989[42]),
|
|
140
|
+
k.event={x:parseInt(b),w:c.target.offsetWidth,p:c.pageX})},end:function(c){var b=[];if(null!=k.event.y){var a=parseInt(this.rows[k.event.y].element.offsetHeight);var d=this.getSelectedRows(!0);c=d.indexOf(parseInt(k.event.y));if(d.length&&-1<c)for(var e=0;e<d.length;e++)b.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==c?(d.push(k.event.y),b.push(k.event.h)):b[c]=k.event.h;this.setHeight(d,a,b)}else if(null!=k.event.x){a=parseInt(this.colgroup[k.event.x].getAttribute(_$_9989[152]));
|
|
141
|
+
d=this.getSelectedColumns();c=d.indexOf(parseInt(k.event.x));if(d.length&&-1<c)for(e=0;e<d.length;e++)b.push(parseInt(this.options.columns[d[e]].width));else d=[];-1==c?(d.push(k.event.x),b.push(k.event.w)):b[c]=k.event.w;this.setWidth(d,a,b)}k.event=null},update:function(c){null!=k.event.y?(c=c.pageY-k.event.p,0<k.event.h+c&&(this.rows[k.event.y].element.style.height=k.event.h+c+_$_9989[44],this.refreshBorders())):null!=k.event.x&&(c=c.pageX-k.event.p,0<k.event.w+c&&(this.colgroup[k.event.x].setAttribute(_$_9989[152],
|
|
142
|
+
k.event.w+c),this.options.columns[k.event.x].width=k.event.w+c,0<this.options.freezeColumns&&ma.width.call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};return k}(),Oa=function(){var k={start:function(c){var b=this.parent.helper;c=parseInt(c.target.getAttribute(_$_9989[42]));if(this.merged.cols[c])console.error(_$_9989[153]);else{k.event={x:c,d:c};this.headers[c].classList.add(_$_9989[154]);for(var a=0;a<this.tbody.children.length;a++){var d=this.tbody.children[a].getAttribute(_$_9989[43]);
|
|
143
|
+
this.records[d][c].element.classList.add(_$_9989[154])}a=this.parent.element.getBoundingClientRect();c=this.headers[c].getBoundingClientRect();d=this.content.getBoundingClientRect();b.style.display=_$_9989[16];b.style.top=d.top-a.top+_$_9989[44];b.style.left=c.left-d.left+_$_9989[44];b.style.width=_$_9989[155];b.style.height=d.height+_$_9989[44];b.classList.add(_$_9989[156])}},end:function(){this.headers[k.event.x].classList.remove(_$_9989[154]);for(var c=0;c<this.tbody.children.length;c++){var b=
|
|
144
|
+
this.tbody.children[c].getAttribute(_$_9989[43]);this.records[b][k.event.x].element.classList.remove(_$_9989[154])}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(_$_9989[156]);this.parent.helper.style.display=_$_9989[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(c){var b=c.target.getAttribute(_$_9989[42]);if(null!=b)if(b=parseInt(b),this.merged.cols[b])console.error(_$_9989[153]);
|
|
145
|
+
else{c=c.target.clientWidth/2>c.offsetX;k.event.d=c?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=(c?b.left:b.right)-a.left+_$_9989[44]}}};return k}(),ra=function(){var k={start:function(c){if(Q.call(this.parent,this)){this.resetSelection();var b=this.parent.helper;if(null!==c.target.getAttribute(_$_9989[43])){var a=parseInt(c.target.getAttribute(_$_9989[43]));
|
|
146
|
+
this.merged.rows[a]?console.error(_$_9989[157]):this.results?console.error(_$_9989[158]):(k.event={y:a,d:a},this.rows[a].element.classList.add(_$_9989[154]),c=this.parent.element.getBoundingClientRect(),a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$_9989[16],b.style.top=a.top-c.top+_$_9989[44],b.style.left=_$_9989[159],b.style.width=this.content.offsetWidth-50+_$_9989[44],b.style.height=_$_9989[155],b.classList.add(_$_9989[160]))}else if(null!==c.target.getAttribute(_$_9989[42]))if(a=
|
|
147
|
+
parseInt(c.target.getAttribute(_$_9989[42])),this.merged.cols[a])console.error(_$_9989[153]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_9989[154]);for(c=0;c<this.tbody.children.length;c++){var d=this.tbody.children[c].getAttribute(_$_9989[43]);this.records[d][a].element.classList.add(_$_9989[154])}c=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();b.style.display=_$_9989[16];b.style.top=d.top-c.top+_$_9989[44];
|
|
148
|
+
b.style.left=a.left-d.left+_$_9989[44];b.style.width=_$_9989[155];b.style.height=d.height+_$_9989[44];b.classList.add(_$_9989[156])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_9989[154]),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(_$_9989[160]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_9989[154]);
|
|
149
|
+
for(var c=0;c<this.tbody.children.length;c++){var b=this.tbody.children[c].getAttribute(_$_9989[43]);this.records[b][k.event.x].element.classList.remove(_$_9989[154])}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(_$_9989[156])}this.parent.helper.style.display=_$_9989[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(c){if(null!=k.event.y){var b=c.target.getAttribute(_$_9989[43]);
|
|
150
|
+
if(null!=b){var a=b=parseInt(b),d=c.target.clientHeight/2>c.offsetY;d?k.event.y<b&&(a=b-1):k.event.y>b&&(a=b+1);c=!1;this.merged.rows[a]&&(k.event.y>a?this.merged.rows[a-1]&&(c=!0):this.merged.rows[a+1]&&(c=!0));c||(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+_$_9989[44])}}else d=c.target.getAttribute(_$_9989[42]),null!=d&&(a=d=parseInt(d),(b=c.target.clientWidth/2>c.offsetX)?k.event.x<
|
|
151
|
+
d&&(a=d-1):k.event.x>d&&(a=d+1),c=!1,this.merged.cols[a]&&(k.event.x>a?this.merged.cols[a-1]&&(c=!0):this.merged.cols[a+1]&&(c=!0)),c||(k.event.d=a,a=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),this.parent.helper.style.left=(b?a.left:a.right)-d.left+_$_9989[44]))}};return k}(),ba=function(){var k=function(c){c.getMerge=k[_$_9989[51]];c.setMerge=k[_$_9989[11]];c.updateMerge=k.update;c.removeMerge=k.remove;c.destroyMerged=c.destroyMerge=k.destroy};k.getHeight=function(c,
|
|
152
|
+
b){var a,d=1;if(this.merged.rows[c])for(var e=0;e<this.options.columns.length;e++){var f=E.getColumnNameFromCoords(e,c);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])b&&void 0!==b[f]||(a[1]>d&&(d=a[1]),b&&(b[f]=this.records[c][e].element&&!this.records[c][e].merged?!0:!1))}return d-1};k.getWidth=function(c,b){var a,d=1;if(this.merged.cols[c])for(var e=0;e<this.options.data.length;e++){var f=E.getColumnNameFromCoords(c,e);if(f=this.merged.cells[f])if(a=this.options.mergeCells[f])b&&void 0!==
|
|
153
|
+
b[f]||(a[0]>d&&(d=a[0]),b&&(b[f]=this.records[e][c].element&&!this.records[e][c].merged?!0:!1))}return d-1};k[_$_9989[51]]=function(c){return c?this.options.mergeCells[c]:this.options.mergeCells};k[_$_9989[11]]=function(c,b,a){if(!Q.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof c==_$_9989[17]?h[c]=[b,a]:typeof c==_$_9989[84]?h=c:((e=this.getHighlighted())?e=[E.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:
|
|
154
|
+
(jSuites.notification({message:C(_$_9989[161])}),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 m=b[a],n=h[b[a]][0],p=h[b[a]][1];n=parseInt(n);p=parseInt(p);if((!n||2>n)&&(!p||2>p))console.log(C(_$_9989[162])+_$_9989[136]+m);else if(this.options.mergeCells[m])g[m]=[n,p],f[m]=this.options.mergeCells[m],k.update.call(this,m,n,p);else{e=E.getCoordsFromColumnName(m);for(var q=e[1];q<e[1]+p;q++)for(var v=e[0];v<e[0]+n;v++)c=E.getColumnNameFromCoords(v,q),(d=this.merged.cells[c])&&
|
|
155
|
+
this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[m]=this.options.mergeCells[m]=[n,p];k.applyCreate.call(this,m);M.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&(l&&G[_$_9989[46]].call(this,e[1],e[0]),U.call(this.parent,{worksheet:this,action:_$_9989[69],newValue:g,oldValue:f}),L.call(this,_$_9989[69],[g]),k.build.call(this),ya.refresh.call(this),ha.refresh.call(this),F.call(this.parent,_$_9989[163],this,g,f))}};k.update=function(c,b,a){var d=
|
|
156
|
+
this.options.mergeCells;if(d[c]){var e=d[c][1];if(b!==d[c][0]||e!==a)k.applyDestroy.call(this,c),b&&a&&(d[c]=[b,a],k.applyCreate.call(this,c))}};k.remove=function(c,b){if(!Q.call(this.parent,this))return!1;b={};var a={},d={};typeof c==_$_9989[17]?d[c]=!0:typeof c==_$_9989[84]&&(d=c);c=Object.keys(d);for(d=0;d<c.length;d++)this.options.mergeCells[c[d]]&&(b[c[d]]=this.options.mergeCells[c[d]],a[c[d]]=!0,k.applyDestroy.call(this,c[d],!0));U.call(this.parent,{worksheet:this,action:_$_9989[70],newValue:a,
|
|
157
|
+
oldValue:b});L.call(this,_$_9989[70],{data:a})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(c,b){var a=this.options.mergeCells;if(a[c]){var d=a[c][0]||1,e=a[c][1]||1;c=E.getCoordsFromColumnName(c);if(!this.records[c[1]][c[0]].merged||1==b)if(a=M[_$_9989[51]].call(this,c[0],c[1])){a.style.display=_$_9989[3];1<d?a.setAttribute(_$_9989[52],d):a.removeAttribute(_$_9989[52]);1<e?a.setAttribute(_$_9989[164],e):a.removeAttribute(_$_9989[164]);1==this.options.textOverflow&&
|
|
158
|
+
(a.style.overflow=_$_9989[49]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){b=c[0]+g;var h=c[1]+f;if(a=this.records[h][b])if(a.merged=[g,f,a.v,a.v],0!=g||0!=f)a.element||M[_$_9989[51]].call(this,b,h),a.element.style.display=_$_9989[40],a.merged[3]=a.element.innerText,a.element.innerText=_$_9989[3],N.call(this,b,h,_$_9989[3])}}}};k.applyDestroy=function(c,b){var a=this.options.mergeCells;if(a[c]){var d=E.getCoordsFromColumnName(c),e=d[0];d=d[1];var f=a[c][0],g=a[c][1];delete this.options.mergeCells[c];
|
|
159
|
+
for(c=0;c<g;c++)for(var h=0;h<f;h++)if(a=this.records[d+c][e+h])a.element&&(0==h&&0==c?(a.element.removeAttribute(_$_9989[52]),a.element.removeAttribute(_$_9989[164])):(a.element.style.display=_$_9989[3],1==b&&(N.call(this,e+h,d+c,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};k.updateConfig=function(c,b,a,d){if(1==b)var e=[a];else{e=[];for(var f=a;f<a+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){a=E.getCoordsFromColumnName(h[f]);
|
|
160
|
+
for(var m=a[c];m<a[c]+g[h[f]][c];m++)-1!==e.indexOf(m)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==b&&(l[h[f]][c]+=d)),0==b&&l[h[f]][c]--)}h=Object.keys(l);for(f=0;f<h.length;f++)k.update.call(this,h[f],l[h[f]][0],l[h[f]][1]);k.build.call(this)};k.build=function(){var c=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(c)for(var b=Object.keys(c),a=0;a<b.length;a++){for(var d=E.getCoordsFromColumnName(b[a]),e=parseInt(c[b[a]][0]),f=parseInt(c[b[a]][1]),g=0;g<e;g++)this.merged.cols[d[0]+
|
|
161
|
+
g]=!0;for(var h=0;h<f;h++)this.merged.rows[d[1]+h]=!0;for(h=0;h<f;h++)for(g=0;g<e;g++){var l=E.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=b[a]}}};k.batch=function(c){var b=Object.keys(c);if(b.length)for(var a=0;a<b.length;a++)!1===c[b[a]]&&k.applyCreate.call(this,b[a])};return k}(),Ba=function(){var k=function(c){c.getHeader=k[_$_9989[51]];c.setHeader=k[_$_9989[11]];c.getHeaders=k.all};k[_$_9989[51]]=function(c){var b;if(b=this.options.columns)return b[c].title||E.getColumnName(c)};
|
|
162
|
+
k.all=function(c){for(var b=[],a=0;a<this.options.columns.length;a++)b.push(k[_$_9989[51]].call(this,a));return c?b:b.join(this.options.csvDelimiter)};k[_$_9989[11]]=function(c,b){if(!Q.call(this.parent,this))return!1;var a;if(a=this.options.columns[c]){var d=k[_$_9989[51]].call(this,c);if(!b&&(b=prompt(C(_$_9989[165]),d),!b))return!1;a.title=b;if(a=this.headers[c])a.innerHTML=b,a.setAttribute(_$_9989[166],b);U.call(this.parent,{worksheet:this,action:_$_9989[75],column:c,oldValue:d,newValue:b});L.call(this,
|
|
163
|
+
_$_9989[75],{column:c,title:b});F.call(this.parent,_$_9989[167],this,c,b,d)}};k.create=function(c){var b=this.options.columns[c],a=b.width||this.options.defaultColWidth,d=b.align||_$_9989[53],e=b.title||E.getColumnName(c),f=document.createElement(_$_9989[147]);this.parent.config.stripHTML?f.innerText=e:f.innerHTML=e;f.setAttribute(_$_9989[42],c);f.style.textAlign=d;b.title&&f.setAttribute(_$_9989[166],f.innerText);b.tooltip&&(f.title=b.tooltip);d=this.options.filters;!0===b.filter&&(d=!0);!1===b.filter&&
|
|
164
|
+
(d=!1);!0===d&&f.classList.add(_$_9989[168]);!1===b.visible&&(a=_$_9989[97]);d=document.createElement(_$_9989[169]);d.setAttribute(_$_9989[152],a);b.type==_$_9989[49]&&(f.style.display=_$_9989[40],d.style.display=_$_9989[40]);this.headers[c]=f;this.colgroup[c]=d};return k}(),aa=function(){var k=function(b,a,d){var e=this.footers.content,f;e&&e[a]&&e[a][b]&&(f=e[a][b].element)&&(void 0===d&&(e=this.options.footers,d=e[a]&&e[a][b]?e[a][b]:_$_9989[3]),P(d)&&1==this.parent.config.parseFormulas&&(d=V.execute.call(this,
|
|
165
|
+
d,b,null,!1)),this.options.applyMaskOnFooters&&(e=da[_$_9989[51]].call(this,b),d=t.editors.general.parseValue(b,a,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_9989[3],f.appendChild(d)):1==this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},c=function(b){b.getFooter=c[_$_9989[51]];b.setFooter=c[_$_9989[11]];b.resetFooter=c.reset;b.refreshFooter=c.refresh;b.getFooterValue=c.value;b.setFooterValue=c.value};c[_$_9989[51]]=function(){return this.options.footers};
|
|
166
|
+
c[_$_9989[11]]=function(b){if(b){var a=this.options.footers;this.options.footers=b}this.options.footers!=a&&(aa.build.call(this),c.render.call(this),G.limited.call(this)&&(this.scrollY.style.display=_$_9989[40],G.resetY.call(this)),L.call(this,_$_9989[170],{data:this.options.footers}),F.call(this.parent,_$_9989[171],this,this.options.footers,a))};c.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var d=0;d<b[a].length;d++)k.call(this,d,a,b[a][d])};c.value=
|
|
167
|
+
function(b,a,d){if(void 0===d)return this.options.footers[a][b];k.call(this,b,a,d);L.call(this,_$_9989[172],{x:b,y:a,value:d});F.call(this.parent,_$_9989[173],this,b,a,d)};c.reset=function(){var b=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_9989[3];L.call(this,_$_9989[174],{});F.call(this.parent,_$_9989[171],this,null,b)};c.create=function(b,a){var d=this.footers.content[a][b];if(d&&d.element)return d.element;d=this.footers.content[a][b]={};var e=
|
|
168
|
+
this.options.columns[b].align?this.options.columns[b].align:_$_9989[53];d.element=document.createElement(_$_9989[147]);d.element.style.textAlign=e;d.element.setAttribute(_$_9989[42],b);d.element.setAttribute(_$_9989[43],a);k.call(this,b,a);this.options.columns[b].type==_$_9989[49]&&(d.element.style.display=_$_9989[40]);return d.element};c.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_9989[3];for(var b=0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=
|
|
169
|
+
[];var a=document.createElement(_$_9989[145]),d=document.createElement(_$_9989[147]);d.innerHTML=_$_9989[148];a.appendChild(d);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[b][a]||(this.options.footers[b][a]=_$_9989[3]),this.footers.content[b][a]||(this.footers.content[b][a]={})}}};c.render=function(){for(var b=this.options.footers,a=0;a<b.length;a++)for(var d=0;d<b[a].length;d++){var e=aa.create.call(this,d,a);this.tfoot.children[a].appendChild(e)}};
|
|
170
|
+
c.adjust=function(b,a,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[b]&&this.headers[b].parentNode)var h=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var m=f[d].splice(b),n=b;n<b+a;n++)f[d][n]=_$_9989[3];f[d]=f[d].concat(m);m=g[d].splice(b);for(n=b;n<b+a;n++)g[d][n]={element:c.create.call(this,n,d)},l&&(1==h?this.tfoot.children[d].appendChild(g[d][n].element):this.tfoot.children[d].insertBefore(g[d][n].element,this.tfoot.children[d].children[b].nextSibling));
|
|
171
|
+
g[d]=g[d].concat(m)}}else for(d=0;d<f.length;d++){for(n=b;n<b+a;n++)(h=this.footers.content[d][n].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(b,a);e[d]=f[d].splice(b,a)}return e};return c}(),pa=function(){var k=function(c){c.setNestedCell=k.cell;c.getNestedCell=k.cell;c.setNestedHeaders=k[_$_9989[11]];c.getNestedHeaders=k[_$_9989[51]];c.resetNestedHeaders=k.reset};k[_$_9989[51]]=function(){return this.options.nestedHeaders};k[_$_9989[11]]=function(c){k.reset.call(this);this.options.nestedHeaders=
|
|
172
|
+
c;k.build.call(this);k.render.call(this);ha.refresh.call(this);T.call(this);L.call(this,_$_9989[175],{data:c});F.call(this.parent,_$_9989[176],this,c)};k.reset=function(){var c=[],b=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$_9989[177])&&c.push(b[a]);if(c.length)for(;b=c.shift();)b.remove();this.nested=null;ha.refresh.call(this);T.call(this);L.call(this,_$_9989[178]);F.call(this.parent,_$_9989[176],this,[])};k.cell=function(c,b,a){if(a){if(!Q.call(this.parent,
|
|
173
|
+
this))return!1;var d=this.options.nestedHeaders[b][c],e=this.nested.content[b][c].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(d.colspan=a.colspan,e.setAttribute(_$_9989[52],a.colspan),e.style.display=0==d.colspan?_$_9989[40]:_$_9989[3]);L.call(this,_$_9989[179],{x:c,y:b,properties:a});F.call(this.parent,_$_9989[180],this,c,b,a)}else return this.nested.content[b][c].element};k.range=function(c){c=this.options.nestedHeaders[c];for(var b=
|
|
174
|
+
[],a=0,d=0;d<c.length;d++){var e=parseInt(c[d].colspan);b[d]=[a,a+e-1];a+=e}return b};k.getColumns=function(c){c=this.options.nestedHeaders[c];for(var b=[],a=0;a<c.length;a++)for(var d=c[a].colspan,e=0;e<d;e++)b.push(a);return b};k.create=function(c,b){if(this.nested.content[b][c])return this.nested.content[b][c].element;var a=this.options.nestedHeaders[b][c]||{},d=this.nested.content[b][c]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_9989[53]);a.title||(a.title=_$_9989[3]);var e=document.createElement(_$_9989[147]);
|
|
175
|
+
e.setAttribute(_$_9989[181],c);e.setAttribute(_$_9989[182],b);e.setAttribute(_$_9989[52],a.colspan);e.setAttribute(_$_9989[183],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var c=0;c<this.options.nestedHeaders.length;c++){this.nested.content[c]=[];var b=document.createElement(_$_9989[147]);b.innerHTML=_$_9989[148];var a=document.createElement(_$_9989[145]);a.classList.add(_$_9989[177]);
|
|
176
|
+
a.appendChild(b);this.thead.insertBefore(a,this.thead.lastChild)}};k.render=function(){for(var c,b=this.options.nestedHeaders,a=0;a<b.length;a++)for(var d=0;d<this.thead.lastChild.children.length;d++){c=this.thead.lastChild.children[d].getAttribute(_$_9989[42]);var e=k.getColumns.call(this,a);void 0!==e[c]&&k.renderCell.call(this,e[c],a)}};k.renderCell=function(c,b,a){var d=pa.create.call(this,c,b);d.parentNode?(c=d.getAttribute(_$_9989[52]),c++,d.setAttribute(_$_9989[52],c)):(d.setAttribute(_$_9989[52],
|
|
177
|
+
1),a?this.thead.children[b].insertBefore(d,this.thead.children[b].children[a]):this.thead.children[b].appendChild(d),0==c&&0<this.options.freezeColumns&&(d.classList.add(_$_9989[50]),d.style.left=xa.call(this)?_$_9989[159]:_$_9989[155]))};k.adjust=function(c,b,a,d){var e=this.options.nestedHeaders;if(e)if(1==a)if(d&&d.nested)for(a=0;a<e.length;a++)for(var f=0;f<e[a].length;f++)k.cell.call(this,f,a,{colspan:d.nested[a][f]});else for(a=0;a<e.length;a++){if(f=k.getColumns.call(this,a)){f=f[c];var g=
|
|
178
|
+
parseInt(e[a][f].colspan)+b;k.cell.call(this,f,a,{colspan:g})}}else{d=[];for(a=0;a<e.length;a++)if(g=k.getColumns.call(this,a)){d[a]=[];for(f=0;f<b;f++){var h=g[c+f];typeof d[a][h]==_$_9989[13]&&(d[a][h]=e[a][h].colspan);e[a][h].colspan--}g=Object.keys(d[a]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],a,{colspan:e[a][g[f]].colspan})}return d}};return k}(),la=function(){var k=function(c,b){var a=function(n){var p;(p=this.results)?n=p.indexOf(n):p=this.rows;n--;for(var q=n;0<=q;q--)if(n=this.results?
|
|
179
|
+
p[q]:q,this.rows[n]&&this.rows[n].element)return n;return 0},d=function(n){var p;(p=this.results)?n=p.indexOf(n):p=this.rows;n++;for(var q=n;q<p.length;q++)if(n=this.results?p[q]:q,this.rows[n]&&this.rows[n].element)return n;return p[p.length-1]},e=function(n,p){for(;0<=n;n--)if(this.records[p][n].element&&this.records[p][n].element.style.display!=_$_9989[40])return n;return 0},f=function(n,p){for(;n<this.options.columns.length;n++)if(this.records[p][n].element&&this.records[p][n].element.style.display!=
|
|
180
|
+
_$_9989[40])return n;return this.options.columns-1},g=this.getHighlighted(),h=g[0],l=g[1],m=g[2];g=g[3];c=parseInt(c);b=parseInt(b);null!=c&&null!=b&&(0<c-m?(f=f.call(this,parseInt(m)+1,b),c=parseInt(c)):(f=parseInt(c),c=e.call(this,parseInt(h)-1,b)),0<b-g?(d=d.call(this,parseInt(g)),b=parseInt(b)):(d=parseInt(b),b=a.call(this,parseInt(l))),c-f<=b-d?(f=parseInt(h),c=parseInt(m)):(d=parseInt(l),b=parseInt(g)),this.setBorder(f,d,c,b,_$_9989[138]))};k.execute=function(c){if(!Q.call(this.parent,this))return!1;
|
|
181
|
+
var b=this.borders.cloning;if(c)if(b&&b.active){c=b.x1;var a=b.y1,d=b.x2,e=b.y2}else return!1;else if(d=this.getSelected(),d.length)c=d[0].x,a=parseInt(d[d.length-1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],m=!1,n=this.getHighlighted(),p=Ea[_$_9989[51]].call(this,n,!1,!1),q=this.getSelected();if(f=this.getStyle(q,!0)){var v=Object.keys(f);if(v.length)for(var u=0;u<v.length;u++)h.push(f[v[u]])}if(n[0]==c)var w=a<n[1]?a-n[1]:1,y=0;else y=c<n[0]?c-n[0]:1,
|
|
182
|
+
w=0;v=0;c=parseInt(c);d=parseInt(d);a=parseInt(a);e=parseInt(e);for(var x=a;x<=e;x++)if(!this.results||-1!=this.results.indexOf(x)){void 0==p[g]&&(g=0);f=0;n[0]!=c&&(y=c<n[0]?c-n[0]:1);for(u=c;u<=d;u++){if(!(0!=m||this.records[x][u].element&&this.records[x][u].element.classList.contains(_$_9989[18]))){if((!b||1!=b.active)&&N.call(this,u,x)){m=!0;continue}void 0==p[g]?f=0:void 0==p[g][f]&&(f=0);var D=p[g][f];D&&!p[1]&&1==this.parent.config.autoIncrement&&(this.options.columns[u].type==_$_9989[56]||
|
|
183
|
+
this.options.columns[u].type==_$_9989[14]?P(D)?D=V.shiftFormula(D,y,x-n[1]):D==Number(D)&&(D=Number(D)+w):this.options.columns[u].type==_$_9989[184]&&(D=new Date(D),D.setDate(D.getDate()+w),D=D.getFullYear()+_$_9989[185]+jSuites.two(parseInt(D.getMonth()+1))+_$_9989[185]+jSuites.two(D.getDate())+_$_9989[132]+_$_9989[186]));D={x:u,y:x,value:D};h&&null!=h[v]&&(D.style=h[v],v++,v>=h.length&&(v=0));l.push(D)}f++;n[0]!=c&&y++}g++;w++}l.length&&(q[0].x<c&&(c=q[0].x),q[0].y<a&&(a=q[0].y),q[q.length-1].x>
|
|
184
|
+
d&&(d=q[q.length-1].x),q[q.length-1].y>e&&(e=q[q.length-1].y),this.setValue(l),this.resetBorders(_$_9989[138],!0),this.updateSelectionFromCoords(c,a,d,e))};k.end=function(c){la.event=!1;la.execute.call(this,!0)};k.cancel=function(c){la.event=!1;this.resetBorders(_$_9989[138],!0)};return k}(),Ea=function(){var k=function(c){c.getData=k[_$_9989[51]];c.getJson=k[_$_9989[51]];c.setData=k[_$_9989[11]];c.loadData=k.load;c.getRowData=k.getRowData;c.setRowData=k.setRowData;c.getColumnData=k.getColumnData;
|
|
185
|
+
c.setColumnData=k.setColumnData;c.updateData=k.update;c.refresh=k.refresh;c.data=k[_$_9989[51]];c.download=k.download;c.copy=k.copy;c.paste=k.paste;c.cut=function(){return c.copy(!0)}};k[_$_9989[51]]=function(c,b,a){!0===c&&(c=this.getHighlighted());for(var d=c?!0:!1,e,f=[],g=this.options.columns.length,h=this.options.data.length,l,m=this.dataType&&typeof a==_$_9989[13]?1:0,n=0;n<h;n++){l=null;e=m?{}:[];for(var p=0;p<g;p++){var q;if(!(q=!d)){q=c[1];var v=c[2],u=c[3];q=p>=c[0]&&p<=v&&n>=q&&n<=u?!0:
|
|
186
|
+
!1}if(q&&(!d||!this.results||-1!=this.results.indexOf(n))){q=N.call(this,p,n);if(b){if(d&&!1===this.rows[n].visible)continue;l=ea.processed.call(this,p,n);void 0!==l&&(q=l)}a&&q.match&&(q.match(a)||q.match(/\n/)||q.match(/"/))&&(q=q.replace(new RegExp(_$_9989[187],_$_9989[188]),_$_9989[189]),q=_$_9989[187]+q+_$_9989[187]);m?jSuites.path.call(e,_$_9989[3]+Z.call(this,p),q):e.push(q);l=!0}}l&&(a?f.push(e.join(a)):f.push(e))}return a?f.join(_$_9989[10])+_$_9989[10]:f};k.parse=function(){for(var c,b=
|
|
187
|
+
{},a=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)c=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_9989[84])&&(typeof f[g].id==_$_9989[14]&&(c=parseInt(f[g].id)),typeof f[g].row==_$_9989[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>a&&(a=d),c&&(b[d]=c);if(Object.keys(e).length)for(g=0;g<=a;g++)e[g]&&(f[g]=e[g]);a=this.getPrimaryKey();if(!1!==a)for(a=Z.call(this,a),g=0;g<f.length;g++)b[g]||!1===a||(c=parseInt(f[g][a]),0<c&&(b[g]=c));return b};k.type=function(){for(var c=this.dataType=
|
|
188
|
+
0;c<this.options.columns.length;c++)typeof this.options.columns[c].name!==_$_9989[13]&&(this.dataType=1)};k[_$_9989[11]]=function(c){c=k.standardize(c);var b={},a=[],d={};var e=Object.keys(c[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=c.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===c[g]&&(c[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)c[g].data[h]||(c[g].data[h]=_$_9989[3])}for(h=0;h<this.options.columns.length;h++){var l=
|
|
189
|
+
Z.call(this,h);d[l]=h}for(g=0;g<c.length;g++){f=c[g].row;l=Object.keys(c[g].data);for(h=0;h<l.length;h++)e=null,void 0!==d[l[h]]?e=d[l[h]]:-1<l[h]&&(e=parseInt(l[h])),null!==e&&a.push({x:e,y:f,value:c[g].data[l[h]]});c[g].id&&(b[f]=c[g].id)}sa.setId.call(this,b);ea[_$_9989[11]].call(this,a,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;k.type.call(this);if(this.options.data){var c=k.parse.call(this),b=this.options.data.length;this.options.minDimensions[1]>
|
|
190
|
+
b&&(b=this.options.minDimensions[1]);for(var a=0;a<b;a++){var d=c[a]?c[a]:null;oa.row.call(this,a,d)}}};k.load=function(c){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_9989[3];this.options.data=c;k.build.call(this);G.call(this)};k.refresh=function(c){if(typeof c!==_$_9989[13])for(var b=0;b<this.options.columns.length;b++){var a=this.records[c]&&this.records[c][b].element?this.records[c][b].element:null,d=da[_$_9989[51]].call(this,b,c);typeof d[0].updateCell==_$_9989[85]&&d[0].updateCell(a,
|
|
191
|
+
N.call(this,b,c),b,c,this,d[1]);a&&M.applyOverflow.call(this,a,b,c)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_9989[59],dataType:_$_9989[60],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(c,b){if(typeof this.options.data[c]===_$_9989[13])return!1;if(b){if(this.dataType){b={};for(var a=0;a<this.options.columns.length;a++){var d=_$_9989[3]+Z.call(this,a),e=_$_9989[3]+
|
|
192
|
+
ea.processed.call(this,a,c,!0);jSuites.path.call(b,d,e)}}else for(b=[],a=0;a<this.options.columns.length;a++)b.push(ea.processed.call(this,a,c,!0));return b}return JSON.parse(JSON.stringify(this.options.data[c]))};k.setRowData=function(c,b,a){for(var d=[],e=0;e<this.options.columns.length;e++)typeof b[e]===_$_9989[13]&&(b[e]=_$_9989[3]),d.push({x:e,y:c,value:b[e]});d.length&&this.setValue(d,null,a)};k.getColumnData=function(c,b){if(typeof this.options.columns[c]===_$_9989[13])return!1;for(var a=[],
|
|
193
|
+
d=0;d<this.options.data.length;d++){var e=b?ea.processed.call(this,c,d,!0):N.call(this,c,d);a.push(e)}return a};k.setColumnData=function(c,b,a){for(var d=[],e=0;e<this.rows.length;e++)typeof b[e]===_$_9989[13]&&(b[e]=_$_9989[3]),d.push({x:c,y:e,value:b[e]});d.length&&this.setValue(d,null,a)};k.copy=function(c){var b=this,a=this.getHighlighted(),d=function(){b.setBorder(a[0],a[1],a[2],a[3],_$_9989[127]);b.borders.copying.clear=1==c?!0:!1},e=k[_$_9989[51]].call(this,a,!0,_$_9989[190]),f=F.call(this.parent,
|
|
194
|
+
_$_9989[191],this,a,e);if(f)e=f;else if(!1===f)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(d):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_9989[192]),d());return e};k.paste=function(c,b,a){if(!Q.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_9989[127],!0),d.borders.copying.clear=!1)},f=a,g=null,h=this.options.style,l=null,m=null,n=[];if(this.borders.copying){var p=[this.borders.copying.x1,
|
|
195
|
+
this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];l=p[0];m=p[1];var q=jSuites.hash(a),v=jSuites.hash(k[_$_9989[51]].call(this,p,!0,_$_9989[190]));if(q!=v)e();else{var u=0,w=0;a=k[_$_9989[51]].call(this,p,!1,!1);for(q=p[1];q<=p[3];q++)if(!this.results||-1!=this.results.indexOf(q)){n[w]=[];u=0;for(v=p[0];v<=p[2];v++)g=E.getColumnNameFromCoords(v,q),n[w][u]=h&&h[g]?h[g]:_$_9989[193],u++;w++}}}c=parseInt(c);b=parseInt(b);100<f.length&&!this.options.pagination&&!G.limited.call(this)&&
|
|
196
|
+
console.log(_$_9989[194]);if(q=F.call(this.parent,_$_9989[195],this,a,c,b,n,f))a=q;else if(!1===q)return!1;if(a){Array.isArray(a)||(a=E.parseCSV(a,_$_9989[190]));if(f=this.getHighlighted()){g=[];u=[];w=[];h=[];var y=0,x=0;for(q=f[1];q<=f[3];q++)if(!this.results||-1!=this.results.indexOf(q)){g=[];u=[];for(v=f[0];v<=f[2];v++)g.push(a[x][y]),n&&n[x]&&n[x][y]?u.push(n[x][y]):u.push(_$_9989[3]),y++,y>=a[0].length&&(y=0);w.push(g);h.push(u);x++;x>=a.length&&(x=0)}0==w.length%a.length&&0==w[0].length%a[0].length&&
|
|
197
|
+
(a=w,n=h)}h=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(q=p[1];q<=p[3];q++)for(v=p[0];v<=p[2];v++)(!this.results||this.results&&0<=this.results.indexOf(q))&&f.push({x:v,y:q,value:_$_9989[3],style:_$_9989[3]});e()}q=c+a[0].length-this.options.columns.length;0<q&&this.insertColumn(q);q=b+a.length-this.rows.length;0<q&&this.insertRow(q);u=g=c;y=w=b;x=null;this.results&&(h=this.results.indexOf(b));for(q=0;q<a.length;q++)for(v=0;v<a[q].length;v++){null!==l&&null!==m&&a[q][v][0]==
|
|
198
|
+
_$_9989[12]&&(a[q][v]=V.shiftFormula(a[q][v],c-l,b-m));u=c+v;y=b+q;this.results&&(y=this.results[h+q]);var D={x:u,y,value:a[q][v]};n&&n[q]&&n[q][v]&&(D.style=n[q][v]);f.push(D);null===x&&ya.isSelected.call(this,u,y,p)&&(x=!0)}x&&e();f.length&&(ea[_$_9989[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),F.call(this.parent,_$_9989[196],this,f),this.updateSelectionFromCoords(g,w,u,y))}};k.download=function(c,b){if(this.parent.config.allowExport){void 0===b&&(b=!0);var a=_$_9989[3];
|
|
199
|
+
if(1==c||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_9989[132])+_$_9989[10];a+=k[_$_9989[51]].call(this,null,b,this.options.csvDelimiter);b=new Blob([_$_9989[198]+a],{type:_$_9989[199]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(b,this.options.csvFileName+_$_9989[200]):(c=document.createElement(_$_9989[201]),b=URL.createObjectURL(b),c.href=b,c.setAttribute(_$_9989[202],this.options.csvFileName+_$_9989[200]),document.body.appendChild(c),
|
|
200
|
+
c.click(),c.parentNode.removeChild(c))}else console.error(_$_9989[197])};k.standardize=function(c){c||(c=[]);Array.isArray(c)||(c=[c]);void 0==c[0]||Array.isArray(c[0])||typeof c[0]==_$_9989[84]||(c=[c]);for(var b=0;b<c.length;b++){var a={};Array.isArray(c[b])||void 0==c[b].data?a.data=c[b]:a=c[b];a.row=void 0==c[b].row?b:c[b].row;c[b]=a}return c};return k}(),Va=function(){var k=function(c){c.getLabel=k[_$_9989[51]];c.getLabelFromCoords=k[_$_9989[51]]};k[_$_9989[51]]=function(c,b,a){if(typeof c==
|
|
201
|
+
_$_9989[17]){c=E.getCoordsFromColumnName(c);var d=c[0];b=c[1]}else d=c;return this.getProcessed(d,b,a)};return k}(),Ha=function(){var k=function(c){c.getDefinedNames=k[_$_9989[51]];c.setDefinedNames=k[_$_9989[11]]};k[_$_9989[11]]=function(c){var b=Object.keys(c);if(b.length){for(var a=0;a<b.length;a++)this.parent.config.definedNames[b[a]]=c[b[a]];L.call(this,_$_9989[203],[c])}};k[_$_9989[51]]=function(c){var b=this.parent.config.definedNames;return c?b[c]:b};k.updateAll=function(c,b){var a,d={};if(a=
|
|
202
|
+
this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=V.update.call(this,a[e[g]],c,b,f);h!==a[e[g]]&&(d[e[g]]=h)}k[_$_9989[11]].call(this,d)}}};k.updateWorksheetName=function(c,b){var a,d={};if(a=this.parent.config.definedNames){var e=Object.keys(a);if(e.length){for(var f=0;f<e.length;f++){var g=V.updateWorksheetName(a[e[f]],c,b);g!==a[e[f]]&&(d[e[f]]=g)}k[_$_9989[11]].call(this,d)}}};return k}(),ka=function(){var k=[_$_9989[204],
|
|
203
|
+
_$_9989[205],_$_9989[206],_$_9989[207],_$_9989[208]],c=[_$_9989[185],_$_9989[151],_$_9989[209],_$_9989[210],_$_9989[211],_$_9989[212],_$_9989[1],_$_9989[213],_$_9989[25],_$_9989[214],_$_9989[12],_$_9989[215],_$_9989[216]],b=[],a=function(){if(0<b.length){for(var f=0;f<b.length;f++)ha.destroy.call(this,b[f]);b=[]}},d=function(f){a.call(this);for(var g=0,h=[],l,m=0;m<f.children.length;m++)if(l=f.children[m].getAttribute(_$_9989[217])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[m].style.color=h[l];if(-1===
|
|
204
|
+
l.indexOf(_$_9989[135])){if(0<=l.indexOf(_$_9989[136])){var n=l.split(_$_9989[136]),p=E.getCoordsFromColumnName(n[0]);n=E.getCoordsFromColumnName(n[1])}else n=p=E.getCoordsFromColumnName(l);ya[_$_9989[11]].call(this,p[0],p[1],n[0],n[1],null,l,h[l])}b.push(l)}},e=function(f,g){f.classList.add(_$_9989[92]);f.classList.add(_$_9989[218]);f.classList.add(_$_9989[219]);f.classList.add(_$_9989[220]);f.setAttribute(_$_9989[221],!0);f.onclick=function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:
|
|
205
|
+
h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_9989[222]))};f.onblur=function(){f.worksheet&&(a.call(f.worksheet),typeof f.onchange==_$_9989[85]&&f.onchange.call(f),f.worksheet=null)};f.onchange=g};e.current=null;e.parse=function(f){for(var g=_$_9989[3],h=_$_9989[3],l=window.getSelection(),m=document.createRange(),n=E.getCaretIndex.call(this.parent,f),p=V.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_9989[3])),q=0;q<p.length;q++)p[q]&&V.tokenIdentifier.test(p[q].trim())?
|
|
206
|
+
(q==p.length-1&&(h=_$_9989[223]),g+=_$_9989[224]+h+_$_9989[225]+p[q].trim().replace(/\$/g,_$_9989[3])+_$_9989[226]+p[q]+_$_9989[227]):g+=p[q];f.innerHTML=g;g=null;for(q=0;q<f.childNodes.length&&!(g=f.childNodes[q],h=g.tagName?g.innerText.length:g.length,0>=n-h);q++)n-=h;g&&(g.tagName?m.setStart(g.firstChild,n):m.setStart(g,n),l.removeAllRanges(),l.addRange(m));d.call(this,f)};e.close=function(f){a.call(this);f?f.classList.remove(_$_9989[92]):e.current&&(typeof e.current.onchange==_$_9989[85]&&e.current.onchange.call(e.current),
|
|
207
|
+
e.current.classList.remove(_$_9989[222]),e.current.worksheet=null,e.current=null)};e.getName=function(f,g,h,l,m){f=E.getColumnNameFromCoords(f,g);h=E.getColumnNameFromCoords(h,l);m.ctrlKey&&(f=h);return f!==h?(m=f+_$_9989[136]+h,m=V.getTokensFromRange.call(this,m),V.getRangeFromTokens.call(this,m)):f};e.range=function(f,g,h,l,m){e.current.getAttribute(_$_9989[228])==_$_9989[229]&&(f=h,g=l);f=e.getName.call(this,f,g,h,l,m);g=document.createElement(_$_9989[230]);g.innerText=f;g.setAttribute(_$_9989[217],
|
|
208
|
+
f);e.current.innerText=_$_9989[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);m.preventDefault()};e.update=function(f,g,h,l,m){var n=this,p=jSuites.getNode();if(p){var q=e.getName.call(this,f,g,h,l,m);f=function(v){var u=document.createElement(_$_9989[230]);u.innerText=q;u.setAttribute(_$_9989[217],q);p.parentNode===n.parent.input&&!1===v?p.parentNode.insertBefore(u,p.nextSibling):n.parent.input.appendChild(u);p=u};if(p.getAttribute(_$_9989[217]))m.ctrlKey?(n.parent.input.appendChild(document.createTextNode(_$_9989[25])),
|
|
209
|
+
f(!0)):(p.innerText=q,p.setAttribute(_$_9989[217],q));else{if(p.innerText!==_$_9989[3]&&-1==c.indexOf(p.innerText.slice(-1))||p.nextElementSibling&&p.nextElementSibling.getAttribute(_$_9989[217]))return!1;f(!1)}jSuites.focus(p);d.call(n,n.parent.input);m.preventDefault();return!0}return!1};e.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_9989[3]),navigator.clipboard?navigator.clipboard.writeText(f):
|
|
210
|
+
(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_9989[192]))}else if(36==f.which){var g=window.getSelection(),h=document.createRange();h.setStart(f.target,0);g.removeAllRanges();g.addRange(h)}else 35==f.which?jSuites.focus(f.target):187==f.which&&!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_9989[3])&&f.target.getAttribute(_$_9989[94])&&f.target.removeAttribute(_$_9989[94])};return e}(),V=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),
|
|
211
|
+
c=function(h){h=b(h);for(var l=[_$_9989[185],_$_9989[151],_$_9989[209],_$_9989[210],_$_9989[211],_$_9989[231]],m=[_$_9989[212],_$_9989[232],_$_9989[1],_$_9989[2],_$_9989[213],_$_9989[233],_$_9989[25],_$_9989[214],_$_9989[12],_$_9989[215],_$_9989[216]],n=_$_9989[3],p=[],q=0,v=0;v<h.length;v++){if(h[v]==_$_9989[187]||h[v]==_$_9989[133])q=0==q?1:0;0==q&&(-1<l.indexOf(h[v])||-1<m.indexOf(h[v]))?(n&&(p.push(n),n=_$_9989[3]),p.push(h[v])):n+=h[v]}n&&p.push(n);for(v=0;v<p.length;v++)-1==p[v].indexOf(_$_9989[187])&&
|
|
212
|
+
-1==p[v].indexOf(_$_9989[133])&&(p[v]=p[v].replace(/\s/g,_$_9989[3]));return p},b=function(h,l){for(var m=_$_9989[3],n=0,p=[_$_9989[12],_$_9989[135],_$_9989[216],_$_9989[215]],q=0;q<h.length;q++)h[q]==_$_9989[187]&&(n=0==n?1:0),1==n?m+=h[q]:(m+=h[q].toUpperCase(),1==l&&0<q&&h[q]==_$_9989[12]&&-1==p.indexOf(h[q-1])&&-1==p.indexOf(h[q+1])&&(m+=_$_9989[12]));return m},a=function(h){h.setFormula=a[_$_9989[11]];h.executeFormula=a.execute;h.formula=[]};a.run=function(h,l){var m=_$_9989[3],n=Object.keys(l);
|
|
213
|
+
if(n.length){for(var p={},q=0;q<n.length;q++){var v=n[q].replace(/!/g,_$_9989[27]);0<v.indexOf(_$_9989[27])&&(v=v.split(_$_9989[27]),p[v[0]]=!0)}v=Object.keys(p);for(q=0;q<v.length;q++)m+=_$_9989[234]+v[q]+_$_9989[235];for(q=0;q<n.length;q++)v=n[q].replace(/!/g,_$_9989[27]),jSuites.isNumeric(l[n[q]])||(p=l[n[q]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(l[n[q]]=e(p,l[n[q]])),m=0<v.indexOf(_$_9989[27])?m+(v+_$_9989[236]+l[n[q]]+_$_9989[237]):m+(_$_9989[234]+
|
|
214
|
+
v+_$_9989[236]+l[n[q]]+_$_9989[237])}h=h.replace(/\$/g,_$_9989[3]);(p=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&p.length&&(h=e(p,h));h=h.replace(/!/g,_$_9989[27]);return(new Function(m+_$_9989[238]+h))()};a[_$_9989[11]]=function(){};var d=function(h){h=b(h,!0);return h.replace(/\$/g,_$_9989[3])},e=function(h,l){for(var m=0;m<h.length;m++){var n=a.getTokensFromRange.call(this,h[m]);l=l.replace(h[m],_$_9989[213]+n.join(_$_9989[25])+_$_9989[233])}return l},f=function(h,
|
|
215
|
+
l,m){for(var n=this.config.definedNames,p=0;p<h.length;p++)h[p]&&n&&n[h[p]]&&(l=l.replace(h[p],n[h[p]]),m&&(m[h[p]]=n[h[p]]));return d(l)},g=function(h,l){var m;if(m=this.records[l][h].a)for(var n=0;n<m.length;n++)for(var p=0;p<m[n].length;p++)m[n][p]&&(m[n][p].innerText=_$_9989[3],this.records[l+n][h+p].v=_$_9989[3]);this.records[l][h].a=[]};a.execute=function(h,l,m,n,p){if(1==this.parent.processing)return null!==l&&null!==m&&this.parent.queue.push([this,l,m]),_$_9989[3];var q=[],v=function(R,O,
|
|
216
|
+
r,A){if(void 0!=O&&void 0!=r){var z=E.getColumnNameFromCoords(O,r);r=A.getWorksheetName()+_$_9989[27]+z;q[r]||(q[r]=0);q[r]++;if(3<q[r])throw{error:_$_9989[239],message:_$_9989[240],reference:r};}else z=null;p||(R=d(R));var B=R,I=B.match(/[A-Z_]+[A-Z0-9_\.]*/g);I&&I.length&&(B=f.call(A.parent,I,B,u));(I=B.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&I.length&&(B=e.call(A,I,B));I=[];B=c(B);for(var J=0;J<B.length;J++)B[J]&&k.test(B[J])&&I.push(B[J]);if(I){if(-1<I.indexOf(z))throw{error:_$_9989[241],
|
|
217
|
+
message:_$_9989[242]};for(B=0;B<I.length;B++){J=I[B].split(_$_9989[135]);J[1]?(O=J[1],J=H(J[0]),r=A.getWorksheetName()+_$_9989[27]+z):(O=J[0],J=A,r=z);if(typeof J==_$_9989[13]||typeof J.formula==_$_9989[13])throw{error:_$_9989[243],message:_$_9989[244]};r&&(J.formula[O]||(J.formula[O]=[]),0>J.formula[O].indexOf(r)&&J.formula[O].push(r));if(!u[I[B]]){r=E.getCoordsFromColumnName(O);O=r[0];r=r[1];var Y=void 0!==J.records[r][O].v?J.records[r][O].v:N.call(J,O,r);u[I[B]]||((_$_9989[3]+Y).substr(0,1)==_$_9989[12]?
|
|
218
|
+
u[I[B]]=v(Y,O,r,J):(Y?Y!=Number(Y)&&(Y=_$_9989[187]+Y+_$_9989[187]):Y=0,u[I[B]]=Y))}}}return R.substr(1)},u={};try{if(h=v(h,l,m,this)){var w=p?a.run(h,u):t.formula(h,u,l,m,this);if(!1!==n&&void 0!=l&&void 0!=m)if(w instanceof Date)this.records[m][l].v=jSuites.calendar.dateToNum(w);else if(Array.isArray(w)){g.call(this,l,m);n=[];for(var y=null,x=0;x<w.length;x++)for(var D=0;D<w[x].length;D++)null===y&&(0<x&&x>D&&this.options.data[m+x][l+D]?y=_$_9989[245]:(this.records[m+x][l+D].v=w[x][D],this.records[m+
|
|
219
|
+
x][l+D].element&&(n[x]||(n[x]=[]),n[x][D]=this.records[m+x][l+D].element,this.records[m+x][l+D].element.innerText=w[x][D])));null===y?(y=w[0][0],this.records[m][l].a=n):g.call(this,l,m);w=this.records[m][l].v=y}else this.records[m][l].v=w;return w}}catch(R){return 1==this.parent.config.debugFormulas&&console.log(h,u,R),R&&R.error?R.error:_$_9989[243]}};a.update=function(h,l,m,n){var p=null,q=null,v=function(y){m&&m[y]&&(y=_$_9989[246]);l[y]&&(y=l[y]);return y};h=b(h,!0);h=c(h);for(var u=0;u<h.length;u++)if(h[u]&&
|
|
220
|
+
k.test(h[u])){if(-1==h[u].indexOf(_$_9989[135])){if(q=h[u],p=_$_9989[3],n)continue}else if(q=h[u].split(_$_9989[135]),p=q[0],q=q[1],n!=p)continue;if(0<=q.indexOf(_$_9989[136])){q=a.getTokensFromRange.call(this,q);for(var w=0;w<q.length;w++)q[w]=v(q[w]);q=a.getRangeFromTokens.call(this,q)}else-1==q.indexOf(_$_9989[247])?q=v(q):(q=v(q.replace(/\$/g,_$_9989[3])),q=_$_9989[247]+q.match(/[A-Z]+/g)+_$_9989[247]+q.match(/[0-9]+/g));p&&(q=p+_$_9989[135]+q);h[u]=q}return h.join(_$_9989[3])};a.getChain=function(h){if(void 0===
|
|
221
|
+
h)return[];var l=[],m=[],n=[],p=function(u){if(0<=u.indexOf(_$_9989[27])){var w=u.split(_$_9989[27]),y=w[0],x=w[1];w=H(w[0])}else w=this,y=w.getWorksheetName(),x=u;if(w.formula[x]&&!n[u]){var D=!1;n[u]=!0;for(u=0;u<w.formula[x].length;u++){var R=w.formula[x][u];-1==R.indexOf(_$_9989[27])&&(R=y+_$_9989[27]+R);if(!m[R]){var O=w.getValue(R);P(O)?l.push([R,O,a.getTokens.call(w,O,y)]):(D=!0,w.formula[x][u]=null);p.call(w,R);m[R]=!0}}1==D&&(w.formula[x]=w.formula[x].filter(function(r){return null!=r}))}},
|
|
222
|
+
q=Object.keys(h);for(h=0;h<q.length;h++)p.call(this,q[h]);q=0;for(h=l.length-1;0<=h;h--){for(var v=0;v<h;v++)if(0<=l[v][2].indexOf(l[h][0])){l.splice(v,0,l.splice(h,1)[0]);h=l.length;break}q++;if(1E6<q){console.error(_$_9989[248]);break}}m=[];for(h=0;h<l.length;h++)m[l[h][0]]=l[h][1];return m};a.updateAll=function(h,l){var m,n;Ha.updateAll.call(this,h,l);var p=Object.keys(this.formula);var q=[];var v=[];for(m=0;m<p.length;m++){var u=p[m];var w=this.formula[u];if(l&&l[u])for(var y=0;y<w.length;y++)h[w[y]]&&
|
|
223
|
+
(w[y]=h[w[y]]),v[w[y]]=!0;else{var x=[];for(y=0;y<w.length;y++)l&&l[w[y]]||(h[w[y]]&&(w[y]=h[w[y]]),v[w[y]]=!0,x.push(w[y]));x.length&&(h[u]&&(u=h[u]),q[u]=x)}}this.formula=q;x=this.getWorksheetName();for(var D=0;D<t.spreadsheet.length;D++)for(var R=t.spreadsheet[D].worksheets,O=0;O<R.length;O++)if(R[O].getWorksheetName()!==x)for(p=Object.keys(R[O].formula),m=0;m<p.length;m++){q=[];w=R[O].formula[p[m]];for(y=0;y<w.length;y++)u=w[y].split(_$_9989[27]),u[0]==x&&u[1]?l&&l[u[1]]||(h[u[1]]&&(u[1]=h[u[1]]),
|
|
224
|
+
q.push(u[0]+_$_9989[27]+u[1])):q.push(w[y]);R[O].formula[p[m]]=q}p=[];u=Object.keys(v);for(y=0;y<u.length;y++)0<=u[y].indexOf(_$_9989[27])?(w=u[y].split(_$_9989[27]),q=H(w[0]),m=w[1],x=this.getWorksheetName(),w=w[0]):(q=this,m=u[y],x=null,w=this.getWorksheetName()),(n=q.getValue(m))&&P(n)&&(q=a.update.call(q,n,h,l,x),q!=n&&(v[u[y]]=q,m=E.getCoordsFromColumnName(m),p[w]||(p[w]=[]),p[w].push({x:m[0],y:m[1],value:q,force:!0})));u=Object.keys(p);for(h=0;h<u.length;h++)q=H(u[h]),p[u[h]]=ea.applyValues.call(q,
|
|
225
|
+
p[u[h]]),ea.setValueChained.call(q,p[u[h]]),L.call(q,_$_9989[107],{data:p[u[h]]})};a.updateWorksheetName=function(h,l,m){for(var n=c(h),p=0;p<n.length;p++)h=n[p].split(_$_9989[135]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_9989[133],_$_9989[188]),_$_9989[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=m,0<=h[0].indexOf(_$_9989[132])&&(h[0]=_$_9989[133]+h[0]+_$_9989[133]),n[p]=h.join(_$_9989[135])));return n.join(_$_9989[3])};a.updateWorksheetNames=function(h,l){for(var m,n,p=0;p<t.spreadsheet.length;p++)for(var q=
|
|
226
|
+
[],v=t.spreadsheet[p].worksheets,u=0;u<v.length;u++){for(var w=0;w<v[u].options.data.length;w++)for(var y=0;y<v[u].options.data[w].length;y++)(m=v[u].options.data[w][y])&&P(m)&&(n=a.updateWorksheetName(m,h,l),n!=m&&q.push({x:y,y:w,value:n,force:!0}));q=ea.applyValues.call(v[u],q);L.call(v[u],_$_9989[107],{data:q})}};a.shiftFormula=function(h,l,m){var n=c(h,!0);h=function(u){if(-1==u.indexOf(_$_9989[135])){u=E.getCoordsFromColumnName(u);var w=_$_9989[3]}else w=n[p].split(_$_9989[135]),u=E.getCoordsFromColumnName(w[1]),
|
|
227
|
+
w=w[0]+_$_9989[135];var y=u[0]+l;u=u[1]+m;return u=0>y||0>u?_$_9989[246]:w+E.getColumnNameFromCoords(y,u)};for(var p=0;p<n.length;p++)if(k.test(n[p])&&-1==n[p].indexOf(_$_9989[247])){var q=-1==n[p].indexOf(_$_9989[135])?[_$_9989[3],n[p]]:n[p].split(_$_9989[135]);if(-1==q[1].indexOf(_$_9989[136]))q[1]=h(q[1]);else{var v=q[1].split(_$_9989[136]);q[1]=h(v[0])+_$_9989[136]+h(v[1])}n[p]=q[0]?q.join(_$_9989[135]):q[1]}return n.join(_$_9989[3])};a.getTokensFromRange=function(h){var l=this,m=_$_9989[3],n=
|
|
228
|
+
_$_9989[3];0<=h.indexOf(_$_9989[27])?n=_$_9989[27]:0<=h.indexOf(_$_9989[135])&&(n=_$_9989[135]);h=h.replace(/\$/g,_$_9989[3]);n&&(m=h.split(n),l=H(m[0]),h=m[1],m=m[0]+n);n=[];h=h.split(_$_9989[136]);var p=E.getCoordsFromColumnName(h[0]),q=E.getCoordsFromColumnName(h[1]);if(p[0]<=q[0]){h=p[0];var v=q[0]}else h=q[0],v=p[0];if(null===p[1]&&null==q[1]){var u=0;p=0;l.options&&l.options.data&&(p=l.options.data.length-1)}else p[1]<=q[1]?(u=p[1],p=q[1]):(u=q[1],p=p[1]);for(l=u;l<=p;l++)for(u=h;u<=v;u++)n.push(m+
|
|
229
|
+
E.getColumnNameFromCoords(u,l));return n};a.getRangeFromTokens=function(h){h=h.filter(function(n){return n!=_$_9989[246]});for(var l=_$_9989[3],m=0;m<h.length;m++)0<=h[m].indexOf(_$_9989[27])&&(l=h[m].split(_$_9989[27]),h[m]=l[1],l=l[0]);l&&(l+=_$_9989[27]);h.sort(function(n,p){n=E.getCoordsFromColumnName(n);p=E.getCoordsFromColumnName(p);return n[1]>p[1]?1:n[1]<p[1]?-1:n[0]>p[0]?1:n[0]<p[0]?-1:0});return h.length?l+(h[0]+_$_9989[136]+h[h.length-1]):_$_9989[246]};a.getTokens=function(h,l){var m=d(h);
|
|
230
|
+
h.replace(/!/g,_$_9989[27]);(h=m.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&(m=f.call(this.parent,h,m));(h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(m=e.call(this,h,m));h=m.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(m=0;m<h.length;m++)-1==h[m].indexOf(_$_9989[27])&&l&&(h[m]=l+_$_9989[27]+h[m]);return h};a.tokenIdentifier=k;a.tokenize=c;return a}(),ea=function(){var k=function(c){c.name=Z;c.value=N;c.getValue=k[_$_9989[51]];c.getValueFromCoords=
|
|
231
|
+
k.getFromCoords;c.setValue=k[_$_9989[11]];c.setValueFromCoords=k.setFromCoords;c.setCheckRadioValue=k.setCheckRadio;c.getProcessed=k.processed};k[_$_9989[51]]=function(c,b){var a=this;if(typeof c==_$_9989[84]){var d=c.x;c=c.y}else 0<=c.indexOf(_$_9989[27])&&(a=c.split(_$_9989[27]),c=a[1],a=H(a[0])),c=E.getCoordsFromColumnName(c),d=c[0],c=c[1];return k.getFromCoords.call(a,d,c,b)};k.getFromCoords=function(c,b,a){var d=null;null!=c&&null!=b&&(d=a?k.processed.call(this,c,b):N.call(this,c,b));return d};
|
|
232
|
+
k[_$_9989[11]]=function(c,b,a){if(!Q.call(this.parent,this))return!1;var d=null,e=null,f=null,g=[];a=a?!0:!1;var h=function(n,p){var q=null;typeof n==_$_9989[17]?(f=E.getCoordsFromColumnName(n),d=f[0],e=f[1]):n.tagName?(d=n.getAttribute(_$_9989[42]),e=n.getAttribute(_$_9989[43])):n.element&&n.element.tagName?(d=n.element.getAttribute(_$_9989[42]),e=n.element.getAttribute(_$_9989[43])):(d=n.x,e=n.y,void 0!==n.value&&(p=n.value),void 0!==n.style&&(q=n.style));n={x:d,y:e,value:p,force:a};null!==q&&(n.style=
|
|
233
|
+
q);g.push(n)};if(c&&Array.isArray(c))for(var l=0;l<c.length;l++)h(c[l],b);else if(typeof c==_$_9989[84]&&void 0==c.x&&void 0==c.tagName)for(b=Object.keys(c),l=0;l<b.length;l++)h(b[l],c[b[l]]);else h(c,b);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,g);X.update.call(this,!0);this.refreshBorders();var m=this;setTimeout(function(){ha.refresh.call(m)},250);if(g.length){U.call(this.parent,{worksheet:m,action:_$_9989[79],records:g,selection:this.selectedCell});
|
|
234
|
+
c=this.getPrimaryKey();if(!1!==c)for(l=0;l<g.length;l++)g[l].x===c&&g[l].value&&S.call(this,g[l]);L.call(this,_$_9989[79],{data:g});F.call(this.parent,_$_9989[249],this,g)}}};k.setFromCoords=function(c,b,a,d){var e=[];e.push({x:c,y:b,value:a});k[_$_9989[11]].call(this,e,null,d)};k.setCheckRadio=function(){for(var c=[],b=this.getSelected(),a=0;a<b.length;a++){var d=b[a].x,e=b[a].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$_9989[250]){var f=N.call(this,d,e)?!1:!0;c.push({x:d,
|
|
235
|
+
y:e,value:f})}}c.length&&k[_$_9989[11]].call(this,c)};k.applyValues=function(c){for(var b,a,d=this.options.style||{},e=[],f={},g=0;g<c.length;g++)if(b=c[g],a=this.updateCell(b.x,b.y,b.value,b.force),void 0!==a.value){if(void 0!==b.style){var h=E.getColumnNameFromCoords(b.x,b.y);a.style=f[h]=b.style;a.oldStyle=d&&d[h]?d[h]:_$_9989[193]}e.push(a)}0<Object.keys(f).length&&Pa.update.call(this,f);return e};k.processed=function(c,b,a){var d=N.call(this,c,b);if(null===d)return null;var e=da[_$_9989[51]].call(this,
|
|
236
|
+
c,b),f=e[1];f.type!=_$_9989[49]&&f.type!=_$_9989[251]&&f.type!=_$_9989[252]&&f.type!=_$_9989[253]&&f.type!=_$_9989[254]&&0!=f.process&&(!0===a||f.type!=_$_9989[255]&&f.type!=_$_9989[256]&&f.type!=_$_9989[257])&&(f.type==_$_9989[250]?d=e[0][_$_9989[51]](f,d,a):this.records[b][c].element?d=1==this.parent.config.stripHTML?this.records[b][c].element.innerText:this.records[b][c].element.innerHTML:((_$_9989[3]+d).substr(0,1)==_$_9989[12]&&(d=this.executeFormula(d,c,b,!1)),e[0]&&typeof e[0][_$_9989[51]]==
|
|
237
|
+
_$_9989[85]&&(d=e[0][_$_9989[51]](f,d,a))));return d};k.setValueChained=function(c){for(var b,a=[],d,e=0;e<c.length;e++)b=c[e],d=E.getColumnNameFromCoords(b.x,b.y),a[d]=b.value;a=V.getChain.call(this,a);c=Object.keys(a);for(e=0;e<c.length;e++)0<=c[e].indexOf(_$_9989[27])?(b=c[e].split(_$_9989[27]),d=b[1],b=H(b[0])):(d=c[e],b=this),d=E.getCoordsFromColumnName(d),M.update.call(b,d[0],d[1],a[c[e]],!0)};return k}(),M=function(){var k=function(c){c.getCell=k[_$_9989[51]];c.getCellFromCoords=k[_$_9989[51]];
|
|
238
|
+
c.updateCell=k.update;c.updateCells=k.updateAll;c.getSelected=k.selected;c.getCells=k.getCells;c.setCells=k.setCells;c.isAttached=k.attached};k.attached=function(c,b){return this.records[b]&&this.records[b][c]&&this.records[b][c].element&&this.records[b][c].element.parentNode&&this.records[b][c].element.parentNode.parentNode?!0:!1};k[_$_9989[51]]=function(c,b,a){typeof c==_$_9989[17]&&(b=E.getCoordsFromColumnName(c),c=b[0],b=b[1]);c=parseInt(c);b=parseInt(b);if(this.records[b]&&this.records[b][c]&&
|
|
239
|
+
this.records[b][c].element)return this.records[b][c].element;var d=N.call(this,c,b);null===d&&(d=_$_9989[3]);return M.create.call(this,c,b,d,a)};k.getFromCoords=function(c,b,a){if(!c)return null;var d=[],e=c[0],f=c[1],g=c[2];c=c[3];for(a&&(a=this.results?E.invert(this.results):null);f<=c;f++)for(var h=e;h<=g;h++)if(!a||a[f])b?d.push(E.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);return d};k.selected=function(c,b){return k.getFromCoords.call(this,this.getHighlighted(),c,b)};k.getSelectedColumns=
|
|
240
|
+
function(){var c=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)c.push(a);return c};k.updateAll=function(c){for(var b=this.getPrimaryKey(),a=[],d=0;d<c.length;d++)void 0!==c[d].id?(S.call(this,c[d]),a.push({id:c[d].id,y:c[d].y}),!1!==b&&k.update.call(this,b,c[d].y,c[d].id,!0)):a.push(k.update.call(this,c[d].x,c[d].y,c[d].value,c[d].force));L.call(this,_$_9989[106],[a])};k.update=function(c,b,a,d){var e=this.records[b];if(e=e&&e[c]?e[c]:null)if(e=e.element,!d&&e&&1==e.classList.contains(_$_9989[18]))d=
|
|
241
|
+
{x:c,y:b};else{d=F.call(this.parent,_$_9989[258],this,e,c,b,a);void 0!==d&&(a=d);d=da[_$_9989[51]].call(this,c,b);typeof d[0].updateCell==_$_9989[85]&&(d=d[0].updateCell(e,a,c,b,this,d[1]),void 0!==d&&(a=d));d={x:c,y:b};var f=N.call(this,c,b);f!==a&&(a=N.call(this,c,b,a),d.oldValue=f,d.value=a,e&&k.applyOverflow.call(this,e,c,b),F.call(this.parent,_$_9989[259],this,e,c,b,d.value,d.oldValue))}else return!1;return d};k.create=function(c,b,a,d){var e=document.createElement(_$_9989[147]);e.setAttribute(_$_9989[42],
|
|
242
|
+
c);e.setAttribute(_$_9989[43],b);var f=da[_$_9989[51]].call(this,c,b);f[0]&&typeof f[0].createCell==_$_9989[85]&&(f=f[0].createCell(e,a,c,b,this,f[1]),void 0!==f&&(a=f));N.call(this,c,b,a);this.records[b][c]||oa.cell.call(this,c,b,a);this.records[b][c].element=e;!a&&this.records[b][c].v&&(e.innerText=this.records[b][c].v);k.applyProperties.call(this,e,c,b,d);k.applyOverflow.call(this,e,c,b);F.call(this.parent,_$_9989[260],this,e,c,b,a);return e};k.getAttributes=function(c,b,a){a[c]||(a[c]={});c==
|
|
243
|
+
_$_9989[261]?a[c][b]=this.getValue(b):c==_$_9989[262]?this.merged.cells&&(b=this.merged.cells[b])&&(a[c][b]=this.options.mergeCells[b]):this.options[c]&&this.options[c][b]&&(a[c][b]=this.options[c][b])};k.setAttributes=function(c){c&&c.style&&this.setStyle(c.style);c&&c.comments&&this.setComments(c.comments);c&&c.meta&&this.setMeta(c.meta);c&&c.cells&&this.setCells(c.cells);c&&c.mergeCells&&this.setMerge(c.mergeCells);c&&c.values&&k.batch.call(this,c.values);c&&c.formulas&&k.batch.call(this,c.formulas,
|
|
244
|
+
!0)};k.applyProperties=function(c,b,a,d){if(!d){d=E.getColumnNameFromCoords(b,a);var e=this.options.style,f=this.options.comments,g=this.options.cells,h=this.options.rows;if(e&&e[d]){var l=(l=c.getAttribute(_$_9989[98]))?l+(_$_9989[263]+e[d]):e[d];c.setAttribute(_$_9989[98],l)}f&&f[d]&&c.setAttribute(_$_9989[264],f[d]);g&&g[d]&&(1==g[d].readOnly&&c.classList.add(_$_9989[18]),!1===g[d].locked&&!0===this.options.selectUnLockedCells&&c.classList.add(_$_9989[265]));h&&h[a]&&1==h[a].readOnly&&c.classList.add(_$_9989[18])}f=
|
|
245
|
+
this.options.columns[b];c.style.textAlign||(c.style.textAlign=f.align?f.align:this.options.defaultColAlign);!1===this.records[a][b].readonly||1!=this.records[a][b].readonly&&1!=f.readOnly&&1!=f.readonly||c.classList.add(_$_9989[18])};k.applyOverflow=function(c,b,a){1==this.options.textOverflow&&0<b&&(b==this.options.columns.length-1&&(c.style.overflow=_$_9989[49]),this.records[a][b-1]&&this.records[a][b-1].element&&(this.records[a][b-1].element.style.overflow=!c.innerText&&this.headers[b-1]&&this.headers[b-
|
|
246
|
+
1].offsetWidth?_$_9989[3]:_$_9989[49]))};k.batch=function(c,b){var a=[],d=Object.keys(c);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_9989[27])){var f=d[e].split(_$_9989[27]);var g=H(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=E.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],c[d[e]],!0);a[f]||(a[f]=[]);a[f].push(h)}if(1==b&&(d=Object.keys(a),d.length))for(e=0;e<d.length;e++)g=H(d[e]),L.call(g,_$_9989[107],a[d[e]])};k.getCells=function(c){return c?this.options.cells[c]:
|
|
247
|
+
this.options.cells};k.setCells=function(c,b){if(!Q.call(this.parent,this))return!1;if(typeof c==_$_9989[17])this.options.cells[c]=b;else{b=Object.keys(c);for(var a=0;a<b.length;a++)this.options.cells[b[a]]=c[b[a]]}};return k}(),za=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);for(var d,e=b?_$_9989[3]:_$_9989[40],f=Object.keys(a),g=0;g<f.length;g++)if(d=this.rows[a[f[g]]])d.element&&(d.element.style.display=e),d.visible=b;this.resetBorders();G.refresh.call(this)},c=function(b){b.getRow=
|
|
248
|
+
c[_$_9989[51]];b.moveRow=c.move;b.insertRow=c.add;b.deleteRow=c.del;b.getSelectedRows=c.selected;b.showRow=k.bind(b,!0);b.hideRow=k.bind(b,!1)};c[_$_9989[51]]=function(b){return this.rows[b]};c.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};c.selected=function(b){var a=[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)b?a.push(e):a.push(this.rows[e].element);return a};c.create=function(b,a){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;
|
|
249
|
+
this.rows[b]||oa.row.call(this,b);var d=document.createElement(_$_9989[145]);d.setAttribute(_$_9989[43],b);this.rows[b].element=d;var e=null;this.options.rows[b]&&!a&&(this.options.rows[b].style&&d.setAttribute(_$_9989[98],this.options.rows[b].style),this.options.rows[b].height&&(d.style.height=parseInt(this.options.rows[b].height)+_$_9989[44]),this.options.rows[b].title&&(e=this.options.rows[b].title),0==this.options.rows[b].visible&&(this.rows[b].visible=!1),this.options.rows[b].id&&(this.rows[b].id=
|
|
250
|
+
this.options.rows[b].id));F.call(this.parent,_$_9989[266],this,b,d);0==this.rows[b].visible&&(d.style.display=_$_9989[40]);e||(e=parseInt(b+1));a=document.createElement(_$_9989[147]);a.innerHTML=e;a.setAttribute(_$_9989[43],b);a.className=_$_9989[267];d.appendChild(a);return d};c.move=function(b,a){if(!Q.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.rows[a]||!this.rows[b])return console.error(_$_9989[268]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[b]?
|
|
251
|
+
d=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[a].element)?(d=G.renderRow.call(this,b),b>a?this.tbody.insertBefore(d,this.rows[a].element):this.tbody.insertBefore(d,this.rows[a].element.nextSibling)):this.rows[b].element&&(this.tbody.removeChild(this.rows[b].element),G.refresh.call(this));this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,
|
|
252
|
+
0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);L.call(this,_$_9989[67],{f:b,t:a});X.references.call(this);X.update.call(this);U.call(this.parent,{worksheet:this,action:_$_9989[67],oldValue:b,newValue:a});F.call(this.parent,_$_9989[269],this,b,a)};c.add=function(b,a,d,e){if(!Q.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_9989[270]),
|
|
253
|
+
!1;var f=[];if(0<b)var g=parseInt(b);else g=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=Ea.standardize(e);d=d?!0:!1;var h=this.options.data?this.options.data.length-1:0;if(void 0==a||a>h||0>a)a=h,d=!1;g||(g=1);if(!1===F.call(this.parent,_$_9989[271],this,a,g,d))return console.log(_$_9989[272]),!1;this.resetBorders();var l=d?a:a+1,m=0;b=[];for(var n=[],p=this.rows.splice(l),q=this.options.data?this.options.data.splice(l):[],v=this.records.splice(l),u=l;u<g+l;u++){var w=e[m]&&
|
|
254
|
+
e[m].id?e[m].id:sa.next.call(this);oa.row.call(this,u,w);var y=this.dataType?{}:[];for(var x=0;x<this.options.columns.length;x++){var D=Z.call(this,x);y[D]=_$_9989[3];e&&e[m]&&e[m].data&&(typeof e[m].data[D]!==_$_9989[13]?y[D]=e[m].data[D]:typeof e[m].data[x]!==_$_9989[13]&&(y[D]=e[m].data[x]));f.push({x,y:u,value:y[D],force:!0})}n.push({id:w,data:y});m++}this.rows=this.rows.concat(p);this.records=this.records.concat(v);this.options.data=this.options.data.concat(q);this.results&&0<this.results.length&&
|
|
255
|
+
(h=this.results[this.results.length-1]);e=!1;p[0]?0<=Array.prototype.indexOf.call(this.tbody.children,p[0].element)&&(e=!0):this.rows[h]?this.rows[h].element&&0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[h].element)&&(e=!0):e=!0;for(u=l;u<g+l;u++)this.results&&(this.rows[u].results=!0),1==e&&(h=p[0]?p[0].element:null,D=G.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(D,h):this.tbody.appendChild(D),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,
|
|
256
|
+
D)>=this.options.pagination&&(e=!1):G.limited.call(this)&&(G.isVisible.call(this,D.children[1])||(e=!1))),b.push(this.records[u]);this.merged.rows[l]&&ba.updateConfig.call(this,1,1,l-1,g);L.call(this,_$_9989[63],{numOfRows:g,rowNumber:a,insertBefore:d?1:0,data:n});l=this.tbody.firstChild.getAttribute(_$_9989[43]);this.results&&(l=this.results.indexOf(parseInt(l)),this.results=ua.refresh.call(this));X.references.call(this);f.length&&ea.applyValues.call(this,f);0<this.options.pagination?ta[_$_9989[11]].call(this,
|
|
257
|
+
this.pageNumber):(this.results&&(l=this.results[l]),this.tbody.textContent=_$_9989[3],G[_$_9989[46]].call(this,l));X.update.call(this);T.call(this);ha.refresh.call(this);U.call(this.parent,{worksheet:this,action:_$_9989[63],rowNumber:a,numOfRows:g,insertBefore:d,data:n});F.call(this.parent,_$_9989[273],this,a,g,b,d)};c.del=function(b,a){if(!Q.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_9989[274]),!1;var d=null,e={},f=[],g=0;void 0==b&&(a=this.getSelectedRows(),
|
|
258
|
+
a[0]?(b=parseInt(a[0].getAttribute(_$_9989[43])),a=a.length):(b=this.options.data.length-1,a=1));var h=this.options.data.length-1;if(void 0==b||b>h||0>b)b=h;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===F.call(this.parent,_$_9989[275],this,b,a))return console.log(_$_9989[276]),!1;if(-1<parseInt(b)&&0<parseInt(a)){h=parseInt(this.thead.lastChild.children[1].getAttribute(_$_9989[42]));var l=
|
|
259
|
+
parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));this.resetBorders();for(var m=b;m<b+a;m++)for(var n=0;n<this.options.columns.length;n++)d=E.getColumnNameFromCoords(n,m),M.getAttributes.call(this,_$_9989[277],d,e),M.getAttributes.call(this,_$_9989[98],d,e),M.getAttributes.call(this,_$_9989[278],d,e),M.getAttributes.call(this,_$_9989[279],d,e),M.getAttributes.call(this,_$_9989[262],d,e),M.getAttributes.call(this,_$_9989[261],d,e),f[d]=!0;if(d=V.getChain.call(this,e.values))e.formulas=d;for(m=
|
|
260
|
+
b;m<b+a;m++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[m].element)&&(this.rows[m].element.parentNode.removeChild(this.rows[m].element),g++);d=[];for(m=b;m<b+a;m++)d.push({id:this.getRowId(m),row:m,data:this.getRowData(m)});this.rows.splice(b,a);m=this.records.splice(b,a);this.options.data.splice(b,a);ba.updateConfig.call(this,1,0,b,a);L.call(this,_$_9989[64],{rowNumber:b,numOfRows:a,data:d});X.references.call(this,f);this.results&&(this.results=ua.refresh.call(this));0<this.options.pagination?
|
|
261
|
+
this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var p=this.whichPage(this.options.data.length-1);this.page(p)}}):G.limited.call(this)&&0<g&&(this.tbody.textContent=_$_9989[3],G.call(this),G[_$_9989[46]].call(this,l,h));X.update.call(this,!0);U.call(this.parent,{worksheet:this,action:_$_9989[64],rowNumber:b,numOfRows:a,insertBefore:1,data:d,attributes:e});F.call(this.parent,_$_9989[280],this,b,a,m,d,e)}};return c}(),Ga=function(){var k=function(b,a){Array.isArray(a)||(a=[a]);
|
|
262
|
+
for(var d,e,f=Object.keys(a),g=0;g<f.length;g++)if(d=a[f[g]],e=this.options.columns[d])this.colgroup[d]&&(this.colgroup[d].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$_9989[44]:_$_9989[144]),e.visible=b;this.resetBorders();G.refresh.call(this)},c=function(b){b.getColumn=c[_$_9989[51]];b.getColumnIdByName=c.getByName;b.getPrimaryKey=c.getPrimaryKey;b.getSelectedColumns=c.selected;b.getOptions=c.getOptions;b.getColumnOptions=c.getOptions;b.moveColumn=c.move;b.insertColumn=c.add;
|
|
263
|
+
b.deleteColumn=c.del;b.getProperties=c.properties;b.setProperties=c.properties;b.getProperty=c.properties;b.setProperty=c.properties;b.showColumn=k.bind(b,!0);b.hideColumn=k.bind(b,!1)};c[_$_9989[51]]=function(b){return this.options.columns[b]||!1};c.getByName=function(b){for(var a=this.options.columns,d=0;d<a.length;d++)if(a[d].name==b)return d;return!1};c.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};c.getOptions=
|
|
264
|
+
function(b,a){var d=this.options.columns[b];Object.keys(this.options.cells).length&&void 0!==a&&(b=E.getColumnNameFromCoords(b,a),this.options.cells[b]&&(d=this.options.cells[b]));if(!d)d={type:_$_9989[56]};else if(!d.type||typeof d.type==_$_9989[17]&&!t.editors[d.type])d.type=_$_9989[56];return d};c.selected=function(b){b=[];var a=this.getHighlighted();if(a)for(var d=a[0];d<=a[2];d++)b.push(d);return b};c.move=function(b,a){if(!Q.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$_9989[281]),
|
|
265
|
+
!1;if(!this.options.columns[a])return console.error(_$_9989[282]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.cols[b]?d=!0:this.merged.cols[a]&&(b>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();d=this.options.freezeColumns;0<d&&(b<d||a<d)?ma.reset.call(this):d=null;if(this.headers[a]&&this.headers[a].parentNode){this.headers[b]||Ba.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],
|
|
266
|
+
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++){var g=this.tbody.children[f].getAttribute(_$_9989[43]);e=(b>a?this.records[g][a].element:this.records[g][a].element.nextSibling)||null;this.tbody.children[f].insertBefore(M[_$_9989[51]].call(this,b,g),e)}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)||
|
|
267
|
+
null,this.tfoot.children[f].insertBefore(aa.create.call(this,b,f),e)}else if(this.headers[b]&&this.headers[b].parentNode){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_9989[43])),this.tbody.children[f].removeChild(this.records[g][b].element);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,
|
|
268
268
|
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=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,
|
|
269
|
-
1)[0]);
|
|
270
|
-
0;
|
|
271
|
-
_$
|
|
272
|
-
|
|
273
|
-
(
|
|
274
|
-
(this.options.data[
|
|
275
|
-
this,a,l,[],d)};c.del=function(b,a){if(!
|
|
276
|
-
console.error(_$
|
|
277
|
-
f++),q
|
|
278
|
-
this.records[
|
|
279
|
-
|
|
280
|
-
(a.type=_$
|
|
281
|
-
(
|
|
282
|
-
|
|
283
|
-
_$
|
|
284
|
-
_$
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
n[
|
|
288
|
-
d);this.refreshBorders();
|
|
289
|
-
d[e[f]]),this.records[g][h].element.style.textAlign||(this.records[g][h].element.style.textAlign=this.options.columns[h].align||this.options.defaultColAlign||_$
|
|
290
|
-
!1:this.options.comments};k[_$
|
|
291
|
-
b:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(b?this.records[f[1]][f[0]].element.setAttribute(_$
|
|
292
|
-
this.options.meta[c][b]:this.options.meta[c]}else return this.options.meta};k[_$
|
|
293
|
-
c[b[d]][e[f]]}Object.keys(a).length&&(
|
|
294
|
-
-1:a>d?1:a<d?-1:0}};k.execute=function(c,b,a){if(0<=c){b=null==b?this.headers[c].classList.contains(_$
|
|
295
|
-
c):k.handler(b,c);f.sort(g);d=a?!0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=
|
|
296
|
-
order:a});k.update.call(this,a);k.arrow.call(this,c,b);
|
|
297
|
-
this.searchInput&&this.searchInput.value?
|
|
298
|
-
0;var c=document.createElement(_$
|
|
299
|
-
1&&(this.pageNumber++,k[_$
|
|
300
|
-
function(c,b){var a=this.pageNumber,d=parseInt(this.options.pagination);if(d){if(null==c||-1==c)c=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===
|
|
301
|
-
if(this.options.pagination){var c=this.results?this.results.length:this.rows.length;if(c){c=Math.ceil(c/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>c?c:10;else 5>c-this.pageNumber?(b=c-9,a=c,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var d=document.createElement(_$
|
|
302
|
-
b,this.pagination.children[1].appendChild(d),this.pageNumber==b-1&&d.classList.add(_$
|
|
303
|
-
for(var c=0;c<this.rows.length;c++)this.rows[c].element&&k.update.call(this,c)}};k.update=function(c){var b,a;if(a=this.options.freezeColumns){var d=
|
|
304
|
-
this.headers[a].style.left=c+1+_$
|
|
305
|
-
this.thead.lastChild)c.children[b].classList.remove(_$
|
|
306
|
-
50:0;if(0<this.options.freezeColumns)for(var b=0;b<=this.options.freezeColumns;b++)c=this.thead.lastChild.children[b]?c+this.thead.lastChild.children[b].offsetWidth:c+this.options.columns[b].width;return c};return k}(),
|
|
307
|
-
|
|
308
|
-
this.content.addEventListener(_$
|
|
309
|
-
this.tbody=document.createElement(_$
|
|
310
|
-
this.table.classList.add(_$
|
|
311
|
-
this.table.classList.add(_$
|
|
312
|
-
var e=document.createElement(_$
|
|
313
|
-
_$
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
_$
|
|
317
|
-
|
|
318
|
-
(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=c.offsetWidth-50+_$
|
|
319
|
-
a.toolbar=document.createElement(_$
|
|
320
|
-
_$
|
|
321
|
-
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=
|
|
322
|
-
if(c.length)for(d=0;d<c.length;d++)if(typeof t.extensions[c[d]].oninit==_$
|
|
323
|
-
a;
|
|
324
|
-
_$
|
|
325
|
-
0;b<this.options.columns.length;b++)k.cell.call(this,b,c)},cell:function(c,b,a){typeof a==_$
|
|
326
|
-
_$
|
|
327
|
-
var e=Array.isArray(b)&&b[d]?b[d]:b;this.colgroup[c[d]].setAttribute(_$
|
|
328
|
-
function(b){b.getHeight=k[_$
|
|
329
|
-
a+_$
|
|
330
|
-
_$
|
|
331
|
-
g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return b};f[_$
|
|
332
|
-
null;return g};f.open=function(g){c=parseInt(g);if(this.headers[c].classList.contains(_$
|
|
333
|
-
!0);g=
|
|
334
|
-
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[c].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$
|
|
335
|
-
f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],
|
|
336
|
-
f[_$
|
|
337
|
-
!1;if(g){e=[];g=new RegExp(g,_$
|
|
338
|
-
g?!1:!0}for(
|
|
339
|
-
var l=document.createElement(_$
|
|
340
|
-
|
|
341
|
-
1==l&&
|
|
342
|
-
this.rows.length;c++)!0===this.rows[c].results&&delete this.rows[c].results;this.results=null};k.refresh=function(){for(var c=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&c.push(b);return c};return k}(),
|
|
343
|
-
function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$
|
|
344
|
-
this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},b=function(a){a.search=b.update;a.resetSearch=b.reset;a.updateSearch=b.refresh;a.showSearch=b.show;a.hideSearch=b.hide};b.execute=function(a,d){null===a?a=this.searchInput.value||_$
|
|
345
|
-
0;h<this.options.columns.length;h++){var l=_$
|
|
346
|
-
_$
|
|
347
|
-
!1;this.searchContainer.style.display=_$
|
|
348
|
-
(this.searchContainer.style.display=_$
|
|
349
|
-
_$
|
|
350
|
-
d.target.innerText);
|
|
351
|
-
icon:_$
|
|
352
|
-
h.push({title:
|
|
353
|
-
onclick:function(){c.insertRow(0)}})),1==c.options.columnSorting&&(h.push({type:_$
|
|
354
|
-
h.push({title:
|
|
355
|
-
g);c.setComments(
|
|
356
|
-
c)}};k[_$
|
|
357
|
-
this.toolbar.style.display=_$
|
|
358
|
-
c.items[b].v){c.items[b].options=[];for(var a=0;a<c.items[b].v.length;a++)c.items[b].options.push(c.items[b].v[a]);c.items[b].k&&(c.items[b].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else c.items[b].type==_$
|
|
359
|
-
this.k,this.v)});(b=
|
|
360
|
-
{type:_$
|
|
361
|
-
_$
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
b
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
else if(
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
k
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
_$
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
f
|
|
423
|
-
|
|
424
|
-
f
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
e
|
|
434
|
-
|
|
435
|
-
e.
|
|
436
|
-
return b}();k.
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
(
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
function(d,e
|
|
448
|
-
|
|
449
|
-
e
|
|
450
|
-
e).
|
|
451
|
-
{
|
|
452
|
-
_$
|
|
269
|
+
1)[0]);L.call(this,_$_9989[68],{f:b,t:a});X.references.call(this);X.update.call(this);0<d&&(b<=d||d<=d)&&ma[_$_9989[11]].call(this,d);U.call(this.parent,{worksheet:this,action:_$_9989[68],oldValue:b,newValue:a});F.call(this.parent,_$_9989[283],this,b,a)};c.add=function(b,a,d,e,f,g){if(!Q.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_9989[284]),!1;var h=[];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 m=
|
|
270
|
+
0;m<b.length;m++)f[m]=[b[m]]}f||(f=[]);d=d?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,d=!1;l||(l=1);if(!1===F.call(this.parent,_$_9989[285],this,a,l,d))return console.log(_$_9989[286]),!1;ha.reset.call(this);if(1==this.dataType)var n=parseInt((_$_9989[3]+Date.now()).substr(-8));e||(e=[]);for(m=0;m<l;m++)e[m]||(e[m]={type:_$_9989[56],source:[],options:[],width:this.options.defaultColWidth,align:this.options.defaultColAlign}),1==this.dataType&&typeof e[m].name==_$_9989[13]&&(e[m].name=
|
|
271
|
+
_$_9989[287]+(n+m));var p=d?a:a+1;this.options.columns=E.injectArray(this.options.columns,p,e);n=function(y,x){for(var D=p;D<l+p;D++)Ba.create.call(this,D),y?(this.headerContainer.insertBefore(this.headers[D],y),this.colgroupContainer.insertBefore(this.colgroup[D],x)):(this.headerContainer.appendChild(this.headers[D]),this.colgroupContainer.appendChild(this.colgroup[D]))};m=function(y,x){if(x)for(var D=p;D<l+p;D++)this.rows[y].element.insertBefore(M[_$_9989[51]].call(this,D,y,!0),x);else for(D=p;D<
|
|
272
|
+
l+p;D++)this.rows[y].element.appendChild(M[_$_9989[51]].call(this,D,y,!0))};var q=this.headers.splice(p),v=this.colgroup.splice(p);q[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,q[0])&&n.call(this,q[0],v[0]):this.headers[b]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[b])&&n.call(this);this.headers=this.headers.concat(q);this.colgroup=this.colgroup.concat(v);aa.adjust.call(this,p,l,1);pa.adjust.call(this,a,l,1,g);g=0;v=q=n=null;for(var u=0;u<this.options.data.length;u++){this.dataType||
|
|
273
|
+
(q=this.options.data[u].splice(p));v=this.records[u].splice(p);g=0;for(var w=p;w<l+p;w++)n=f[u]&&f[u][g]?f[u][g]:_$_9989[3],N.call(this,w,u,n),h.push({x:w,y:u,value:n}),oa.cell.call(this,w,u),g++;this.rows[u].element&&this.rows[u].element.parentNode&&(v[0]?0<=Array.prototype.indexOf.call(this.rows[u].element.children,v[0].element)&&m.call(this,u,v[0].element):this.records[u][b].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][b].element)&&m.call(this,u));this.dataType||
|
|
274
|
+
(this.options.data[u]=this.options.data[u].concat(q));this.records[u]=this.records[u].concat(v)}this.merged.cols[p]&&ba.updateConfig.call(this,0,1,p-1,l);L.call(this,_$_9989[65],{numOfColumns:l,columnNumber:a,insertBefore:d?1:0,properties:e,data:f});X.references.call(this);h.length&&ea.applyValues.call(this,h);X.update.call(this);this.refreshBorders();U.call(this.parent,{worksheet:this,action:_$_9989[65],columnNumber:a,numOfColumns:l,insertBefore:d,properties:e,data:f});F.call(this.parent,_$_9989[288],
|
|
275
|
+
this,a,l,[],d)};c.del=function(b,a){if(!Q.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_9989[289]),!1;var d={},e=[],f=0;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 g=this.options.columns.length-1;if(void 0==b||b>g||0>b)b=g;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,
|
|
276
|
+
console.error(_$_9989[290])));if(!1===F.call(this.parent,_$_9989[291],this,b,a))return console.log(_$_9989[292]),!1;if(-1<parseInt(b)&&0<parseInt(a)){g=parseInt(this.thead.lastChild.children[1].getAttribute(_$_9989[42]));var h=parseInt(this.tbody.firstChild.getAttribute(_$_9989[43]));this.resetBorders();var l=null,m=[],n=[],p=[];var q=0;for(var v=b;v<b+a;v++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[v])&&(this.colgroup[v].parentNode.removeChild(this.colgroup[v]),this.headers[v].parentNode.removeChild(this.headers[v]),
|
|
277
|
+
f++),p[q]=this.options.columns[v],q++;for(var u=0;u<this.options.data.length;u++)for(v=b;v<b+a;v++)q=E.getColumnNameFromCoords(v,u),M.getAttributes.call(this,_$_9989[277],q,d),M.getAttributes.call(this,_$_9989[98],q,d),M.getAttributes.call(this,_$_9989[278],q,d),M.getAttributes.call(this,_$_9989[279],q,d),M.getAttributes.call(this,_$_9989[262],q,d),M.getAttributes.call(this,_$_9989[261],q,d),e[q]=!0,this.records[u][v].element&&0<=Array.prototype.indexOf.call(this.rows[u].element.children,this.records[u][v].element)&&
|
|
278
|
+
this.records[u][v].element.parentNode.removeChild(this.records[u][v].element);if(v=V.getChain.call(this,d.values))d.formulas=v;this.options.columns.splice(b,a);this.headers.splice(b,a);this.colgroup.splice(b,a);for(u=0;u<this.options.data.length;u++)this.dataType||(n[u]=this.options.data[u].splice(b,a)),m[u]=this.records[u].splice(b,a);aa.adjust.call(this,b,a,0);(v=pa.adjust.call(this,b,a,0))&&(l={nested:v});ba.updateConfig.call(this,0,0,b,a);L.call(this,_$_9989[66],{columnNumber:b,numOfColumns:a});
|
|
279
|
+
X.references.call(this,e);G.limited.call(this)&&0<f&&(this.tbody.textContent=_$_9989[3],G.call(this),G[_$_9989[46]].call(this,h,g));X.update.call(this,!0);U.call(this.parent,{worksheet:this,action:_$_9989[66],columnNumber:b,numOfColumns:a,insertBefore:1,data:n,properties:p,attributes:d,extra:l});F.call(this.parent,_$_9989[293],this,b,a,m,p,d)}}};c.properties=function(b,a){if(this.options.columns[b]){if(a){if(!Q.call(this.parent,this))return!1;a=typeof a==_$_9989[17]?{type:a}:a;a.type&&t.editors[a.type]||
|
|
280
|
+
(a.type=_$_9989[56]);parseInt(a.width)||(a.width=this.options.defaultColWidth||100);this.edition&&this.closeEditor(this.edition,!1);var d=this.options.columns[b],e=t.editors[d.type],f=t.editors[a.type];if(e&&typeof e.destroyCell==_$_9989[85])for(var g=0;g<this.records.length;g++)this.records[g][b].element&&e.destroyCell(this.records[g][b].element);this.options.columns[b]=a;if(f&&typeof f.createCell==_$_9989[85])for(g=0;g<this.records.length;g++)this.records[g]&&this.records[g][b]&&this.records[g][b].element&&
|
|
281
|
+
(M.applyProperties.call(this,this.records[g][b].element,b,g),f.createCell(this.records[g][b].element,N.call(this,b,g),b,g,this,a));a.width&&this.colgroup[b]&&this.colgroup[b].setAttribute(_$_9989[152],parseInt(a.width));a.title&&(this.headers[b]&&(this.headers[b].innerText=a.title,this.headers[b].setAttribute(_$_9989[166],a.title)),this.options.columns[b].title=a.title);a.tooltip&&(this.headers[b]&&(this.headers[b].title=a.tooltip),this.options.columns[b].tooltip=a.tooltip);this.refreshBorders();
|
|
282
|
+
U.call(this.parent,{worksheet:this,action:_$_9989[77],column:b,newValue:a,oldValue:d});L.call(this,_$_9989[77],{column:b,options:a});return!0}return this.options.columns[b]}console.error(_$_9989[294])};return c}(),Pa=function(){var k={},c={},b=function(d){if(typeof d==_$_9989[17]){var e=d;d=E.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=E.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){c[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_9989[98],
|
|
283
|
+
_$_9989[3]);var g=this.options.columns[f].align?this.options.columns[f].align:this.options.defaultColAlign;g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(d){d.getStyle=a[_$_9989[51]];d.setStyle=a[_$_9989[11]];d.resetStyle=a.reset};a[_$_9989[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_9989[17])return e[d];var f=[],g=Object.keys(d);if(0<g.length)for(var h=0;h<g.length;h++){if(typeof d[h]==
|
|
284
|
+
_$_9989[17])var l=e&&e[d[h]]?e[d[h]]:_$_9989[3];else l=E.getColumnNameFromCoords(d[h].x,d[h].y),l=e&&e[l]?e[l]:_$_9989[3];f.push(l)}return f}return this.options.style};a[_$_9989[11]]=function(d,e,f,g){if(!Q.call(this.parent,this))return!1;this.options.style||(this.options.style={});var h=this.options.style,l=null,m=[],n=[],p={};n=function(u,w,y){if(!p[u]&&(h[u]?m=h[u].split(_$_9989[263]):(h[u]=_$_9989[3],m=[]),p[u]={},m.length))for(var x=0;x<m.length;x++)m[x]&&m[x].trim()&&(l=m[x].split(_$_9989[136]),
|
|
285
|
+
p[u][l[0].trim()]=l[1].trim());c[u]||(c[u]=[]);k[u]||(k[u]=[]);p[u][w]||(p[u][w]=_$_9989[3]);c[u].push([w+_$_9989[136]+p[u][w]]);p[u][w]=p[u][w]&&p[u][w]==y&&!g?_$_9989[3]:y;k[u].push([w+_$_9989[136]+p[u][w]]);y=E.getCoordsFromColumnName(u);this.records[y[1]]&&this.records[y[1]][y[0]]&&this.records[y[1]][y[0]].element&&(this.records[y[1]][y[0]].element.style[w]=p[u][w]);p[u][w]||delete p[u][w]};k={};c={};if(e)if(typeof d==_$_9989[17])n.call(this,d,e,f);else{if(d&&d.length)for(var q=0;q<d.length;q++){var v=
|
|
286
|
+
E.getColumnNameFromCoords(d[q].x,d[q].y);n.call(this,v,e,f)}}else for(f=Object.keys(d),q=0;q<f.length;q++)if(v=d[f[q]])for(typeof v==_$_9989[17]&&(v=v.split(_$_9989[263])),e=0;e<v.length;e++)v[e]&&(typeof v[e]==_$_9989[17]&&(v[e]=v[e].split(_$_9989[136])),v[e][0].trim()&&n.call(this,f[q],v[e][0].trim(),v[e][1].trim()));m={};n=Object.keys(p);if(n.length){for(q=0;q<n.length;q++){m[n[q]]||(m[n[q]]=[]);d=Object.keys(p[n[q]]);for(e=0;e<d.length;e++)m[n[q]].push(d[e]+_$_9989[114]+p[n[q]][d[e]]);this.options.style[n[q]]=
|
|
287
|
+
m[n[q]].join(_$_9989[295])}n=Object.keys(k);for(q=0;q<n.length;q++)k[n[q]]=k[n[q]].join(_$_9989[263]);n=Object.keys(c);for(q=0;q<n.length;q++)c[n[q]]=c[n[q]].join(_$_9989[263]);this.refreshBorders();U.call(this.parent,{worksheet:this,action:_$_9989[71],oldValue:c,newValue:k});L.call(this,_$_9989[71],[k]);F.call(this.parent,_$_9989[296],this,k,c)}};a.reset=function(d){if(!Q.call(this.parent,this))return!1;if(d){c={};if(Array.isArray(d))for(var e=0;e<d.length;e++)b.call(this,d[e]);else b.call(this,
|
|
288
|
+
d);this.refreshBorders();U.call(this.parent,{worksheet:this,action:_$_9989[72],cells:d,oldValue:c});L.call(this,_$_9989[72],[d]);F.call(this.parent,_$_9989[298],this,d)}else console.error(_$_9989[297])};a.update=function(d){k={};c={};for(var e=Object.keys(d),f=0;f<e.length;f++){c[e[f]]=this.options.style[e[f]]||_$_9989[3];k[e[f]]=this.options.style[e[f]]=d[e[f]];var g=E.getCoordsFromColumnName(e[f]),h=g[0];g=g[1];this.records[g]&&this.records[g][h]&&this.records[g][h].element&&(this.records[g][h].element.setAttribute(_$_9989[98],
|
|
289
|
+
d[e[f]]),this.records[g][h].element.style.textAlign||(this.records[g][h].element.style.textAlign=this.options.columns[h].align||this.options.defaultColAlign||_$_9989[53]))}L.call(this,_$_9989[72],[e]);L.call(this,_$_9989[71],[k]);F.call(this.parent,_$_9989[296],this,k,c)};return a}(),Wa=function(){var k=function(c){c.getComments=k[_$_9989[51]];c.setComments=k[_$_9989[11]]};k[_$_9989[51]]=function(c){return c&&typeof c==_$_9989[17]?this.options.comments&&this.options.comments[c]?this.options.comments[c]:
|
|
290
|
+
!1:this.options.comments};k[_$_9989[11]]=function(c,b){if(!Q.call(this.parent,this))return!1;if(typeof c==_$_9989[17]){var a={};a[c]=b}else a=c;if(b=F.call(this.parent,_$_9989[299],this,a))a=b;else if(!1===b)return!1;this.options.comments||(this.options.comments={});c={};var d=Object.keys(a);if(d.length){for(var e=0;e<d.length;e++){var f=E.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(c[d[e]]=this.options.comments[d[e]]||_$_9989[3],(b=a[d[e]])?this.options.comments[d[e]]=
|
|
291
|
+
b:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&(b?this.records[f[1]][f[0]].element.setAttribute(_$_9989[264],b):this.records[f[1]][f[0]].element.removeAttribute(_$_9989[264])))}U.call(this.parent,{worksheet:this,action:_$_9989[76],newValue:a,oldValue:c});L.call(this,_$_9989[76],[a]);F.call(this.parent,_$_9989[300],this,a,c)}};return k}(),Xa=function(){var k=function(c){c.getMeta=k[_$_9989[51]];c.setMeta=k[_$_9989[11]];c.resetMeta=k.reset};k[_$_9989[51]]=function(c,b){if(c){if(this.options.meta[c])return b?
|
|
292
|
+
this.options.meta[c][b]:this.options.meta[c]}else return this.options.meta};k[_$_9989[11]]=function(c,b,a){if(!Q.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof c==_$_9989[17]&&b){a||(a=_$_9989[3]);var d={};d[c]={};d[c][b]=a;c=d}b=Object.keys(c);if(b.length){a={};for(d=0;d<b.length;d++){this.options.meta[b[d]]||(this.options.meta[b[d]]={});a[b[d]]||(a[b[d]]={});for(var e=Object.keys(c[b[d]]),f=0;f<e.length;f++)this.options.meta[b[d]][e[f]]=c[b[d]][e[f]],a[b[d]][e[f]]=
|
|
293
|
+
c[b[d]][e[f]]}Object.keys(a).length&&(L.call(this,_$_9989[301],[a]),F.call(this.parent,_$_9989[302],this,a))}};k.reset=function(){this.options.meta={};L.call(this,_$_9989[303],{});F.call(this.parent,_$_9989[304],this,{})};return k}(),Ya=function(){var k=function(c){c.orderBy=k.execute};k.handler=function(c,b){return function(a,d){a=a[1];d=d[1];return c?a===_$_9989[3]&&d!==_$_9989[3]?1:a!==_$_9989[3]&&d===_$_9989[3]?-1:a>d?-1:a<d?1:0:a===_$_9989[3]&&d!==_$_9989[3]?1:a!==_$_9989[3]&&d===_$_9989[3]?
|
|
294
|
+
-1:a>d?1:a<d?-1:0}};k.execute=function(c,b,a){if(0<=c){b=null==b?this.headers[c].classList.contains(_$_9989[305])?1:0:b?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ga.getOptions.call(this,c,g),e=this.records[g][c].v,e=d.type==_$_9989[251]||d.type==_$_9989[256]||d.type==_$_9989[257]||d.type==_$_9989[306]||d.type==_$_9989[14]||d.type==_$_9989[307]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=[g,e];g=typeof this.parent.config.sorting===_$_9989[85]?this.parent.config.sorting(b,
|
|
295
|
+
c):k.handler(b,c);f.sort(g);d=a?!0:!1;if(!a)for(a=[],g=0;g<f.length;g++)a[g]=f[g][0];if(g=F.call(this.parent,_$_9989[308],this,c,b,a))a=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(C(_$_9989[309])))this.destroyMerged();else return!1;if(a.length<f.length)for(g=0;g<f.length;g++)-1==a.indexOf(f[g][0])&&a.push(f[g][0]);f=[];for(g=0;g<a.length;g++)f[a[g]]=g;Da.call(this,!1);ha.reset.call(this);L.call(this,_$_9989[78],{column:c,direction:b,
|
|
296
|
+
order:a});k.update.call(this,a);k.arrow.call(this,c,b);ha.refresh.call(this);U.call(this.parent,{worksheet:this,action:_$_9989[78],column:c,newValue:a,oldValue:f,direction:b});F.call(this.parent,_$_9989[310],this,c,b,a);return!0}};k.update=function(c){for(var b=[],a=0;a<c.length;a++)b[a]=this.options.data[c[a]];for(a=0;a<c.length;a++)this.options.data[a]=b[a];b=[];for(a=0;a<c.length;a++)b[a]=this.records[c[a]];this.records=b;b=[];for(a=0;a<c.length;a++)b[a]=this.rows[c[a]];this.rows=b;X.references.call(this);
|
|
297
|
+
this.searchInput&&this.searchInput.value?qa.update.call(this,null):ca.update.call(this)};k.arrow=function(c,b){for(var a=0;a<this.headers.length;a++)this.headers[a].classList.remove(_$_9989[311]),this.headers[a].classList.remove(_$_9989[305]);b?this.headers[c].classList.add(_$_9989[311]):this.headers[c].classList.add(_$_9989[305])};return k}(),ta=function(){var k=function(c){c.whichPage=k.whichPage;c.quantityOfPages=k.quantityOfPages;c.page=k[_$_9989[11]];c.updatePagination=k.update};k.build=function(){this.pageNumber=
|
|
298
|
+
0;var c=document.createElement(_$_9989[20]),b=document.createElement(_$_9989[20]);this.pagination=document.createElement(_$_9989[20]);this.pagination.classList.add(_$_9989[312]);this.pagination.appendChild(c);this.pagination.appendChild(b);this.options.pagination||(this.pagination.style.display=_$_9989[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_9989[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-
|
|
299
|
+
1&&(this.pageNumber++,k[_$_9989[11]].call(this,this.pageNumber))};k.whichPage=function(c){if(0<this.options.pagination)return this.rows[c]?(this.results&&(c=this.results.indexOf(parseInt(c))),Math.ceil((parseInt(c)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_9989[313]);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(_$_9989[313]);return!1};k[_$_9989[11]]=
|
|
300
|
+
function(c,b){var a=this.pageNumber,d=parseInt(this.options.pagination);if(d){if(null==c||-1==c)c=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===F.call(this.parent,_$_9989[315],this,c,a,d))return!1;this.pageNumber=c;G.resetY.call(this);aa.refresh.call(this);typeof b==_$_9989[85]&&b.call(this);F.call(this.parent,_$_9989[316],this,c,a,d)}else console.error(_$_9989[314])};k.update=function(){this.pagination.children[0].innerHTML=_$_9989[3];this.pagination.children[1].innerHTML=_$_9989[3];
|
|
301
|
+
if(this.options.pagination){var c=this.results?this.results.length:this.rows.length;if(c){c=Math.ceil(c/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>c?c:10;else 5>c-this.pageNumber?(b=c-9,a=c,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var d=document.createElement(_$_9989[20]);d.className=_$_9989[318];d.innerHTML=_$_9989[215];d.title=1;this.pagination.children[1].appendChild(d)}for(;b<=a;b++)d=document.createElement(_$_9989[20]),d.className=_$_9989[318],d.innerHTML=
|
|
302
|
+
b,this.pagination.children[1].appendChild(d),this.pageNumber==b-1&&d.classList.add(_$_9989[319]);a<c&&(d=document.createElement(_$_9989[20]),d.className=_$_9989[318],d.innerHTML=_$_9989[216],d.title=c,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=C(_$_9989[320],[this.pageNumber+1,c])}else this.pagination.children[0].innerHTML=C(_$_9989[317])}};return k}(),ma=function(){var k=function(c){c.setFreezeColumns=k[_$_9989[11]];c.resetFreezeColumns=k.reset};k.width=function(){if(this.options.freezeColumns){k.headers.call(this);
|
|
303
|
+
for(var c=0;c<this.rows.length;c++)this.rows[c].element&&k.update.call(this,c)}};k.update=function(c){var b,a;if(a=this.options.freezeColumns){var d=xa.call(this)?50:0;if(this.rows[c].element)for(var e=0;e<a;e++){if(b=this.records[c][e].element)b.classList.add(_$_9989[50]),b.style.left=d+1+_$_9989[44];d+=this.options.columns[e].width}}};k.headers=function(){var c=xa.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(_$_9989[50]);
|
|
304
|
+
this.headers[a].style.left=c+1+_$_9989[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][a].element.classList.add(_$_9989[50]),this.footers.content[d][a].element.style.left=c+1+_$_9989[44];c+=this.options.columns[a].width}}else k.reset.call(this)};k[_$_9989[11]]=function(c){k.reset.call(this);this.options.freezeColumns=c;k.width.call(this);G.limited.call(this)&&T.call(this)};k.reset=function(){G[_$_9989[46]].call(this,null,this.options.freezeColumns);
|
|
305
|
+
for(var c,b=1;b<=this.options.freezeColumns;b++){if(c=this.thead.lastChild)c.children[b].classList.remove(_$_9989[50]),c.children[b].style.left=_$_9989[3];for(var a=0;a<this.rows.length;a++)if(c=this.rows[a].element)c.children[b].classList.remove(_$_9989[50]),c.children[b].style.left=_$_9989[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[b].classList.remove(_$_9989[50]),this.tfoot.children[a].children[b].style.left=_$_9989[3]}this.options.freezeColumns=
|
|
306
|
+
0};k.getWidth=function(){var c=xa.call(this)?50:0;if(0<this.options.freezeColumns)for(var b=0;b<=this.options.freezeColumns;b++)c=this.thead.lastChild.children[b]?c+this.thead.lastChild.children[b].offsetWidth:c+this.options.columns[b].width;return c};return k}(),X=function(){var k=function(a,d){if(this.options[a]){for(var e={},f=Object.keys(this.options[a]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[a][f[g]];this.options[a]=e}},c=function(){if(0<this.options.minSpareRows){for(var a=
|
|
307
|
+
0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)N.call(this,f,d)&&(e=!0);if(e)break;else a++}0<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(d=0;d<this.rows.length;d++)N.call(this,f,d)&&(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=
|
|
308
|
+
document.createElement(_$_9989[20]);this.content.classList.add(_$_9989[321]);this.content.addEventListener(_$_9989[322],function(f){if(G.limited.call(a)&&!a.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?G.pageLeft.call(a,1,null,f):G.pageRight.call(a,1,null,f):0>f.deltaY?G.pageUp.call(a,1,null,f):G.pageDown.call(a,1,null,f)}});this.content.addEventListener(_$_9989[323],function(f){if(!a.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_9989[324]);
|
|
309
|
+
this.thead=document.createElement(_$_9989[325]);this.tbody=document.createElement(_$_9989[326]);this.tfoot=document.createElement(_$_9989[327]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_9989[328]);var d=document.createElement(_$_9989[169]);d.setAttribute(_$_9989[152],_$_9989[329]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_9989[145]);d=document.createElement(_$_9989[147]);d.classList.add(_$_9989[330]);this.headerContainer.appendChild(d);
|
|
310
|
+
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_9989[331]);this.table.setAttribute(_$_9989[332],_$_9989[97]);this.table.setAttribute(_$_9989[333],_$_9989[97]);this.table.setAttribute(_$_9989[334],_$_9989[335]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.parent.config.wordWrap&&this.table.classList.add(_$_9989[336]);this.options.textOverflow||this.table.classList.add(_$_9989[337]);
|
|
311
|
+
!1===this.options.selectLockedCells&&this.table.classList.add(_$_9989[338]);this.corner=document.createElement(_$_9989[20]);this.corner.className=_$_9989[339];this.corner.setAttribute(_$_9989[334],_$_9989[340]);this.corner.setAttribute(_$_9989[341],_$_9989[342]);0==this.options.selectionCopy&&(this.corner.style.display=_$_9989[40]);this.scrollX=T.build.call(a,_$_9989[45]);this.scrollY=T.build.call(a,_$_9989[343]);d=document.createElement(_$_9989[20]);d.appendChild(this.content);d.appendChild(this.scrollY);
|
|
312
|
+
d.classList.add(_$_9989[344]);var e=document.createElement(_$_9989[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_9989[345]);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(e);1==this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=300),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-8),this.content.style.overflow=_$_9989[49],this.content.style.maxHeight=parseInt(this.options.tableHeight)+
|
|
313
|
+
_$_9989[44],this.content.style.maxWidth=parseInt(this.options.tableWidth)+_$_9989[44]);this.options.freezeColumns>this.options.columns.length&&console.error(_$_9989[346]);qa.build.call(this);pa.build.call(this);ta.build.call(this);Ea.build.call(this);ba.build.call(this);aa.build.call(this);G.call(this);ca.onload.call(this);c.call(this)};b.references=function(a){var d=[],e=[],f=null,g=null,h=null,l=null;for(f=0;f<this.options.columns.length;f++)if(g=this.headers[f])h=g.getAttribute(_$_9989[42]),h!=
|
|
314
|
+
f&&(g.setAttribute(_$_9989[42],f),g.getAttribute(_$_9989[166])||(g.innerHTML=E.getColumnName(f)));for(var m=0;m<this.rows.length;m++)g=this.rows[m],l=g.y,l!=m&&(g.y=m,d[l]=m,g.element&&(g.element.setAttribute(_$_9989[43],m),g.element.children[0].setAttribute(_$_9989[43],m),f=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:m+1,g.element.children[0].innerHTML=f));var n=function(q,v){g=this.records[v][q];h=g.x;l=g.y;h!=q&&(g.x=q,g.element&&g.element.setAttribute(_$_9989[42],
|
|
315
|
+
q));l!=v&&(g.y=v,g.element&&g.element.setAttribute(_$_9989[43],v));if(h!=q||l!=v){var u=E.getColumnNameFromCoords(h,l);q=E.getColumnNameFromCoords(q,v);e[u]=q}};if(a){m=function(q,v){q&&q[v]&&delete q[v]};var p=Object.keys(a);for(f=0;f<p.length;f++)m(this,p[f]),m(this.options.meta,p[f]),m(this.options.cells,p[f]),m(this.options.style,p[f]),m(this.options.comments,p[f])}for(m=0;m<this.rows.length;m++)for(f=0;f<this.options.columns.length;f++)n.call(this,f,m);k.call(this,_$_9989[347],d);k.call(this,
|
|
316
|
+
_$_9989[277],e);k.call(this,_$_9989[278],e);k.call(this,_$_9989[98],e);k.call(this,_$_9989[279],e);k.call(this,_$_9989[262],e);this.options.mergeCells&&ba.build.call(this);V.updateAll.call(this,e,a);return e};b.update=function(a){a&&c.call(this);if(typeof this.parent.config.updateTable==_$_9989[85])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)a=this.records[d][e],this.parent.config.updateTable.call(this,this,a.element,e,d,N.call(this,e,d),a.r?a.r:a.v);T.call(this);
|
|
317
|
+
aa.refresh.call(this)};return b}(),oa=function(){var k={spreadsheet:function(c,b){var a={name:null,config:{},el:c,element:c,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Ca.spreadsheet.call(a,b);a.config.license&&(t.license=a.config.license);c.spreadsheet=a;c.jspreadsheet=c.jexcel=a.worksheets;t.spreadsheet.push(a);a.name||(a.name=jSuites.guid());k.bind(a.config.root?a.config.root:document);var d=a.config.tabs;typeof d!==_$_9989[84]&&
|
|
318
|
+
(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=c.offsetWidth-50+_$_9989[44]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){a.createWorksheet();return!1};d.onclick=function(f,g,h,l,m){0<=h&&a.openWorksheet(h)};d.onchangeposition=function(f,g,h){a.updateWorksheet(g,h)};jSuites.tabs(c,d);c.classList.add(_$_9989[348]);1==b.fullscreen&&c.classList.add(_$_9989[15]);var e=document.createElement(_$_9989[20]);
|
|
319
|
+
a.toolbar=document.createElement(_$_9989[20]);a.toolbar.className=_$_9989[349];e.appendChild(a.toolbar);a.filter=ca.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_9989[20]);a.helper.className=_$_9989[350];e.appendChild(a.helper);a.loading=document.createElement(_$_9989[20]);a.loading.classList.add(_$_9989[351]);e.appendChild(a.loading);e.appendChild(da.build(a));e.appendChild(Qa(a));a.textarea=document.createElement(_$_9989[352]);a.textarea.className=_$_9989[353];a.textarea.tabIndex=
|
|
320
|
+
_$_9989[354];e.appendChild(a.textarea);d.position===_$_9989[355]?c.insertBefore(e,c.children[0]):c.insertBefore(e,c.children[1]);c.appendChild(Ia.call(a,t.license));a.createWorksheet=ia.createWorksheet;a.deleteWorksheet=ia.deleteWorksheet;a.renameWorksheet=ia.renameWorksheet;a.updateWorksheet=ia.updateWorksheet;a.openWorksheet=ia.openWorksheet;a.moveWorksheet=ia.moveWorksheet;a.getWorksheet=ia.getWorksheet;a.getWorksheetActive=ia.getWorksheetActive;a.getWorksheetInstance=ia.getWorksheetInstance;a.getConfig=
|
|
321
|
+
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=Ja;a.progress=Ka;a.undo=U.undo;a.redo=U.redo;a.setToolbar=fa[_$_9989[11]];a.getToolbar=fa[_$_9989[51]];a.showToolbar=fa.show;a.hideToolbar=fa.hide;a.tools=e;1!==a.edition&&(c=Object.keys(a.config.definedNames))&&c.length&&(a.config.definedNames={},console.log(_$_9989[356]));b.plugins&&na.call(a,b.plugins);a.setPlugins=function(f){na.call(a,f)};c=Object.keys(t.extensions);
|
|
322
|
+
if(c.length)for(d=0;d<c.length;d++)if(typeof t.extensions[c[d]].oninit==_$_9989[85])t.extensions[c[d]].oninit(a,b);return a},worksheet:function(c,b){var a={};c.worksheets.push(a);a.parent=c;Ca(a);Sa(a);ya(a);ha(a);da(a);Ea(a);Ua(a);ba(a);Pa(a);Va(a);ea(a);V(a);M(a);za(a);Ga(a);Xa(a);Wa(a);Ba(a);aa(a);pa(a);qa(a);ca(a);fa(a);sa(a);Za(a);$a(a);ta(a);ia(a);ma(a);Ta(a);Ya(a);Ha(a);Ca.worksheet.call(a,b);!t.license&&a.options.license&&(t.license=a.options.license);c.element.jexcel=c.worksheets?c.worksheets:
|
|
323
|
+
a;na.execute.call(a.parent,_$_9989[357],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_9989[358]+ia.nextName());var d=this.options.worksheetName;H(d)&&console.log(_$_9989[359]+d+_$_9989[360]);H(d,a);this.element=c.element.tabs.appendElement(this.options.worksheetName,function(e,f){a.options.worksheetState===_$_9989[49]&&(f.style.display=_$_9989[40])});this.element.classList.add(_$_9989[361]);this.element.jexcel=this;X.build.call(this);na.execute.call(this.parent,
|
|
324
|
+
_$_9989[362],[this]);this.options.data&&500<this.options.data.length&&!G.limited.call(this)&&!this.options.pagination&&console.error(_$_9989[363])};return a},row:function(c,b){this.rows[c]||(this.rows[c]={element:null,y:c});b&&(this.rows[c].id=b,sa[_$_9989[11]].call(this,b));this.options.rows&&this.options.rows[c]&&this.options.rows[c].height&&(this.rows[c].height=this.options.rows[c].height);this.records[c]||(this.records[c]=[]);this.options.data[c]||(this.options.data[c]=this.dataType?{}:[]);for(b=
|
|
325
|
+
0;b<this.options.columns.length;b++)k.cell.call(this,b,c)},cell:function(c,b,a){typeof a==_$_9989[13]&&(a=N.call(this,c,b),null===a||void 0===a)&&(a=_$_9989[3],N.call(this,c,b,a));this.records[b][c]||(this.records[b][c]={element:null,x:c,y:b,v:a})},bind:function(c){for(var b=Object.keys(Aa),a=0;a<b.length;a++)(b[a]==_$_9989[364]?window:c).addEventListener(b[a],Aa[b[a]],b[a]==_$_9989[365]||b[a]==_$_9989[366]||b[a]==_$_9989[367]?{passive:!1}:{})},unbind:function(c){for(var b=Object.keys(Aa),a=0;a<b.length;a++)(b[a]==
|
|
326
|
+
_$_9989[364]?window:c).removeEventListener(b[a],Aa[b[a]])}};return k}(),Za=function(){var k=function(c){c.getWidth=k[_$_9989[51]];c.setWidth=k[_$_9989[11]]};k[_$_9989[51]]=function(c){var b=this.options.columns;if(typeof c===_$_9989[13]){c=[];for(var a=0;a<b.length;a++)c.push(b[a].width)}else c=b[c].width;return c};k[_$_9989[11]]=function(c,b,a){if(!Q.call(this.parent,this))return!1;if(b){if(Array.isArray(c)){a||(a=[]);for(var d=0;d<c.length;d++){a[d]||(a[d]=this.colgroup[c[d]].getAttribute(_$_9989[152]));
|
|
327
|
+
var e=Array.isArray(b)&&b[d]?b[d]:b;this.colgroup[c[d]].setAttribute(_$_9989[152],e);this.options.columns[c[d]].width=e}}else a||(a=this.colgroup[c].getAttribute(_$_9989[152])),this.colgroup[c].setAttribute(_$_9989[152],b),this.options.columns[c].width=b;this.refreshBorders();U.call(this.parent,{worksheet:this,action:_$_9989[73],column:c,oldValue:a,newValue:b});L.call(this,_$_9989[73],{column:c,width:b,oldWidth:a});F.call(this.parent,_$_9989[368],this,c,b,a)}G.refresh.call(this)};return k}(),$a=function(){var k=
|
|
328
|
+
function(b){b.getHeight=k[_$_9989[51]];b.setHeight=k[_$_9989[11]]};k[_$_9989[51]]=function(b){if(b)b=this.rows[b].element.style.height;else{b=[];for(var a=0;a<this.rows.length;a++){var d=this.rows[a].element.style.height;d&&(b[a]=d)}}return b};var c=function(b,a){a=parseInt(a);var d=this.rows[b].height?this.rows[b].height:this.rows[b].element.offsetHeight||this.options.defaultRowHeight;this.rows[b].element.style.height=a+_$_9989[44];this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].height=
|
|
329
|
+
a+_$_9989[44];this.rows[b].height=a;return d};k[_$_9989[11]]=function(b,a,d){if(!Q.call(this.parent,this))return!1;var e,f=typeof d==_$_9989[13]?!0:!1;if(a){if(Array.isArray(b))for(!0===f&&(d=[]),e=0;e<b.length;e++){var g=Array.isArray(a)&&a[e]?a[e]:a;c.call(this,b[e],g);1==f&&d.push(f)}else e=c.call(this,b,a),1==f&&(d=e);this.refreshBorders();U.call(this.parent,{worksheet:this,action:_$_9989[74],row:b,oldValue:d,newValue:a});L.call(this,_$_9989[74],{row:b,height:a,oldHeight:d});F.call(this.parent,
|
|
330
|
+
_$_9989[369],this,b,a,d)}G.refresh.call(this)};return k}(),ca=function(){var k=function(g){var h=e[g];g=a[e[g]];if(!g.element){g.element=document.createElement(_$_9989[370]);g.element.innerHTML=g.value;var l=document.createElement(_$_9989[220]);l.type=_$_9989[250];l.value=h;l.o=g;g.element.insertBefore(l,g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},c=null,b=null,a=[],d=0,e=null,f=function(g){g.setFilter=f[_$_9989[11]];g.getFilter=f[_$_9989[51]];g.openFilter=f.open;
|
|
331
|
+
g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return b};f[_$_9989[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_9989[371]),g.filters=h):(l&&l.classList.remove(_$_9989[371]),g.filters=null);f.update.call(this)};f[_$_9989[51]]=function(g){if(g)return this.options.columns[g].filters||null;g={};for(var h=0;h<this.options.columns.length;h++)g[h]=this.options.columns[h].filters||
|
|
332
|
+
null;return g};f.open=function(g){c=parseInt(g);if(this.headers[c].classList.contains(_$_9989[168])){b=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[c].getBoundingClientRect();g=l.left-h.left;l=l.top-h.top+l.height;h=this.parent.filter;h.style.display=_$_9989[16];h.style.top=l+_$_9989[44];h.style.left=g+_$_9989[44];h.children[0].focus();g=h.children[1].selectAll;h.children[1].textContent=_$_9989[3];h.children[1].appendChild(g);this.options.columns[c].filters||(g.children[0].checked=
|
|
333
|
+
!0);g=qa.execute.call(this,null,c);g=E.invert(g);h=[];for(l=0;l<this.rows.length;l++)if(g[l]){var m=_$_9989[3]+N.call(this,c,l),n=_$_9989[3]+ea.processed.call(this,c,l,!0);m.substr(0,1)==_$_9989[12]&&(m=n);h.push([m,n])}h.sort(function(p,q){return p[0]>q[0]?1:p[0]<q[0]?-1:0});a=[];for(l=0;l<h.length;l++)a[h[l][0]]={value:h[l][1],element:null};void 0!==a[_$_9989[3]]&&(delete a[_$_9989[3]],a[_$_9989[3]]={value:_$_9989[212]+C(_$_9989[373])+_$_9989[232],element:null});f.search.call(this,_$_9989[3])}else console.log(_$_9989[372])};
|
|
334
|
+
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[c].filters||[]:[];for(var h=0;h<e.length;h++)a[e[h]].selected&&g.push(e[h])}f[_$_9989[11]].call(this,c,g)}this.parent.filter.style.display=_$_9989[3];this.parent.filter.children[0].value=_$_9989[3];c=null;b=!1;a=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);ua.reset.call(this);
|
|
335
|
+
f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],m=0;m<this.options.data.length;m++){for(var n=!0,p=0;p<h.length;p++)if(h[p].filters&&g!==p){var q=_$_9989[3]+N.call(this,p,m),v=_$_9989[3]+this.getLabelFromCoords(p,m,!0);-1==h[p].filters.indexOf(q)&&-1==h[p].filters.indexOf(v)&&(n=!1)}n&&l.push(m)}return l};f.update=function(){ua.reset.call(this);this.resetSelection();this.resetBorders();var g=qa.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_9989[85]){var h=
|
|
336
|
+
f[_$_9989[51]].call(this),l=F.call(this.parent,_$_9989[374],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;g&&g.length<this.rows.length&&ua[_$_9989[11]].call(this,g);G.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_9989[375],this,h,g)};f.show=function(g){f.updateDOM.call(this,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=
|
|
337
|
+
!1;if(g){e=[];g=new RegExp(g,_$_9989[376]);for(var l=Object.keys(a),m=0;m<l.length;m++)(_$_9989[3]+l[m]).match(g)||(_$_9989[3]+a[l[m]]).match(g)?(e.push(l[m]),a[l[m]].selected=!0):a[l[m]].selected=!1;h.firstChild.checked=!0;this.options.columns[c].filters&&h.appendChild(h.currentSelection)}else{e=Object.keys(a);if(g=this.options.columns[c].filters)for(m=0;m<e.length;m++)a[e[m]].selected=!1,0<=g.indexOf(e[m])&&(a[e[m]].selected=!0);else for(m=0;m<e.length;m++)a[e[m]].selected=!0;h.firstChild.checked=
|
|
338
|
+
g?!1:!0}for(m=d=0;m<e.length;m++)200>m&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_9989[20]);g.className=_$_9989[377];g.onclick=function(n){n.target.tagName==_$_9989[378]&&n.target.o&&(n.target.o.selected=n.target.checked);n=!0;for(var p=1;p<this.children.length;p++)this.children[p].children[0].checked||(n=!1);this.children[0].children[0].checked=n};var h=document.createElement(_$_9989[220]);h.type=_$_9989[56];h.placeholder=C(_$_9989[379]);h.className=_$_9989[380];
|
|
339
|
+
var l=document.createElement(_$_9989[220]);l.type=_$_9989[381];l.value=_$_9989[382];l.className=_$_9989[383];var m=document.createElement(_$_9989[20]);m.className=_$_9989[384];m.appendChild(h);m.appendChild(g);m.appendChild(l);g.currentSelection=document.createElement(_$_9989[370]);g.currentSelection.innerHTML=_$_9989[385]+C(_$_9989[386]);g.selectAll=document.createElement(_$_9989[370]);g.selectAll.innerHTML=_$_9989[387]+C(_$_9989[388])+_$_9989[232];g.selectAll.onclick=function(){for(var n=this.children[0].checked,
|
|
340
|
+
p=1;p<this.parentNode.children.length;p++)this.parentNode.children[p].children[0].checked=n;if(1==n)for(p=0;p<e.length;p++)a[e[p]].selected=!0;else for(n=Object.keys(a),p=0;p<n.length;p++)a[n[p]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(n){for(n=0;d<e.length-1&&10>n;){var p=d++;g.appendChild(k(p));n++}}});return m};f.updateDOM=function(g,h,l){var m=this.headers,n=function(p){1==h?m[p].classList.add(_$_9989[168]):(this.options.columns[p].filters=null,m[p].classList.remove(_$_9989[371]),
|
|
341
|
+
1==l&&m[p].classList.remove(_$_9989[168]))};if(g)n.call(this,g);else for(g=0;g<m.length;g++)n.call(this,g)};f.onload=function(){var g,h=!1;if(g=this.options.columns)for(var l=0;l<g.length;l++)Array.isArray(g[l].filters)&&0<g[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_9989[371]),h=!0);1==h&&f.update.call(this)};return f}(),ua=function(){var k={};k[_$_9989[11]]=function(c){for(var b=0;b<c.length;b++)this.rows[c[b]].results=!0;this.results=c};k.reset=function(){for(var c=0;c<
|
|
342
|
+
this.rows.length;c++)!0===this.rows[c].results&&delete this.rows[c].results;this.results=null};k.refresh=function(){for(var c=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&c.push(b);return c};return k}(),qa=function(){var k=function(a){var d=document.createElement(_$_9989[20]);if(0<a.options.pagination&&a.options.paginationOptions&&0<a.options.paginationOptions.length){a.paginationDropdown=document.createElement(_$_9989[389]);a.paginationDropdown.classList.add(_$_9989[390]);a.paginationDropdown.onchange=
|
|
343
|
+
function(){a.options.pagination=parseInt(this.value);a.page(0)};for(var e=0;e<a.options.paginationOptions.length;e++){var f=document.createElement(_$_9989[391]);f.value=a.options.paginationOptions[e];f.innerHTML=a.options.paginationOptions[e];a.paginationDropdown.appendChild(f)}a.paginationDropdown.value=a.options.pagination;d.appendChild(document.createTextNode(C(_$_9989[392])));d.appendChild(a.paginationDropdown);d.appendChild(document.createTextNode(C(_$_9989[393])))}return d},c=function(a,d){var e=
|
|
344
|
+
this.merged.rows;if(e[d]){for(;0<d&&e[d-1];)d--;for(;e[d];)a.push(d++)}else a.push(d)},b=function(a){a.search=b.update;a.resetSearch=b.reset;a.updateSearch=b.refresh;a.showSearch=b.show;a.hideSearch=b.hide};b.execute=function(a,d){null===a?a=this.searchInput.value||_$_9989[3]:a!==this.searchInput.value&&(this.searchInput.value=a);this.pageNumber=0;var e=[],f=null;d=ca.execute.call(this,d);if(a)try{a=new RegExp(a,_$_9989[376]);for(var g=0;g<this.rows.length;g++){f=!1;if(!d||0<=d.indexOf(g))for(var h=
|
|
345
|
+
0;h<this.options.columns.length;h++){var l=_$_9989[3]+N.call(this,h,g),m=_$_9989[3]+this.getLabelFromCoords(h,g);if(l.match(a)||m.match(a))f=!0}1==f&&c.call(this,e,g)}}catch(n){}else e=d;if(e.length){for(g=0;g<this.rows.length;g++)!0===this.rows[g].results&&e.push(g);e.sort(function(n,p){return n-p})}return e};b.update=function(a){ua.reset.call(this);this.resetSelection();this.resetBorders();var d=b.execute.call(this,a);if(typeof this.parent.config.onbeforesearch==_$_9989[85]){var e=F.call(this.parent,
|
|
346
|
+
_$_9989[395],this,a,d);if(e)d=e;else if(!1===e)return!1}this.pageNumber=0;d&&d.length<this.rows.length&&ua[_$_9989[11]].call(this,d);G.resetY.call(this);aa.refresh.call(this);F.call(this.parent,_$_9989[396],this,a,d)};b.refresh=function(){G.resetY.call(this);aa.refresh.call(this)};b.reset=function(){this.searchInput.value=_$_9989[3];ua.reset.call(this);G.resetY.call(this);aa.refresh.call(this)};b.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_9989[3]};b.hide=function(){this.options.search=
|
|
347
|
+
!1;this.searchContainer.style.display=_$_9989[40]};b.build=function(){this.searchContainer=document.createElement(_$_9989[20]);this.searchContainer.classList.add(_$_9989[397]);this.searchContainer.appendChild(k(this));var a=this.searchContainer,d=a.appendChild,e=document.createElement(_$_9989[20]);e.innerHTML=C(_$_9989[379])+_$_9989[114];this.searchInput=document.createElement(_$_9989[220]);this.searchInput.classList.add(_$_9989[394]);e.appendChild(this.searchInput);d.call(a,e);0==this.options.search&&
|
|
348
|
+
(this.searchContainer.style.display=_$_9989[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return b}(),Qa=function(){var k=function(c){c.contextmenu=document.createElement(_$_9989[20]);c.contextmenu.className=_$_9989[398];jSuites.contextmenu(c.contextmenu,{onclick:function(b,a,d){b.close()}});return c.contextmenu};k.open=function(c,b){var a=c.target.getAttribute(_$_9989[42]),d=c.target.getAttribute(_$_9989[43]),e=k[_$_9989[51]](this,a,d,c,b[0],b[1],b[2]);if(typeof this.parent.config.contextMenu==
|
|
349
|
+
_$_9989[85]){var f=this.parent.config.contextMenu(this,a,d,c,e,b[0],b[1],b[2]);if(f)e=f;else if(!1===f)return!1}c.preventDefault();f=na.execute.call(this.parent,_$_9989[86],[this,a,d,c,e,b[0],b[1],b[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(c,e)};k[_$_9989[51]]=function(c,b,a,d,e,f,g){var h=[],l=c.parent.config,m=-1!=navigator.userAgent.indexOf(_$_9989[399])?_$_9989[400]:_$_9989[401];e==_$_9989[402]&&(1==l.allowRenameWorksheet&&h.push({title:C(_$_9989[403]),onclick:function(){var p=prompt(C(_$_9989[403]),
|
|
350
|
+
d.target.innerText);p&&c.parent.renameWorksheet(f,p)}}),1==l.allowDeleteWorksheet&&h.push({title:C(_$_9989[404]),onclick:function(){confirm(C(_$_9989[405]),d.target.innerText)&&c.parent.deleteWorksheet(f)}}),h.push({type:_$_9989[406]}));e==_$_9989[407]&&(h.push({title:C(_$_9989[408]),onclick:function(){var p=prompt(C(_$_9989[408]),d.target.innerText);c.setNestedCell(f,g,{title:p})}}),h.push({type:_$_9989[406]}));if(e==_$_9989[409]||e==_$_9989[410]||e==_$_9989[411]||e==_$_9989[407])h.push({title:C(_$_9989[412]),
|
|
351
|
+
icon:_$_9989[413],shortcut:m+_$_9989[414],onclick:function(){c.cut()}}),h.push({title:C(_$_9989[415]),icon:_$_9989[416],shortcut:m+_$_9989[417],onclick:function(){c.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:C(_$_9989[418]),icon:_$_9989[419],shortcut:m+_$_9989[420],onclick:function(){c.selectedCell&&navigator.clipboard.readText().then(function(p){p&&c.paste(c.selectedCell[0],c.selectedCell[1],p)})}}),h.push({type:_$_9989[406]});e==_$_9989[409]&&(1==c.options.allowInsertColumn&&
|
|
352
|
+
h.push({title:C(_$_9989[421]),onclick:function(){c.insertColumn(1,parseInt(f),1)}}),1==c.options.allowInsertColumn&&h.push({title:C(_$_9989[422]),onclick:function(){c.insertColumn(1,parseInt(f),0)}}),1==c.options.allowDeleteColumn&&h.push({title:C(_$_9989[423]),onclick:function(){c.deleteColumn(c.getSelectedColumns().length?void 0:parseInt(b))}}),1==c.options.allowRenameColumn&&h.push({title:C(_$_9989[424]),onclick:function(){c.setHeader(f)}}),c.options.data.length||(h.push({type:_$_9989[406]}),h.push({title:C(_$_9989[425]),
|
|
353
|
+
onclick:function(){c.insertRow(0)}})),1==c.options.columnSorting&&(h.push({type:_$_9989[406]}),h.push({title:C(_$_9989[426]),onclick:function(){c.orderBy(f,0)}}),h.push({title:C(_$_9989[427]),onclick:function(){c.orderBy(f,1)}}),h.push({type:_$_9989[406]})));if(e==_$_9989[411]||e==_$_9989[410])1==c.options.allowInsertRow&&(h.push({title:C(_$_9989[428]),onclick:function(){c.insertRow(1,parseInt(a),1)}}),h.push({title:C(_$_9989[429]),onclick:function(){c.insertRow(1,parseInt(a))}})),1==c.options.allowDeleteRow&&
|
|
354
|
+
h.push({title:C(_$_9989[430]),onclick:function(){c.deleteRow(c.getSelectedRows().length?void 0:parseInt(a))}}),h.push({type:_$_9989[406]});if(e==_$_9989[411]&&1==c.options.allowComments){var n=c.records[g][f].element.getAttribute(_$_9989[264])||_$_9989[3];h.push({title:n?C(_$_9989[431]):C(_$_9989[432]),icon:_$_9989[433],onclick:function(){var p=E.getColumnNameFromCoords(f,g),q=prompt(C(_$_9989[434]),n);q&&c.setComments(p,q)}});n&&h.push({title:C(_$_9989[435]),onclick:function(){var p=E.getColumnNameFromCoords(f,
|
|
355
|
+
g);c.setComments(p,_$_9989[3])}});h.push({type:_$_9989[406]})}l.allowExport&&h.push({title:C(_$_9989[436]),icon:_$_9989[437],shortcut:m+_$_9989[438],onclick:function(){c.download()}});l.about&&h.push({title:C(_$_9989[439]),icon:_$_9989[440],onclick:function(){!0===l.about?alert(K().print()):alert(l.about)}});return h};return k}(),fa=function(){var k=function(c){c.showToolbar=function(){k.show.call(c.parent)};c.hideToolbar=function(){k.hide.call(c.parent)};c.refreshToolbar=function(){k.update.call(c.parent,
|
|
356
|
+
c)}};k[_$_9989[11]]=function(c){this.toolbar.innerHTML=_$_9989[3];this.config.toolbar=k[_$_9989[51]].call(this,c);k.show.call(this)};k[_$_9989[51]]=function(c){c||(c=this.config.toolbar);c?Array.isArray(c)?c={items:c}:typeof c===_$_9989[85]&&(c=c({items:k.getDefault()})):c={};typeof c!==_$_9989[84]&&(c={});c.items||(c.items=k.getDefault());typeof c.responsive==_$_9989[13]&&(c.responsive=!0,c.bottom=!1,c.maxWidth=this.element.offsetWidth);return c};k.show=function(){this.toolbar.innerHTML||k.build.call(this);
|
|
357
|
+
this.toolbar.style.display=_$_9989[3];this.element.classList.add(_$_9989[441])};k.hide=function(){this.toolbar.style.display=_$_9989[40];this.element.classList.remove(_$_9989[441])};k.update=function(c,b){if(b=this.toolbarInstance)if(b.update(c),b.options.responsive){var a=parseInt(c.content.style.maxWidth);if(!a||this.config.fullscreen)a=c.element.offsetWidth;b.options.maxWidth=a;b.refresh()}};k.build=function(){for(var c=k[_$_9989[51]].call(this),b=0;b<c.items.length;b++)if(c.items[b].type==_$_9989[389]){if(!c.items[b].options&&
|
|
358
|
+
c.items[b].v){c.items[b].options=[];for(var a=0;a<c.items[b].v.length;a++)c.items[b].options.push(c.items[b].v[a]);c.items[b].k&&(c.items[b].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else c.items[b].type==_$_9989[255]?(c.items[b].type=_$_9989[442],c.items[b].onclick=function(d,e,f){f.color||jSuites.color(f,{onchange:function(g,h){t.current.setStyle(t.current.getSelected(),f.k,h)}}).open()}):!c.items[b].onclick&&c.items[b].k&&(c.items[b].onclick=function(){t.current.setStyle(t.current.getSelected(),
|
|
359
|
+
this.k,this.v)});(b=na.execute.call(this,_$_9989[87],[c]))&&(c=b[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,c);this.toolbarInstance.application=this;c=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[c])};k.getDefault=function(){return[{content:_$_9989[443],onclick:function(){t.current&&t.current.undo()}},{content:_$_9989[444],onclick:function(){t.current&&t.current.redo()}},{content:_$_9989[437],onclick:function(){t.current&&t.current.download()}},{type:_$_9989[445]},
|
|
360
|
+
{type:_$_9989[389],width:_$_9989[446],options:[_$_9989[447],_$_9989[448],_$_9989[449]],render:function(c){return _$_9989[450]+c+_$_9989[226]+c+_$_9989[451]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_9989[452],d)}},{type:_$_9989[389],width:_$_9989[453],content:_$_9989[454],options:[_$_9989[455],_$_9989[456],_$_9989[457],_$_9989[458],_$_9989[459]],render:function(c){return _$_9989[460]+c+_$_9989[226]+c+_$_9989[451]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),
|
|
361
|
+
_$_9989[461],d)}},{type:_$_9989[389],options:[_$_9989[462],_$_9989[463],_$_9989[464],_$_9989[465]],render:function(c){return _$_9989[466]+c+_$_9989[467]},onchange:function(c,b,a,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_9989[468],d.split(_$_9989[469])[2])}},{type:_$_9989[442],content:_$_9989[470],k:_$_9989[471],v:_$_9989[472]},{type:_$_9989[255],content:_$_9989[473],k:_$_9989[255]},{type:_$_9989[255],content:_$_9989[474],k:_$_9989[475]},{type:_$_9989[389],content:_$_9989[476],width:_$_9989[477],
|
|
362
|
+
options:[_$_9989[478],_$_9989[479],_$_9989[480],_$_9989[481]],onchange:function(c,b,a,d,e){c=t.current.table;c.classList.remove(_$_9989[482]);c.classList.remove(_$_9989[483]);c.classList.remove(_$_9989[484]);1==e?c.classList.add(_$_9989[482]):2==e?c.classList.add(_$_9989[483]):3==e&&c.classList.add(_$_9989[484]);t.current.refreshBorders()}},{content:_$_9989[15],onclick:function(c,b,a){a.children[0].innerText==_$_9989[15]?(t.current.fullscreen(!0),a.children[0].innerText=_$_9989[485]):(t.current.fullscreen(!1),
|
|
363
|
+
a.children[0].innerText=_$_9989[15])},tooltip:_$_9989[486],updateState:function(c,b,a,d){a.children[0].innerText=1==d.parent.config.fullscreen?_$_9989[485]:_$_9989[15]}},{type:_$_9989[389],data:[_$_9989[487],_$_9989[488],_$_9989[489],_$_9989[490],_$_9989[491],_$_9989[492],_$_9989[493],_$_9989[494],_$_9989[495],_$_9989[496]],columns:5,render:function(c){return _$_9989[466]+c+_$_9989[467]},right:!0,onchange:function(c,b,a,d,e){if(c=t.current.getHighlighted()){a=b.thickness||1;b=b.color||_$_9989[497];
|
|
364
|
+
e={};for(var f=c[0],g=c[1],h=c[2],l=c[3],m=c[1];m<=c[3];m++)for(var n=c[0];n<=c[2];n++){var p=E.getColumnNameFromCoords(n,m);e[p]||(e[p]=_$_9989[3]);e[p]=d!=_$_9989[492]&&d!=_$_9989[488]||n!=f?(d==_$_9989[489]||d==_$_9989[491])&&n>f?e[p]+(_$_9989[498]+a+_$_9989[499]+b+_$_9989[295]):d==_$_9989[487]?e[p]+(_$_9989[498]+a+_$_9989[499]+b+_$_9989[295]):e[p]+_$_9989[500]:e[p]+(_$_9989[498]+a+_$_9989[499]+b+_$_9989[295]);e[p]=d!=_$_9989[487]&&d!=_$_9989[494]&&d!=_$_9989[488]||n!=h?e[p]+_$_9989[502]:e[p]+
|
|
365
|
+
(_$_9989[501]+a+_$_9989[499]+b+_$_9989[295]);e[p]=d!=_$_9989[493]&&d!=_$_9989[488]||m!=g?(d==_$_9989[489]||d==_$_9989[490])&&m>g?e[p]+(_$_9989[503]+a+_$_9989[499]+b+_$_9989[295]):d==_$_9989[487]?e[p]+(_$_9989[503]+a+_$_9989[499]+b+_$_9989[295]):e[p]+_$_9989[504]:e[p]+(_$_9989[503]+a+_$_9989[499]+b+_$_9989[295]);e[p]=d!=_$_9989[487]&&d!=_$_9989[495]&&d!=_$_9989[488]||m!=l?e[p]+_$_9989[506]:e[p]+(_$_9989[505]+a+_$_9989[499]+b+_$_9989[295])}Object.keys(e)&&t.current.setStyle(e,null,null,!0)}},onload:function(c,
|
|
366
|
+
b){var a=document.createElement(_$_9989[20]),d=document.createElement(_$_9989[20]);a.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=g;b.color=g}});d=document.createElement(_$_9989[442]);d.classList.add(_$_9989[507]);d.innerHTML=_$_9989[508];d.onclick=function(){e.open()};a.appendChild(d);c.children[1].appendChild(a);d=document.createElement(_$_9989[20]);jSuites.picker(d,{type:_$_9989[389],data:[1,2,3,4,5],render:function(f){return _$_9989[509]+
|
|
367
|
+
f+_$_9989[510]},onchange:function(f,g,h,l){b.thickness=l},width:_$_9989[511]});c.children[1].appendChild(d);d=document.createElement(_$_9989[20]);d.style.flex=_$_9989[512];c.children[1].appendChild(d)}},{content:_$_9989[513],onclick:function(c,b,a){a.children[0].innerText==_$_9989[513]?(qa.show.call(t.current),a.children[0].innerText=_$_9989[514]):(qa.hide.call(t.current),a.children[0].innerText=_$_9989[513])},tooltip:_$_9989[515],updateState:function(c,b,a,d){a.children[0].innerText=1==d.options.search?
|
|
368
|
+
_$_9989[514]:_$_9989[513]}}]};return k}(),ia=function(){var k=function(c){c.createWorksheet=function(b){return c.parent.createWorksheet(b)};c.deleteWorksheet=function(b){return c.parent.deleteWorksheet(b)};c.renameWorksheet=function(b,a){return c.parent.renameWorksheet(b,a)};c.moveWorksheet=function(b,a){return c.parent.moveWorksheet(b,a)};c.openWorksheet=function(){return c.parent.openWorksheet(c.parent.getWorksheet(c))};c.getWorksheet=function(b){return c.parent.getWorksheet(b)};c.getWorksheetActive=
|
|
369
|
+
function(){return c.parent.getWorksheetActive()};c.getWorksheetName=function(){return c.options.worksheetName.toUpperCase()}};k.nextName=function(){var c=1,b,a=t.spreadsheet;if(a.length)for(var d=0;d<a.length;d++){var e=a[d].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>c&&(c=b))}return c};k.createWorksheet=function(c){if(!Q.call(this))return!1;c||(c={});var b=this.worksheets.length,a=F.call(this,
|
|
370
|
+
_$_9989[516],c,b);if(typeof a===_$_9989[84])c=a;else if(!1===a)return!1;c.data||c.minDimensions||(c.minDimensions=[8,8]);c.worksheetId||(c.worksheetId=jSuites.guid().substring(0,8));c.worksheetName||(c.worksheetName=_$_9989[358]+k.nextName());H(c.worksheetName)?jSuites.notification({error:_$_9989[512],message:_$_9989[517]}):(a=oa.worksheet(this,c),a.onload(),L.call(a,_$_9989[518],[c]),F.call(this,_$_9989[519],a,c,b))};k.deleteWorksheet=function(c){var b=this.worksheets[c];if(!Q.call(this,b))return!1;
|
|
371
|
+
H(b.options.worksheetName,null);this.element.tabs.deleteElement(c);this.worksheets.splice(c,1);L.call(b,_$_9989[520],[c]);F.call(this,_$_9989[521],b,c)};k.renameWorksheet=function(c,b){var a=this.worksheets[c];if(!Q.call(this,a))return!1;var d=a.options.worksheetName;if(d.toLowerCase()==b.toLowerCase())return!1;b=b.replace(/[^0-9A-Za-z_\s^]+/gi,_$_9989[3]);Number(b)==b&&(b=_$_9989[358]+Number(b));H(b)?alert(_$_9989[522]):(H(d,null),this.element.tabs.rename(c,b),a.options.worksheetName=b,H(b,a),U.call(this,
|
|
372
|
+
{worksheet:a,action:_$_9989[80],index:c,oldValue:d,newValue:b}),L.call(a,_$_9989[80],{worksheet:c,newValue:b}),Ha.updateWorksheetName.call(a,d,b),V.updateWorksheetNames.call(a,d,b),F.call(this,_$_9989[523],a,c,b,d))};k.updateWorksheet=function(c,b){var a=this.worksheets;if(!Q.call(this))return!1;this.worksheets.splice(b,0,a.splice(c,1)[0]);U.call(this,{worksheet:a[b],action:_$_9989[81],f:c,t:b});L.call(a[b],_$_9989[81],{f:c,t:b});F.call(this,_$_9989[524],a[b],c,b)};k.moveWorksheet=function(c,b){this.element.tabs.move(c,
|
|
373
|
+
b)};k.openWorksheet=function(c){var b=this.worksheets[c];!b||t.current&&t.current==b||(this.element.tabs.getActive()!=c?this.element.tabs.open(c):this.element.tabs.setBorder(c),t.current&&t.current.resetSelection(),t.current=b,t.current.refreshBorders(),T.call(t.current),k.state.call(this,c),fa.update.call(this,t.current),F.call(this,_$_9989[525],b,c))};k.getWorksheet=function(c){if(c&&typeof c==_$_9989[84]){if(c=this.worksheets.indexOf(c),0<=c)return c}else for(var b=0;b<this.worksheets.length;b++)if(c===
|
|
374
|
+
this.worksheets[b].options.worksheetId)return b;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(c){return c===_$_9989[3]||typeof c==_$_9989[17]?(c=k.getWorksheet.call(this,c),!1===c?!1:this.worksheets[c]):this.worksheets[c]};k.state=function(c){try{if(typeof localStorage!==_$_9989[13]){var b=this.config.cloud?this.config.cloud:this.element.id;if(b)if(typeof c!==_$_9989[13])localStorage.setItem(_$_9989[526]+b,c);else{var a=parseInt(localStorage.getItem(_$_9989[526]+
|
|
375
|
+
b));k.openWorksheet.call(this,a)}}}catch(d){}};return k}(),E=function(){var k={getCaretIndex:function(c){var b=0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(b=a.getRangeAt(0),a=b.cloneRange(),a.selectNodeContents(c),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(c){for(var b=[],a=Object.keys(c),d=0;d<a.length;d++)b[c[a[d]]]=a[d];return b},getColumnName:function(c){var b=_$_9989[3];701<c?(b+=String.fromCharCode(64+parseInt(c/
|
|
376
|
+
676)),b+=String.fromCharCode(64+parseInt(c%676/26))):25<c&&(b+=String.fromCharCode(64+parseInt(c/26)));return b+=String.fromCharCode(65+c%26)},getColumnNameFromCoords:function(c,b){return k.getColumnName(parseInt(c))+(parseInt(b)+1)},getCoordsFromColumnName:function(c){var b=/^[a-zA-Z]+/.exec(c);if(b){for(var a=0,d=0;d<b[0].length;d++)a+=parseInt(b[0].charCodeAt(d)-64)*Math.pow(26,b[0].length-1-d);a--;0>a&&(a=0);c=parseInt(/[0-9]+$/.exec(c))||null;0<c&&c--;return[a,c]}}};k.shiftFormula=V.shiftFormula;
|
|
377
|
+
k.createFromTable=function(c,b){if(c.tagName!=_$_9989[527])console.log(_$_9989[528]);else{b||(b={});b.columns=[];b.data=[];var a=c.querySelectorAll(_$_9989[529]);if(a.length)for(var d=0;d<a.length;d++){var e=a[d].style.width;e||(e=a[d].getAttribute(_$_9989[152]));e&&(b.columns[d]||(b.columns[d]={}),b.columns[d].width=e)}e=function(y){var x=y.getBoundingClientRect();x=50<x.width?x.width:50;b.columns[d]||(b.columns[d]={});y.getAttribute(_$_9989[530])?b.columns[d].type=y.getAttribute(_$_9989[530]):b.columns[d].type=
|
|
378
|
+
_$_9989[56];b.columns[d].width=x+_$_9989[44];b.columns[d].title=y.innerHTML;b.columns[d].align=y.style.textAlign||(b.defaultColAlign?b.defaultColAlign:_$_9989[53]);y.classList.contains(_$_9989[531])&&(b.columns[d].readOnly=!0);if(x=y.getAttribute(_$_9989[532]))b.columns[d].name=x;if(x=y.getAttribute(_$_9989[533]))b.columns[d].id=x};var f=[],g=c.querySelectorAll(_$_9989[534]);if(g.length){for(a=0;a<g.length-1;a++){var h=[];for(d=0;d<g[a].children.length;d++){var l={title:g[a].children[d].innerText,
|
|
379
|
+
colspan:g[a].children[d].getAttribute(_$_9989[52])||1};h.push(l)}f.push(h)}g=g[g.length-1].children;for(d=0;d<g.length;d++)e(g[d])}l=0;var m={},n={},p={},q={},v=null;h=c.querySelectorAll(_$_9989[535]);for(a=0;a<h.length;a++)if(b.data[l]=[],1!=b.parseTableFirstRowAsHeader||g.length||0!=a){for(d=0;d<h[a].children.length;d++){var u=h[a].children[d].getAttribute(_$_9989[536]);u?u.substr(0,1)!=_$_9989[12]&&(u=_$_9989[12]+u):u=h[a].children[d].innerHTML;b.data[l].push(u);u=E.getColumnNameFromCoords(d,a);
|
|
380
|
+
(v=h[a].children[d].getAttribute(_$_9989[537]))&&(q[u]=v);v=parseInt(h[a].children[d].getAttribute(_$_9989[52]))||0;var w=parseInt(h[a].children[d].getAttribute(_$_9989[164]))||0;if(v||w)m[u]=[v||1,w||1];if(v=h[a].children[d].style&&h[a].children[d].style.display==_$_9989[40])h[a].children[d].style.display=_$_9989[3];(v=h[a].children[d].getAttribute(_$_9989[98]))&&(p[u]=v);h[a].children[d].classList.contains(_$_9989[538])&&(p[u]=p[u]?p[u]+_$_9989[539]:_$_9989[540])}h[a].style&&h[a].style.height&&
|
|
381
|
+
(n[a]={height:h[a].style.height});l++}else for(d=0;d<h[a].children.length;d++)e(h[a].children[d]);0<Object.keys(f).length&&(b.nestedHeaders=f);0<Object.keys(p).length&&(b.style=p);0<Object.keys(m).length&&(b.mergeCells=m);0<Object.keys(n).length&&(b.rows=n);0<Object.keys(q).length&&(b.classes=q);h=c.querySelectorAll(_$_9989[541]);if(h.length){c=[];for(a=0;a<h.length;a++){e=[];for(d=0;d<h[a].children.length;d++)e.push(h[a].children[d].innerText);c.push(e)}0<Object.keys(c).length&&(b.footers=c)}if(1==
|
|
382
|
+
b.parseTableAutoCellType)for(c=[],d=0;d<b.columns.length;d++){f=e=!0;c[d]=[];for(a=0;a<b.data.length;a++)if(u=b.data[a][d],c[d][u]||(c[d][u]=0),c[d][u]++,25<u.length&&(e=!1),10==u.length){if(u.substr(4,1)!=_$_9989[185]||u.substr(7,1)!=_$_9989[185])f=!1}else f=!1;a=Object.keys(c[d]).length;f?b.columns[d].type=_$_9989[184]:1==e&&1<a&&a<=parseInt(.1*b.data.length)&&(b.columns[d].type=_$_9989[58],b.columns[d].source=Object.keys(c[d]))}return b}};k.injectArray=function(c,b,a){return c.slice(0,b).concat(a).concat(c.slice(b))};
|
|
383
|
+
k.parseCSV=function(c,b){b=b||_$_9989[25];for(var a=0,d=0,e=[[]],f=0,g=null,h=!1,l=!1,m=0;m<c.length;m++)if(e[d]||(e[d]=[]),e[d][a]||(e[d][a]=_$_9989[3]),c[m]!=_$_9989[542])if(c[m]!=_$_9989[543]&&c[m]!=b||0!=h&&1!=l&&g){c[m]==_$_9989[187]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&c[m]==_$_9989[187]){c[m+1]==_$_9989[187]?(h=!0,e[d][a]+=c[m],m++):l=!0;continue}e[d][a]+=c[m]}else{g=null;l=h=!1;if(e[d][a][0]==_$_9989[187]){var n=e[d][a].trim();n[n.length-1]==_$_9989[187]&&(e[d][a]=
|
|
384
|
+
n.substr(1,n.length-2))}c[m]==_$_9989[543]?(a=0,d++):(a++,a>f&&(f=a))}for(c=0;c<e.length;c++)for(m=0;m<=f;m++)void 0===e[c][m]&&(e[c][m]=_$_9989[3]);return e};k.getTokensFromRange=V.getTokensFromRange;k.getRangeFromTokens=V.getRangeFromTokens;return k}(),Aa=function(){function k(r){return t.current&&t.current.options.tableOverflow&&r.target.tagName==_$_9989[569]&&r.target.hasAttribute(_$_9989[42])}function c(){x.x1=x.x2;x.y1=x.y2;D=null}function b(r,A=1){A*=.1;return 0>r?Math.min(0,Math.ceil(r/(1+
|
|
385
|
+
A))+1):Math.max(0,Math.ceil(r/(1+A))-1)}function a(){0<Math.abs(x.speeds.vertical)&&(x.speeds.vertical=b(x.speeds.vertical,1),t.current.scrollY.scrollTop+=d(x.speeds.vertical),0==t.current.scrollY.scrollTop||t.current.scrollY.scrollHeight-t.current.scrollY.scrollTop===t.current.scrollY.clientHeight)&&(x.speeds.vertical=0);0<Math.abs(x.speeds.horizontal)&&(x.speeds.horizontal=b(x.speeds.horizontal,1),t.current.scrollX.scrollLeft+=d(x.speeds.horizontal),0==t.current.scrollX.scrollLeft||t.current.scrollX.scrollWidth-
|
|
386
|
+
t.current.scrollX.scrollLeft===t.current.scrollX.clientWidth)&&(x.speeds.horizontal=0);0>=Math.abs(x.speeds.vertical)&&0>=Math.abs(x.speeds.horizontal)||requestAnimationFrame(a)}function d(r,A=100){return Math.ceil(A/1E3*r)}var e={},f=null,g=null,h=null,l=!1,m=null,n=null,p=null,q=function(r){function A(ja){ja.className&&(ja.classList.contains(_$_9989[348])&&(I=ja),ja.classList.contains(_$_9989[361])&&(J=ja),ja.classList.contains(_$_9989[544])&&(Y=ja));ja.tagName==_$_9989[545]?z=1:ja.tagName==_$_9989[546]?
|
|
387
|
+
z=2:ja.tagName==_$_9989[547]&&(z=3);ja.parentNode&&!I&&A(ja.parentNode)}var z=null,B=null,I=null,J=null,Y=null,W=null,wa=null,Ra=null;A(r.target);if(null!==Y)return!1;if(I)if(r.target.classList.contains(_$_9989[330]))B=_$_9989[548];else if(r.target.classList.contains(_$_9989[339]))B=_$_9989[138];else if(r.target.classList.contains(_$_9989[267]))B=_$_9989[410],W=parseInt(r.target.getAttribute(_$_9989[43]));else if(r.target.parentNode&&r.target.parentNode.classList.contains(_$_9989[177]))W=r.target.getAttribute(_$_9989[181]),
|
|
388
|
+
wa=r.target.getAttribute(_$_9989[182]),null===W?B=_$_9989[548]:(B=_$_9989[407],W=parseInt(W),wa=parseInt(wa));else if(r.target.parentNode&&r.target.parentNode.classList.contains(_$_9989[146]))B=_$_9989[549];else if(r.target.classList.contains(_$_9989[150]))B=_$_9989[549];else if(r.target.parentNode&&r.target.parentNode.classList.contains(_$_9989[550]))B=_$_9989[402],W=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==z)B=_$_9989[409],W=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_9989[168])&&
|
|
389
|
+
3<W&&20>W&&(B=_$_9989[551]),W=r.target.getAttribute(_$_9989[42]);else if(2==z){if(r=v(r,I))B=_$_9989[411],W=r[0],wa=r[1],Ra=r[2]}else if(3==z){if(W=r.target.getAttribute(_$_9989[42]),wa=r.target.getAttribute(_$_9989[43]),W||wa)B=_$_9989[552]}else z||jSuites.findElement(r.target,_$_9989[553])&&(B=_$_9989[87]);return[I,J,z,B,W,wa,Ra]},v=function(r,A){if(r.changedTouches&&r.changedTouches[0]){var z=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else z=r.clientX,r=r.clientY;A=(A.spreadsheet.config.root?
|
|
390
|
+
A.spreadsheet.config.root:document).elementsFromPoint(z,r);for(var B=0;B<A.length;B++)if(z=A[B].getAttribute(_$_9989[42]),r=A[B].getAttribute(_$_9989[43]),null!=z&&null!=r)return z=parseInt(z),r=parseInt(r),[z,r,A[B]];return!1},u=function(r){var A=q(r);if(!1===A)return!1;A[0]?A[1]?t.current!=A[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=A[1].jexcel):(r=A[0].tabs.getActive(),0<=r&&(t.current=A[0].spreadsheet.worksheets[r])):t.current&&!jSuites.findElement(r.target,_$_9989[219])&&(t.current.resetSelection(!0),
|
|
391
|
+
t.current=null);return A};e.input=function(r){if(r.target.tagName==_$_9989[554]&&r.target.classList.contains(_$_9989[92])){var A=null;t.current?A=t.current:r.target.getAttribute(_$_9989[555])&&(A=H(r.target.getAttribute(_$_9989[555])));A&&ka.parse.call(A,r.target)}};e.keydown=function(r){if(t.current){r.target.tagName==_$_9989[554]&&r.target.classList.contains(_$_9989[92])&&ka.onkeydown.call(t.current,r);if(27==r.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),r.preventDefault(),
|
|
392
|
+
!1;if(ra.event)return ra.cancel.call(t.current,r),r.preventDefault(),!1;if(la.event)return la.cancel.call(t.current,r),!1;if(1==ca.isVisible())return ca.close.call(t.current,!1),r.preventDefault(),!1}if(!r.target.classList.contains(_$_9989[219]))if(r.target.classList.contains(_$_9989[380])){var A=r.target;m&&clearTimeout(m);m=setTimeout(function(){ca.search.call(t.current,A.value);m=null},500)}else if(r.target.classList.contains(_$_9989[394]))A=r.target,m&&clearTimeout(m),m=setTimeout(function(){t.current.search(A.value);
|
|
393
|
+
m=null},400);else if(t.current.edition){var z=t.current.edition.getAttribute(_$_9989[42]);13==r.which?t.current.options.columns[z].type==_$_9989[184]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[z].type!=_$_9989[58]&&t.current.options.columns[z].type!=_$_9989[556]&&t.current.options.columns[z].type!=_$_9989[433]&&(r.altKey?t.current.parent.input.classList.contains(_$_9989[557])||document.execCommand(_$_9989[558],!1,_$_9989[559]):(t.current.closeEditor(t.current.edition,!0),
|
|
394
|
+
t.current.down(),r.preventDefault())):9==r.which&&(t.current.closeEditor(t.current.edition,!0),t.current.right(),r.preventDefault())}else if(t.current.selectedCell)if(33==r.which)0<t.current.options.pagination?ta.pageUp.call(t.current):G.pageUp.call(t.current);else if(34==r.which)0<t.current.options.pagination?ta.pageDown.call(t.current):G.pageDown.call(t.current);else if(37==r.which)t.current.left(r.shiftKey,r.ctrlKey),r.preventDefault();else if(39==r.which)t.current.right(r.shiftKey,r.ctrlKey),
|
|
395
|
+
r.preventDefault();else if(38==r.which)t.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)t.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)t.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)t.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)t.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||8==r.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_9989[3]);
|
|
396
|
+
else if(13==r.which)r.shiftKey?t.current.up():(1==t.current.options.allowManualInsertRow&&t.current.selectedCell[1]==(t.current.results?t.current.results[t.current.results.length-1]:t.current.rows.length-1)&&t.current.insertRow(),t.current.selectedCell&&t.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?t.current.left():(z=t.current.selectedCell[0],t.current.right(),1==t.current.options.allowInsertColumn&&1==t.current.options.allowManualInsertColumn&&t.current.selectedCell[0]==z&&
|
|
397
|
+
(t.current.insertColumn(),t.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)65==r.which?(t.current.selectAll(),r.preventDefault()):83==r.which?(t.current.download(),r.preventDefault()):89==r.which?(t.current.parent.redo(),r.preventDefault()):90==r.which?(t.current.parent.undo(),r.preventDefault()):67==r.which?(t.current.copy(),r.preventDefault()):88==r.which?(t.current.cut(),r.preventDefault()):86==r.which?e.paste(r):189==r.which&&(1==t.current.options.allowDeleteRow&&
|
|
398
|
+
h==_$_9989[410]?(t.current.deleteRow(),r.preventDefault()):1==t.current.options.allowDeleteColumn&&h==_$_9989[409]&&(t.current.deleteColumn(),r.preventDefault()));else if(t.current.selectedCell&&t.current.isEditable()){z=t.current.selectedCell[1];var B=t.current.selectedCell[0];t.current.options.columns[B].type!=_$_9989[18]&&(32==r.keyCode?t.current.options.columns[B].type==_$_9989[250]||t.current.options.columns[B].type==_$_9989[252]?r.preventDefault():t.current.openEditor(t.current.records[z][B].element,
|
|
399
|
+
!0,r):113==r.keyCode?t.current.openEditor(t.current.records[z][B].element,!1,r):1!=r.key.length&&r.key!=_$_9989[560]||r.altKey||r.ctrlKey||t.current.records[z]&&t.current.openEditor(t.current.records[z][B].element,!0,r))}}};var w=function(r,A,z,B,I,J){if(1==t.current.parent.input.classList.contains(_$_9989[92])&&ka.update.call(t.current,r,A,z,B,I))return!1;if(t.current.edition)t.current.closeEditor(t.current.edition,!0);else if(h&&h!==J)return!1;ka.current?ka.range.call(t.current,r,A,z,B,I):ya[_$_9989[11]].call(t.current,
|
|
400
|
+
r,A,z,B,I)};e.mousedown=function(r){r=r||window.event;var A=r.buttons?r.buttons:r.button?r.button:r.which;if(t.current)if(1==ca.isVisible()&&(jSuites.findElement(r.target,_$_9989[384])||ca.close.call(t.current,!1)),t.current.edition){if(jSuites.findElement(r.target,_$_9989[99]))return!1}else if(jSuites.findElement(r.target,_$_9989[219]))return!1;var z=u(r);if(!1===z)return!1;p=z;if(1<A)if(z[3]==_$_9989[409]){if(t.current.isSelected(z[4],null))return!1}else if(z[3]==_$_9989[410]){if(t.current.isSelected(null,
|
|
401
|
+
z[4]))return!1}else if(z[3]==_$_9989[411]&&t.current.isSelected(z[4],z[5]))return!1;if(t.current){if(z[3]==_$_9989[138])t.current.isEditable()&&(la.event=!0);else if(z[3]==_$_9989[551])ca.open.call(t.current,z[4]);else{if(1==z[2])if(1==t.current.options.columnDrag&&6>r.target.offsetHeight-r.offsetY)ra.start.call(t.current,r);else if(1==t.current.options.columnResize&&6>r.target.offsetWidth-r.offsetX)va.start.call(t.current,r);else{A=t.current.options.columns.length-1;var B=t.current.options.data.length-
|
|
402
|
+
1;if(z[3]==_$_9989[548])w(0,0,A,B,r,z[3]),g=f=0;else if(z[3]==_$_9989[407]){var I=pa.range.call(t.current,z[5])[z[4]];I[1]>A&&(I[1]=A);w(I[0],0,I[1],B,r,z[3]);f=I[0];g=0}else(r.shiftKey||r.ctrlKey)&&null!=f&&null!=g?w(f,0,z[4],B,r,z[3]):(z[3]==_$_9989[409]&&f==z[4]&&1==t.current.options.allowRenameColumn&&(n=setTimeout(function(){t.current.setHeader(z[4])},800)),w(z[4],0,z[4],B,r,z[3]),f=z[4],g=0)}if(2==z[2])if(z[3]==_$_9989[410])1==t.current.options.rowDrag&&6>r.target.offsetWidth-r.offsetX?ra.start.call(t.current,
|
|
403
|
+
r):1==t.current.options.rowResize&&6>r.target.offsetHeight-r.offsetY?va.start.call(t.current,r):(A=t.current.options.columns.length-1,B=parseInt(z[4]),(r.shiftKey||r.ctrlKey)&&null!=f&&null!=g?w(0,g,A,B,r,z[3]):(w(0,B,A,B,r,z[3]),f=0,g=B));else if(z[3]==_$_9989[411]){A=parseInt(z[4]);B=parseInt(z[5]);if(!t.current.edition&&(I=t.current.options.columns[z[4]].type,r.target.tagName==_$_9989[561]&&(I==_$_9989[253]||I==_$_9989[254])&&r.target.parentNode.classList.contains(_$_9989[124]))){var J=r.target.innerText;
|
|
404
|
+
I==_$_9989[253]&&(J=_$_9989[562]+J);window.open(J,_$_9989[563])}(r.shiftKey||r.ctrlKey)&&null!=f&&null!=g?w(f,g,A,B,r,z[3]):(w(A,B,A,B,r,z[3]),f=A,g=B)}}h=z[3];typeof z[3]!==_$_9989[13]&&F.call(t.current.parent,_$_9989[564],t.current,z[3],z[4],z[5]);l=!0}else l=!1};e.mouseup=function(r){t.current&&(ra.event?ra.end.call(t.current,r):va.event?va.end.call(t.current,r):la.event?la.end.call(t.current,r):r.target.classList.contains(_$_9989[383])?ca.close.call(t.current,!0):t.current.edition&&r.target.classList.contains(_$_9989[565])&&
|
|
405
|
+
50>r.target.clientWidth-r.offsetX&&50>r.offsetY?da.close.call(t.current,null,!0):r.target.classList.contains(_$_9989[318])&&(r=r.target.innerText==_$_9989[215]?0:r.target.innerText==_$_9989[216]?r.target.getAttribute(_$_9989[264])-1:r.target.innerText-1,ta[_$_9989[11]].call(t.current,parseInt(r))));n&&(clearTimeout(n),n=null);l=h=!1;ka.current&&ka.close.call(t.current)};e.mousemove=function(r){r=r||window.event;if(t.current){var A=r.target.getAttribute(_$_9989[42]),z=r.target.getAttribute(_$_9989[43]);
|
|
406
|
+
if(1==l)ra.event?ra.update.call(t.current,r):va.event?va.update.call(t.current,r):Oa.event&&Oa.update.call(t.current,r);else{var B=r.target.getBoundingClientRect();t.current.cursor&&(t.current.cursor.style.cursor=_$_9989[3],t.current.cursor=null);1==t.current.options.editable&&(A||z)&&(1==t.current.options.rowResize&&r.target&&A&&!z&&5>B.width-(r.clientX-B.left)?(t.current.cursor=r.target,t.current.cursor.style.cursor=_$_9989[566]):1==t.current.options.columnResize&&r.target&&!A&&z&&5>B.height-(r.clientY-
|
|
407
|
+
B.top)?(t.current.cursor=r.target,t.current.cursor.style.cursor=_$_9989[567]):1==t.current.options.rowDrag&&r.target&&!A&&z&&5>B.width-(r.clientX-B.left)?(t.current.cursor=r.target,t.current.cursor.style.cursor=_$_9989[568]):1==t.current.options.columnDrag&&r.target&&A&&!z&&5>B.height-(r.clientY-B.top)&&(t.current.cursor=r.target,t.current.cursor.style.cursor=_$_9989[568]))}}};e.mouseover=function(r){r=r||window.event;var A=!1;if(t.current&&1==l){var z=q(r);if(z[0]){if(z[1]&&t.current!=z[1].jexcel&&
|
|
408
|
+
t.current)return!1;if(!ra.event&&!va.event)if(la.event){var B=r.target.getAttribute(_$_9989[42]),I=r.target.getAttribute(_$_9989[43]);t.current.isSelected(B,I)||null===B||null===I||(la.call(t.current,B,I),A=!0)}else null!==f&&null!==g&&(1==z[2]&&(B=f,z[3]==_$_9989[409]&&(B=r.target.getAttribute(_$_9989[42])),I=t.current.options.data.length-1,w(f,0,B,I,r,z[3])),2==z[2]&&(z[3]==_$_9989[410]?(B=t.current.options.columns.length-1,I=parseInt(r.target.getAttribute(_$_9989[43])),w(0,g,B,I,r,z[3])):z[3]==
|
|
409
|
+
_$_9989[411]&&(B=r.target.getAttribute(_$_9989[42]),I=r.target.getAttribute(_$_9989[43]),B&&I&&(w(f,g,B,I,r,z[3]),A=!0))))}}1==A&&!n&&G.limited.call(t.current)?n=setTimeout(function(){var J=t.current.content.getBoundingClientRect();if(r.changedTouches&&r.changedTouches[0])var Y=r.changedTouches[0].clientX,W=r.changedTouches[0].clientY;else Y=r.clientX,W=r.clientY;50>J.height-(W-J.top)?G.pageDown.call(t.current,1,null,r):80>W-J.top&&G.pageUp.call(t.current,1,null,r);50>J.width-(Y-J.left)?G.pageRight.call(t.current,
|
|
410
|
+
1,null,r):80>Y-J.left&&G.pageLeft.call(t.current,1,null,r);n=null},100):n&&(clearTimeout(n),n=null)};e.dblclick=function(r){if(t.current)if(r.target.classList.contains(_$_9989[339]))la.execute.call(t.current,!1);else{var A=q(r);1==A[2]?1==t.current.options.columnSorting&&(r=r.target.getAttribute(_$_9989[42]))&&t.current.orderBy(r):2==A[2]&&t.current.isEditable()&&!t.current.edition&&A[6]&&t.current.openEditor(A[6])}};e.paste=function(r){if(t.current&&t.current.selectedCell&&!t.current.edition){var A=
|
|
411
|
+
r.clipboardData||window.clipboardData;A&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],A.getData(_$_9989[56])),r&&r.preventDefault())}};e.contextmenu=function(r){var A=u(r);!1!==A&&(A[1]||(A=p),t.current&&!t.current.edition&&(A=Array.prototype.slice.call(A,3),Qa.open.call(t.current,r,A)))};var y=Date.now(),x={},D=null,R=null,O=null;e.touchstart=function(r){var A=q(r);A[0]?A[1]&&t.current!=A[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=A[1].jexcel):t.current&&
|
|
412
|
+
(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var z=A[4];A=A[5];k(r)&&(O=r.touches[0],R=r.touches.length,y=Date.now(),x.x1=r.touches[0].screenX,x.y1=r.touches[0].screenY,x.x2=r.touches[0].screenX,x.y2=r.touches[0].screenY,D=setTimeout(c,250),null!=x.speeds&&(x.speeds.vertical=0,x.speeds.horizontal=0));if(null!==z&&null!==A){t.current.updateSelectionFromCoords(z,A,z,A);var B=r.target;n=setTimeout(function(){t.current.openEditor(B,!1,r);n=null},300)}}};e.touchmove=function(r){n&&
|
|
413
|
+
(clearTimeout(n),n=null);if(k(r)&&1==R){var A=r.changedTouches[0];O&&(t.current.scrollY.scrollTop+=-1*(A.clientY-O.clientY),t.current.scrollX.scrollLeft+=-1*(A.clientX-O.clientX));O=A;x.x2=r.touches[0].screenX;x.y2=r.touches[0].screenY;null!=x.speeds&&(x.speeds.vertical=0,x.speeds.horizontal=0);null==D&&(D=setTimeout(c,250));r.cancelable&&t.current.options.tableOverflow&&r.preventDefault()}};e.touchend=function(r){n&&(clearTimeout(n),n=null);D&&(clearTimeout(D),D=null);O=R=null;if(k(r)){r=Date.now()-
|
|
414
|
+
y;var A=x.x1,z=x.y1,B=x.x2,I=x.y2,J=A==A&&z==I?0:Math.sqrt(Math.pow(A-A,2)+Math.pow(z-I,2));I>z&&(J=-J);10>Math.abs(I-z)&&(J=0);I=0>=r?-1:Math.ceil(J/(r/1E3));z=A==B&&z==z?0:Math.sqrt(Math.pow(A-B,2)+Math.pow(z-z,2));B>A&&(z=-z);10>Math.abs(B-A)&&(z=0);x.speeds={vertical:I,horizontal:0>=r?-1:Math.ceil(z/(r/1E3))};(250>r&&200<Math.abs(x.speeds.vertical)||250>r&&200<Math.abs(x.speeds.horizontal))&&requestAnimationFrame(a)}};e.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&G.refresh.call(t.current)};
|
|
415
|
+
return e}(),t=function(k,c,b){c||(c={});if(c.cloud&&!b)typeof c.plugins.cloud==_$_9989[85]?c.plugins.cloud.load(c,function(f){t(k,f,!0)}):console.error(_$_9989[570]);else{if(k.spreadsheet)a=k.spreadsheet,Ca[_$_9989[11]].call(a,c);else var a=oa.spreadsheet(k,c);a.processing=!0;1==a.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[a.name]=function(){for(var f=0;f<a.worksheets.length;f++)a.worksheets[f].onload();a.processing=!1;if(Array.isArray(a.queue)&&0<a.queue.length)for(;f=a.queue.shift();)f[0].updateCell(f[1],
|
|
416
|
+
f[2],N.call(f[0],f[1],f[2]),!0);a.config.toolbar&&fa.show.call(a);for(f=0;f<a.worksheets.length;f++)aa.refresh.call(a.worksheets[f]);if(typeof a.config.onload==_$_9989[85])a.config.onload(a);ia.state.call(a);jSuites.loading.hide()};Array.isArray(c.worksheets)&&(c=c.worksheets);if(Array.isArray(c)){b=null;for(var d=[],e=0;e<c.length;e++)b=oa.worksheet(a,c[e]),d.push(b)}else d=oa.worksheet(a,c);jSuites.ajax.pending(a.name)||(jSuites.ajax.oncomplete[a.name](),jSuites.ajax.oncomplete[a.name]=null);return d}};
|
|
417
|
+
t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=ka;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var c=Object.keys(k),b=0;b<c.length;b++)typeof k[c[b]]===_$_9989[85]&&(t[c[b]]=k[c[b]],t.extensions[c[b]]=k[c[b]],t.license&&typeof t[c[b]].license==_$_9989[85]&&t[c[b]].license.call(t,t.license))};t.destroy=function(k,c){k.spreadsheet&&(c&&oa.unbind(k),c=t.spreadsheet.indexOf(k.spreadsheet),t.spreadsheet.splice(c,1),
|
|
418
|
+
k.spreadsheet=null,k.jexcel=null,k.innerHTML=_$_9989[3],k.classList.remove(_$_9989[571]),k.classList.remove(_$_9989[348]))};t.version=K;t.helpers=E;t.events=Aa;typeof formula!==_$_9989[13]&&(t.formula=formula);t.editors=function(){var k={},c=function(b,a){return 1==b[a]||b.options&&1==b.options[a]?!0:b[a]==_$_9989[229]||b.options&&b.options[a]==_$_9989[229]?!0:!1};k.createEditor=function(b,a,d,e){e.parent.input.setAttribute(_$_9989[100],!1);b==_$_9989[220]?(b=document.createElement(_$_9989[220]),
|
|
419
|
+
b.type=_$_9989[56],b.value=d):b=document.createElement(_$_9989[20]);b.style.width=a.offsetWidth-2+_$_9989[44];b.style.height=a.offsetHeight-1+_$_9989[44];e.parent.input.appendChild(b);return b};k.createDialog=function(b,a,d,e,f,g){b=k.createEditor(_$_9989[20],b,a,f);b.classList.add(_$_9989[572]);b.classList.add(_$_9989[565]);800>window.innerWidth?(f.parent.input.style.top=_$_9989[144],f.parent.input.style.left=_$_9989[144]):(a=f.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(f.parent.input.style.marginTop=
|
|
420
|
+
-f.parent.input.offsetHeight));return b};k.general=function(){var b={},a=function(e){e=(_$_9989[3]+e)[0];return e==_$_9989[12]||e==_$_9989[573]?!0:!1},d=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,f.options=e.options);e.decimal&&(f.options||(f.options={}),f.options={decimal:e.decimal});return f}return null};b.updateCell=function(e,f,g,h,l,m){g=parseInt(g);h=parseInt(h);if(e){var n=d(m),p=null;f===_$_9989[3]||a(f)||typeof f===
|
|
421
|
+
_$_9989[14]||(n?(n=jSuites.mask.extract(f,n,!0))&&n.value!==_$_9989[3]&&(p=n.value):1==(!1===l.options.autoCasting||!1===m.autoCasting?!1:!0)&&(m.type==_$_9989[14]||m.type==_$_9989[307]||m.type==_$_9989[306]?(n=jSuites.mask.extract(f,m,!0))&&n.value!==_$_9989[3]&&(p=n.value):jSuites.isNumeric(Number(f))&&(p=Number(f))));null!==p&&(f=p);f=b.parseValue(g,h,f,l,m,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_9989[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=
|
|
422
|
+
f;if(null!==p)return p}};b.createCell=b.updateCell;b.openEditor=function(e,f,g,h,l,m){var n=l.parent.input;n.onblur=function(){n.classList.contains(_$_9989[92])||l.closeEditor(e,!0)};if(m.type==_$_9989[14]||m.type==_$_9989[307]||m.type==_$_9989[306])n.classList.add(_$_9989[557]),a(f)||m.inputmode||(m.inputmode=_$_9989[574]);g=null;a(f)||(m.inputmode&&n.setAttribute(_$_9989[96],m.inputmode),(g=d(m))?(m.disabledMaskOnEdition||(m.mask?(m=m.mask.split(_$_9989[263]),n.setAttribute(_$_9989[94],m[0])):m.locale&&
|
|
423
|
+
n.setAttribute(_$_9989[575],m.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&m.type==_$_9989[306]&&(f*=100));g||(n.innerText=f,jSuites.focus(l.parent.input))};b.closeEditor=function(e,f,g,h,l,m){e=l.parent.input;f=f?e.innerText:_$_9989[3];a(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_9989[3]):m.type==_$_9989[306]&&(f+=_$_9989[576],e.classList.remove(_$_9989[577]));return f};b.parseValue=function(e,f,g,h,l,m){a(g)&&1==h.parent.config.parseFormulas&&(g=h.executeFormula(g,
|
|
424
|
+
e,f));g instanceof Element||g instanceof HTMLDocument||!l||a(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),m&&f.mask&&(f=f.mask.split(_$_9989[263]),f[1]&&(f[1].match(new RegExp(_$_9989[578],_$_9989[376]))&&(0>g?m.classList.add(_$_9989[579]):m.classList.remove(_$_9989[579])),f[1].match(new RegExp(_$_9989[580],_$_9989[376]))&&0>g&&(e=_$_9989[212]+e+_$_9989[232]))),e&&(g=e));return g};b[_$_9989[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_9989[306]?100*parseFloat(f):
|
|
425
|
+
f};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(d,e,f,g,h,l){d&&(f=document.createElement(_$_9989[20]),f.classList.add(_$_9989[581]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_9989[3],d.appendChild(f))};b.createCell=b.updateCell;b.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_9989[582];m.toolbar=!1;a=k.createDialog(d,
|
|
426
|
+
e,f,g,h,l);a=jSuites.editor(a,m)};b.closeEditor=function(d,e,f,g,h,l){return e?a.getData():_$_9989[3]};return b}();k.dropdown=function(){var b={createCell:function(a,d,e,f,g,h){h.render==_$_9989[583]?a.classList.add(_$_9989[584]):a.classList.add(_$_9989[585]);if(a=b.updateCell(a,d,e,f,g,h))return a},destroyCell:function(a){a.classList.remove(_$_9989[585])},updateCell:function(a,d,e,f,g,h){if(a){var l=b.getItem(a,d,e,f,g,h);l?a.innerHTML=l:d?(d=b.fromLabel(a,d,e,f,g,h),d.length?(l=b.getItem(a,d,e,
|
|
427
|
+
f,g,h),a.innerHTML=l):a.innerHTML=_$_9989[3]):a.innerHTML=_$_9989[3];return d}},openEditor:function(a,d,e,f,g,h){var l=k.createEditor(_$_9989[20],a,d,g),m=h.delimiter||_$_9989[263];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_9989[85]&&(h.source=h.filter(g.el,a,e,f,h.source));typeof h.filterOptions==_$_9989[85]&&(h=h.filterOptions(g,a,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));c(h,_$_9989[586])&&(e.multiple=!0);c(h,_$_9989[57])&&(e.autocomplete=
|
|
428
|
+
!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){g.closeEditor(a,!0)};c(h,_$_9989[586])?d&&(e.value=(_$_9989[3]+d).split(m)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(a,d,e,f,g,h){for(var l=g.parent.input.children[0],m=h.delimiter||_$_9989[263],n=l.dropdown.getText(!0),p=l.dropdown.getValue(!0),q=0;q<p.length;q++)!1===b.getItem(a,p[q],e,f,g,h)&&h.source.push({id:p[q],name:n[q]});l.dropdown.close(!0);if(d)return p.join(m)},fromLabel:function(a,d,e,f,g,h){a=h.delimiter||
|
|
429
|
+
_$_9989[263];e=[];f=[];Array.isArray(d)||(d=(_$_9989[3]+d).split(a));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!c(h,_$_9989[586])&&1<Object.keys(d).length&&(f=[],f[d[0]]=!0);for(d=0;d<h.source.length;d++)f[h.source[d].name]&&e.push(h.source[d].id);return e.join(a)},getItem:function(a,d,e,f,g,h){f=h.delimiter||_$_9989[263];a=[];e=[];Array.isArray(d)||(d=(_$_9989[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!c(h,_$_9989[586])&&1<Object.keys(f).length&&(d=
|
|
430
|
+
[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_9989[84])for(d=0;d<h.source.length;d++)f=h.source[d],h.source[d]={id:f,name:f};for(d=0;d<h.source.length;d++)typeof e[h.source[d].id]!==_$_9989[13]&&a.push(h.render==_$_9989[255]?h.source[d].color:h.render==_$_9989[587]?h.source[d].image:h.source[d].name);if(a.length){if(typeof h.render!==_$_9989[13]){for(d=0;d<a.length;d++)e=d,f=a[d],f=h.render==_$_9989[255]?_$_9989[588]+f+_$_9989[589]:h.render==_$_9989[587]?_$_9989[588]+f+_$_9989[589]:h.render==
|
|
431
|
+
_$_9989[583]?_$_9989[591]+(h.source[d].color||_$_9989[590])+_$_9989[592]+f+_$_9989[593]:void 0,a[e]=f;return a.join(_$_9989[3])}for(d=0;d<a.length;d++)a[d]=(_$_9989[3]+a[d]).replace(_$_9989[215],_$_9989[594]);return a.join(_$_9989[295])}return!1}};b[_$_9989[51]]=function(a,d){for(var e=0;e<a.source.length;e++)if(a.source[e].id==d)return a.render==_$_9989[255]?a.source[e].color:a.render==_$_9989[587]?a.source[e].image:a.source[e].name};return b}();k.autocomplete=k.dropdown;k.calendar=function(){var b=
|
|
432
|
+
{},a=null;b.updateCell=function(d,e,f,g,h,l){if(d){f=e;l=b.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_9989[3]+e;g.substr(4,1)==_$_9989[185]&&g.substr(7,1)==_$_9989[185]?g=!0:(g=g.split(_$_9989[185]),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,l))&&(f=g);if(f=jSuites.calendar.getDateString(f,l))return d.innerText=f,e;d.innerText=_$_9989[3];return _$_9989[3]}};b.createCell=b.updateCell;b.openEditor=
|
|
433
|
+
function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_9989[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(m,n){h.closeEditor(d,!0)};typeof l.timepicker!==_$_9989[13]&&(f.time=c(l,_$_9989[595])?!0:!1);typeof f.readonly!==_$_9989[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;a=k.createEditor(_$_9989[220],d,e,h);jSuites.calendar(a,f);!1===a.calendar.options.readonly&&a.focus()};b.closeEditor=function(d,e,f,g,h){d=a.calendar.close(!0,
|
|
434
|
+
a.value?!0:!1);d=a.value?d:_$_9989[3];if(e)return d};b.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_9989[596]};b[_$_9989[51]]=function(d,e){d=b.getFormat(d);return jSuites.calendar.getDateString(e,d)};return b}();k.color=function(){var b={},a=null;b.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_9989[597]?(f=document.createElement(_$_9989[20]),f.className=_$_9989[255],f.style.backgroundColor=e,d.innerText=_$_9989[3],d.appendChild(f)):(d.style.color=
|
|
435
|
+
e,d.innerText=e))};b.createCell=b.updateCell;b.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_9989[85]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(m,n){h.closeEditor(d,!0)};a=k.createEditor(_$_9989[220],d,e,h);a=jSuites.color(a,l);a.open()};b.closeEditor=function(d,e,f,g,h,l){d=a.close(!0);if(e)return d};b[_$_9989[51]]=function(d,e){d=document.createElement(_$_9989[20]);d.style.width=_$_9989[598];d.style.height=_$_9989[22];d.style.backgroundColor=
|
|
436
|
+
e;return d.outerHTML};return b}();k.checkbox=function(){var b={createCell:function(a,d,e,f,g,h){d=d&&d!=_$_9989[599]&&d!=_$_9989[600]?!0:!1;e=document.createElement(_$_9989[220]);e.type=_$_9989[250];e.checked=d;e.onclick=function(){g.setValue(a,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_9989[601],_$_9989[601]);a.innerHTML=_$_9989[3];a.appendChild(e);return d},updateCell:function(a,d){d=d&&d!=_$_9989[599]&&d!=_$_9989[600]?!0:!1;a&&(a.children[0].checked=d);return d},openEditor:function(a,
|
|
437
|
+
d,e,f,g){d=a.children[0].checked?!1:!0;g.setValue(a,d);return!1},closeEditor:function(a,d){return!1}};b[_$_9989[51]]=function(a,d){return 1==d||1==d||d==_$_9989[229]?jSuites.translate(_$_9989[229]):jSuites.translate(_$_9989[599])};return b}();k.radio=function(){var b={createCell:function(a,d,e,f,g,h){a.getAttribute(_$_9989[42]);e=document.createElement(_$_9989[220]);e.type=_$_9989[252];e.checked=1==d||1==d||d==_$_9989[229]?!0:!1;e.onclick=function(){g.setValue(a,!0)};(h&&1==h.readOnly||!g.isEditable())&&
|
|
438
|
+
e.setAttribute(_$_9989[601],_$_9989[601]);a.innerHTML=_$_9989[3];a.appendChild(e)},updateCell:function(a,d,e,f,g){d=1==d||1==d||d==_$_9989[229]||d==_$_9989[602]?!0:!1;a&&(a.children[0].checked=d);if(1==d){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 d},openEditor:function(a,d,e,f,g){return!1},closeEditor:function(a,d){return!1}};b[_$_9989[51]]=function(a,d){return 1==d||1==d||d==_$_9989[229]?_$_9989[229]:_$_9989[599]};
|
|
439
|
+
return b}();k.autonumber=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,l){(e=parseInt(e))||0<parseInt(d.innerText)&&(e=parseInt(d.innerText));l.sequence||(l.sequence=0);e?b.isValid(e,f,g,h)||(e=_$_9989[243]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_9989[220],d,e,h);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h){return e?a.value:_$_9989[3]};
|
|
440
|
+
b.isValid=function(d,e,f,g){for(var h,l=0;l<g.options.data.length;l++)if(h=g.value(e,l),h==d&&l!=f)return!1;return!0};return b}();k.progressbar=function(){var b={},a=null;b.createCell=function(d,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(d.children[0]&&d.children[0].tagName==_$_9989[554])var f=d.children[0];else f=document.createElement(_$_9989[20]),f.classList.add(_$_9989[256]),d.innerText=_$_9989[3],d.classList.add(_$_9989[603]),d.appendChild(f);f.style.width=parseInt(e)+_$_9989[576];
|
|
441
|
+
f.setAttribute(_$_9989[264],parseInt(e)+_$_9989[576])};b.destroyCell=function(d){d.classList.remove(_$_9989[603])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_9989[220],d,e,h);a.type=_$_9989[14];a.setAttribute(_$_9989[604],0);a.setAttribute(_$_9989[605],100);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h){return e?a.value:_$_9989[3]};return b}();k.rating=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,
|
|
442
|
+
l){return b.setCell(d,e,l)};b.destroyCell=function(d){d.classList.remove(_$_9989[606])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){a=k.createEditor(_$_9989[220],d,e,h);a.type=_$_9989[14];a.setAttribute(_$_9989[604],0);a.setAttribute(_$_9989[605],5);a.onblur=function(){h.closeEditor(d,!0)};a.focus();a.value=e};b.closeEditor=function(d,e,f,g,h,l){return e?a.value:_$_9989[3]};b.setCell=function(d,e,f){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(d){f=f&&f.color?f.color:_$_9989[579];
|
|
443
|
+
var g=document.createElement(_$_9989[20]);g.setAttribute(_$_9989[264],parseInt(e)+_$_9989[607]);g.classList.add(_$_9989[257]);for(var h=0;h<e;h++){var l=document.createElement(_$_9989[442]);l.className=_$_9989[507];l.style.color=f;l.innerHTML=_$_9989[608];g.appendChild(l)}d.innerHTML=_$_9989[3];d.className=_$_9989[606];d.appendChild(g)}return e};return b}();k.email=function(){var b={createCell:function(a,d,e,f,g,h){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_9989[561]?e=a.children[0]:
|
|
444
|
+
(e=document.createElement(_$_9989[201]),a.innerText=_$_9989[3],a.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_9989[609],h.options.url)),e.innerText=d)}};b.updateCell=b.createCell;b.openEditor=function(a,d,e,f,g,h){g.parent.input.classList.add(_$_9989[557]);g.parent.input.onblur=function(){g.closeEditor(a,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};b.closeEditor=function(a,d,e,f,g){g.parent.input.classList.remove(_$_9989[557]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,
|
|
445
|
+
_$_9989[188]),_$_9989[3]):_$_9989[3]};return b}();k.url=k.email;k.image=function(){var b={},a=null;b.createCell=function(d,e,f,g,h,l){d&&(e?d.children&&d.children[0]&&d.children[0].tagName==_$_9989[610]?d.children[0].src=e:(f=document.createElement(_$_9989[37]),l.render==_$_9989[611]&&f.classList.add(_$_9989[611]),l.options&&(f.style.maxWidth=_$_9989[612],l.options.absolute&&(f.style.position=_$_9989[613]),l.options.width&&(f.style.maxWidth=parseInt(l.options.width)+_$_9989[44]),l.options.height&&
|
|
446
|
+
(f.style.maxHeight=parseInt(l.options.height)+_$_9989[44])),f.src=e,d.innerHTML=_$_9989[3],d.appendChild(f)):d.innerHTML=_$_9989[3])};b.updateCell=b.createCell;b.openEditor=function(d,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;a=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_9989[37]),d.src=e,d.classList.add(_$_9989[614]),d.style.width=_$_9989[612],a.appendChild(d));jSuites.image(a,l)};b.closeEditor=function(d,e,f,g,h,l){if(e&&(d=a.children[0]))return d.tagName==_$_9989[610]?d.src:
|
|
447
|
+
_$_9989[3]};b[_$_9989[51]]=function(d,e){return _$_9989[615]+e+_$_9989[616]};return b}();k.html=function(){var b={},a=null;b.createCell=function(d,e){d.classList.add(_$_9989[617]);var f=document.createElement(_$_9989[20]);f.innerHTML=e;d.appendChild(f)};b.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};b.destroyCell=function(d){d.classList.remove(_$_9989[617])};b.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.focus=!0;m.value=e;m.border=!1;m.height=_$_9989[582];e=k.createDialog(d,
|
|
448
|
+
e,f,g,h,l);a=jSuites.editor(e,m);a.close=function(){h.closeEditor(d,!0)};jSuites.tracking(a,!0)};b.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(a,!1);d=a.getData();if(e)return d};return b}();k.hidden=function(){return{createCell:function(b,a,d,e,f){b.style.display=_$_9989[40];b.innerText=a},updateCell:function(b,a,d,e,f){b&&(b.innerText=a)},openEditor:function(b,a,d,e,f){return!1},closeEditor:function(b,a){return!1}}}();k.tags=function(){var b={},a=null;b.createCell=function(d,e){d.classList.add(_$_9989[618]);
|
|
449
|
+
b.updateCell(d,e)};b.updateCell=function(d,e){d&&(d.innerHTML=e)};b.destroyCell=function(d){d.classList.remove(_$_9989[618])};b.openEditor=function(d,e,f,g,h,l){var m=l&&l.options?l.options:{};m.value=e;a=k.createDialog(d,e,f,g,h,l);d=document.createElement(_$_9989[20]);d.style.margin=_$_9989[22];d.style.marginRight=_$_9989[619];a.appendChild(d);a=jSuites.tags(d,m);d.focus();jSuites.focus(d)};b.closeEditor=function(d,e,f,g,h,l){d=a.getValue();if(e)return d};return b}();k.record=function(){var b={},
|
|
450
|
+
a=null;b.createCell=function(d,e,f,g,h,l){d.classList.add(_$_9989[585]);var m;(m=h.parent.getWorksheetInstance(l.worksheetId))?m.rows?b.updateCell(d,e,f,g,h,l):(d.innerText=_$_9989[243],h.parent.queue.push([h,f,g])):(d.innerText=_$_9989[243],h.parent.queue.push([h,f,g]))};b.destroyCell=function(d){d.classList.remove(_$_9989[585])};b.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_9989[13]?d.innerText=_$_9989[243]:d.innerHTML=b.getValue(d,e,f,g,h,l))};b.openEditor=function(d,e,f,g,h,
|
|
451
|
+
l){var m=l.delimiter||_$_9989[263];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_9989[85]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_9989[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=b.getSource(h,l);c(l,_$_9989[586])&&(f.multiple=!0);c(l,_$_9989[57])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};c(l,_$_9989[586])?e&&(f.value=(_$_9989[3]+e).split(m)):f.value=e;a=k.createEditor(_$_9989[20],
|
|
452
|
+
d,e,h);a=jSuites.dropdown(a,f)};b.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_9989[263];f=a.getValue(!0);a.close(!0);if(e)return f.join(d)};b.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_9989[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_9989[3]||0==e||null==e||void 0==e)return _$_9989[3];e=(_$_9989[3]+e).split(_$_9989[263]);for(g=0;g<e.length;g++){var m=e[g].trim();var n=
|
|
453
|
+
h.name(f);m=h.getRowById(m);n=!1===m?_$_9989[620]:m[n];0<=l.worksheetImage&&(n=_$_9989[621]+n+_$_9989[622]);d.push(n)}return 0<=l.worksheetImage?d.join(_$_9989[3]):d.join(_$_9989[295])}return _$_9989[243]};b.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_9989[17]&&(g=d.parent.getWorksheetInstance(e.worksheetId));if(g){var h,l=[];for(d=0;d<g.rows.length;d++)if(h=g.value(f,d))h={id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,
|
|
454
|
+
d)),l.push(h)}else console.error(_$_9989[623]+e.worksheetId);return l};b[_$_9989[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_9989[255]?d.source[f].color:d.render==_$_9989[587]?d.source[f].image:d.source[f].name};return b}();return k}();typeof jQuery!==_$_9989[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(c){var b=k(this)[_$_9989[51]](0);if(b.jspreadsheet){if(typeof arguments[0]==_$_9989[14])var a=arguments[0],d=2;else a=0,d=1;return b.jspreadsheet[a][c].apply(b.jspreadsheet[a],
|
|
455
|
+
Array.prototype.slice.call(arguments,d))}return t(k(this)[_$_9989[51]](0),arguments[0])}}(jQuery);return t});
|