jspreadsheet 8.0.60 → 8.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +422 -337
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v8.0.
|
|
2
|
+
* Jspreadsheet v8.0.61
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -7,10 +7,22 @@
|
|
|
7
7
|
* This software requires a license. Visit: https://jspreadsheet.com/v8
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
if (! formula && typeof(require) === 'function') {
|
|
11
|
+
var formula = require('@jspreadsheet/formula');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
if (! jSuites && typeof(require) === 'function') {
|
|
15
|
+
var jSuites = require('jsuites');
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(z){var D=0;return function(){return D<z.length?{done:!1,value:z[D++]}:{done:!0}}};$jscomp.arrayIterator=function(z){return{next:$jscomp.arrayIteratorImpl(z)}};$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(z,D,F){if(z==Array.prototype||z==Object.prototype)return z;z[D]=F.value;return z};$jscomp.getGlobal=function(z){z=["object"==typeof globalThis&&globalThis,z,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var D=0;D<z.length;++D){var F=z[D];if(F&&F.Math==Math)return F}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(z,D){var F=$jscomp.propertyToPolyfillSymbol[D];if(null==F)return z[D];F=z[F];return void 0!==F?F:z[D]};
|
|
21
|
+
$jscomp.polyfill=function(z,D,F,O){D&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfillIsolated(z,D,F,O):$jscomp.polyfillUnisolated(z,D,F,O))};$jscomp.polyfillUnisolated=function(z,D,F,O){F=$jscomp.global;z=z.split(".");for(O=0;O<z.length-1;O++){var M=z[O];if(!(M in F))return;F=F[M]}z=z[z.length-1];O=F[z];D=D(O);D!=O&&null!=D&&$jscomp.defineProperty(F,z,{configurable:!0,writable:!0,value:D})};
|
|
22
|
+
$jscomp.polyfillIsolated=function(z,D,F,O){var M=z.split(".");z=1===M.length;O=M[0];O=!z&&O in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var W=0;W<M.length-1;W++){var K=M[W];if(!(K in O))return;O=O[K]}M=M[M.length-1];F=$jscomp.IS_SYMBOL_NATIVE&&"es6"===F?O[M]:null;D=D(F);null!=D&&(z?$jscomp.defineProperty($jscomp.polyfills,M,{configurable:!0,writable:!0,value:D}):D!==F&&(void 0===$jscomp.propertyToPolyfillSymbol[M]&&(F=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[M]=$jscomp.IS_SYMBOL_NATIVE?
|
|
23
|
+
$jscomp.global.Symbol(M):$jscomp.POLYFILL_PREFIX+F+"$"+M),$jscomp.defineProperty(O,$jscomp.propertyToPolyfillSymbol[M],{configurable:!0,writable:!0,value:D})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(z){z={next:z};z[Symbol.iterator]=function(){return this};return z};
|
|
24
|
+
$jscomp.iteratorFromArray=function(z,D){z instanceof String&&(z+="");var F=0,O=!1,M={next:function(){if(!O&&F<z.length){var W=F++;return{value:D(W,z[W]),done:!1}}O=!0;return{done:!0,value:void 0}}};M[Symbol.iterator]=function(){return M};return M};$jscomp.polyfill("Array.prototype.values",function(z){return z?z:function(){return $jscomp.iteratorFromArray(this,function(D,F){return F})}},"es8","es3");
|
|
25
|
+
var _$_5e7a=["use strict","{","}","","8.0.61","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",
|
|
14
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",
|
|
15
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",
|
|
16
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",
|
|
@@ -28,335 +40,408 @@ var B=["use strict","{","}","","8.0.60","Base","https://jspreadsheet.com","Unlic
|
|
|
28
40
|
"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","data-current","html","jss_nowrap","insertHTML","<br/>\n","Process","A","mailto:",
|
|
29
41
|
"_blank","onclick","jclose","col-resize","row-resize","move","Cloud plugin not loaded.","jtabs","true","jss_dialog","#","decimal","data-locale","%","jss_percent","\\[Red\\]","red","\\(","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","<","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE",
|
|
30
42
|
"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 "];
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
if(this.
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
1;try{if(
|
|
37
|
-
-1==
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
this.height
|
|
44
|
-
this.
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
0;
|
|
61
|
-
1].getAttribute(
|
|
62
|
-
this.options.
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
(
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
c=
|
|
113
|
-
h
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
this.
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
this.
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
return
|
|
139
|
-
this.options.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
e
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
this.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
(
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
r
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
r.
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
h.
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
(
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
b
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
0
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
this.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
this.
|
|
251
|
-
this.
|
|
252
|
-
f.
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
0;
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
if(
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
!
|
|
276
|
-
(this.
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
this.
|
|
290
|
-
b
|
|
291
|
-
{
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
(
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
(
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
b
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
43
|
+
(function(z,D){typeof exports===_$_5e7a[84]&&typeof module!==_$_5e7a[13]?module.exports=D():typeof define===_$_5e7a[85]&&define.amd?define(D):z.jspreadsheet=z.jexcel=D()})(this,function(){_$_5e7a[0];var z=function(k,a){k=jSuites.translate(k);if(a&&a.length)for(var c=0;c<a.length;c++)k=k.replace(_$_5e7a[1]+c+_$_5e7a[2],a[c]);return k},D=function(k,a){Array.isArray(k)&&(k=k[0]);k=k.replace(new RegExp(/'/g),_$_5e7a[3]).toUpperCase();if(void 0===a)return window[k]?window[k]:null;window[k]=a},F=function(){var k=
|
|
44
|
+
{version:_$_5e7a[4],edition:_$_5e7a[5],host:_$_5e7a[6],license:_$_5e7a[7],print:function(){return[_$_5e7a[8]+this.edition+_$_5e7a[9]+this.version+_$_5e7a[10]+this.host+_$_5e7a[10]+this.license]}};return function(){return k}}(),O=function(k){var a=parseInt(k.y);if(k.id)var c=parseInt(k.id);else k.value&&(c=parseInt(k.value));0<c&&(this.rows[a].id=c,pa[_$_5e7a[11]].call(this,c))},M=function(k){return(_$_5e7a[3]+k).substr(0,1)===_$_5e7a[12]},W=function(k){var a=this.options.columns;return a[k]&&a[k].name?
|
|
45
|
+
a[k].name:k},K=function(k,a,c){var b;if(b=this.options.data[a]){var d=0<=k?W.call(this,k):k;typeof c===_$_5e7a[13]?c=typeof d===_$_5e7a[14]?b[k]:jSuites.path.call(b,_$_5e7a[3]+d):(typeof d===_$_5e7a[14]?b[k]=c:jSuites.path.call(b,_$_5e7a[3]+d,c),!M(c)&&this.records[a][k]&&(this.records[a][k].v=c))}else c=null;return c},N=function(k){return 0==this.config.editable||k&&0==k.options.editable?!1:(k=Da.call(this))?7<=k?!0:!1:!0},Ea=function(k){var a=_$_5e7a[15];if(this.parent)var c=this.parent.config,
|
|
46
|
+
b=this.parent.element,d=this;else c=this.config,b=this.element,d=t.current?t.current:null;typeof k===_$_5e7a[13]&&(k=!b.classList.contains(a));k?(b.classList.add(a),c.fullscreen=!0):(b.classList.remove(a),c.fullscreen=!1);d&&(d.tbody.innerHTML=_$_5e7a[3],C.call(d),P.refresh.call(d),da.update.call(d.parent,d))},Fa=function(k){var a=this.loading;null===k&&(k=a.style.display==_$_5e7a[16]?!0:!1);a.style.display=k?_$_5e7a[16]:_$_5e7a[3];setTimeout(function(){a.style.display=_$_5e7a[3]},1E3)},Aa=function(k,
|
|
47
|
+
a){if(typeof k===_$_5e7a[17]){var c=A.getCoordsFromColumnName(k);c=this.records[c[1]][c[0]];if(c.element)k=c.element;else return typeof a===_$_5e7a[13]?c.readonly:c.readonly=a?!0:!1}c=_$_5e7a[18];k=k.classList;if(typeof a===_$_5e7a[13])return k.contains(c)?!0:!1;a?k.add(c):k.remove(c)},Ga=function(k){var a=_$_5e7a[19],c=this.table.classList;typeof k==_$_5e7a[13]&&(k=!c.contains(a));k?c.remove(a):c.add(a);this.refreshBorders()},Da=function(k){if(void 0===k)return this.status;var a=document.createElement(_$_5e7a[20]);
|
|
48
|
+
a.style.textAlign=_$_5e7a[21];a.style.fontSize=_$_5e7a[22];a.style.cursor=_$_5e7a[23];a.onclick=function(){window.location.href=F().host+_$_5e7a[24]};var c=null,b=[74,50,48,50,48,33].join(_$_5e7a[3]);(function(e){c=1;try{if(e){var f=window.atob(e);f=f.split(_$_5e7a[25]);if(f[1]){f[1]=window.atob(f[1]);var g=f[0];e=b;var h=f[1],l=jSuites.sha512,n=_$_5e7a[3],q=_$_5e7a[3];128<e.length&&(e=l(e));for(var p=0;128>p;p++){var r=e[p]?e[p].charCodeAt(0):0;n+=String.fromCharCode(54^r);q+=String.fromCharCode(92^
|
|
49
|
+
r)}var w=l(q+l(n+h));if(g!=w)c=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var m=window.location.hostname||_$_5e7a[26],v=m.split(_$_5e7a[27]);m=m.split(_$_5e7a[27]);2<m.length&&!jSuites.isNumeric(m[m.length-1])&&v.shift();v=v.join(_$_5e7a[27]);m=m.join(_$_5e7a[27]);if(-1==f[1].domain.indexOf(v)&&-1==f[1].domain.indexOf(m))c=4;else if(f[1].scope&&0<=f[1].scope.indexOf(_$_5e7a[28])){m=new Date;v=parseInt(m.getTime()/1E3);var u=F();f[1].date<v?(c=f[1].date+2592E3<v&&!f[1].plan||f[1].date+15552E3<v?6:
|
|
50
|
+
7,u.license=f[1].name+_$_5e7a[29]):(c=8,u.license=_$_5e7a[30]+f[1].name,u.edition=3==f[1].plan||6==f[1].plan?_$_5e7a[31]:_$_5e7a[5])}else c=5}else c=4}else c=2}}catch(x){}})(k);k=_$_5e7a[3];if(1==c)k=_$_5e7a[32];else if(2==c||3==c||4==c)k=_$_5e7a[33];else if(5==c)k=_$_5e7a[34];else if(6==c||7==c)k=_$_5e7a[35];a.appendChild(document.createTextNode(k));if(8>c)try{if(typeof sessionStorage!==_$_5e7a[13]&&!sessionStorage.getItem(_$_5e7a[36])){sessionStorage.setItem(_$_5e7a[36],!0);var d=document.createElement(_$_5e7a[37]);
|
|
51
|
+
d.src=F().host+_$_5e7a[38]+_$_5e7a[39];d.style.display=_$_5e7a[40];a.appendChild(d)}}catch(e){}Object.defineProperty(this,_$_5e7a[41],{value:c,writable:!1,configurable:!1,enumerable:!1,extensible:!1});F().edition===_$_5e7a[31]&&(this.edition=1);return a},P=function(){var k=function(){if(this.edition){var d=this.edition.getAttribute(_$_5e7a[42]),e=this.edition.getAttribute(_$_5e7a[43]);aa.position.call(this,d,e)}},a=function(){this.scrollX.scrollWidth<this.scrollX.scrollLeft+this.scrollX.offsetWidth+
|
|
52
|
+
25?(this.content.scrollLeft=this.content.scrollWidth,0<this.options.freezeColumns&&ea.refresh.call(this)):this.content.scrollLeft=0;k.call(this)},c=function(){var d=this.scrollY.scrollTop+this.scrollY.offsetHeight+13,e=this.tbody.lastChild.getAttribute(_$_5e7a[43]),f=this.results?this.rows[this.results[this.results.length-1]].y:this.rows[this.rows.length-1].y;this.content.scrollTop=this.scrollY.scrollHeight<d&&e==f?this.content.scrollHeight:0;k.call(this)},b=function(){if(C.limited.call(this)){var d=
|
|
53
|
+
ja.getWidth.call(this),e=this.content.offsetWidth,f=this.content.offsetHeight;this.width=b.width.call(this)+(d?d:1);this.height=b.height.call(this);this.tfoot.offsetHeight&&(this.height+=this.tfoot.offsetHeight+26);this.scrollX.firstChild.style.width=this.width+_$_5e7a[44];this.scrollY.firstChild.style.height=this.height+_$_5e7a[44];this.scrollX.style.width=e+_$_5e7a[44];this.scrollY.style.height=f+_$_5e7a[44];this.scrollX.style.display=this.width>e?_$_5e7a[3]:_$_5e7a[40];this.scrollY.style.display=
|
|
54
|
+
this.height>f?_$_5e7a[3]:_$_5e7a[40]}else this.scrollX.style.display=_$_5e7a[40],this.scrollY.style.display=_$_5e7a[40]};b.refresh=function(){this.scrollY.scrollTop=0;this.scrollX.scrollLeft=0;b.call(this)};b.updateX=function(){if(b.event)return!1;var d=parseInt(this.thead.lastChild.children[(this.options.freezeColumns||0)+1].getAttribute(_$_5e7a[42]));b.setX.call(this,b.width.call(this,d));a.call(this)};b.updateY=function(){if(b.event)return!1;if(this.tbody.firstChild){var d=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43]));
|
|
55
|
+
b.setY.call(this,b.height.call(this,d));c.call(this)}};b.setX=function(d){b.ignore=!0;this.scrollX.scrollLeft=d};b.setY=function(d){b.ignore=!0;this.scrollY.scrollTop=d};b.update=function(d,e){e==_$_5e7a[45]?(d=b.width.call(this,null,d.target.scrollLeft/(d.target.scrollWidth-this.content.offsetWidth)*this.width),C.reset.call(this),C[_$_5e7a[46]].call(this,null,d),a.call(this)):(d=b.height.call(this,null,d.target.scrollTop/(d.target.scrollHeight-this.content.offsetHeight)*(this.height-(this.tbody.offsetHeight-
|
|
56
|
+
5))),this.tbody.textContent=_$_5e7a[3],C[_$_5e7a[46]].call(this,d),c.call(this))};b.build=function(d){var e=this,f=document.createElement(_$_5e7a[20]),g=document.createElement(_$_5e7a[20]);f.className=_$_5e7a[47]+d;g.className=_$_5e7a[48]+d;f.appendChild(g);d==_$_5e7a[45]?f.style.height=_$_5e7a[22]:f.style.width=_$_5e7a[22];f.onscroll=function(h){if(b.ignore)return b.ignore=!1;b.event=!0;b.update.call(e,h,d);b.event=!1};return f};b.width=function(d,e){for(var f=this.options.columns,g=0,h=this.options.freezeColumns||
|
|
57
|
+
0;h<this.options.columns.length;h++){if(d===h)return g;!1!==f[h].visible&&f[h].type!==_$_5e7a[49]&&(g+=parseInt(f[h].width));if(g>=e)return h}return e?h:g};b.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===g)return f;this.rows[g]&&!1!==this.rows[g].visible&&(f=this.rows[g].height?f+parseInt(this.rows[g].height):f+parseInt(this.options.defaultRowHeight));
|
|
58
|
+
if(f>=e)return g}return e?g:f};return b}(),C=function(){var k=function(){k.reset.call(this,!0);k.renderX.call(this,0);k.renderY.call(this,0);ja.headers.call(this);0<this.options.pagination&&qa.update.call(this);T.update.call(this);this.refreshBorders();P.call(this)};k.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};k.refresh=function(){if(!this.tbody.lastChild)return!1;var a=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_5e7a[42]))+1,c=parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43]));
|
|
59
|
+
this.results?(c=this.results.indexOf(c),c<this.results.length-1&&c++,c=this.results[c]):c++;k.renderX.call(this,a);k.renderY.call(this,c);k.adjustX.call(this,!1);k.adjustY.call(this,!1);P.call(this)};k.renderX=function(a,c,b){var d=this.options.columns,e=0,f=[],g=(this.options.freezeColumns||0)+1;1==this.parent.config.fullscreen?e=this.content.offsetWidth:1==this.options.tableOverflow&&(e=parseInt(this.options.tableWidth));var h=this.headerContainer.offsetWidth||0;for(b||(b=0);d[a]&&(!e||h<e||0<b);){!1!==
|
|
60
|
+
d[a].visible&&d[a].type!==_$_5e7a[49]&&(h+=parseInt(d[a].width));0<b&&b--;var l=Y.getWidth.call(this,a,f);l>b&&(b=l);c?(k.renderColumn.call(this,a,g),a--):(k.renderColumn.call(this,a),a++)}Y.batch.call(this,f)};k.renderY=function(a,c,b){var d=0,e=[];1==this.parent.config.fullscreen?d=this.content.offsetHeight:1==this.options.tableOverflow&&(d=parseInt(this.options.tableHeight));d&&(d-=this.thead.offsetHeight+4,this.tfoot.offsetHeight&&(d-=this.tfoot.offsetHeight+14));var f=this.tbody.offsetHeight;
|
|
61
|
+
var g=parseInt(this.headerContainer.children[(this.options.freezeColumns||0)+1].getAttribute(_$_5e7a[42])),h=parseInt(this.headerContainer.lastChild.getAttribute(_$_5e7a[42])),l=this.results?this.results.indexOf(a):a,n=parseInt(this.options.pagination)||0,q=this.tbody.children.length||0,p=!1;for(b||(b=0);this.options.data&&this.options.data[a]&&(!n||q<n||0<b)&&(!d||f<=d||0<b);){var r=k.renderRow.call(this,a,g,h);c?(this.tbody.insertBefore(r,this.tbody.firstChild),l--):(this.tbody.appendChild(r),l++);
|
|
62
|
+
this.rows[a].height?(r.offsetHeight!==this.rows[a].height&&(this.rows[a].height=r.offsetHeight,p=!0),f+=this.rows[a].height):(f+=this.rows[a].height=r.offsetHeight,p=!0);0<b&&b--;a=Y.getHeight.call(this,a,e);a>b&&(b=a);a=this.results?this.results[l]:l;q++}Y.batch.call(this,e);p&&P.call(this)};k.renderColumn=function(a,c,b){this.headers[a]||wa.create.call(this,a);if(this.options.nestedHeaders)for(b=0;b<this.options.nestedHeaders.length;b++){var d=ka.getColumns.call(this,b);void 0!==d[a]&&ka.renderCell.call(this,
|
|
63
|
+
d[a],b,c)}if(this.options.footers)for(b=0;b<this.options.footers.length;b++)d=X.create.call(this,a,b),null===c?this.tfoot.children[b].appendChild(d):this.tfoot.children[b].insertBefore(d,this.tfoot.children[b].children[c]);null===c?(this.headerContainer.appendChild(this.headers[a]),this.colgroupContainer.appendChild(this.colgroup[a])):(this.headerContainer.insertBefore(this.headers[a],this.headerContainer.children[c]),this.colgroupContainer.insertBefore(this.colgroup[a],this.colgroupContainer.children[c]));
|
|
64
|
+
if(this.tbody.children.length)for(b=0;b<this.tbody.children.length;b++)d=parseInt(this.tbody.children[b].getAttribute(_$_5e7a[43])),(d=I[_$_5e7a[51]].call(this,a,d))&&(null===c?this.tbody.children[b].appendChild(d):this.tbody.children[b].insertBefore(d,this.tbody.children[b].children[c]))};k.renderRow=function(a,c,b,d){var e=this.options.freezeColumns||0;null==c&&(c=parseInt(this.headerContainer.children[e+1].getAttribute(_$_5e7a[42])));null==b&&(b=parseInt(this.headerContainer.lastChild.getAttribute(_$_5e7a[42])));
|
|
65
|
+
var f=ua.create.call(this,a,d);if(f.children.length)for(;f.children[e+1];)f.removeChild(f.lastChild);if(0<e){for(var g=0;g<e;g++)f.appendChild(I[_$_5e7a[51]].call(this,g,a));ja.update.call(this,a)}for(g=c;g<=b;g++)c=I[_$_5e7a[51]].call(this,g,a,d),f.appendChild(c);return f};k.resetY=function(){if(this.options.pagination){this.pageNumber||(this.pageNumber=0);var a=this.options.pagination*this.pageNumber}else a=0;var c=0;if(this.merged.rows[a]){for(c=this.options.pagination;this.merged.rows[a]&&0<=
|
|
66
|
+
a;)a--;a++}this.tbody.textContent=_$_5e7a[3];this.results&&this.results.length&&(a=this.results[a]);(!this.results||0<this.results.length)&&C.renderY.call(this,a,0,c);0<this.options.pagination&&qa.update.call(this);P.call(this);this.refreshBorders()};k[_$_5e7a[46]]=function(a,c){if(null!==a&&0<=a)if(0<this.options.pagination)this.page(this.whichPage(a));else if(this.rows[a]||(a=this.options.data.length-1),!ua.attached.call(this,a)){if(this.merged.rows[a]){for(;this.merged.rows[a]&&0<=a;)a--;a++}this.tbody.textContent=
|
|
67
|
+
_$_5e7a[3];k.renderY.call(this,a);0<a&&k.renderY.call(this,a-1,!0);P.updateY.call(this)}if(null!==c&&0<=c&&(this.options.columns[c]||(c=this.options.columns.length-1),a||(a=k.getY.call(this)),!I.attached.call(this,c,a))){if(this.merged.cols[c]){for(var b=a=0;b<this.rows.length;b++)this.records[b][c].merged&&(a=this.records[b][c].merged[0]);c-=a}k.reset.call(this);k.renderX.call(this,c);0<c&&k.renderX.call(this,c-1,!0);P.updateX.call(this)}this.refreshBorders()};k.pageUp=function(a,c,b){var d=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43]));
|
|
68
|
+
if(c){a=null;var e=this.results?this.results[0]:0}else this.results?(e=this.results.indexOf(d),0<e&&e--,e=this.results[e]):(e=d,0<e&&e--);if(e<d){if(null==a)this.tbody.textContent=_$_5e7a[3];else{d=a;if(this.options.mergeCells){var f=parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43]));d+=Y.getHeight.call(this,f)}for(f=0;f<d;f++)this.tbody.removeChild(this.tbody.lastChild)}k.renderY.call(this,e,!c,a);k.adjustY.call(this,!1);b&&b.preventDefault();P.updateY.call(this)}this.refreshBorders()};k.pageDown=
|
|
69
|
+
function(a,c,b){var d=parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43]));if(c){a=null;var e=this.results?this.results[this.results.length-1]:this.rows.length-1}else this.results?(e=this.results.indexOf(d),e<this.results.length-1&&e++,e=this.results[e]):(e=d,d<this.options.data.length-1&&e++);if(e>d){if(null==a)this.tbody.textContent=_$_5e7a[3];else{d=a;if(this.options.mergeCells){var f=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43]));d+=Y.getHeight.call(this,f)}for(f=0;f<d;f++)this.tbody.removeChild(this.tbody.firstChild)}k.renderY.call(this,
|
|
70
|
+
e,c,a);k.adjustY.call(this,!0);b&&b.preventDefault();P.updateY.call(this)}this.refreshBorders()};k.removeColumns=function(a,c){var b=null===c?this.headerContainer.lastChild:this.headerContainer.children[c];if(b)b=parseInt(b.getAttribute(_$_5e7a[42]));else return!1;if(this.options.mergeCells){for(var d=0,e=b,f=0;f<a;f++){var g=Y.getWidth.call(this,e);g>d&&(d=g);null===c?e--:e++}a+=d}a>=this.headerContainer.children.length&&(a=this.headerContainer.children.length-1);if((d=this.options.nestedHeaders)&&
|
|
71
|
+
d.length)for(e=0;e<d.length;e++)for(g=ka.getColumns.call(this,e),f=0;f<a;f++)if(void 0!==g[b+f]&&this.nested.content[e][g[b+f]]){var h=this.nested.content[e][g[b+f]].element,l=h.getAttribute(_$_5e7a[52]);0<l&&l--;0<l?h.setAttribute(_$_5e7a[52],l):h.parentNode&&this.thead.children[e].removeChild(h)}for(f=0;f<a;f++)null===c?(this.headerContainer.removeChild(this.headerContainer.lastChild),this.colgroupContainer.removeChild(this.colgroupContainer.lastChild)):this.headerContainer.children[c]&&(this.headerContainer.removeChild(this.headerContainer.children[c]),
|
|
72
|
+
this.colgroupContainer.removeChild(this.colgroupContainer.children[c]));for(e=0;e<this.tbody.children.length;e++)for(f=0;f<a;f++)null===c?this.tbody.children[e].removeChild(this.tbody.children[e].lastChild):this.tbody.children[e].children[c]&&this.tbody.children[e].removeChild(this.tbody.children[e].children[c]);for(e=0;e<this.tfoot.children.length;e++)for(f=0;f<a;f++)null===c?this.tfoot.children[e].removeChild(this.tfoot.children[e].lastChild):this.tfoot.children[e].removeChild(this.tfoot.children[e].children[c])};
|
|
73
|
+
k.pageLeft=function(a,c){var b=this.options.freezeColumns||0;if(c){a=null;var d=b}else d=parseInt(this.thead.lastChild.children[b+1].getAttribute(_$_5e7a[42]))-1;d>=b&&(null==a?k.reset.call(this):k.removeColumns.call(this,a,null),k.renderX.call(this,d,!c,a),k.adjustX.call(this,!1),P.updateX.call(this));this.refreshBorders()};k.pageRight=function(a,c){var b=this.options.freezeColumns||0;if(c){a=null;var d=this.options.columns.length-1}else d=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_5e7a[42]))+
|
|
74
|
+
1;d<this.options.columns.length&&(null==a?k.reset.call(this):k.removeColumns.call(this,a,b+1),k.renderX.call(this,d,c,a),k.adjustX.call(this,!0),P.updateX.call(this));this.refreshBorders()};k.reset=function(a){1<this.headerContainer.children.length&&(a=a?0:this.options.freezeColumns||0,k.removeColumns.call(this,this.headerContainer.children.length-(a+1),a+1))};k.getX=function(){if(this.thead.lastChild)return parseInt(this.thead.lastChild.children[1].getAttribute(_$_5e7a[42]))};k.getY=function(){if(this.tbody.firstChild)return parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43]))};
|
|
75
|
+
k.adjustX=function(a,c){var b=this.options.freezeColumns||0;if(a){c=this.options.columns.length-1;var d=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_5e7a[42]));b=parseInt(this.tbody.firstChild.children[b+1].getAttribute(_$_5e7a[42]))}else c=b,d=parseInt(this.tbody.firstChild.children[b+1].getAttribute(_$_5e7a[42])),b=parseInt(this.tbody.firstChild.lastChild.getAttribute(_$_5e7a[42]));d===c&&(a?b--:b++,k.renderX.call(this,b,a))};k.adjustY=function(a,c){if(a){c=this.rows.length-1;var b=
|
|
76
|
+
parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43])),d=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43]))}else c=0,b=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43])),d=parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43]));b==c&&(this.results?(c=this.results.indexOf(d),d=a?this.results[c-1]:this.results[c+1]):a?d--:d++,k.renderY.call(this,d,a))};k.isVisible=function(a,c){var b=this.thead.clientHeight;c||(c=1);var d=!1,e=!1,f=a.getAttribute(_$_5e7a[42]),g=a.getAttribute(_$_5e7a[43]);
|
|
77
|
+
var h=this.records[g][f];h.merged&&(f-=h.merged[0],g-=h.merged[1],a=this.records[g][f].element);g=this.content.getBoundingClientRect();h=a.getBoundingClientRect();var l=ja.getWidth.call(this),n=g.left+l,q=g.left+g.width;f=g.top+b;var p=g.top+g.height;var r=0;g=h.top;g>=f&&g<=p||(r++,d=!0);g=h.top+h.height;g>=f&&g<=p||r++;if(r>=c)return 2>c&&(c=this.content.scrollTop,0==d?p-f>h.height&&(this.content.scrollTop+=g-p+3,P.ignore=!0,this.scrollY.scrollTop+=g-p+3):(this.content.scrollTop=a.offsetTop-b,P.ignore=
|
|
78
|
+
!0,this.scrollY.scrollTop-=c-this.content.scrollTop)),!1;if(!l||!a.classList.contains(_$_5e7a[50]))if(r=0,f=h.left,f>=n&&f<=q||(r++,e=!0),f=h.left+h.width,f>=n&&f<q||r++,r>=c)return 2>c&&(c=this.content.scrollLeft,0==e?q-n>h.width&&(this.content.scrollLeft+=f-q+3,P.ignore=!0,this.scrollX.scrollLeft+=f-q+3):(this.content.scrollLeft=a.offsetLeft-n-50,P.ignore=!0,this.scrollX.scrollLeft-=c-this.content.scrollLeft)),!1;return!0};return k}(),Ha=function(k,a,c,b){for(var d=this.options.columns,e=k,f,g=
|
|
79
|
+
null;k<d.length-1;)if(k++,!1!==d[k].visible&&d[k].type!==_$_5e7a[49]){f=this.records[a]&&this.records[a][k].v===_$_5e7a[3]?!1:!0;null===g&&(g=f);if(this.records[a]&&this.records[a][k].element&&this.records[a][k].element.style.display==_$_5e7a[40]){if(this.records[a][k].merged){if(k==k+this.records[a][k].merged[0]&&(e=k,!c))break;f=!1}}else{if(c&&f!==g&&!b)break;if(c)e=k;else return k}g=f}return e},Ia=function(k,a,c,b){for(var d=this.options.columns,e=k,f,g=null;0<k;)if(k--,!1!==d[k].visible&&d[k].type!==
|
|
80
|
+
_$_5e7a[49]){f=this.records[a]&&this.records[a][k].v===_$_5e7a[3]?!1:!0;null===g&&(g=f);if(this.records[a]&&this.records[a][k].element&&this.records[a][k].element.style.display==_$_5e7a[40]){if(this.records[a][k].merged){e=k-this.records[a][k].merged[0];if(!c)break;f=!0}}else{if(c&&f!==g&&!b)break;if(c)e=k;else return k}g=f}return e},Na=function(){var k=function(c,b,d,e){1==c||3==c?ua.attached.call(this,d)||(0<this.options.pagination?this.page(this.whichPage(d)):(1==c?C.pageUp.call(this,1,e):C.pageDown.call(this,
|
|
81
|
+
1,e),ua.attached.call(this,d)||C[_$_5e7a[46]].call(this,d))):I.attached.call(this,b,d)||(0==c?C.pageLeft.call(this,1,e):C.pageRight.call(this,1,e),I.attached.call(this,b,d)||C[_$_5e7a[46]].call(this,d,b))},a=function(c){c.up=a.up;c.down=a.down;c.right=a.right;c.left=a.left;c.last=a.last;c.first=a.first};a.up=function(c,b,d){if(c)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,n=null;if(this.results&&
|
|
82
|
+
(h=this.results.indexOf(h),-1==h)){d=l;break a}for(;0<h;){h--;var q=this.results?this.results[h]:h;if(!1!==this.rows[q].visible){var p=this.records[q][g].v===_$_5e7a[3]?!1:!0;null===n&&(n=p);if(this.records[q][g].element&&this.records[q][g].element.style.display==_$_5e7a[40]){if(this.records[q][g].merged){l=q-this.records[q][g].merged[1];if(!b)break;p=!0}}else if(b&&p!==n&&!d){d=l;break a}else if(b)l=this.records[q][g].merged?q-this.records[q][g].merged[1]:q;else{d=q;break a}n=p}}d=l}d!=f&&(f=d,c?
|
|
83
|
+
(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,1,e,f,b),this.updateSelectionFromCoords(c,d,e,f))};a.down=function(c,b,d){if(c)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,n=null;if(this.results){h=this.results.indexOf(h);if(-1==h){d=l;break a}var q=this.results.length-1}else q=this.rows.length-1;for(;h<q;){h++;var p=this.results?this.results[h]:h;if(!1!==
|
|
84
|
+
this.rows[p].visible){var r=this.records[p][g].v===_$_5e7a[3]?!1:!0;null===n&&(n=r);if(this.records[p][g].element&&this.records[p][g].element.style.display==_$_5e7a[40]){if(this.records[p][g].merged){if(!this.records[p][g].merged[1]&&(l=p,!b))break;r=!0}}else if(b&&r!==n&&!d){d=l;break a}else if(b)l=p;else{d=p;break a}n=r}}d=l}d!=f&&(f=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,3,e,f,b),this.updateSelectionFromCoords(c,d,e,f))};a.right=function(c,b,d){if(c)var e=
|
|
85
|
+
parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ha.call(this,e,f,b,d);d!=e&&(e=d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,2,e,f,b),this.updateSelectionFromCoords(c,d,e,f))};a.left=function(c,b,d){if(c)var e=parseInt(this.selectedCell[2]),f=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),f=parseInt(this.selectedCell[1]);d=Ia.call(this,e,f,b,d);d!=e&&(e=
|
|
86
|
+
d,c?(c=this.selectedCell[0],d=this.selectedCell[1]):(c=e,d=f,e=c,f=d),k.call(this,0,e,f,b),this.updateSelectionFromCoords(c,d,e,f))};a.first=function(c,b){b?a.up.call(this,c,!0,!0):a.left.call(this,c,!0,!0)};a.last=function(c,b){b?a.down.call(this,c,!0,!0):a.right.call(this,c,!0,!0)};return a}(),Oa=function(){return function(k){k.save=Ja;k.fullscreen=Ea;k.setReadOnly=Aa;k.getReadOnly=Aa;k.isReadOnly=Aa;k.setPlugins=function(a){la.call(this.parent,a)};k.showIndex=function(){Ga.call(this,!0)};k.hideIndex=
|
|
87
|
+
function(){Ga.call(this,!1)};k[_$_5e7a[46]]=C[_$_5e7a[46]];k.undo=function(){Q.undo.call(k.parent)};k.redo=function(){Q.redo.call(k.parent)};k.isEditable=function(){return N.call(k.parent,k)};k.dispatch=function(){return B.apply(this.parent,arguments)};k.setViewport=function(a,c){this.options.tableOverflow=!0;a=parseInt(a);c=parseInt(c);100<a&&(this.options.tableWidth=a+_$_5e7a[44],this.content.style.maxWidth=this.options.tableWidth);100<c&&(this.options.tableHeight=parseInt(c)+_$_5e7a[44],this.content.style.maxHeight=
|
|
88
|
+
this.options.tableHeight);this.tbody.innerHTML=_$_5e7a[3];C.call(this);P.refresh.call(this);da.update.call(this.parent,this)}}}(),xa=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:_$_5e7a[53],minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_5e7a[36],csvHeaders:!0,csvDelimiter:_$_5e7a[25],columnSorting:!0,columnDrag:!0,columnResize:!0,
|
|
89
|
+
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:_$_5e7a[54],tableWidth:null,comments:null,meta:null,style:{},freezeColumns:0,orderBy:null,worksheetId:_$_5e7a[3],worksheetName:null,worksheetState:null,
|
|
90
|
+
filters:!1,footers:null,validations:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0},a={application:_$_5e7a[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,tabs:!1,allowDeleteWorksheet:!0,
|
|
91
|
+
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,onselection:null,onbeforecomments:null,
|
|
92
|
+
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,onchangerowid:null,onbeforesearch:null,
|
|
93
|
+
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},c=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},b=function(e){e&&(typeof e==_$_5e7a[17]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||
|
|
94
|
+
(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_5e7a[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=_$_5e7a[56]):this.options.columns[g]=
|
|
95
|
+
{type:_$_5e7a[56]},this.options.columns[g].type==_$_5e7a[57]&&(this.options.columns[g].type=_$_5e7a[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!=_$_5e7a[58]||this.options.columns[g].source||(this.options.columns[g].source=[]),this.options.columns[g].type==_$_5e7a[58]&&this.options.columns[g].url&&
|
|
96
|
+
jSuites.ajax({url:this.options.columns[g].url,index:g,method:_$_5e7a[59],dataType:_$_5e7a[60],worksheet:this,group:this.parent.name,success:function(h){this.worksheet.options.columns[this.index].source=h}})},d=function(e){e.getConfig=d[_$_5e7a[51]];e.setConfig=d[_$_5e7a[11]]};d.spreadsheet=function(e){this.config=c(e,a);1!=this.config.secureFormulas&&console.log(_$_5e7a[61])};d.worksheet=function(e){var f=this;f.options=c(e,k);f.options.csv?jSuites.ajax({url:f.options.csv,method:_$_5e7a[59],dataType:_$_5e7a[56],
|
|
97
|
+
group:f.parent.name,success:function(g){g=A.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:_$_5e7a[56],align:f.options.defaultColAlign,width:f.options.defaultColWidth}),typeof f.options.columns[l].title===_$_5e7a[13]&&(f.options.columns[l].title=h[l]);b.call(f,g)}}):f.options.url?jSuites.ajax({url:f.options.url,method:_$_5e7a[59],dataType:_$_5e7a[60],group:f.parent.name,success:function(g){b.call(f,
|
|
98
|
+
g)}}):b.call(f)};d[_$_5e7a[51]]=function(){return this.options};d[_$_5e7a[11]]=function(e){typeof e==_$_5e7a[17]&&(e=JSON.parse(e));if(this.parent){f=Object.keys(e);for(g=0;g<f.length;g++)typeof k[f[g]]!==_$_5e7a[13]&&(this.options[f[g]]=e[f[g]]);!0===e.filters?Z.show.call(this):!1===e.filters&&Z.hide.call(this);!0===e.search?ma.show.call(this):!1===e.search&&ma.hide.call(this);!0===e.toolbar?da.show.call(this.parent):!1===e.toolbar&&da.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&
|
|
99
|
+
(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));G.call(this,_$_5e7a[62],{data:JSON.stringify(e)})}else for(var f=Object.keys(e),g=0;g<f.length;g++)typeof a[f[g]]!==_$_5e7a[13]&&(this.config[f[g]]=e[f[g]])};return d}(),Q=function(k){k=function(a){if(1!=this.ignoreHistory){var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=a}};k.undo=function(){if(0<=this.historyIndex)var a=
|
|
100
|
+
this.history[this.historyIndex--];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();var b=[];if(a.action==_$_5e7a[63])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+1,a.numOfRows);else if(a.action==_$_5e7a[64])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),I.setAttributes.call(c,a.attributes);else if(a.action==_$_5e7a[65])c.deleteColumn(a.insertBefore?a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_5e7a[66])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,
|
|
101
|
+
a.data,a.extra),I.setAttributes.call(c,a.attributes);else if(a.action==_$_5e7a[67])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_5e7a[68])c.moveColumn(a.newValue,a.oldValue);else if(a.action==_$_5e7a[69])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_5e7a[70])c.setMerge(a.oldValue);else if(a.action==_$_5e7a[71])c.setStyle(a.oldValue,null,null,1);else if(a.action==_$_5e7a[72])c.setStyle(a.oldValue);else if(a.action==_$_5e7a[73])c.setWidth(a.column,a.oldValue);else if(a.action==
|
|
102
|
+
_$_5e7a[74])c.setHeight(a.row,a.oldValue);else if(a.action==_$_5e7a[75])c.setHeader(a.column,a.oldValue);else if(a.action==_$_5e7a[76])c.setComments(a.oldValue);else if(a.action==_$_5e7a[77])c.setProperty(a.column,a.oldValue);else if(a.action==_$_5e7a[78])c.orderBy(a.column,a.direction?0:1,a.oldValue);else if(a.action==_$_5e7a[79]){for(var d=0;d<a.records.length;d++){var e={x:a.records[d].x,y:a.records[d].y,value:a.records[d].oldValue};a.records[d].oldStyle&&(e.style=a.records[d].oldStyle);b.push(e)}c.setValue(b)}else a.action==
|
|
103
|
+
_$_5e7a[80]?c.renameWorksheet(a.index,a.oldValue):a.action==_$_5e7a[81]&&c.moveWorksheet(a.t,a.f);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1;B.call(this,_$_5e7a[82],c,a)}};k.redo=function(){if(this.historyIndex<this.history.length-1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();a.action==_$_5e7a[63]?c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data):a.action==_$_5e7a[64]?c.deleteRow(a.rowNumber,a.numOfRows):
|
|
104
|
+
a.action==_$_5e7a[65]?c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,a.properties,a.data):a.action==_$_5e7a[66]?c.deleteColumn(a.columnNumber,a.numOfColumns):a.action==_$_5e7a[67]?c.moveRow(a.oldValue,a.newValue):a.action==_$_5e7a[68]?c.moveColumn(a.oldValue,a.newValue):a.action==_$_5e7a[69]?c.setMerge(a.newValue):a.action==_$_5e7a[70]?c.removeMerge(a.newValue):a.action==_$_5e7a[71]?c.setStyle(a.newValue,null,null,1):a.action==_$_5e7a[72]?c.resetStyle(a.cells):a.action==_$_5e7a[73]?c.setWidth(a.column,
|
|
105
|
+
a.newValue):a.action==_$_5e7a[74]?c.setHeight(a.row,a.newValue):a.action==_$_5e7a[75]?c.setHeader(a.column,a.newValue):a.action==_$_5e7a[76]?c.setComments(a.newValue):a.action==_$_5e7a[77]?c.setProperty(a.column,a.newValue):a.action==_$_5e7a[78]?c.orderBy(a.column,a.direction,a.newValue):a.action==_$_5e7a[79]?c.setValue(a.records):a.action==_$_5e7a[80]?c.renameWorksheet(a.index,a.newValue):a.action==_$_5e7a[81]&&c.moveWorksheet(a.f,a.t);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=
|
|
106
|
+
!1;B.call(this,_$_5e7a[83],c,a)}};return k}(),la=function(){var k=function(a){var c=null;if(Array.isArray(a))c=a;else if(typeof a==_$_5e7a[84]){c=[];var b=Object.keys(a);for(var d=0;d<b.length;d++)c.push({name:b[d],plugin:a[b[d]],options:{}})}if(c&&c.length)for(d=0;d<c.length;d++){if(c[d].name&&c[d].plugin){var e=c[d].name;var f=c[d].plugin;var g=c[d].options}typeof f===_$_5e7a[85]&&(this.plugins[e]=f.call(t,this,g,this.config),typeof f.license==_$_5e7a[85]&&t.license&&f.license(t.license))}};k.execute=
|
|
107
|
+
function(a,c){if(this.plugins){var b=Object.keys(this.plugins);if(b.length)for(var d=0;d<b.length;d++)if(typeof this.plugins[b[d]][a]==_$_5e7a[85]){var e=this.plugins[b[d]][a].apply(this.plugins[b[d]],c);e&&(a==_$_5e7a[86]&&(c[4]=e),a==_$_5e7a[87]&&(c[0]=e))}return c}};return k}(),aa=function(){var k=function(a){a.getEditor=k[_$_5e7a[51]];a.openEditor=k.open;a.closeEditor=k.close};k[_$_5e7a[51]]=function(a,c){a=Ba.getOptions.call(this,a,c);return[a.type&&typeof a.type==_$_5e7a[84]?a.type:t.editors[a.type],
|
|
108
|
+
a]};k.open=function(a,c,b){if(!N.call(this.parent,this))return!1;if(1!=a.classList.contains(_$_5e7a[18])){var d=parseInt(a.getAttribute(_$_5e7a[42])),e=parseInt(a.getAttribute(_$_5e7a[43]));if(!0===this.options.locked){var f=A.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-=f[1],a=this.records[e][d].element;if(!I.attached.call(this,d,e)){if(this.results&&0<this.results.length)return console.error(_$_5e7a[88]),
|
|
109
|
+
!1;C[_$_5e7a[46]].call(this,e,d)}k.position.call(this,d,e);f=this.parent.input;f.innerText=_$_5e7a[3];B.call(this.parent,_$_5e7a[89],this,a,d,e);c=1==c?_$_5e7a[3]:K.call(this,d,e);var g=k[_$_5e7a[51]].call(this,d,e),h=!0;typeof g[0].openEditor==_$_5e7a[85]&&(!1===g[0].openEditor(a,c,d,e,this,g[1],b)?h=!1:B.call(this.parent,_$_5e7a[90],this,a,d,e,f,g[1]));h&&(1==this.options.textOverflow&&(this.records[e][d].element.style.overflow=_$_5e7a[49],0<d&&(this.records[e][d-1].element.style.overflow=_$_5e7a[49])),
|
|
110
|
+
this.edition=a,f.classList.add(_$_5e7a[91]),1==this.parent.config.editorFormulas&&M(c)&&(f.classList.add(_$_5e7a[92]),U.parse.call(this,f),a=document.createTextNode(_$_5e7a[3]),f.appendChild(a),jSuites.focus(f)))}};k.close=function(a,c){null===a&&(a=this.edition);this.parent.input.classList.contains(_$_5e7a[92])&&U.close.call(this,this.parent.input);var b,d=parseInt(a.getAttribute(_$_5e7a[42])),e=parseInt(a.getAttribute(_$_5e7a[43]));1==this.options.textOverflow&&(b=this.records[e][d+1])&&b.element&&
|
|
111
|
+
b.element.innerText==_$_5e7a[3]&&(this.records[e][d].element.style.overflow=_$_5e7a[3]);b=k[_$_5e7a[51]].call(this,d,e);if(1==c){var f=null;if(typeof b[0].closeEditor==_$_5e7a[85]){var g=b[0].closeEditor(a,!0,d,e,this,b[1]);void 0!==g&&(f=g)}null!==f&&K.call(this,d,e)!=f&&this.setValue(a,f)}else b[0].closeEditor(a,!1,d,e,this,b[1]);B.call(this.parent,_$_5e7a[93],this,a,d,e,f,c);b[1]&&typeof b[1].render==_$_5e7a[85]&&b[1].render.call(this,a,this.records[e][d].v,d,e,this,b[1]);b=this.parent.input;b.onblur&&
|
|
112
|
+
(b.onblur=null);b.children[0]&&b.children[0].onblur&&(b.children[0].onblur=null);b.update&&(b.update=null);aa.build(this.parent);b.removeAttribute(_$_5e7a[94]);b.removeAttribute(_$_5e7a[95]);b.removeAttribute(_$_5e7a[96]);this.edition=b.mask=null;this.refreshBorders()};k.position=function(a,c){var b=null;if(b=this.records[c][a].element){var d=this.parent.element.getBoundingClientRect();b=b.getBoundingClientRect();var e=this.parent.input;e.x=a;e.y=c;0==b.width&&0==b.height?e.style.opacity=_$_5e7a[97]:
|
|
113
|
+
(e.setAttribute(_$_5e7a[98],_$_5e7a[3]),a=b.top-d.top+1,c=b.left-d.left+1,e.style.top=a+_$_5e7a[44],e.style.left=c+_$_5e7a[44],e.style.minWidth=b.width-1+_$_5e7a[44],e.style.minHeight=b.height-1+_$_5e7a[44],setTimeout(function(){e.focus()},0))}};k.build=function(a){a.input||(a.input=document.createElement(_$_5e7a[20]));a.input.className=_$_5e7a[99];a.input.setAttribute(_$_5e7a[100],!0);a.input.innerText=_$_5e7a[3];a.input.oninput=function(c){t.current.parent.config.editorFormulas=!0;M(c.target.innerText)?
|
|
114
|
+
c.target.classList.add(_$_5e7a[92]):c.target.classList.contains(_$_5e7a[92])&&U.close.call(t.current,this)};return a.input};return k}(),B=function(k){if(!this.ignoreEvents){if(typeof this.config.onevent==_$_5e7a[85])var a=this.config.onevent.apply(this,arguments);typeof this.config[k]==_$_5e7a[85]&&(a=this.config[k].apply(this,Array.prototype.slice.call(arguments,1)));la.execute.call(this,_$_5e7a[101],arguments)}return a},pa=function(){var k=function(a){a.sequence=0;a.getNextSequence=k.next;a.getRowId=
|
|
115
|
+
k.getId;a.setRowId=k.setId;a.getRowById=k.getRowById};k[_$_5e7a[51]]=function(){return this.sequence};k[_$_5e7a[11]]=function(a,c){if(a>this.sequence||c)this.sequence=a};k.next=function(){return 1==this.options.sequence?++this.sequence:null};k.reset=function(){this.sequence=0};k.getId=function(a){if(this.rows[a]&&this.rows[a].id)return this.rows[a].id;var c=this.getPrimaryKey();if(!1!==c)return K.call(this,c,a)};k.setId=function(a,c){if(void 0!==c&&0<=parseInt(a)){var b={};b[a]=c}else b=a;a=Object.keys(b);
|
|
116
|
+
if(a.length){for(var d=0;d<a.length;d++)c=b[a[d]],this.rows[a[d]].id=c,k[_$_5e7a[11]].call(this,c);G.call(this,_$_5e7a[102],[b]);B.call(this.parent,_$_5e7a[103],this,b)}};k.getRowById=function(a,c){for(var b=0;b<this.rows.length;b++)if(k.getId.call(this,b)==a)return!0===c?this.rows[b]:this.options.data[b];return!1};return k}(),Ja=function(){var k=function(c){for(var b=[],d={},e=0;e<c.length;e++){var f=c[e].x,g=c[e].y,h=pa.getId.call(this,g);if(!h)if(d[g])h=d[g];else if(h=pa.next.call(this))d[g]=h;
|
|
117
|
+
b[g]||(b[g]={id:h,row:g,data:{}});f=W.call(this,f);b[g].data[f]=c[e].value}pa.setId.call(this,d);return b.filter(function(l){return null!=l})},a=function(c){var b=c[0];if(0<=[_$_5e7a[104],_$_5e7a[105],_$_5e7a[102],_$_5e7a[106]].indexOf(b))return!1;var d={};b==_$_5e7a[79]||b==_$_5e7a[107]?(b=_$_5e7a[108],d[b]=k.call(this,c[1].data)):Array.isArray(c[1])&&1==c[1].length?d[b]=c[1][0]:d[b]=c[1];return d};return function(c,b,d,e){var f=this.parent,g=this;d=null;var h=a.call(this,b);if(h)b=h;else if(!1===
|
|
118
|
+
h)return!1;if(h=B.call(f,_$_5e7a[109],f,g,b))b=h;else if(!1===h)return!1;Fa.call(f,!0);jSuites.ajax({url:c,method:_$_5e7a[110],dataType:_$_5e7a[60],data:{data:JSON.stringify(b)},queue:!0,beforeSend:function(l){d&&l.setRequestHeader(_$_5e7a[111],_$_5e7a[112]+d)},success:function(l){f.element.classList.contains(_$_5e7a[113])&&f.element.classList.remove(_$_5e7a[113]);l&&(l.message&&(l.name=f.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_5e7a[114]+l.message):jSuites.notification(l)),
|
|
119
|
+
l.success?typeof e===_$_5e7a[85]?e(l):l.data&&Array.isArray(l.data)&&I.updateAll.call(g,l.data):l.error&&(alert(_$_5e7a[115]),window.open(window.location.href,_$_5e7a[116])));B.call(f,_$_5e7a[117],f,g,b,l)},error:function(){f.element.classList.add(_$_5e7a[113])}})}}(),G=function(){return function(){la.execute.call(this.parent,_$_5e7a[118],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var k=null;if(this.parent.config.server){var a=this.parent.worksheets.indexOf(this);k=this.parent.config.server;
|
|
120
|
+
k=-1==k.indexOf(_$_5e7a[119])?k+(_$_5e7a[120]+a):k+(_$_5e7a[121]+a)}else this.options.persistence&&(k=typeof this.options.persistence==_$_5e7a[17]?this.options.persistence:this.options.url);k&&Ja.call(this,k,arguments)}}}(),ya=function(k){if(this.selectedCell){var a=this.selectedCell[0],c=this.selectedCell[1];this.records&&this.records[c]&&this.records[c][a]&&this.records[c][a].element||(this.selectedCell=this.getHighlighted(),a=this.selectedCell[0],c=this.selectedCell[1]);var b=this.getHighlighted(),
|
|
121
|
+
d=b[0],e=b[1],f=b[2];b=b[3];k=k?_$_5e7a[122]:_$_5e7a[123];if(this.records[c]&&this.records[c][a]&&this.records[c][a].element)this.records[c][a].element.classList[k](_$_5e7a[124]);for(a=d;a<=f;a++)if(this.headers[a])this.headers[a].classList[k](_$_5e7a[125]);for(;e<=b;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[k](_$_5e7a[125])}},ta=function(){var k=function(a){a.resetSelection=k.reset;a.updateSelection=k.fromElements;a.updateSelectionFromCoords=k[_$_5e7a[11]];a.selectAll=
|
|
122
|
+
k.all;a.isSelected=k.isSelected;a.getHighlighted=k.getHighlighted;a.getRange=k.getRange};k.getHighlighted=function(){var a=this.borders;return(a=a.main)?[a.x1,a.y1,a.x2,a.y2]:null};k.isSelected=function(a,c,b){if(!b&&(b=this.getHighlighted(),!b))return!1;var d=b[0],e=b[1],f=b[2];b=b[3];f||(f=d);b||(b=e);return null==a?c>=e&&c<=b:null==c?a>=d&&a<=f:a>=d&&a<=f&&c>=e&&c<=b};k.reset=function(){if(this.selectedCell)a=1,this.edition&&aa.close.call(this,this.edition,!0),this.resetBorders(_$_5e7a[126],!0),
|
|
123
|
+
this.resetBorders(_$_5e7a[127],!0),this.selectedCell=null,1==a&&B.call(this.parent,_$_5e7a[128],this);else var a=0;return a};k.refresh=function(){this.selectedCell&&k[_$_5e7a[11]].call(this,this.selectedCell)};k.isValid=function(a,c,b,d){return!(a>=this.options.columns.length||c>=this.rows.length||b>=this.options.columns.length||d>=this.rows.length)};k[_$_5e7a[11]]=function(a,c,b,d,e,f,g){f||(f=_$_5e7a[126]);Array.isArray(a)&&(d=a[3],b=a[2],c=a[1],a=a[0]);null==b&&(b=a);null==d&&(d=c);if(!k.isValid.call(this,
|
|
124
|
+
a,c,b,d))return!1;if(null!=a){if(parseInt(a)<parseInt(b))var h=parseInt(a),l=parseInt(b);else h=parseInt(b),l=parseInt(a);if(parseInt(c)<parseInt(d))var n=parseInt(c),q=parseInt(d);else n=parseInt(d),q=parseInt(c);var p;var r={};if(this.options.mergeCells){for(var w=n;w<=q;w++)for(var m=h;m<=l;m++)if(p=this.records[w][m].merged)p=A.getColumnNameFromCoords(m-p[0],w-p[1]),r[p]=!0;w=Object.keys(r);if(w.length)for(m=0;m<w.length;m++)p=A.getCoordsFromColumnName(w[m]),r=this.options.mergeCells[w[m]],p[0]<
|
|
125
|
+
h&&(h=p[0]),p[0]+r[0]-1>l&&(l=p[0]+r[0]-1),p[1]<n&&(n=p[1]),p[1]+r[1]-1>q&&(q=p[1]+r[1]-1)}}f==_$_5e7a[126]&&(this.selectedCell?(ya.call(this,!1),p=1):p=0,this.selectedCell=[a,c,b,d],this.records[d][b].element&&C.isVisible.call(this,this.records[d][b].element),aa.position.call(this,a,c),0==p&&B.call(this.parent,_$_5e7a[129],this),da.update.call(this.parent,t.current,this.selectedCell));ea[_$_5e7a[11]].call(this,h,n,l,q,f,g);f==_$_5e7a[126]&&(la.execute.call(this.parent,_$_5e7a[130],[this,h,n,l,q,
|
|
126
|
+
e]),B.call(this.parent,_$_5e7a[131],this,h,n,l,q,e))};k.fromElements=function(a,c,b){var d=a.getAttribute(_$_5e7a[42]);a=a.getAttribute(_$_5e7a[43]);if(c){var e=c.getAttribute(_$_5e7a[42]);c=c.getAttribute(_$_5e7a[43])}else e=d,c=a;this.updateSelectionFromCoords(d,a,e,c,b)};k.all=function(){k[_$_5e7a[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};k.getRange=function(){var a=this.selectedCell;if(!a)return _$_5e7a[3];var c=A.getColumnNameFromCoords(a[0],a[1]);a=A.getColumnNameFromCoords(a[2],
|
|
127
|
+
a[3]);var b=this.options.worksheetName;b=-1!=b.indexOf(_$_5e7a[132])?_$_5e7a[133]+b+_$_5e7a[134]:b+_$_5e7a[135];return c==a?b+c:b+c+_$_5e7a[136]+a};return k}(),ea=function(){var k=function(b){b.borders=[];b.setBorder=k[_$_5e7a[11]];b.getBorder=k[_$_5e7a[51]];b.resetBorders=k.reset;b.refreshBorders=k.refresh};k[_$_5e7a[51]]=function(b){return this.borders[b]};var a=function(b,d,e,f,g,h){g||(g=0);if(!ta.isValid.call(this,b,d,e,f))return!1;if(this.borders[g])l=this.borders[g];else{var l={};l.element=
|
|
128
|
+
document.createElement(_$_5e7a[20]);l.element.classList.add(_$_5e7a[137]);g==_$_5e7a[127]||g==_$_5e7a[138]||g==_$_5e7a[126]?l.element.classList.add(_$_5e7a[139]+g):(h=h?h:jSuites.randomColor(!0),l.color=h,l.element.style.backgroundColor=h+_$_5e7a[140],l.element.style.borderColor=h);this.content.appendChild(l.element)}l.x1=b;l.y1=d;l.x2=e;l.y2=f;h=this.headers[b]?this.headers[b].offsetLeft:0;var n=this.headers[e]?this.headers[e].offsetLeft:0,q=this.rows[d].element?this.rows[d].element.offsetTop:0,
|
|
129
|
+
p=this.rows[f].element?this.rows[f].element.offsetTop:0;l.element.style.top=_$_5e7a[141];l.element.style.left=_$_5e7a[141];l.active=0;var r=this.options.freezeColumns||0,w=!1,m=null,v=null,u=null,x=null;this.tbody.firstChild&&(v=parseInt(this.tbody.firstChild.getAttribute(_$_5e7a[43])),x=parseInt(this.tbody.lastChild.getAttribute(_$_5e7a[43])));this.thead.lastChild&&(m=parseInt(this.thead.lastChild.children[r+1].getAttribute(_$_5e7a[42])),u=parseInt(this.thead.lastChild.lastChild.getAttribute(_$_5e7a[42])),
|
|
130
|
+
this.thead.lastChild.children[1].style.display==_$_5e7a[40]&&(m=Ha.call(this,m,v)),this.thead.lastChild.lastChild.style.display==_$_5e7a[40]&&(u=Ia.call(this,u,x)));null==m||e<m&&b>=r||b>u||f<v||d>x||(h?l.element.style.borderLeftColor=l.color?l.color:_$_5e7a[3]:(h=this.thead.lastChild.children[r+1].offsetLeft,l.element.style.borderLeftColor=g==_$_5e7a[127]?_$_5e7a[142]:_$_5e7a[143]),n?(n+=this.headers[e].offsetWidth,l.element.style.borderRightColor=l.color?l.color:_$_5e7a[3]):(e>u?(n=this.headers[u].offsetLeft+
|
|
131
|
+
this.headers[u].offsetWidth,w=!0):n=this.thead.lastChild.children[r].offsetLeft+this.thead.lastChild.children[r].offsetWidth,l.element.style.borderRightColor=g==_$_5e7a[127]?_$_5e7a[142]:_$_5e7a[143]),n=n-h-1,q?l.element.style.borderTopColor=l.color?l.color:_$_5e7a[3]:(q=this.tbody.firstChild.offsetTop,l.element.style.borderTopColor=g==_$_5e7a[127]?_$_5e7a[142]:_$_5e7a[143]),p?(p+=this.rows[f].element.offsetHeight,l.element.style.borderBottomColor=l.color?l.color:_$_5e7a[3]):(p=this.rows[x].element.offsetTop+
|
|
132
|
+
this.rows[x].element.offsetHeight,l.element.style.borderBottomColor=g==_$_5e7a[127]?_$_5e7a[142]:_$_5e7a[143],w=!0),p=p-q-1,this.options.freezeColumns&&(l.element.style.borderLeftWidth=_$_5e7a[3],l.element.style.borderRightWidth=_$_5e7a[3],d=0<this.content.scrollLeft?ja.getWidth.call(this):0)&&(b=b<this.options.freezeColumns,e=e<this.options.freezeColumns,b&&e||!b&&e||(b&&!e?(e=d+this.content.scrollLeft,e>h+n&&(l.element.style.borderRightWidth=_$_5e7a[144],n+=e-(h+n))):(e=d+this.content.scrollLeft,
|
|
133
|
+
e>h&&(e-=h,e>n?h=q=-2E3:(h=h+e+1,n-=e,l.element.style.borderLeftWidth=_$_5e7a[144]))))),l.element.style.top=q+_$_5e7a[44],l.element.style.left=h+_$_5e7a[44],l.element.style.width=n+_$_5e7a[44],l.element.style.height=p+_$_5e7a[44],l.t=q,l.l=h,l.w=n,l.h=p,l.active=1);g==_$_5e7a[126]&&(l.active&&1!=w?(this.corner.style.top=q+p-2+_$_5e7a[44],this.corner.style.left=h+n-2+_$_5e7a[44]):(this.corner.style.top=_$_5e7a[141],this.corner.style.left=_$_5e7a[141]));this.borders[g]=l},c=function(b,d){b.element.style.top=
|
|
134
|
+
_$_5e7a[141];b.element.style.left=_$_5e7a[141];b.active=0;d&&(b.x1=null,b.y1=null,b.x2=null,b.y2=null)};k[_$_5e7a[11]]=function(b,d,e,f,g,h){a.call(this,b,d,e,f,g,h);g==_$_5e7a[126]&&(ya.call(this,!0),G.call(this,_$_5e7a[104],{x1:b,y1:d,x2:e,y2:f}))};k.reset=function(b,d){b&&b!=_$_5e7a[126]||(this.corner.style.top=_$_5e7a[141],this.corner.style.left=_$_5e7a[141],ya.call(this,!1));if(b)this.borders[b]&&c(this.borders[b],d);else{d=Object.keys(this.borders);for(var e=0;e<d.length;e++)c(this.borders[d[e]])}b&&
|
|
135
|
+
b!=_$_5e7a[126]||G.call(this,_$_5e7a[105])};k.refresh=function(b){var d=this.borders;if(b)d[b]&&null!=d[b].x1&&a.call(this,d[b].x1,d[b].y1,d[b].x2,d[b].y2,b);else{b=Object.keys(d);for(var e=0;e<b.length;e++)d[b[e]]&&null!=d[b[e]].x1&&a.call(this,d[b[e]].x1,d[b[e]].y1,d[b[e]].x2,d[b[e]].y2,b[e])}this.edition&&(d=this.parent.input,aa.position.call(this,d.x,d.y))};k.destroy=function(b){var d;if(d=this.borders[b])d.element.remove(),delete this.borders[b]};return k}(),Pa=function(){var k=function(a){a.setGroup=
|
|
136
|
+
k[_$_5e7a[11]];a.unsetGroup=k.unset};k[_$_5e7a[11]]=function(a,c,b){0==a&&(b=document.createElement(_$_5e7a[145]),b.classList.add(_$_5e7a[146]),this.thead.insertBefore(b,this.thead.firstChild),a=document.createElement(_$_5e7a[147]),a.innerHTML=_$_5e7a[148],b.appendChild(a),a=document.createElement(_$_5e7a[147]),b.appendChild(a),c=this.headers[c])&&(c=c.querySelector(_$_5e7a[149]),c||(c=document.createElement(_$_5e7a[20]),c.classList.add(_$_5e7a[150]),c.innerText=_$_5e7a[151],a.appendChild(c)))};k.unset=
|
|
137
|
+
function(a,c){};return k}(),sa=function(){var k={start:function(a){if(!N.call(this.parent,this))return!1;if(null!==a.target.getAttribute(_$_5e7a[43])){var c=a.target.getAttribute(_$_5e7a[43]);k.event={y:parseInt(c),h:a.target.offsetHeight,p:a.pageY}}else null!==a.target.getAttribute(_$_5e7a[42])&&(c=a.target.getAttribute(_$_5e7a[42]),k.event={x:parseInt(c),w:a.target.offsetWidth,p:a.pageX})},end:function(a){var c=[];if(null!=k.event.y){var b=parseInt(this.rows[k.event.y].element.offsetHeight);var d=
|
|
138
|
+
this.getSelectedRows(!0);a=d.indexOf(parseInt(k.event.y));if(d.length&&-1<a)for(var e=0;e<d.length;e++)c.push(parseInt(this.rows[d[e]].element.offsetHeight));else d=[];-1==a?(d.push(k.event.y),c.push(k.event.h)):c[a]=k.event.h;this.setHeight(d,b,c)}else if(null!=k.event.x){b=parseInt(this.colgroup[k.event.x].getAttribute(_$_5e7a[152]));d=this.getSelectedColumns();a=d.indexOf(parseInt(k.event.x));if(d.length&&-1<a)for(e=0;e<d.length;e++)c.push(parseInt(this.options.columns[d[e]].width));else d=[];
|
|
139
|
+
-1==a?(d.push(k.event.x),c.push(k.event.w)):c[a]=k.event.w;this.setWidth(d,b,c)}k.event=null},update:function(a){null!=k.event.y?(a=a.pageY-k.event.p,0<k.event.h+a&&(this.rows[k.event.y].element.style.height=k.event.h+a+_$_5e7a[44],this.refreshBorders())):null!=k.event.x&&(a=a.pageX-k.event.p,0<k.event.w+a&&(this.colgroup[k.event.x].setAttribute(_$_5e7a[152],k.event.w+a),0<this.options.freezeColumns&&ja[_$_5e7a[11]].call(this),this.refreshBorders()))},cancel:function(){k.end.call(this)}};return k}(),
|
|
140
|
+
Ka=function(){var k={start:function(a){var c=this.parent.helper;a=parseInt(a.target.getAttribute(_$_5e7a[42]));if(this.merged.cols[a])console.error(_$_5e7a[153]);else{k.event={x:a,d:a};this.headers[a].classList.add(_$_5e7a[154]);for(var b=0;b<this.tbody.children.length;b++){var d=this.tbody.children[b].getAttribute(_$_5e7a[43]);this.records[d][a].element.classList.add(_$_5e7a[154])}b=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();d=this.content.getBoundingClientRect();
|
|
141
|
+
c.style.display=_$_5e7a[16];c.style.top=d.top-b.top+_$_5e7a[44];c.style.left=a.left-d.left+_$_5e7a[44];c.style.width=_$_5e7a[155];c.style.height=d.height+_$_5e7a[44];c.classList.add(_$_5e7a[156])}},end:function(){this.headers[k.event.x].classList.remove(_$_5e7a[154]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_5e7a[43]);this.records[c][k.event.x].element.classList.remove(_$_5e7a[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
142
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_5e7a[156]);this.parent.helper.style.display=_$_5e7a[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(a){var c=a.target.getAttribute(_$_5e7a[42]);if(null!=c)if(c=parseInt(c),this.merged.cols[c])console.error(_$_5e7a[153]);else{a=a.target.clientWidth/2>a.offsetX;k.event.d=a?k.event.x<c?parseInt(c)-1:parseInt(c):k.event.x>c?parseInt(c)+1:parseInt(c);c=this.headers[c].getBoundingClientRect();var b=
|
|
143
|
+
this.content.getBoundingClientRect();this.parent.helper.style.left=(a?c.left:c.right)-b.left+_$_5e7a[44]}}};return k}(),na=function(){var k={start:function(a){if(N.call(this.parent,this)){this.resetSelection();var c=this.parent.helper;if(null!==a.target.getAttribute(_$_5e7a[43])){var b=parseInt(a.target.getAttribute(_$_5e7a[43]));this.merged.rows[b]?console.error(_$_5e7a[157]):this.results?console.error(_$_5e7a[158]):(k.event={y:b,d:b},this.rows[b].element.classList.add(_$_5e7a[154]),a=this.parent.element.getBoundingClientRect(),
|
|
144
|
+
b=this.rows[b].element.getBoundingClientRect(),c.style.display=_$_5e7a[16],c.style.top=b.top-a.top+_$_5e7a[44],c.style.left=_$_5e7a[159],c.style.width=this.content.offsetWidth-50+_$_5e7a[44],c.style.height=_$_5e7a[155],c.classList.add(_$_5e7a[160]))}else if(null!==a.target.getAttribute(_$_5e7a[42]))if(b=parseInt(a.target.getAttribute(_$_5e7a[42])),this.merged.cols[b])console.error(_$_5e7a[153]);else{k.event={x:b,d:b};this.headers[b].classList.add(_$_5e7a[154]);for(a=0;a<this.tbody.children.length;a++){var d=
|
|
145
|
+
this.tbody.children[a].getAttribute(_$_5e7a[43]);this.records[d][b].element.classList.add(_$_5e7a[154])}a=this.parent.element.getBoundingClientRect();b=this.headers[b].getBoundingClientRect();d=this.content.getBoundingClientRect();c.style.display=_$_5e7a[16];c.style.top=d.top-a.top+_$_5e7a[44];c.style.left=b.left-d.left+_$_5e7a[44];c.style.width=_$_5e7a[155];c.style.height=d.height+_$_5e7a[44];c.classList.add(_$_5e7a[156])}}else return!1},end:function(){if(null!=k.event.y)this.rows[k.event.y].element.classList.remove(_$_5e7a[154]),
|
|
146
|
+
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(_$_5e7a[160]);else if(null!=k.event.x){this.headers[k.event.x].classList.remove(_$_5e7a[154]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_5e7a[43]);this.records[c][k.event.x].element.classList.remove(_$_5e7a[154])}null!=k.event.d&&k.event.x!=k.event.d&&(this.moveColumn(k.event.x,
|
|
147
|
+
k.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_5e7a[156])}this.parent.helper.style.display=_$_5e7a[3];k.event=null},cancel:function(){k.event.d=null;k.end.call(this)},update:function(a){if(null!=k.event.y){var c=a.target.getAttribute(_$_5e7a[43]);if(null!=c){var b=c=parseInt(c),d=a.target.clientHeight/2>a.offsetY;d?k.event.y<c&&(b=c-1):k.event.y>c&&(b=c+1);a=!1;this.merged.rows[b]&&(k.event.y>b?this.merged.rows[b-1]&&(a=!0):this.merged.rows[b+1]&&(a=!0));a||(k.event.d=b,
|
|
148
|
+
b=this.parent.element.getBoundingClientRect(),c=this.rows[c].element.getBoundingClientRect(),this.parent.helper.style.top=(d?c.top:c.bottom)-b.top+_$_5e7a[44])}}else d=a.target.getAttribute(_$_5e7a[42]),null!=d&&(b=d=parseInt(d),(c=a.target.clientWidth/2>a.offsetX)?k.event.x<d&&(b=d-1):k.event.x>d&&(b=d+1),a=!1,this.merged.cols[b]&&(k.event.x>b?this.merged.cols[b-1]&&(a=!0):this.merged.cols[b+1]&&(a=!0)),a||(k.event.d=b,b=this.headers[d].getBoundingClientRect(),d=this.content.getBoundingClientRect(),
|
|
149
|
+
this.parent.helper.style.left=(c?b.left:b.right)-d.left+_$_5e7a[44]))}};return k}(),Y=function(){var k=function(a){a.getMerge=k[_$_5e7a[51]];a.setMerge=k[_$_5e7a[11]];a.updateMerge=k.update;a.removeMerge=k.remove;a.destroyMerged=a.destroyMerge=k.destroy};k.getHeight=function(a,c){var b,d=1;if(this.merged.rows[a])for(var e=0;e<this.options.columns.length;e++){var f=A.getColumnNameFromCoords(e,a);if(f=this.merged.cells[f])if(b=this.options.mergeCells[f])c&&void 0!==c[f]||(b[1]>d&&(d=b[1]),c&&(c[f]=
|
|
150
|
+
this.records[a][e].element&&!this.records[a][e].merged?!0:!1))}return d-1};k.getWidth=function(a,c){var b,d=1;if(this.merged.cols[a])for(var e=0;e<this.options.data.length;e++){var f=A.getColumnNameFromCoords(a,e);if(f=this.merged.cells[f])if(b=this.options.mergeCells[f])c&&void 0!==c[f]||(b[0]>d&&(d=b[0]),c&&(c[f]=this.records[e][a].element&&!this.records[e][a].merged?!0:!1))}return d-1};k[_$_5e7a[51]]=function(a){return a?this.options.mergeCells[a]:this.options.mergeCells};k[_$_5e7a[11]]=function(a,
|
|
151
|
+
c,b){if(!N.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var d,e=null,f={},g={},h={},l=!1;typeof a==_$_5e7a[17]?h[a]=[c,b]:typeof a==_$_5e7a[84]?h=a:((e=this.getHighlighted())?e=[A.getColumnNameFromCoords(e[0],e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:z(_$_5e7a[161])}),e=!1),e&&(h[e[0]]=[e[1],e[2]]));c=Object.keys(h);if(c.length){for(b=0;b<c.length;b++){var n=c[b],q=h[c[b]][0],p=h[c[b]][1];q=parseInt(q);p=parseInt(p);if((!q||2>q)&&(!p||2>
|
|
152
|
+
p))console.log(z(_$_5e7a[162])+_$_5e7a[136]+n);else if(this.options.mergeCells[n])g[n]=[q,p],f[n]=this.options.mergeCells[n],k.update.call(this,n,q,p);else{e=A.getCoordsFromColumnName(n);for(var r=e[1];r<e[1]+p;r++)for(var w=e[0];w<e[0]+q;w++)a=A.getColumnNameFromCoords(w,r),(d=this.merged.cells[a])&&this.options.mergeCells[d]&&(f[d]=this.options.mergeCells[d],k.applyDestroy.call(this,d));g[n]=this.options.mergeCells[n]=[q,p];k.applyCreate.call(this,n);I.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(g).length&&
|
|
153
|
+
(l&&C[_$_5e7a[46]].call(this,e[1],e[0]),Q.call(this.parent,{worksheet:this,action:_$_5e7a[69],newValue:g,oldValue:f}),G.call(this,_$_5e7a[69],[g]),k.build.call(this),ta.refresh.call(this),ea.refresh.call(this),B.call(this.parent,_$_5e7a[163],this,g,f))}};k.update=function(a,c,b){var d=this.options.mergeCells;if(d[a]){var e=d[a][1];if(c!==d[a][0]||e!==b)k.applyDestroy.call(this,a),c&&b&&(d[a]=[c,b],k.applyCreate.call(this,a))}};k.remove=function(a,c){if(!N.call(this.parent,this))return!1;c={};var b=
|
|
154
|
+
{},d={};typeof a==_$_5e7a[17]?d[a]=!0:typeof a==_$_5e7a[84]&&(d=a);a=Object.keys(d);for(d=0;d<a.length;d++)this.options.mergeCells[a[d]]&&(c[a[d]]=this.options.mergeCells[a[d]],b[a[d]]=!0,k.applyDestroy.call(this,a[d],!0));Q.call(this.parent,{worksheet:this,action:_$_5e7a[70],newValue:b,oldValue:c});G.call(this,_$_5e7a[70],{data:b})};k.destroy=function(){k.remove.call(this,this.options.mergeCells,!0)};k.applyCreate=function(a,c){var b=this.options.mergeCells;if(b[a]){var d=b[a][0]||1,e=b[a][1]||1;
|
|
155
|
+
a=A.getCoordsFromColumnName(a);if(!this.records[a[1]][a[0]].merged||1==c)if(b=I[_$_5e7a[51]].call(this,a[0],a[1])){b.style.display=_$_5e7a[3];1<d?b.setAttribute(_$_5e7a[52],d):b.removeAttribute(_$_5e7a[52]);1<e?b.setAttribute(_$_5e7a[164],e):b.removeAttribute(_$_5e7a[164]);1==this.options.textOverflow&&(b.style.overflow=_$_5e7a[49]);for(var f=0;f<e;f++)for(var g=0;g<d;g++){c=a[0]+g;var h=a[1]+f;if(b=this.records[h][c])if(b.merged=[g,f,b.v,b.v],0!=g||0!=f)b.element||I[_$_5e7a[51]].call(this,c,h),b.element.style.display=
|
|
156
|
+
_$_5e7a[40],b.merged[3]=b.element.innerText,b.element.innerText=_$_5e7a[3],K.call(this,c,h,_$_5e7a[3])}}}};k.applyDestroy=function(a,c){var b=this.options.mergeCells;if(b[a]){var d=A.getCoordsFromColumnName(a),e=d[0];d=d[1];var f=b[a][0],g=b[a][1];delete this.options.mergeCells[a];for(a=0;a<g;a++)for(var h=0;h<f;h++)if(b=this.records[d+a][e+h])b.element&&(0==h&&0==a?(b.element.removeAttribute(_$_5e7a[52]),b.element.removeAttribute(_$_5e7a[164])):(b.element.style.display=_$_5e7a[3],1==c&&(K.call(this,
|
|
157
|
+
e+h,d+a,b.merged[2]),b.element.innerHTML=b.merged[3]))),b.merged&&delete b.merged}};k.updateConfig=function(a,c,b,d){if(1==c)var e=[b];else{e=[];for(var f=b;f<b+d;f++)e.push(f)}var g=this.options.mergeCells,h=Object.keys(g),l={};for(f=0;f<h.length;f++){b=A.getCoordsFromColumnName(h[f]);for(var n=b[a];n<b[a]+g[h[f]][a];n++)-1!==e.indexOf(n)&&(l[h[f]]||(l[h[f]]=[g[h[f]][0],g[h[f]][1]],1==c&&(l[h[f]][a]+=d)),0==c&&l[h[f]][a]--)}h=Object.keys(l);for(f=0;f<h.length;f++)k.update.call(this,h[f],l[h[f]][0],
|
|
158
|
+
l[h[f]][1]);k.build.call(this)};k.build=function(){var a=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(a)for(var c=Object.keys(a),b=0;b<c.length;b++){for(var d=A.getCoordsFromColumnName(c[b]),e=parseInt(a[c[b]][0]),f=parseInt(a[c[b]][1]),g=0;g<e;g++)this.merged.cols[d[0]+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=A.getColumnNameFromCoords(d[0]+g,d[1]+h);this.merged.cells[l]=c[b]}}};k.batch=function(a){var c=Object.keys(a);if(c.length)for(var b=
|
|
159
|
+
0;b<c.length;b++)!1===a[c[b]]&&k.applyCreate.call(this,c[b])};return k}(),wa=function(){var k=function(a){a.getHeader=k[_$_5e7a[51]];a.setHeader=k[_$_5e7a[11]];a.getHeaders=k.all};k[_$_5e7a[51]]=function(a){var c;if(c=this.options.columns)return c[a].title||A.getColumnName(a)};k.all=function(a){for(var c=[],b=0;b<this.options.columns.length;b++)c.push(k[_$_5e7a[51]].call(this,b));return a?c:c.join(this.options.csvDelimiter)};k[_$_5e7a[11]]=function(a,c){if(!N.call(this.parent,this))return!1;var b;
|
|
160
|
+
if(b=this.options.columns[a]){var d=k[_$_5e7a[51]].call(this,a);if(!c&&(c=prompt(z(_$_5e7a[165]),d),!c))return!1;b.title=c;if(b=this.headers[a])b.innerHTML=c,b.setAttribute(_$_5e7a[166],c);Q.call(this.parent,{worksheet:this,action:_$_5e7a[75],column:a,oldValue:d,newValue:c});G.call(this,_$_5e7a[75],{column:a,title:c});B.call(this.parent,_$_5e7a[167],this,a,c,d)}};k.create=function(a){var c=this.options.columns[a],b=c.width||this.options.defaultColWidth,d=c.align||_$_5e7a[53],e=c.title||A.getColumnName(a),
|
|
161
|
+
f=document.createElement(_$_5e7a[147]);this.parent.config.stripHTML?f.innerText=e:f.innerHTML=e;f.setAttribute(_$_5e7a[42],a);f.style.textAlign=d;c.title&&f.setAttribute(_$_5e7a[166],f.innerText);c.tooltip&&(f.title=c.tooltip);d=this.options.filters;!0===c.filter&&(d=!0);!1===c.filter&&(d=!1);!0===d&&f.classList.add(_$_5e7a[168]);!1===c.visible&&(b=_$_5e7a[97]);d=document.createElement(_$_5e7a[169]);d.setAttribute(_$_5e7a[152],b);c.type==_$_5e7a[49]&&(f.style.display=_$_5e7a[40],d.style.display=_$_5e7a[40]);
|
|
162
|
+
this.headers[a]=f;this.colgroup[a]=d};return k}(),X=function(){var k=function(c,b,d){var e=this.footers.content,f;e&&e[b]&&e[b][c]&&(f=e[b][c].element)&&(M(d)&&1==this.parent.config.parseFormulas?d=S.execute.call(this,d,c,null,!1):d||(e=this.options.footers,d=e[b]&&e[b][c]?e[b][c]:_$_5e7a[3]),this.options.applyMaskOnFooters&&(e=aa[_$_5e7a[51]].call(this,c),d=t.editors.general.parseValue(c,b,d,this,e[1],f)),d instanceof Element||d instanceof HTMLDocument?(f.innerHTML=_$_5e7a[3],f.appendChild(d)):1==
|
|
163
|
+
this.parent.config.stripHTML?f.innerText=d:f.innerHTML=d)},a=function(c){c.getFooter=a[_$_5e7a[51]];c.setFooter=a[_$_5e7a[11]];c.resetFooter=a.reset;c.refreshFooter=a.refresh;c.getFooterValue=a.value;c.setFooterValue=a.value};a[_$_5e7a[51]]=function(){return this.options.footers};a[_$_5e7a[11]]=function(c){if(c){var b=this.options.footers;this.options.footers=c}this.options.footers!=b&&(X.build.call(this),C.limited.call(this)?C.refresh.call(this):a.render.call(this),G.call(this,_$_5e7a[170],{data:this.options.footers}),
|
|
164
|
+
B.call(this.parent,_$_5e7a[171],this,this.options.footers,b))};a.refresh=function(){var c=this.options.footers;if(c&&c.length)for(var b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++)k.call(this,d,b,c[b][d])};a.value=function(c,b,d){if(void 0===d)return this.options.footers[b][c];k.call(this,c,b,d);G.call(this,_$_5e7a[172],{x:c,y:b,value:d});B.call(this.parent,_$_5e7a[173],this,c,b,d)};a.reset=function(){var c=this.options.footers;this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=
|
|
165
|
+
_$_5e7a[3];G.call(this,_$_5e7a[174],{});B.call(this.parent,_$_5e7a[171],this,null,c)};a.create=function(c,b){var d=this.footers.content[b][c];if(d&&d.element)return d.element;d=this.footers.content[b][c]={};var e=this.options.columns[c].align?this.options.columns[c].align:_$_5e7a[53];d.element=document.createElement(_$_5e7a[147]);d.element.style.textAlign=e;d.element.setAttribute(_$_5e7a[42],c);d.element.setAttribute(_$_5e7a[43],b);k.call(this,c,b,null);this.options.columns[c].type==_$_5e7a[49]&&
|
|
166
|
+
(d.element.style.display=_$_5e7a[40]);return d.element};a.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers)for(var c=0;c<this.options.footers.length;c++){if(!this.footers.content[c]){this.footers.content[c]=[];var b=document.createElement(_$_5e7a[145]),d=document.createElement(_$_5e7a[147]);d.innerHTML=_$_5e7a[148];b.appendChild(d);this.footers.element.appendChild(b)}for(b=0;b<this.options.columns.length;b++)this.options.footers[c][b]||(this.options.footers[c][b]=
|
|
167
|
+
_$_5e7a[3]),this.footers.content[c][b]||(this.footers.content[c][b]={})}};a.render=function(){for(var c=this.options.footers,b=0;b<c.length;b++)for(var d=0;d<c[b].length;d++){var e=X.create.call(this,d,b);this.tfoot.children[b].appendChild(e)}};a.adjust=function(c,b,d){var e=[],f=this.options.footers,g=this.footers.content;if(f)if(1==d){if(this.headers[c]&&this.headers[c].parentNode)var h=this.headers[c]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(d=0;d<f.length;d++){for(var n=f[d].splice(c),q=
|
|
168
|
+
c;q<c+b;q++)f[d][q]=_$_5e7a[3];f[d]=f[d].concat(n);n=g[d].splice(c);for(q=c;q<c+b;q++)g[d][q]={element:a.create.call(this,q,d)},l&&(1==h?this.tfoot.children[d].appendChild(g[d][q].element):this.tfoot.children[d].insertBefore(g[d][q].element,this.tfoot.children[d].children[c].nextSibling));g[d]=g[d].concat(n)}}else for(d=0;d<f.length;d++){for(q=c;q<c+b;q++)(h=this.footers.content[d][q].element)&&h.parentNode&&h.parentNode.removeChild(h);g[d].splice(c,b);e[d]=f[d].splice(c,b)}return e};return a}(),
|
|
169
|
+
ka=function(){var k=function(a){a.setNestedCell=k.cell;a.getNestedCell=k.cell;a.setNestedHeaders=k[_$_5e7a[11]];a.getNestedHeaders=k[_$_5e7a[51]];a.resetNestedHeaders=k.reset};k[_$_5e7a[51]]=function(){return this.options.nestedHeaders};k[_$_5e7a[11]]=function(a){k.reset.call(this);this.options.nestedHeaders=a;k.build.call(this);k.render.call(this);ea.refresh.call(this);P.call(this);G.call(this,_$_5e7a[175],{data:a});B.call(this.parent,_$_5e7a[176],this,a)};k.reset=function(){var a=[],c=this.thead.children;
|
|
170
|
+
this.options.nestedHeaders=null;for(var b=0;b<c.length;b++)c[b].classList.contains(_$_5e7a[177])&&a.push(c[b]);if(a.length)for(;c=a.shift();)c.remove();this.nested=null;ea.refresh.call(this);P.call(this);G.call(this,_$_5e7a[178]);B.call(this.parent,_$_5e7a[176],this,[])};k.cell=function(a,c,b){if(b){if(!N.call(this.parent,this))return!1;var d=this.options.nestedHeaders[c][a],e=this.nested.content[c][a].element;void 0!==b.title&&(e.innerText=b.title);void 0!==b.tooltip&&(e.title=b.tooltip);void 0!==
|
|
171
|
+
b.colspan&&(d.colspan=b.colspan,e.setAttribute(_$_5e7a[52],b.colspan),e.style.display=0==d.colspan?_$_5e7a[40]:_$_5e7a[3]);G.call(this,_$_5e7a[179],{x:a,y:c,properties:b});B.call(this.parent,_$_5e7a[180],this,a,c,b)}else return this.nested.content[c][a].element};k.range=function(a){a=this.options.nestedHeaders[a];for(var c=[],b=0,d=0;d<a.length;d++){var e=parseInt(a[d].colspan);c[d]=[b,b+e-1];b+=e}return c};k.getColumns=function(a){a=this.options.nestedHeaders[a];for(var c=[],b=0;b<a.length;b++)for(var d=
|
|
172
|
+
a[b].colspan,e=0;e<d;e++)c.push(b);return c};k.create=function(a,c){if(this.nested.content[c][a])return this.nested.content[c][a].element;var b=this.options.nestedHeaders[c][a]||{},d=this.nested.content[c][a]={};b.colspan||(b.colspan=1);b.align||(b.align=_$_5e7a[53]);b.title||(b.title=_$_5e7a[3]);var e=document.createElement(_$_5e7a[147]);e.setAttribute(_$_5e7a[181],a);e.setAttribute(_$_5e7a[182],c);e.setAttribute(_$_5e7a[52],b.colspan);e.setAttribute(_$_5e7a[183],b.align);e.innerHTML=b.title;b.tooltip&&
|
|
173
|
+
(e.title=b.tooltip);return d.element=e};k.build=function(){this.nested||(this.nested={content:[]});if(this.options.nestedHeaders)for(var a=0;a<this.options.nestedHeaders.length;a++){this.nested.content[a]=[];var c=document.createElement(_$_5e7a[147]);c.innerHTML=_$_5e7a[148];var b=document.createElement(_$_5e7a[145]);b.classList.add(_$_5e7a[177]);b.appendChild(c);this.thead.insertBefore(b,this.thead.lastChild)}};k.render=function(){for(var a,c=this.options.nestedHeaders,b=0;b<c.length;b++)for(var d=
|
|
174
|
+
0;d<this.thead.lastChild.children.length;d++){a=this.thead.lastChild.children[d].getAttribute(_$_5e7a[42]);var e=k.getColumns.call(this,b);void 0!==e[a]&&k.renderCell.call(this,e[a],b)}};k.renderCell=function(a,c,b){var d=ka.create.call(this,a,c);d.parentNode?(a=d.getAttribute(_$_5e7a[52]),a++,d.setAttribute(_$_5e7a[52],a)):(d.setAttribute(_$_5e7a[52],1),b?this.thead.children[c].insertBefore(d,this.thead.children[c].children[b]):this.thead.children[c].appendChild(d),0==a&&0<this.options.freezeColumns&&
|
|
175
|
+
(d.classList.add(_$_5e7a[50]),d.style.left=_$_5e7a[159]))};k.adjust=function(a,c,b,d){var e=this.options.nestedHeaders;if(e)if(1==b)if(d&&d.nested)for(b=0;b<e.length;b++)for(var f=0;f<e[b].length;f++)k.cell.call(this,f,b,{colspan:d.nested[b][f]});else for(b=0;b<e.length;b++){if(f=k.getColumns.call(this,b)){f=f[a];var g=parseInt(e[b][f].colspan)+c;k.cell.call(this,f,b,{colspan:g})}}else{d=[];for(b=0;b<e.length;b++)if(g=k.getColumns.call(this,b)){d[b]=[];for(f=0;f<c;f++){var h=g[a+f];typeof d[b][h]==
|
|
176
|
+
_$_5e7a[13]&&(d[b][h]=e[b][h].colspan);e[b][h].colspan--}g=Object.keys(d[b]);for(f=0;f<g.length;f++)k.cell.call(this,g[f],b,{colspan:e[b][g[f]].colspan})}return d}};return k}(),ha=function(){var k=function(a,c){var b=function(q){var p;(p=this.results)?q=p.indexOf(q):p=this.rows;q--;for(var r=q;0<=r;r--)if(q=this.results?p[r]:r,this.rows[q]&&this.rows[q].element)return q;return 0},d=function(q){var p;(p=this.results)?q=p.indexOf(q):p=this.rows;q++;for(var r=q;r<p.length;r++)if(q=this.results?p[r]:
|
|
177
|
+
r,this.rows[q]&&this.rows[q].element)return q;return p[p.length-1]},e=function(q,p){for(;0<=q;q--)if(this.records[p][q].element&&this.records[p][q].element.style.display!=_$_5e7a[40])return q;return 0},f=function(q,p){for(;q<this.options.columns.length;q++)if(this.records[p][q].element&&this.records[p][q].element.style.display!=_$_5e7a[40])return q;return this.options.columns-1},g=this.getHighlighted(),h=g[0],l=g[1],n=g[2];g=g[3];a=parseInt(a);c=parseInt(c);null!=a&&null!=c&&(0<a-n?(f=f.call(this,
|
|
178
|
+
parseInt(n)+1,c),a=parseInt(a)):(f=parseInt(a),a=e.call(this,parseInt(h)-1,c)),0<c-g?(d=d.call(this,parseInt(g)),c=parseInt(c)):(d=parseInt(c),c=b.call(this,parseInt(l))),a-f<=c-d?(f=parseInt(h),a=parseInt(n)):(d=parseInt(l),c=parseInt(g)),this.setBorder(f,d,a,c,_$_5e7a[138]))};k.execute=function(a){if(!N.call(this.parent,this))return!1;var c=this.borders.cloning;if(a)if(c&&c.active){a=c.x1;var b=c.y1,d=c.x2,e=c.y2}else return!1;else if(d=this.getSelected(),d.length)a=d[0].x,b=parseInt(d[d.length-
|
|
179
|
+
1].y)+1,d=d[d.length-1].x,e=this.options.data.length-1;else return!1;var f,g=0,h=[],l=[],n=!1,q=this.getHighlighted(),p=za[_$_5e7a[51]].call(this,q,!1,!1),r=this.getSelected();if(f=this.getStyle(r,!0)){var w=Object.keys(f);if(w.length)for(var m=0;m<w.length;m++)h.push(f[w[m]])}if(q[0]==a)var v=b<q[1]?b-q[1]:1,u=0;else u=a<q[0]?a-q[0]:1,v=0;w=0;a=parseInt(a);d=parseInt(d);b=parseInt(b);e=parseInt(e);for(var x=b;x<=e;x++)if(!this.results||-1!=this.results.indexOf(x)){void 0==p[g]&&(g=0);f=0;q[0]!=a&&
|
|
180
|
+
(u=a<q[0]?a-q[0]:1);for(m=a;m<=d;m++){if(!(0!=n||this.records[x][m].element&&this.records[x][m].element.classList.contains(_$_5e7a[18]))){if((!c||1!=c.active)&&K.call(this,m,x)){n=!0;continue}void 0==p[g]?f=0:void 0==p[g][f]&&(f=0);var y=p[g][f];y&&!p[1]&&1==this.parent.config.autoIncrement&&(this.options.columns[m].type==_$_5e7a[56]||this.options.columns[m].type==_$_5e7a[14]?M(y)?y=S.shiftFormula(y,u,x-q[1]):y==Number(y)&&(y=Number(y)+v):this.options.columns[m].type==_$_5e7a[184]&&(y=new Date(y),
|
|
181
|
+
y.setDate(y.getDate()+v),y=y.getFullYear()+_$_5e7a[185]+jSuites.two(parseInt(y.getMonth()+1))+_$_5e7a[185]+jSuites.two(y.getDate())+_$_5e7a[132]+_$_5e7a[186]));y={x:m,y:x,value:y};h&&null!=h[w]&&(y.style=h[w],w++,w>=h.length&&(w=0));l.push(y)}f++;q[0]!=a&&u++}g++;v++}l.length&&(r[0].x<a&&(a=r[0].x),r[0].y<b&&(b=r[0].y),r[r.length-1].x>d&&(d=r[r.length-1].x),r[r.length-1].y>e&&(e=r[r.length-1].y),this.setValue(l),this.resetBorders(_$_5e7a[138],!0),this.updateSelectionFromCoords(a,b,d,e))};k.end=function(a){ha.event=
|
|
182
|
+
!1;ha.execute.call(this,!0)};k.cancel=function(a){ha.event=!1;this.resetBorders(_$_5e7a[138],!0)};return k}(),za=function(){var k=function(a){a.getData=k[_$_5e7a[51]];a.getJson=k[_$_5e7a[51]];a.setData=k[_$_5e7a[11]];a.loadData=k.load;a.getRowData=k.getRowData;a.setRowData=k.setRowData;a.getColumnData=k.getColumnData;a.setColumnData=k.setColumnData;a.updateData=k.update;a.refresh=k.refresh;a.data=k[_$_5e7a[51]];a.download=k.download;a.copy=k.copy;a.paste=k.paste;a.cut=function(){return a.copy(!0)}};
|
|
183
|
+
k[_$_5e7a[51]]=function(a,c,b){!0===a&&(a=this.getHighlighted());for(var d=a?!0:!1,e,f=[],g=this.options.columns.length,h=this.options.data.length,l,n=this.dataType&&typeof b==_$_5e7a[13]?1:0,q=0;q<h;q++){l=null;e=n?{}:[];for(var p=0;p<g;p++){var r;if(!(r=!d)){r=a[1];var w=a[2],m=a[3];r=p>=a[0]&&p<=w&&q>=r&&q<=m?!0:!1}if(r&&(!d||!this.results||-1!=this.results.indexOf(q))){r=K.call(this,p,q);if(c){if(d&&!1===this.rows[q].visible)continue;l=ba.processed.call(this,p,q);void 0!==l&&(r=l)}b&&r.match&&
|
|
184
|
+
(r.match(b)||r.match(/\n/)||r.match(/"/))&&(r=r.replace(new RegExp(_$_5e7a[187],_$_5e7a[188]),_$_5e7a[189]),r=_$_5e7a[187]+r+_$_5e7a[187]);n?jSuites.path.call(e,_$_5e7a[3]+W.call(this,p),r):e.push(r);l=!0}}l&&(b?f.push(e.join(b)):f.push(e))}return b?f.join(_$_5e7a[10])+_$_5e7a[10]:f};k.parse=function(){for(var a,c={},b=0,d,e=[],f=this.options.data,g=0;g<f.length;g++)a=null,d=g,f[g].data&&(Array.isArray(f[g].data)||typeof f[g].data==_$_5e7a[84])&&(typeof f[g].id==_$_5e7a[14]&&(a=parseInt(f[g].id)),
|
|
185
|
+
typeof f[g].row==_$_5e7a[14]&&(d=f[g].row),e[d]=f[g].data,f[g]=[]),d>b&&(b=d),a&&(c[d]=a);if(Object.keys(e).length)for(g=0;g<=b;g++)e[g]&&(f[g]=e[g]);b=this.getPrimaryKey();if(!1!==b)for(b=W.call(this,b),g=0;g<f.length;g++)c[g]||!1===b||(a=parseInt(f[g][b]),0<a&&(c[g]=a));return c};k.type=function(){for(var a=this.dataType=0;a<this.options.columns.length;a++)typeof this.options.columns[a].name!==_$_5e7a[13]&&(this.dataType=1)};k[_$_5e7a[11]]=function(a){a=k.standardize(a);var c={},b=[],d={};var e=
|
|
186
|
+
Object.keys(a[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var f=a.length-this.options.data.length;0<f&&this.insertRow(f);for(var g=0;g<this.options.data.length;g++){void 0===a[g]&&(a[g]={row:g,data:[]});for(var h=0;h<this.options.columns.length;h++)a[g].data[h]||(a[g].data[h]=_$_5e7a[3])}for(h=0;h<this.options.columns.length;h++){var l=W.call(this,h);d[l]=h}for(g=0;g<a.length;g++){f=a[g].row;l=Object.keys(a[g].data);for(h=0;h<l.length;h++)e=null,void 0!==d[l[h]]?e=d[l[h]]:-1<l[h]&&
|
|
187
|
+
(e=parseInt(l[h])),null!==e&&b.push({x:e,y:f,value:a[g].data[l[h]]});a[g].id&&(c[f]=a[g].id)}pa.setId.call(this,c);ba[_$_5e7a[11]].call(this,b,null,!0)};k.build=function(){this.results=null;this.rows=[];this.records=[];this.sequence=0;if(this.options.data){var a=k.parse.call(this),c=this.options.data.length;this.options.minDimensions[1]>c&&(c=this.options.minDimensions[1]);for(var b=0;b<c;b++){var d=a[b]?a[b]:null;ia.row.call(this,b,d)}}k.type.call(this)};k.load=function(a){this.resetBorders();this.resetSelection();
|
|
188
|
+
this.tbody.innerText=_$_5e7a[3];this.options.data=a;k.build.call(this);C.call(this)};k.refresh=function(a){if(typeof a!==_$_5e7a[13])for(var c=0;c<this.options.columns.length;c++){var b=this.records[a]&&this.records[a][c].element?this.records[a][c].element:null,d=aa[_$_5e7a[51]].call(this,c,a);typeof d[0].updateCell==_$_5e7a[85]&&d[0].updateCell(b,K.call(this,c,a),c,a,this,d[1]);b&&I.applyOverflow.call(this,b,c,a)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();
|
|
189
|
+
jSuites.ajax({url:this.options.url,method:_$_5e7a[59],dataType:_$_5e7a[60],success:function(f){e.setData(f);jSuites.loading.hide()}})}};k.getRowData=function(a,c){if(typeof this.options.data[a]===_$_5e7a[13])return!1;if(c){if(this.dataType){c={};for(var b=0;b<this.options.columns.length;b++){var d=_$_5e7a[3]+W.call(this,b),e=_$_5e7a[3]+ba.processed.call(this,b,a,!0);jSuites.path.call(c,d,e)}}else for(c=[],b=0;b<this.options.columns.length;b++)c.push(ba.processed.call(this,b,a,!0));return c}return JSON.parse(JSON.stringify(this.options.data[a]))};
|
|
190
|
+
k.setRowData=function(a,c,b){for(var d=[],e=0;e<this.options.columns.length;e++)typeof c[e]===_$_5e7a[13]&&(c[e]=_$_5e7a[3]),d.push({x:e,y:a,value:c[e]});d.length&&this.setValue(d,null,b)};k.getColumnData=function(a,c){if(typeof this.options.columns[a]===_$_5e7a[13])return!1;for(var b=[],d=0;d<this.options.data.length;d++){var e=c?ba.processed.call(this,a,d,!0):K.call(this,a,d);b.push(e)}return b};k.setColumnData=function(a,c,b){for(var d=[],e=0;e<this.rows.length;e++)typeof c[e]===_$_5e7a[13]&&(c[e]=
|
|
191
|
+
_$_5e7a[3]),d.push({x:a,y:e,value:c[e]});d.length&&this.setValue(d,null,b)};k.copy=function(a){var c=this,b=this.getHighlighted(),d=function(){c.setBorder(b[0],b[1],b[2],b[3],_$_5e7a[127]);c.borders.copying.clear=1==a?!0:!1},e=k[_$_5e7a[51]].call(this,b,!0,_$_5e7a[190]),f=B.call(this.parent,_$_5e7a[191],this,b,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(_$_5e7a[192]),
|
|
192
|
+
d());return e};k.paste=function(a,c,b){if(!N.call(this.parent,this))return!1;var d=this,e=function(){d.borders.copying&&(d.resetBorders(_$_5e7a[127],!0),d.borders.copying.clear=!1)},f=b,g=null,h=this.options.style,l=null,n=null,q=[];if(this.borders.copying){var p=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];l=p[0];n=p[1];var r=jSuites.hash(b),w=jSuites.hash(k[_$_5e7a[51]].call(this,p,!0,_$_5e7a[190]));if(r!=w)e();else{var m=0,v=0;b=k[_$_5e7a[51]].call(this,
|
|
193
|
+
p,!1,!1);for(r=p[1];r<=p[3];r++)if(!this.results||-1!=this.results.indexOf(r)){q[v]=[];m=0;for(w=p[0];w<=p[2];w++)g=A.getColumnNameFromCoords(w,r),q[v][m]=h&&h[g]?h[g]:_$_5e7a[193],m++;v++}}}a=parseInt(a);c=parseInt(c);100<f.length&&!this.options.pagination&&!C.limited.call(this)&&console.log(_$_5e7a[194]);if(r=B.call(this.parent,_$_5e7a[195],this,b,a,c,q,f))b=r;else if(!1===r)return!1;if(b){Array.isArray(b)||(b=A.parseCSV(b,_$_5e7a[190]));if(f=this.getHighlighted()){g=[];m=[];v=[];h=[];var u=0,x=
|
|
194
|
+
0;for(r=f[1];r<=f[3];r++)if(!this.results||-1!=this.results.indexOf(r)){g=[];m=[];for(w=f[0];w<=f[2];w++)g.push(b[x][u]),q&&q[x]&&q[x][u]?m.push(q[x][u]):m.push(_$_5e7a[3]),u++,u>=b[0].length&&(u=0);v.push(g);h.push(m);x++;x>=b.length&&(x=0)}0==v.length%b.length&&0==v[0].length%b[0].length&&(b=v,q=h)}h=null;f=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(r=p[1];r<=p[3];r++)for(w=p[0];w<=p[2];w++)(!this.results||this.results&&0<=this.results.indexOf(r))&&f.push({x:w,y:r,value:_$_5e7a[3],
|
|
195
|
+
style:_$_5e7a[3]});e()}r=a+b[0].length-this.options.columns.length;0<r&&this.insertColumn(r);r=c+b.length-this.rows.length;0<r&&this.insertRow(r);m=g=a;u=v=c;x=null;this.results&&(h=this.results.indexOf(c));for(r=0;r<b.length;r++)for(w=0;w<b[r].length;w++){null!==l&&null!==n&&b[r][w][0]==_$_5e7a[12]&&(b[r][w]=S.shiftFormula(b[r][w],a-l,c-n));m=a+w;u=c+r;this.results&&(u=this.results[h+r]);var y={x:m,y:u,value:b[r][w]};q&&q[r]&&q[r][w]&&(y.style=q[r][w]);f.push(y);null===x&&ta.isSelected.call(this,
|
|
196
|
+
m,u,p)&&(x=!0)}x&&e();f.length&&(ba[_$_5e7a[11]].call(this,f,null,this.parent.config.forceUpdateOnPaste?!0:!1),B.call(this.parent,_$_5e7a[196],this,f),this.updateSelectionFromCoords(g,v,m,u))}};k.download=function(a,c){if(this.parent.config.allowExport){void 0===c&&(c=!0);var b=_$_5e7a[3];if(1==a||1==this.parent.config.includeHeadersOnDownload)b+=this.getHeaders().replace(/\s+/gm,_$_5e7a[132])+_$_5e7a[10];b+=k[_$_5e7a[51]].call(this,null,c,this.options.csvDelimiter);c=new Blob([_$_5e7a[198]+b],{type:_$_5e7a[199]});
|
|
197
|
+
window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(c,this.options.csvFileName+_$_5e7a[200]):(a=document.createElement(_$_5e7a[201]),c=URL.createObjectURL(c),a.href=c,a.setAttribute(_$_5e7a[202],this.options.csvFileName+_$_5e7a[200]),document.body.appendChild(a),a.click(),a.parentNode.removeChild(a))}else console.error(_$_5e7a[197])};k.standardize=function(a){a||(a=[]);Array.isArray(a)||(a=[a]);void 0==a[0]||Array.isArray(a[0])||typeof a[0]==_$_5e7a[84]||(a=[a]);
|
|
198
|
+
for(var c=0;c<a.length;c++){var b={};Array.isArray(a[c])||void 0==a[c].data?b.data=a[c]:b=a[c];b.row=void 0==a[c].row?c:a[c].row;a[c]=b}return a};return k}(),Qa=function(){var k=function(a){a.getLabel=k[_$_5e7a[51]];a.getLabelFromCoords=k[_$_5e7a[51]]};k[_$_5e7a[51]]=function(a,c,b){if(typeof a==_$_5e7a[17]){a=A.getCoordsFromColumnName(a);var d=a[0];c=a[1]}else d=a;return this.getProcessed(d,c,b)};return k}(),Ca=function(){var k=function(a){a.getDefinedNames=k[_$_5e7a[51]];a.setDefinedNames=k[_$_5e7a[11]]};
|
|
199
|
+
k[_$_5e7a[11]]=function(a){var c=Object.keys(a);if(c.length){for(var b=0;b<c.length;b++)this.parent.config.definedNames[c[b]]=a[c[b]];G.call(this,_$_5e7a[203],[a])}};k[_$_5e7a[51]]=function(a){var c=this.parent.config.definedNames;return a?c[a]:c};k.updateAll=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=Object.keys(b);if(e.length){for(var f=this.getWorksheetName(),g=0;g<e.length;g++){var h=S.update.call(this,b[e[g]],a,c,f);h!==b[e[g]]&&(d[e[g]]=h)}k[_$_5e7a[11]].call(this,
|
|
200
|
+
d)}}};k.updateWorksheetName=function(a,c){var b,d={};if(b=this.parent.config.definedNames){var e=Object.keys(b);if(e.length){for(var f=0;f<e.length;f++){var g=S.updateWorksheetName(b[e[f]],a,c);g!==b[e[f]]&&(d[e[f]]=g)}k[_$_5e7a[11]].call(this,d)}}};return k}(),U=function(){var k=[_$_5e7a[204],_$_5e7a[205],_$_5e7a[206],_$_5e7a[207],_$_5e7a[208]],a=[_$_5e7a[185],_$_5e7a[151],_$_5e7a[209],_$_5e7a[210],_$_5e7a[211],_$_5e7a[212],_$_5e7a[1],_$_5e7a[213],_$_5e7a[25],_$_5e7a[214],_$_5e7a[12],_$_5e7a[215],
|
|
201
|
+
_$_5e7a[216]],c=[],b=function(){if(0<c.length){for(var f=0;f<c.length;f++)ea.destroy.call(this,c[f]);c=[]}},d=function(f){b.call(this);for(var g=0,h=[],l,n=0;n<f.children.length;n++)if(l=f.children[n].getAttribute(_$_5e7a[217])){h[l]||(h[l]=k[g++],4<g&&(g=0));f.children[n].style.color=h[l];if(-1===l.indexOf(_$_5e7a[135])){if(0<=l.indexOf(_$_5e7a[136])){var q=l.split(_$_5e7a[136]),p=A.getCoordsFromColumnName(q[0]);q=A.getCoordsFromColumnName(q[1])}else q=p=A.getCoordsFromColumnName(l);ta[_$_5e7a[11]].call(this,
|
|
202
|
+
p[0],p[1],q[0],q[1],null,l,h[l])}c.push(l)}},e=function(f,g){f.classList.add(_$_5e7a[92]);f.classList.add(_$_5e7a[218]);f.classList.add(_$_5e7a[219]);f.classList.add(_$_5e7a[220]);f.setAttribute(_$_5e7a[221],!0);f.addEventListener(_$_5e7a[222],function(h){h=h.changedTouches&&h.changedTouches[0]?h.changedTouches[0].clientX:h.clientX;var l=this.getBoundingClientRect();24>l.width-(h-l.left)&&(e.current=f,f.classList.add(_$_5e7a[223]))});typeof g==_$_5e7a[85]&&(f.onchange=g)};e.current=null;e.parse=function(f){for(var g=
|
|
203
|
+
_$_5e7a[3],h=_$_5e7a[3],l=window.getSelection(),n=document.createRange(),q=A.getCaretIndex.call(this.parent,f),p=S.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_5e7a[3])),r=0;r<p.length;r++)p[r]&&S.tokenIdentifier.test(p[r].trim())?(r==p.length-1&&(h=_$_5e7a[224]),g+=_$_5e7a[225]+h+_$_5e7a[226]+p[r].trim().replace(/\$/g,_$_5e7a[3])+_$_5e7a[227]+p[r]+_$_5e7a[228]):g+=p[r];f.innerHTML=g;g=null;for(r=0;r<f.childNodes.length&&!(g=f.childNodes[r],h=g.tagName?g.innerText.length:g.length,0>=q-h);r++)q-=
|
|
204
|
+
h;g&&(g.tagName?n.setStart(g.firstChild,q):n.setStart(g,q),l.removeAllRanges(),l.addRange(n));d.call(this,f)};e.close=function(f){b.call(this);f?f.classList.remove(_$_5e7a[92]):(typeof U.current.onchange==_$_5e7a[85]&&U.current.onchange.call(U.current),U.current.classList.remove(_$_5e7a[223]),U.current=null)};e.getName=function(f,g,h,l,n){f=A.getColumnNameFromCoords(f,g);h=A.getColumnNameFromCoords(h,l);n.ctrlKey&&(f=h);return f!==h?(n=f+_$_5e7a[136]+h,n=S.getTokensFromRange.call(this,n),S.getRangeFromTokens.call(this,
|
|
205
|
+
n)):f};e.range=function(f,g,h,l,n){f=e.getName.call(this,f,g,h,l,n);g=document.createElement(_$_5e7a[229]);g.innerText=f;g.setAttribute(_$_5e7a[217],f);e.current.innerText=_$_5e7a[3];e.current.appendChild(g);d.call(this,e.current);jSuites.focus(g);n.preventDefault()};e.update=function(f,g,h,l,n){var q=this,p=jSuites.getNode();if(p){var r=e.getName.call(this,f,g,h,l,n);f=function(w){var m=document.createElement(_$_5e7a[229]);m.innerText=r;m.setAttribute(_$_5e7a[217],r);p.parentNode===q.parent.input&&
|
|
206
|
+
!1===w?p.parentNode.insertBefore(m,p.nextSibling):q.parent.input.appendChild(m);p=m};if(p.getAttribute(_$_5e7a[217]))n.ctrlKey?(q.parent.input.appendChild(document.createTextNode(_$_5e7a[25])),f(!0)):(p.innerText=r,p.setAttribute(_$_5e7a[217],r));else{if(p.innerText!==_$_5e7a[3]&&-1==a.indexOf(p.innerText.slice(-1))||p.nextElementSibling&&p.nextElementSibling.getAttribute(_$_5e7a[217]))return!1;f(!1)}jSuites.focus(p);d.call(q,q.parent.input);n.preventDefault();return!0}return!1};e.onkeydown=function(f){if(f.target&&
|
|
207
|
+
f.target.classList.contains(_$_5e7a[92]))if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_5e7a[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_5e7a[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,
|
|
208
|
+
_$_5e7a[3])&&f.target.getAttribute(_$_5e7a[94])&&f.target.removeAttribute(_$_5e7a[94])};return e}(),S=function(){var k=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),a=function(h){h=c(h);for(var l=[_$_5e7a[185],_$_5e7a[151],_$_5e7a[209],_$_5e7a[210],_$_5e7a[211],_$_5e7a[230]],n=[_$_5e7a[212],_$_5e7a[231],_$_5e7a[1],_$_5e7a[2],_$_5e7a[213],_$_5e7a[232],_$_5e7a[25],_$_5e7a[214],_$_5e7a[12],_$_5e7a[215],_$_5e7a[216]],q=_$_5e7a[3],p=[],r=0,w=0;w<h.length;w++){if(h[w]==_$_5e7a[187]||
|
|
209
|
+
h[w]==_$_5e7a[133])r=0==r?1:0;0==r&&(-1<l.indexOf(h[w])||-1<n.indexOf(h[w]))?(q&&(p.push(q),q=_$_5e7a[3]),p.push(h[w])):q+=h[w]}q&&p.push(q);for(w=0;w<p.length;w++)-1==p[w].indexOf(_$_5e7a[187])&&-1==p[w].indexOf(_$_5e7a[133])&&(p[w]=p[w].replace(/\s/g,_$_5e7a[3]));return p},c=function(h,l){for(var n=_$_5e7a[3],q=0,p=[_$_5e7a[12],_$_5e7a[135],_$_5e7a[216],_$_5e7a[215]],r=0;r<h.length;r++)h[r]==_$_5e7a[187]&&(q=0==q?1:0),1==q?n+=h[r]:(n+=h[r].toUpperCase(),1==l&&0<r&&h[r]==_$_5e7a[12]&&-1==p.indexOf(h[r-
|
|
210
|
+
1])&&-1==p.indexOf(h[r+1])&&(n+=_$_5e7a[12]));return n},b=function(h){h.setFormula=b[_$_5e7a[11]];h.executeFormula=b.execute;h.formula=[]};b.run=function(h,l){var n=Object.keys(l);if(n.length){for(var q={},p=0;p<n.length;p++){var r=n[p].replace(/!/g,_$_5e7a[27]);0<r.indexOf(_$_5e7a[27])&&(r=r.split(_$_5e7a[27]),q[r[0]]={})}r=Object.keys(q);for(p=0;p<r.length;p++)w+=_$_5e7a[233]+r[p]+_$_5e7a[234];for(p=0;p<n.length;p++){r=n[p].replace(/!/g,_$_5e7a[27]);jSuites.isNumeric(l[n[p]])||(q=l[n[p]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
|
|
211
|
+
q.length&&(l[n[p]]=e(q,l[n[p]]));var w=0<r.indexOf(_$_5e7a[27])?w+(r+_$_5e7a[235]+l[n[p]]+_$_5e7a[236]):w+(_$_5e7a[233]+r+_$_5e7a[235]+l[n[p]]+_$_5e7a[236])}}h=h.replace(/\$/g,_$_5e7a[3]);h=h.replace(/!/g,_$_5e7a[27]);(q=h.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(h=e(q,h));return(new Function(w+_$_5e7a[237]+h))()};b[_$_5e7a[11]]=function(){};var d=function(h){h=c(h,!0);return h.replace(/\$/g,_$_5e7a[3])},e=function(h,l){for(var n=0;n<h.length;n++){var q=
|
|
212
|
+
b.getTokensFromRange.call(this,h[n]);l=l.replace(h[n],_$_5e7a[213]+q.join(_$_5e7a[25])+_$_5e7a[232])}return l},f=function(h,l,n){for(var q=this.config.definedNames,p=0;p<h.length;p++)h[p]&&q&&q[h[p]]&&(l=l.replace(h[p],q[h[p]]),n&&(n[h[p]]=q[h[p]]));return d(l)},g=function(h,l){var n;if(n=this.records[l][h].a)for(var q=0;q<n.length;q++)for(var p=0;p<n[q].length;p++)n[q][p]&&(n[q][p].innerText=_$_5e7a[3],this.records[l+q][h+p].v=_$_5e7a[3]);this.records[l][h].a=[]};b.execute=function(h,l,n,q,p){if(1==
|
|
213
|
+
this.parent.processing)return null!==l&&null!==n&&this.parent.queue.push([this,l,n]),_$_5e7a[3];var r=[],w=function(H,L,E,ca){if(void 0!=L&&void 0!=E){var ra=A.getColumnNameFromCoords(L,E);E=ca.getWorksheetName()+_$_5e7a[27]+ra;r[E]||(r[E]=0);r[E]++;if(3<r[E])throw{error:_$_5e7a[238],message:_$_5e7a[239],reference:E};}else ra=null;p||(H=d(H));var J=H,V=J.match(/[A-Z_]+[A-Z0-9_\.]*/g);V&&V.length&&(J=f.call(ca.parent,V,J,m));(V=J.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&
|
|
214
|
+
V.length&&(J=e.call(ca,V,J));V=[];J=a(J);for(var R=0;R<J.length;R++)J[R]&&k.test(J[R])&&V.push(J[R]);if(V){if(-1<V.indexOf(ra))throw{error:_$_5e7a[240],message:_$_5e7a[241]};for(J=0;J<V.length;J++){R=V[J].split(_$_5e7a[135]);R[1]?(L=R[1],R=D(R[0]),E=ca.getWorksheetName()+_$_5e7a[27]+ra):(L=R[0],R=ca,E=ra);if(typeof R==_$_5e7a[13]||typeof R.formula==_$_5e7a[13])throw{error:_$_5e7a[242],message:_$_5e7a[243]};E&&(R.formula[L]||(R.formula[L]=[]),0>R.formula[L].indexOf(E)&&R.formula[L].push(E));if(!m[V[J]]){E=
|
|
215
|
+
A.getCoordsFromColumnName(L);L=E[0];E=E[1];var oa=void 0!==R.records[E][L].v?R.records[E][L].v:K.call(R,L,E);m[V[J]]||((_$_5e7a[3]+oa).substr(0,1)==_$_5e7a[12]?m[V[J]]=w(oa,L,E,R):(oa?oa!=Number(oa)&&(oa=_$_5e7a[187]+oa+_$_5e7a[187]):oa=0,m[V[J]]=oa))}}}return H.substr(1)},m={};try{if(h=w(h,l,n,this)){var v=p?b.run(h,m):t.formula(h,m,l,n,this);if(!1!==q&&void 0!=l&&void 0!=n)if(v instanceof Date)this.records[n][l].v=jSuites.calendar.dateToNum(v);else if(Array.isArray(v)){g.call(this,l,n);q=[];for(var u=
|
|
216
|
+
null,x=0;x<v.length;x++)for(var y=0;y<v[x].length;y++)null===u&&(0<x&&x>y&&this.options.data[n+x][l+y]?u=_$_5e7a[244]:(this.records[n+x][l+y].v=v[x][y],this.records[n+x][l+y].element&&(q[x]||(q[x]=[]),q[x][y]=this.records[n+x][l+y].element,this.records[n+x][l+y].element.innerText=v[x][y])));null===u?(u=v[0][0],this.records[n][l].a=q):g.call(this,l,n);v=this.records[n][l].v=u}else this.records[n][l].v=v;return v}}catch(H){return 1==this.parent.config.debugFormulas&&console.log(h,m,H),H&&H.error?H.error:
|
|
217
|
+
_$_5e7a[242]}};b.update=function(h,l,n,q){var p=null,r=null,w=function(u){n&&n[u]&&(u=_$_5e7a[245]);l[u]&&(u=l[u]);return u};h=c(h,!0);h=a(h);for(var m=0;m<h.length;m++)if(h[m]&&k.test(h[m])){if(-1==h[m].indexOf(_$_5e7a[135])){if(r=h[m],p=_$_5e7a[3],q)continue}else if(r=h[m].split(_$_5e7a[135]),p=r[0],r=r[1],q!=p)continue;if(0<=r.indexOf(_$_5e7a[136])){r=b.getTokensFromRange.call(this,r);for(var v=0;v<r.length;v++)r[v]=w(r[v]);r=b.getRangeFromTokens.call(this,r)}else-1==r.indexOf(_$_5e7a[246])?r=
|
|
218
|
+
w(r):(r=w(r.replace(/\$/g,_$_5e7a[3])),r=_$_5e7a[246]+r.match(/[A-Z]+/g)+_$_5e7a[246]+r.match(/[0-9]+/g));p&&(r=p+_$_5e7a[135]+r);h[m]=r}return h.join(_$_5e7a[3])};b.getChain=function(h){if(void 0===h)return[];var l=[],n=[],q=[],p=function(m){if(0<=m.indexOf(_$_5e7a[27])){var v=m.split(_$_5e7a[27]),u=v[0],x=v[1];v=D(v[0])}else v=this,u=v.getWorksheetName(),x=m;if(v.formula[x]&&!q[m]){var y=!1;q[m]=!0;for(m=0;m<v.formula[x].length;m++){var H=v.formula[x][m];-1==H.indexOf(_$_5e7a[27])&&(H=u+_$_5e7a[27]+
|
|
219
|
+
H);if(!n[H]){var L=v.getValue(H);M(L)?l.push([H,L,b.getTokens.call(v,L,u)]):(y=!0,v.formula[x][m]=null);p.call(v,H);n[H]=!0}}1==y&&(v.formula[x]=v.formula[x].filter(function(E){return null!=E}))}},r=Object.keys(h);for(h=0;h<r.length;h++)p.call(this,r[h]);r=0;for(h=l.length-1;0<=h;h--){for(var w=0;w<h;w++)if(0<=l[w][2].indexOf(l[h][0])){l.splice(w,0,l.splice(h,1)[0]);h=l.length;break}r++;if(1E6<r){console.error(_$_5e7a[247]);break}}n=[];for(h=0;h<l.length;h++)n[l[h][0]]=l[h][1];return n};b.updateAll=
|
|
220
|
+
function(h,l){var n,q;Ca.updateAll.call(this,h,l);var p=Object.keys(this.formula);var r=[];var w=[];for(n=0;n<p.length;n++){var m=p[n];var v=this.formula[m];if(l&&l[m])for(var u=0;u<v.length;u++)h[v[u]]&&(v[u]=h[v[u]]),w[v[u]]=!0;else{var x=[];for(u=0;u<v.length;u++)l&&l[v[u]]||(h[v[u]]&&(v[u]=h[v[u]]),w[v[u]]=!0,x.push(v[u]));x.length&&(h[m]&&(m=h[m]),r[m]=x)}}this.formula=r;x=this.getWorksheetName();for(var y=0;y<t.spreadsheet.length;y++)for(var H=t.spreadsheet[y].worksheets,L=0;L<H.length;L++)if(H[L].getWorksheetName()!==
|
|
221
|
+
x)for(p=Object.keys(H[L].formula),n=0;n<p.length;n++){r=[];v=H[L].formula[p[n]];for(u=0;u<v.length;u++)m=v[u].split(_$_5e7a[27]),m[0]==x&&m[1]?l&&l[m[1]]||(h[m[1]]&&(m[1]=h[m[1]]),r.push(m[0]+_$_5e7a[27]+m[1])):r.push(v[u]);H[L].formula[p[n]]=r}p=[];m=Object.keys(w);for(u=0;u<m.length;u++)0<=m[u].indexOf(_$_5e7a[27])?(v=m[u].split(_$_5e7a[27]),r=D(v[0]),n=v[1],x=this.getWorksheetName(),v=v[0]):(r=this,n=m[u],x=null,v=this.getWorksheetName()),(q=r.getValue(n))&&M(q)&&(r=b.update.call(r,q,h,l,x),r!=
|
|
222
|
+
q&&(w[m[u]]=r,n=A.getCoordsFromColumnName(n),p[v]||(p[v]=[]),p[v].push({x:n[0],y:n[1],value:r,force:!0})));m=Object.keys(p);for(h=0;h<m.length;h++)r=D(m[h]),p[m[h]]=ba.applyValues.call(r,p[m[h]]),ba.setValueChained.call(r,p[m[h]]),G.call(r,_$_5e7a[107],{data:p[m[h]]})};b.updateWorksheetName=function(h,l,n){for(var q=a(h),p=0;p<q.length;p++)h=q[p].split(_$_5e7a[135]),h[1]&&(h[0]=h[0].replace(new RegExp(_$_5e7a[133],_$_5e7a[188]),_$_5e7a[3]),h[0].toUpperCase()==l.toUpperCase()&&(h[0]=n,0<=h[0].indexOf(_$_5e7a[132])&&
|
|
223
|
+
(h[0]=_$_5e7a[133]+h[0]+_$_5e7a[133]),q[p]=h.join(_$_5e7a[135])));return q.join(_$_5e7a[3])};b.updateWorksheetNames=function(h,l){for(var n,q,p=0;p<t.spreadsheet.length;p++)for(var r=[],w=t.spreadsheet[p].worksheets,m=0;m<w.length;m++){for(var v=0;v<w[m].options.data.length;v++)for(var u=0;u<w[m].options.data[v].length;u++)(n=w[m].options.data[v][u])&&M(n)&&(q=b.updateWorksheetName(n,h,l),q!=n&&r.push({x:u,y:v,value:q,force:!0}));r=ba.applyValues.call(w[m],r);G.call(w[m],_$_5e7a[107],{data:r})}};
|
|
224
|
+
b.shiftFormula=function(h,l,n){var q=a(h,!0);h=function(m){if(-1==m.indexOf(_$_5e7a[135])){m=A.getCoordsFromColumnName(m);var v=_$_5e7a[3]}else v=q[p].split(_$_5e7a[135]),m=A.getCoordsFromColumnName(v[1]),v=v[0]+_$_5e7a[135];var u=m[0]+l;m=m[1]+n;return m=0>u||0>m?_$_5e7a[245]:v+A.getColumnNameFromCoords(u,m)};for(var p=0;p<q.length;p++)if(k.test(q[p])&&-1==q[p].indexOf(_$_5e7a[246])){var r=-1==q[p].indexOf(_$_5e7a[135])?[_$_5e7a[3],q[p]]:q[p].split(_$_5e7a[135]);if(-1==r[1].indexOf(_$_5e7a[136]))r[1]=
|
|
225
|
+
h(r[1]);else{var w=r[1].split(_$_5e7a[136]);r[1]=h(w[0])+_$_5e7a[136]+h(w[1])}q[p]=r[0]?r.join(_$_5e7a[135]):r[1]}return q.join(_$_5e7a[3])};b.getTokensFromRange=function(h){var l=this,n=_$_5e7a[3],q=_$_5e7a[3];0<=h.indexOf(_$_5e7a[27])?q=_$_5e7a[27]:0<=h.indexOf(_$_5e7a[135])&&(q=_$_5e7a[135]);h=h.replace(/\$/g,_$_5e7a[3]);q&&(n=h.split(q),l=D(n[0]),h=n[1],n=n[0]+q);q=[];h=h.split(_$_5e7a[136]);var p=A.getCoordsFromColumnName(h[0]),r=A.getCoordsFromColumnName(h[1]);if(p[0]<=r[0]){h=p[0];var w=r[0]}else h=
|
|
226
|
+
r[0],w=p[0];if(null===p[1]&&null==r[1]){var m=0;p=0;l.options&&l.options.data&&(p=l.options.data.length-1)}else p[1]<=r[1]?(m=p[1],p=r[1]):(m=r[1],p=p[1]);for(l=m;l<=p;l++)for(m=h;m<=w;m++)q.push(n+A.getColumnNameFromCoords(m,l));return q};b.getRangeFromTokens=function(h){h=h.filter(function(q){return q!=_$_5e7a[245]});for(var l=_$_5e7a[3],n=0;n<h.length;n++)0<=h[n].indexOf(_$_5e7a[27])&&(l=h[n].split(_$_5e7a[27]),h[n]=l[1],l=l[0]);l&&(l+=_$_5e7a[27]);h.sort(function(q,p){q=A.getCoordsFromColumnName(q);
|
|
227
|
+
p=A.getCoordsFromColumnName(p);return q[1]>p[1]?1:q[1]<p[1]?-1:q[0]>p[0]?1:q[0]<p[0]?-1:0});return h.length?l+(h[0]+_$_5e7a[136]+h[h.length-1]):_$_5e7a[245]};b.getTokens=function(h,l){var n=d(h);h.replace(/!/g,_$_5e7a[27]);(h=n.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&h.length&&(n=f.call(this.parent,h,n));(h=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&h.length&&(n=e.call(this,h,n));h=n.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g);for(n=0;n<h.length;n++)-1==
|
|
228
|
+
h[n].indexOf(_$_5e7a[27])&&l&&(h[n]=l+_$_5e7a[27]+h[n]);return h};b.tokenIdentifier=k;b.tokenize=a;return b}(),ba=function(){var k=function(a){a.name=W;a.value=K;a.getValue=k[_$_5e7a[51]];a.getValueFromCoords=k.getFromCoords;a.setValue=k[_$_5e7a[11]];a.setValueFromCoords=k.setFromCoords;a.setCheckRadioValue=k.setCheckRadio;a.getProcessed=k.processed};k[_$_5e7a[51]]=function(a,c){var b=this;if(typeof a==_$_5e7a[84]){var d=a.x;a=a.y}else 0<=a.indexOf(_$_5e7a[27])&&(b=a.split(_$_5e7a[27]),a=b[1],b=D(b[0])),
|
|
229
|
+
a=A.getCoordsFromColumnName(a),d=a[0],a=a[1];return k.getFromCoords.call(b,d,a,c)};k.getFromCoords=function(a,c,b){var d=null;null!=a&&null!=c&&(d=b?k.processed.call(this,a,c):K.call(this,a,c));return d};k[_$_5e7a[11]]=function(a,c,b){if(!N.call(this.parent,this))return!1;var d,e,f=null,g=[];b=b?!0:!1;var h=function(q,p){var r=null;typeof q==_$_5e7a[17]?(f=A.getCoordsFromColumnName(q),d=f[0],e=f[1]):q.tagName?(d=q.getAttribute(_$_5e7a[42]),e=q.getAttribute(_$_5e7a[43])):q.element&&q.element.tagName?
|
|
230
|
+
(d=q.element.getAttribute(_$_5e7a[42]),e=q.element.getAttribute(_$_5e7a[43])):(d=q.x,e=q.y,void 0!==q.value&&(p=q.value),void 0!==q.style&&(r=q.style));q={x:d,y:e,value:p,force:b};null!==r&&(q.style=r);g.push(q)};if(a&&Array.isArray(a))for(var l=0;l<a.length;l++)h(a[l],c);else if(typeof a==_$_5e7a[84]&&void 0==a.x&&void 0==a.tagName)for(c=Object.keys(a),l=0;l<c.length;l++)h(c[l],a[c[l]]);else h(a,c);if(g.length){g=k.applyValues.call(this,g);this.parent.config.parseFormulas&&k.setValueChained.call(this,
|
|
231
|
+
g);T.update.call(this,!0);this.refreshBorders();var n=this;setTimeout(function(){ea.refresh.call(n)},250);if(g.length){Q.call(this.parent,{worksheet:n,action:_$_5e7a[79],records:g,selection:this.selectedCell});a=this.getPrimaryKey();if(!1!==a)for(l=0;l<g.length;l++)g[l].x===a&&g[l].value&&O.call(this,g[l]);G.call(this,_$_5e7a[79],{data:g});B.call(this.parent,_$_5e7a[248],this,g)}}};k.setFromCoords=function(a,c,b,d){var e=[];e.push({x:a,y:c,value:b});k[_$_5e7a[11]].call(this,e,null,d)};k.setCheckRadio=
|
|
232
|
+
function(){for(var a=[],c=this.getSelected(),b=0;b<c.length;b++){var d=c[b].x,e=c[b].y;if(!this.options.columns[d].readOnly&&this.options.columns[d].type==_$_5e7a[249]){var f=K.call(this,d,e)?!1:!0;a.push({x:d,y:e,value:f})}}a.length&&k[_$_5e7a[11]].call(this,a)};k.applyValues=function(a){for(var c,b,d=this.options.style||{},e=[],f={},g=0;g<a.length;g++)if(c=a[g],b=this.updateCell(c.x,c.y,c.value,c.force),void 0!==b.value){if(void 0!==c.style){var h=A.getColumnNameFromCoords(c.x,c.y);b.style=f[h]=
|
|
233
|
+
c.style;b.oldStyle=d&&d[h]?d[h]:_$_5e7a[193]}e.push(b)}0<Object.keys(f).length&&La.update.call(this,f);return e};k.processed=function(a,c,b){var d=K.call(this,a,c);if(null===d)return null;var e=aa[_$_5e7a[51]].call(this,a,c),f=e[1];f.type!=_$_5e7a[49]&&f.type!=_$_5e7a[250]&&f.type!=_$_5e7a[251]&&f.type!=_$_5e7a[252]&&f.type!=_$_5e7a[253]&&0!=f.process&&(!0===b||f.type!=_$_5e7a[254]&&f.type!=_$_5e7a[255]&&f.type!=_$_5e7a[256])&&(f.type==_$_5e7a[249]?d=e[0][_$_5e7a[51]](f,d,b):this.records[c][a].element?
|
|
234
|
+
d=1==this.parent.config.stripHTML?this.records[c][a].element.innerText:this.records[c][a].element.innerHTML:((_$_5e7a[3]+d).substr(0,1)==_$_5e7a[12]&&(d=this.executeFormula(d,a,c,!1)),e[0]&&typeof e[0][_$_5e7a[51]]==_$_5e7a[85]&&(d=e[0][_$_5e7a[51]](f,d,b))));return d};k.setValueChained=function(a){for(var c,b=[],d,e=0;e<a.length;e++)c=a[e],d=A.getColumnNameFromCoords(c.x,c.y),b[d]=c.value;b=S.getChain.call(this,b);a=Object.keys(b);for(e=0;e<a.length;e++)0<=a[e].indexOf(_$_5e7a[27])?(c=a[e].split(_$_5e7a[27]),
|
|
235
|
+
d=c[1],c=D(c[0])):(d=a[e],c=this),d=A.getCoordsFromColumnName(d),I.update.call(c,d[0],d[1],b[a[e]],!0)};return k}(),I=function(){var k=function(a){a.getCell=k[_$_5e7a[51]];a.getCellFromCoords=k[_$_5e7a[51]];a.updateCell=k.update;a.updateCells=k.updateAll;a.getSelected=k.selected;a.getCells=k.getCells;a.setCells=k.setCells;a.isAttached=k.attached};k.attached=function(a,c){return this.records[c]&&this.records[c][a]&&this.records[c][a].element&&this.records[c][a].element.parentNode&&this.records[c][a].element.parentNode.parentNode?
|
|
236
|
+
!0:!1};k[_$_5e7a[51]]=function(a,c,b){typeof a==_$_5e7a[17]&&(c=A.getCoordsFromColumnName(a),a=c[0],c=c[1]);a=parseInt(a);c=parseInt(c);if(this.records[c]&&this.records[c][a]&&this.records[c][a].element)return this.records[c][a].element;var d=K.call(this,a,c);null===d&&(d=_$_5e7a[3]);return I.create.call(this,a,c,d,b)};k.getFromCoords=function(a,c,b){if(!a)return null;var d=[],e=a[0],f=a[1],g=a[2];a=a[3];for(b&&(b=this.results?A.invert(this.results):null);f<=a;f++)for(var h=e;h<=g;h++)if(!b||b[f])c?
|
|
237
|
+
d.push(A.getColumnNameFromCoords(h,f)):d.push(this.records[f][h]);return d};k.selected=function(a,c){return k.getFromCoords.call(this,this.getHighlighted(),a,c)};k.getSelectedColumns=function(){var a=[],c=this.getHighlighted();if(c)for(var b=c[0];b<=c[2];b++)a.push(b);return a};k.updateAll=function(a){for(var c=this.getPrimaryKey(),b=[],d=0;d<a.length;d++)void 0!==a[d].id?(O.call(this,a[d]),b.push({id:a[d].id,y:a[d].y}),!1!==c&&k.update.call(this,c,a[d].y,a[d].id,!0)):b.push(k.update.call(this,a[d].x,
|
|
238
|
+
a[d].y,a[d].value,a[d].force));G.call(this,_$_5e7a[106],[b])};k.update=function(a,c,b,d){var e=this.records[c];if(e=e&&e[a]?e[a]:null)if(e=e.element,!d&&e&&1==e.classList.contains(_$_5e7a[18]))d={x:a,y:c};else{d=B.call(this.parent,_$_5e7a[257],this,e,a,c,b);void 0!==d&&(b=d);d=aa[_$_5e7a[51]].call(this,a,c);typeof d[0].updateCell==_$_5e7a[85]&&(d=d[0].updateCell(e,b,a,c,this,d[1]),void 0!==d&&(b=d));d={x:a,y:c};var f=K.call(this,a,c);f!==b&&(b=K.call(this,a,c,b),d.oldValue=f,d.value=b,e&&k.applyOverflow.call(this,
|
|
239
|
+
e,a,c),B.call(this.parent,_$_5e7a[258],this,e,a,c,d.value,d.oldValue))}else return!1;return d};k.create=function(a,c,b,d){var e=document.createElement(_$_5e7a[147]);e.setAttribute(_$_5e7a[42],a);e.setAttribute(_$_5e7a[43],c);var f=aa[_$_5e7a[51]].call(this,a,c);f[0]&&typeof f[0].createCell==_$_5e7a[85]&&(f=f[0].createCell(e,b,a,c,this,f[1]),void 0!==f&&(b=f));K.call(this,a,c,b);this.records[c][a]||ia.cell.call(this,a,c,b);this.records[c][a].element=e;!b&&this.records[c][a].v&&(e.innerText=this.records[c][a].v);
|
|
240
|
+
k.applyProperties.call(this,e,a,c,d);k.applyOverflow.call(this,e,a,c);B.call(this.parent,_$_5e7a[259],this,e,a,c,b);return e};k.getAttributes=function(a,c,b){b[a]||(b[a]={});a==_$_5e7a[260]?b[a][c]=this.getValue(c):a==_$_5e7a[261]?this.merged.cells&&(c=this.merged.cells[c])&&(b[a][c]=this.options.mergeCells[c]):this.options[a]&&this.options[a][c]&&(b[a][c]=this.options[a][c])};k.setAttributes=function(a){a&&a.style&&this.setStyle(a.style);a&&a.comments&&this.setComments(a.comments);a&&a.meta&&this.setMeta(a.meta);
|
|
241
|
+
a&&a.cells&&this.setCells(a.cells);a&&a.mergeCells&&this.setMerge(a.mergeCells);a&&a.values&&k.batch.call(this,a.values);a&&a.formulas&&k.batch.call(this,a.formulas,!0)};k.applyProperties=function(a,c,b,d){if(!d){d=A.getColumnNameFromCoords(c,b);var e=this.options.style,f=this.options.comments,g=this.options.cells,h=this.options.rows;if(e&&e[d]){var l=(l=a.getAttribute(_$_5e7a[98]))?l+(_$_5e7a[262]+e[d]):e[d];a.setAttribute(_$_5e7a[98],l)}f&&f[d]&&a.setAttribute(_$_5e7a[263],f[d]);g&&g[d]&&(1==g[d].readOnly&&
|
|
242
|
+
a.classList.add(_$_5e7a[18]),!1===g[d].locked&&!0===this.options.selectUnLockedCells&&a.classList.add(_$_5e7a[264]));h&&h[b]&&1==h[b].readOnly&&a.classList.add(_$_5e7a[18])}f=this.options.columns[c];a.style.textAlign||(a.style.textAlign=f.align?f.align:this.options.defaultColAlign);!1===this.records[b][c].readonly||1!=this.records[b][c].readonly&&1!=f.readOnly&&1!=f.readonly||a.classList.add(_$_5e7a[18])};k.applyOverflow=function(a,c,b){1==this.options.textOverflow&&0<c&&(c==this.options.columns.length-
|
|
243
|
+
1&&(a.style.overflow=_$_5e7a[49]),this.records[b][c-1]&&this.records[b][c-1].element&&(this.records[b][c-1].element.style.overflow=!a.innerText&&this.headers[c-1]&&this.headers[c-1].offsetWidth?_$_5e7a[3]:_$_5e7a[49]))};k.batch=function(a,c){var b=[],d=Object.keys(a);if(d.length)for(var e=0;e<d.length;e++){if(0<=d[e].indexOf(_$_5e7a[27])){var f=d[e].split(_$_5e7a[27]);var g=D(f[0]);var h=f[1];f=f[0]}else g=this,h=d[e],f=this.getWorksheetName();h=A.getCoordsFromColumnName(h);h=g.updateCell(h[0],h[1],
|
|
244
|
+
a[d[e]],!0);b[f]||(b[f]=[]);b[f].push(h)}if(1==c&&(d=Object.keys(b),d.length))for(e=0;e<d.length;e++)g=D(d[e]),G.call(g,_$_5e7a[107],b[d[e]])};k.getCells=function(a){return a?this.options.cells[a]:this.options.cells};k.setCells=function(a,c){if(!N.call(this.parent,this))return!1;if(typeof a==_$_5e7a[17])this.options.cells[a]=c;else{c=Object.keys(a);for(var b=0;b<c.length;b++)this.options.cells[c[b]]=a[c[b]]}};return k}(),ua=function(){var k=function(c,b){Array.isArray(b)||(b=[b]);for(var d,e=c?_$_5e7a[3]:
|
|
245
|
+
_$_5e7a[40],f=Object.keys(b),g=0;g<f.length;g++)if(d=this.rows[b[f[g]]])d.element&&(d.element.style.display=e),d.visible=c;this.resetBorders();C.refresh.call(this)},a=function(c){c.getRow=a[_$_5e7a[51]];c.moveRow=a.move;c.insertRow=a.add;c.deleteRow=a.del;c.getSelectedRows=a.selected;c.showRow=k.bind(c,!0);c.hideRow=k.bind(c,!1)};a[_$_5e7a[51]]=function(c){return this.rows[c]};a.attached=function(c){return this.rows[c]&&this.rows[c].element&&this.rows[c].element.parentNode?!0:!1};a.selected=function(c){var b=
|
|
246
|
+
[],d=this.getHighlighted();if(d)for(var e=d[1];e<=d[3];e++)c?b.push(e):b.push(this.rows[e].element);return b};a.create=function(c,b){if(this.rows[c]&&this.rows[c].element)return this.rows[c].element;this.rows[c]||ia.row.call(this,c);var d=document.createElement(_$_5e7a[145]);d.setAttribute(_$_5e7a[43],c);this.rows[c].element=d;var e=null;this.options.rows[c]&&!b&&(this.options.rows[c].style&&d.setAttribute(_$_5e7a[98],this.options.rows[c].style),this.options.rows[c].height&&(d.style.height=parseInt(this.options.rows[c].height)+
|
|
247
|
+
_$_5e7a[44]),this.options.rows[c].title&&(e=this.options.rows[c].title),0==this.options.rows[c].visible&&(this.rows[c].visible=!1),this.options.rows[c].id&&(this.rows[c].id=this.options.rows[c].id));B.call(this.parent,_$_5e7a[265],this,c,d);0==this.rows[c].visible&&(d.style.display=_$_5e7a[40]);e||(e=parseInt(c+1));b=document.createElement(_$_5e7a[147]);b.innerHTML=e;b.setAttribute(_$_5e7a[43],c);b.className=_$_5e7a[266];d.appendChild(b);return d};a.move=function(c,b){if(!N.call(this.parent,this))return!1;
|
|
248
|
+
c=parseInt(c);b=parseInt(b);if(!this.rows[b]||!this.rows[c])return console.error(_$_5e7a[267]),!1;if(0<Object.keys(this.getMerge()).length){var d=null;this.merged.rows[c]?d=!0:this.merged.rows[b]&&(c>b?this.merged.rows[b-1]&&(d=!0):this.merged.rows[b+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[b].element)?(d=C.renderRow.call(this,c),c>b?this.tbody.insertBefore(d,this.rows[b].element):this.tbody.insertBefore(d,this.rows[b].element.nextSibling)):
|
|
249
|
+
this.rows[c].element&&(this.tbody.removeChild(this.rows[c].element),C.refresh.call(this));this.rows.splice(b,0,this.rows.splice(c,1)[0]);this.records.splice(b,0,this.records.splice(c,1)[0]);this.options.data.splice(b,0,this.options.data.splice(c,1)[0]);0<this.options.pagination&&this.tbody.children.length!=this.options.pagination&&this.page(this.pageNumber);G.call(this,_$_5e7a[67],{f:c,t:b});T.references.call(this);T.update.call(this);Q.call(this.parent,{worksheet:this,action:_$_5e7a[67],oldValue:c,
|
|
250
|
+
newValue:b});B.call(this.parent,_$_5e7a[268],this,c,b)};a.add=function(c,b,d,e){if(!N.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_5e7a[269]),!1;var f=[];if(0<c)var g=parseInt(c);else g=1,Array.isArray(c)&&!e&&(Array.isArray(c[0])?e=c:(e=[],e.push(c)));e=za.standardize(e);d=d?!0:!1;var h=this.options.data?this.options.data.length-1:0;if(void 0==b||b>h||0>b)b=h,d=!1;g||(g=1);if(!1===B.call(this.parent,_$_5e7a[270],this,b,g,d))return console.log(_$_5e7a[271]),
|
|
251
|
+
!1;this.resetBorders();c=d?b:b+1;for(var l,n,q=0,p=[],r=[],w=this.rows.splice(c),m=this.options.data?this.options.data.splice(c):[],v=this.records.splice(c),u=c;u<g+c;u++){var x=e[q]&&e[q].id?e[q].id:pa.next.call(this);ia.row.call(this,u,x);n=this.dataType?{}:[];for(var y=0;y<this.options.columns.length;y++)l=W.call(this,y),n[l]=_$_5e7a[3],e&&e[q]&&e[q].data&&(typeof e[q].data[l]!==_$_5e7a[13]?n[l]=e[q].data[l]:typeof e[q].data[y]!==_$_5e7a[13]&&(n[l]=e[q].data[y])),f.push({x:y,y:u,value:n[l],force:!0});
|
|
252
|
+
r.push({id:x,data:n});q++}this.rows=this.rows.concat(w);this.records=this.records.concat(v);this.options.data=this.options.data.concat(m);this.results&&0<this.results.length&&(h=this.results[this.results.length-1]);e=!1;w[0]?0<=Array.prototype.indexOf.call(this.tbody.children,w[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=c;u<g+c;u++)this.results&&this.results.push(u),1==e&&(h=w[0]?w[0].element:
|
|
253
|
+
null,l=C.renderRow.call(this,u,null,null,!0),h?this.tbody.insertBefore(l,h):this.tbody.appendChild(l),0<this.options.pagination?Array.prototype.indexOf.call(this.tbody.children,l)>=this.options.pagination&&(e=!1):C.limited.call(this)&&(C.isVisible.call(this,l.children[1])||(e=!1))),p.push(this.records[u]);0<this.options.pagination?qa[_$_5e7a[11]].call(this,this.pageNumber):C.limited.call(this)&&(w=this.tbody.firstChild.getAttribute(_$_5e7a[43]),this.tbody.innerText=_$_5e7a[3],C[_$_5e7a[46]].call(this,
|
|
254
|
+
w));this.merged.rows[c]&&Y.updateConfig.call(this,1,1,c-1,g);G.call(this,_$_5e7a[63],{numOfRows:g,rowNumber:b,insertBefore:d?1:0,data:r});T.references.call(this);f.length&&ba.applyValues.call(this,f);T.update.call(this);P.call(this);ea.refresh.call(this);Q.call(this.parent,{worksheet:this,action:_$_5e7a[63],rowNumber:b,numOfRows:g,insertBefore:d,data:r});B.call(this.parent,_$_5e7a[272],this,b,g,p,d)};a.del=function(c,b){if(!N.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_5e7a[273]),
|
|
255
|
+
!1;var d=null,e={},f=[],g=0;void 0==c&&(b=this.getSelectedRows(),b[0]?(c=parseInt(b[0].getAttribute(_$_5e7a[43])),b=b.length):(c=this.options.data.length-1,b=1));d=this.options.data.length-1;if(void 0==c||c>d||0>c)c=d;b||(b=1);c+b>=this.options.data.length&&(b=this.options.data.length-c,b>=this.options.data.length&&(b=this.options.data.length,this.resetSelection()));if(!1===B.call(this.parent,_$_5e7a[274],this,c,b))return console.log(_$_5e7a[275]),!1;if(-1<parseInt(c)&&0<parseInt(b)){this.resetBorders();
|
|
256
|
+
for(var h=c;h<c+b;h++)for(var l=0;l<this.options.columns.length;l++)d=A.getColumnNameFromCoords(l,h),I.getAttributes.call(this,_$_5e7a[276],d,e),I.getAttributes.call(this,_$_5e7a[98],d,e),I.getAttributes.call(this,_$_5e7a[277],d,e),I.getAttributes.call(this,_$_5e7a[278],d,e),I.getAttributes.call(this,_$_5e7a[261],d,e),I.getAttributes.call(this,_$_5e7a[260],d,e),f[d]=!0;if(d=S.getChain.call(this,e.values))e.formulas=d;for(h=c;h<c+b;h++)0<=Array.prototype.indexOf.call(this.tbody.children,this.rows[h].element)&&
|
|
257
|
+
(this.rows[h].element.parentNode.removeChild(this.rows[h].element),g++);d=[];for(h=c;h<c+b;h++)d.push({id:this.getRowId(h),row:h,data:this.getRowData(h)});this.rows.splice(c,b);h=this.records.splice(c,b);this.options.data.splice(c,b);Y.updateConfig.call(this,1,0,c,b);G.call(this,_$_5e7a[64],{rowNumber:c,numOfRows:b,data:d});T.references.call(this,f);if(0<this.options.pagination)this.page(this.pageNumber,function(){if(0==this.tbody.children.length){var n=this.whichPage(this.options.data.length-1);
|
|
258
|
+
this.page(n)}});else if(C.limited.call(this)&&0<g)if(0==this.tbody.children.length)this[_$_5e7a[46]](c);else C.refresh.call(this);T.update.call(this,!0);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[64],rowNumber:c,numOfRows:b,insertBefore:1,data:d,attributes:e});B.call(this.parent,_$_5e7a[279],this,c,b,h,d,e)}};return a}(),Ba=function(){var k=function(c,b){Array.isArray(b)||(b=[b]);for(var d,e,f=Object.keys(b),g=0;g<f.length;g++)if(d=b[f[g]],e=this.options.columns[d])this.colgroup[d]&&
|
|
259
|
+
(this.colgroup[d].style.width=c?parseInt(e.width||this.options.defaultColWidth)+_$_5e7a[44]:_$_5e7a[144]),e.visible=c;this.resetBorders();C.refresh.call(this)},a=function(c){c.getColumn=a[_$_5e7a[51]];c.getColumnIdByName=a.getByName;c.getPrimaryKey=a.getPrimaryKey;c.getSelectedColumns=a.selected;c.getOptions=a.getOptions;c.getColumnOptions=a.getOptions;c.moveColumn=a.move;c.insertColumn=a.add;c.deleteColumn=a.del;c.getProperties=a.properties;c.setProperties=a.properties;c.getProperty=a.properties;
|
|
260
|
+
c.setProperty=a.properties;c.showColumn=k.bind(c,!0);c.hideColumn=k.bind(c,!1)};a[_$_5e7a[51]]=function(c){return this.options.columns[c]||!1};a.getByName=function(c){for(var b=this.options.columns,d=0;d<b.length;d++)if(b[d].name==c)return d;return!1};a.getPrimaryKey=function(){for(var c=0;c<this.options.columns.length;c++)if(1==this.options.columns[c].primaryKey)return c;return!1};a.getOptions=function(c,b){var d=this.options.columns[c];Object.keys(this.options.cells).length&&void 0!==b&&(c=A.getColumnNameFromCoords(c,
|
|
261
|
+
b),this.options.cells[c]&&(d=this.options.cells[c]));if(!d)d={type:_$_5e7a[56]};else if(!d.type||typeof d.type==_$_5e7a[17]&&!t.editors[d.type])d.type=_$_5e7a[56];return d};a.selected=function(c){c=[];var b=this.getHighlighted();if(b)for(var d=b[0];d<=b[2];d++)c.push(d);return c};a.move=function(c,b){if(!N.call(this.parent,this))return!1;c=parseInt(c);b=parseInt(b);if(!this.options.columns[c])return console.error(_$_5e7a[280]),!1;if(!this.options.columns[b])return console.error(_$_5e7a[281]),!1;if(0<
|
|
262
|
+
Object.keys(this.getMerge()).length){var d=null;this.merged.cols[c]?d=!0:this.merged.cols[b]&&(c>b?this.merged.cols[b-1]&&(d=!0):this.merged.cols[b+1]&&(d=!0));d&&this.destroyMerged()}this.resetBorders();d=this.options.freezeColumns;0<d&&(c<d||b<d)?ja.reset.call(this):d=null;if(this.headers[b]&&this.headers[b].parentNode){this.headers[c]||wa.create.call(this,c);var e=(c>b?this.headers[b]:this.headers[b].nextSibling)||null;this.headerContainer.insertBefore(this.headers[c],e);e=(c>b?this.colgroup[b]:
|
|
263
|
+
this.colgroup[b].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[c],e);for(var f=0;f<this.tbody.children.length;f++){var g=this.tbody.children[f].getAttribute(_$_5e7a[43]);e=(c>b?this.records[g][b].element:this.records[g][b].element.nextSibling)||null;this.tbody.children[f].insertBefore(I[_$_5e7a[51]].call(this,c,g),e)}if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)e=(c>b?this.footers.content[f][b].element:this.footers.content[f][b].element.nextSibling)||null,
|
|
264
|
+
this.tfoot.children[f].insertBefore(X.create.call(this,c,f),e)}else if(this.headers[c]&&this.headers[c].parentNode){this.headerContainer.removeChild(this.headers[c]);this.colgroupContainer.removeChild(this.colgroup[c]);for(f=0;f<this.tbody.children.length;f++)g=parseInt(this.tbody.children[f].getAttribute(_$_5e7a[43])),this.tbody.children[f].removeChild(this.records[g][c].element);if(this.options.footers)for(f=0;f<this.tfoot.children.length;f++)this.tfoot.children[f].removeChild(this.footers.content[f][c].element)}this.options.columns.splice(b,
|
|
265
|
+
0,this.options.columns.splice(c,1)[0]);this.headers.splice(b,0,this.headers.splice(c,1)[0]);this.colgroup.splice(b,0,this.colgroup.splice(c,1)[0]);for(f=0;f<this.rows.length;f++)this.dataType||this.options.data[f].splice(b,0,this.options.data[f].splice(c,1)[0]),this.records[f].splice(b,0,this.records[f].splice(c,1)[0]);if(this.options.footers)for(f=0;f<this.options.footers.length;f++)this.options.footers[f].splice(b,0,this.options.footers[f].splice(c,1)[0]),this.footers.content[f].splice(b,0,this.footers.content[f].splice(c,
|
|
266
|
+
1)[0]);G.call(this,_$_5e7a[68],{f:c,t:b});T.references.call(this);T.update.call(this);0<d&&(c<=d||d<=d)&&ja[_$_5e7a[11]].call(this,d);Q.call(this.parent,{worksheet:this,action:_$_5e7a[68],oldValue:c,newValue:b});B.call(this.parent,_$_5e7a[282],this,c,b)};a.add=function(c,b,d,e,f,g){if(!N.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_5e7a[283]),!1;var h=[];if(0<c)var l=parseInt(c);else if(l=1,Array.isArray(c)&&!f)if(Array.isArray(c[0]))f=c;else{f=[];for(var n=
|
|
267
|
+
0;n<c.length;n++)f[n]=[c[n]]}f||(f=[]);d=d?!0:!1;c=this.options.columns.length-1;if(void 0==b||b>c||0>b)b=c,d=!1;l||(l=1);if(!1===B.call(this.parent,_$_5e7a[284],this,b,l,d))return console.log(_$_5e7a[285]),!1;ea.reset.call(this);if(1==this.dataType)var q=parseInt((_$_5e7a[3]+Date.now()).substr(-8));e||(e=[]);for(n=0;n<l;n++)e[n]||(e[n]={type:_$_5e7a[56],source:[],options:[],width:this.options.defaultColWidth,align:this.options.defaultColAlign}),1==this.dataType&&typeof e[n].name==_$_5e7a[13]&&(e[n].name=
|
|
268
|
+
_$_5e7a[286]+(q+n));var p=d?b:b+1;this.options.columns=A.injectArray(this.options.columns,p,e);q=function(u,x){for(var y=p;y<l+p;y++)wa.create.call(this,y),u?(this.headerContainer.insertBefore(this.headers[y],u),this.colgroupContainer.insertBefore(this.colgroup[y],x)):(this.headerContainer.appendChild(this.headers[y]),this.colgroupContainer.appendChild(this.colgroup[y]))};n=function(u,x){if(x)for(var y=p;y<l+p;y++)this.rows[u].element.insertBefore(I[_$_5e7a[51]].call(this,y,u),x);else for(y=p;y<l+
|
|
269
|
+
p;y++)this.rows[u].element.appendChild(I[_$_5e7a[51]].call(this,y,u))};var r=this.headers.splice(p),w=this.colgroup.splice(p);r[0]?0<=Array.prototype.indexOf.call(this.headerContainer.children,r[0])&&q.call(this,r[0],w[0]):this.headers[c]&&0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[c])&&q.call(this);this.headers=this.headers.concat(r);this.colgroup=this.colgroup.concat(w);X.adjust.call(this,p,l,1);ka.adjust.call(this,b,l,1,g);g=0;w=r=q=null;for(var m=0;m<this.options.data.length;m++){this.dataType||
|
|
270
|
+
(r=this.options.data[m].splice(p));w=this.records[m].splice(p);g=0;for(var v=p;v<l+p;v++)q=f[m]&&f[m][g]?f[m][g]:_$_5e7a[3],K.call(this,v,m,q),h.push({x:v,y:m,value:q}),ia.cell.call(this,v,m),g++;this.rows[m].element&&this.rows[m].element.parentNode&&(w[0]?0<=Array.prototype.indexOf.call(this.rows[m].element.children,w[0].element)&&n.call(this,m,w[0].element):this.records[m][c].element&&0<=Array.prototype.indexOf.call(this.rows[m].element.children,this.records[m][c].element)&&n.call(this,m));this.dataType||
|
|
271
|
+
(this.options.data[m]=this.options.data[m].concat(r));this.records[m]=this.records[m].concat(w)}this.merged.cols[p]&&Y.updateConfig.call(this,0,1,p-1,l);G.call(this,_$_5e7a[65],{numOfColumns:l,columnNumber:b,insertBefore:d?1:0,properties:e,data:f});T.references.call(this);h.length&&ba.applyValues.call(this,h);T.update.call(this);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[65],columnNumber:b,numOfColumns:l,insertBefore:d,properties:e,data:f});B.call(this.parent,_$_5e7a[287],
|
|
272
|
+
this,b,l,[],d)};a.del=function(c,b){if(!N.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_5e7a[288]),!1;var d={},e=[],f=0;if(1<this.options.columns.length){void 0==c&&(b=this.getSelectedColumns(!0),b.length?(c=parseInt(b[0]),b=parseInt(b.length)):(c=this.options.columns.length-1,b=1));var g=this.options.columns.length-1;if(void 0==c||c>g||0>c)c=g;b||(b=1);c+b>=this.options.columns.length&&(b=this.options.columns.length-c,b>=this.options.columns.length&&(b--,
|
|
273
|
+
console.error(_$_5e7a[289])));if(!1===B.call(this.parent,_$_5e7a[290],this,c,b))return console.log(_$_5e7a[291]),!1;if(-1<parseInt(c)&&0<parseInt(b)){this.resetBorders();g=null;var h=[],l=[],n=[];var q=0;for(var p=c;p<c+b;p++)0<=Array.prototype.indexOf.call(this.headerContainer.children,this.headers[p])&&(this.colgroup[p].parentNode.removeChild(this.colgroup[p]),this.headers[p].parentNode.removeChild(this.headers[p]),f++),n[q]=this.options.columns[p],q++;for(var r=0;r<this.options.data.length;r++)for(p=
|
|
274
|
+
c;p<c+b;p++)q=A.getColumnNameFromCoords(p,r),I.getAttributes.call(this,_$_5e7a[276],q,d),I.getAttributes.call(this,_$_5e7a[98],q,d),I.getAttributes.call(this,_$_5e7a[277],q,d),I.getAttributes.call(this,_$_5e7a[278],q,d),I.getAttributes.call(this,_$_5e7a[261],q,d),I.getAttributes.call(this,_$_5e7a[260],q,d),e[q]=!0,this.records[r][p].element&&0<=Array.prototype.indexOf.call(this.rows[r].element.children,this.records[r][p].element)&&this.records[r][p].element.parentNode.removeChild(this.records[r][p].element);
|
|
275
|
+
if(p=S.getChain.call(this,d.values))d.formulas=p;this.options.columns.splice(c,b);this.headers.splice(c,b);this.colgroup.splice(c,b);for(r=0;r<this.options.data.length;r++)this.dataType||(l[r]=this.options.data[r].splice(c,b)),h[r]=this.records[r].splice(c,b);X.adjust.call(this,c,b,0);(p=ka.adjust.call(this,c,b,0))&&(g={nested:p});Y.updateConfig.call(this,0,0,c,b);G.call(this,_$_5e7a[66],{columnNumber:c,numOfColumns:b});T.references.call(this,e);0<f&&(1==this.thead.children.length?C[_$_5e7a[46]].call(this,
|
|
276
|
+
null,c):C.refresh.call(this));T.update.call(this,!0);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[66],columnNumber:c,numOfColumns:b,insertBefore:1,data:l,properties:n,attributes:d,extra:g});B.call(this.parent,_$_5e7a[292],this,c,b,h,n,d)}}};a.properties=function(c,b){if(this.options.columns[c]){if(b){if(!N.call(this.parent,this))return!1;b=typeof b==_$_5e7a[17]?{type:b}:b;b.type&&t.editors[b.type]||(b.type=_$_5e7a[56]);parseInt(b.width)||(b.width=this.options.defaultColWidth||
|
|
277
|
+
100);this.edition&&this.closeEditor(this.edition,!1);var d=this.options.columns[c],e=t.editors[d.type],f=t.editors[b.type];if(e&&typeof e.destroyCell==_$_5e7a[85])for(var g=0;g<this.records.length;g++)this.records[g][c].element&&e.destroyCell(this.records[g][c].element);this.options.columns[c]=b;if(f&&typeof f.createCell==_$_5e7a[85])for(g=0;g<this.records.length;g++)this.records[g]&&this.records[g][c]&&this.records[g][c].element&&(I.applyProperties.call(this,this.records[g][c].element,c,g),f.createCell(this.records[g][c].element,
|
|
278
|
+
K.call(this,c,g),c,g,this,b));b.width&&this.colgroup[c]&&this.colgroup[c].setAttribute(_$_5e7a[152],parseInt(b.width));b.title&&(this.headers[c]&&(this.headers[c].innerText=b.title,this.headers[c].setAttribute(_$_5e7a[166],b.title)),this.options.columns[c].title=b.title);b.tooltip&&(this.headers[c]&&(this.headers[c].title=b.tooltip),this.options.columns[c].tooltip=b.tooltip);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[77],column:c,newValue:b,oldValue:d});G.call(this,_$_5e7a[77],
|
|
279
|
+
{column:c,options:b});return!0}return this.options.columns[c]}console.error(_$_5e7a[293])};return a}(),La=function(){var k={},a={},c=function(d){if(typeof d==_$_5e7a[17]){var e=d;d=A.getCoordsFromColumnName(d);var f=d[0];d=d[1]}else f=d.x,d=d.y,e=A.getColumnNameFromCoords(f,d);if(this.records[d]&&this.records[d][f]&&this.records[d][f].element){a[e]=this.options.style[e];this.records[d][f].element.setAttribute(_$_5e7a[98],_$_5e7a[3]);var g=this.options.columns[f].align?this.options.columns[f].align:
|
|
280
|
+
this.options.defaultColAlign;g&&(this.records[d][f].element.style.textAlign=g)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},b=function(d){d.getStyle=b[_$_5e7a[51]];d.setStyle=b[_$_5e7a[11]];d.resetStyle=b.reset};b[_$_5e7a[51]]=function(d){var e=this.options.style;if(!e)return!1;if(d){if(typeof d==_$_5e7a[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]==_$_5e7a[17])var l=e&&e[d[h]]?e[d[h]]:_$_5e7a[3];else l=A.getColumnNameFromCoords(d[h].x,
|
|
281
|
+
d[h].y),l=e&&e[l]?e[l]:_$_5e7a[3];f.push(l)}return f}return this.options.style};b[_$_5e7a[11]]=function(d,e,f,g){if(!N.call(this.parent,this))return!1;this.options.style||(this.options.style={});var h=this.options.style,l=null,n=[],q=[],p={};q=function(m,v,u){if(!p[m]&&(h[m]?n=h[m].split(_$_5e7a[262]):(h[m]=_$_5e7a[3],n=[]),p[m]={},n.length))for(var x=0;x<n.length;x++)n[x]&&n[x].trim()&&(l=n[x].split(_$_5e7a[136]),p[m][l[0].trim()]=l[1].trim());a[m]||(a[m]=[]);k[m]||(k[m]=[]);p[m][v]||(p[m][v]=_$_5e7a[3]);
|
|
282
|
+
a[m].push([v+_$_5e7a[136]+p[m][v]]);p[m][v]=p[m][v]&&p[m][v]==u&&!g?_$_5e7a[3]:u;k[m].push([v+_$_5e7a[136]+p[m][v]]);u=A.getCoordsFromColumnName(m);this.records[u[1]]&&this.records[u[1]][u[0]]&&this.records[u[1]][u[0]].element&&(this.records[u[1]][u[0]].element.style[v]=p[m][v]);p[m][v]||delete p[m][v]};k={};a={};if(e)if(typeof d==_$_5e7a[17])q.call(this,d,e,f);else{if(d&&d.length)for(var r=0;r<d.length;r++){var w=A.getColumnNameFromCoords(d[r].x,d[r].y);q.call(this,w,e,f)}}else for(f=Object.keys(d),
|
|
283
|
+
r=0;r<f.length;r++)if(w=d[f[r]])for(typeof w==_$_5e7a[17]&&(w=w.split(_$_5e7a[262])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_5e7a[17]&&(w[e]=w[e].split(_$_5e7a[136])),w[e][0].trim()&&q.call(this,f[r],w[e][0].trim(),w[e][1].trim()));n={};q=Object.keys(p);if(q.length){for(r=0;r<q.length;r++){n[q[r]]||(n[q[r]]=[]);d=Object.keys(p[q[r]]);for(e=0;e<d.length;e++)n[q[r]].push(d[e]+_$_5e7a[114]+p[q[r]][d[e]]);this.options.style[q[r]]=n[q[r]].join(_$_5e7a[294])}q=Object.keys(k);for(r=0;r<q.length;r++)k[q[r]]=
|
|
284
|
+
k[q[r]].join(_$_5e7a[262]);q=Object.keys(a);for(r=0;r<q.length;r++)a[q[r]]=a[q[r]].join(_$_5e7a[262]);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[71],oldValue:a,newValue:k});G.call(this,_$_5e7a[71],[k]);B.call(this.parent,_$_5e7a[295],this,k,a)}};b.reset=function(d){if(!N.call(this.parent,this))return!1;if(d){a={};if(Array.isArray(d))for(var e=0;e<d.length;e++)c.call(this,d[e]);else c.call(this,d);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[72],
|
|
285
|
+
cells:d,oldValue:a});G.call(this,_$_5e7a[72],[d]);B.call(this.parent,_$_5e7a[297],this,d)}else console.error(_$_5e7a[296])};b.update=function(d){k={};a={};for(var e=Object.keys(d),f=0;f<e.length;f++){a[e[f]]=this.options.style[e[f]]||_$_5e7a[3];k[e[f]]=this.options.style[e[f]]=d[e[f]];var g=A.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(_$_5e7a[98],d[e[f]]),this.records[g][h].element.style.textAlign||
|
|
286
|
+
(this.records[g][h].element.style.textAlign=this.options.columns[h].align||this.options.defaultColAlign||_$_5e7a[53]))}G.call(this,_$_5e7a[72],[e]);G.call(this,_$_5e7a[71],[k]);B.call(this.parent,_$_5e7a[295],this,k,a)};return b}(),Ra=function(){var k=function(a){a.getComments=k[_$_5e7a[51]];a.setComments=k[_$_5e7a[11]]};k[_$_5e7a[51]]=function(a){return a&&typeof a==_$_5e7a[17]?this.options.comments&&this.options.comments[a]?this.options.comments[a]:!1:this.options.comments};k[_$_5e7a[11]]=function(a,
|
|
287
|
+
c){if(!N.call(this.parent,this))return!1;if(typeof a==_$_5e7a[17]){var b={};b[a]=c}else b=a;if(c=B.call(this.parent,_$_5e7a[298],this,b))b=c;else if(!1===c)return!1;this.options.comments||(this.options.comments={});a={};var d=Object.keys(b);if(d.length){for(var e=0;e<d.length;e++){var f=A.getCoordsFromColumnName(d[e]);this.records[f[1]]&&this.records[f[1]][f[0]]&&(a[d[e]]=this.options.comments[d[e]]||_$_5e7a[3],(c=b[d[e]])?this.options.comments[d[e]]=c:delete this.options.comments[d[e]],this.records[f[1]][f[0]].element&&
|
|
288
|
+
(c?this.records[f[1]][f[0]].element.setAttribute(_$_5e7a[263],c):this.records[f[1]][f[0]].element.removeAttribute(_$_5e7a[263])))}Q.call(this.parent,{worksheet:this,action:_$_5e7a[76],newValue:b,oldValue:a});G.call(this,_$_5e7a[76],[b]);B.call(this.parent,_$_5e7a[299],this,b,a)}};return k}(),Sa=function(){var k=function(a){a.getMeta=k[_$_5e7a[51]];a.setMeta=k[_$_5e7a[11]];a.resetMeta=k.reset};k[_$_5e7a[51]]=function(a,c){if(a){if(this.options.meta[a])return c?this.options.meta[a][c]:this.options.meta[a]}else return this.options.meta};
|
|
289
|
+
k[_$_5e7a[11]]=function(a,c,b){if(!N.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof a==_$_5e7a[17]&&c){b||(b=_$_5e7a[3]);var d={};d[a]={};d[a][c]=b;a=d}c=Object.keys(a);if(c.length){b={};for(d=0;d<c.length;d++){this.options.meta[c[d]]||(this.options.meta[c[d]]={});b[c[d]]||(b[c[d]]={});for(var e=Object.keys(a[c[d]]),f=0;f<e.length;f++)this.options.meta[c[d]][e[f]]=a[c[d]][e[f]],b[c[d]][e[f]]=a[c[d]][e[f]]}Object.keys(b).length&&(G.call(this,_$_5e7a[300],[b]),B.call(this.parent,
|
|
290
|
+
_$_5e7a[301],this,b))}};k.reset=function(){this.options.meta={};G.call(this,_$_5e7a[302],{});B.call(this.parent,_$_5e7a[303],this,{})};return k}(),Ta=function(){var k=function(a){a.orderBy=k.execute};k.handler=function(a,c){return function(b,d){b=b[1];d=d[1];return a?b===_$_5e7a[3]&&d!==_$_5e7a[3]?1:b!==_$_5e7a[3]&&d===_$_5e7a[3]?-1:b>d?-1:b<d?1:0:b===_$_5e7a[3]&&d!==_$_5e7a[3]?1:b!==_$_5e7a[3]&&d===_$_5e7a[3]?-1:b>d?1:b<d?-1:0}};k.execute=function(a,c,b){if(0<=a){c=null==c?this.headers[a].classList.contains(_$_5e7a[304])?
|
|
291
|
+
1:0:c?1:0;for(var d,e,f=[],g=0;g<this.options.data.length;g++)d=Ba.getOptions.call(this,a,g),e=this.records[g][a].v,e=d.type==_$_5e7a[250]||d.type==_$_5e7a[255]||d.type==_$_5e7a[256]||d.type==_$_5e7a[305]||d.type==_$_5e7a[14]||d.type==_$_5e7a[306]?Number(e):jSuites.isNumeric(e)?Number(e):e.toLowerCase(),f[g]=[g,e];g=typeof this.parent.config.sorting===_$_5e7a[85]?this.parent.config.sorting(c,a):k.handler(c,a);f.sort(g);d=b?!0:!1;if(!b)for(b=[],g=0;g<f.length;g++)b[g]=f[g][0];if(g=B.call(this.parent,
|
|
292
|
+
_$_5e7a[307],this,a,c,b))b=g;else if(!1===g)return!1;if(d)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(z(_$_5e7a[308])))this.destroyMerged();else return!1;if(b.length<f.length)for(g=0;g<f.length;g++)-1==b.indexOf(f[g][0])&&b.push(f[g][0]);f=[];for(g=0;g<b.length;g++)f[b[g]]=g;ya.call(this,!1);ea.reset.call(this);G.call(this,_$_5e7a[78],{column:a,direction:c,order:b});k.update.call(this,b);k.arrow.call(this,a,c);ea.refresh.call(this);Q.call(this.parent,{worksheet:this,
|
|
293
|
+
action:_$_5e7a[78],column:a,newValue:b,oldValue:f,direction:c});B.call(this.parent,_$_5e7a[309],this,a,c,b);return!0}};k.update=function(a){for(var c=[],b=0;b<a.length;b++)c[b]=this.options.data[a[b]];for(b=0;b<a.length;b++)this.options.data[b]=c[b];c=[];for(b=0;b<a.length;b++)c[b]=this.records[a[b]];this.records=c;c=[];for(b=0;b<a.length;b++)c[b]=this.rows[a[b]];this.rows=c;T.references.call(this);this.searchInput&&this.searchInput.value?ma.update.call(this,null):Z.update.call(this)};k.arrow=function(a,
|
|
294
|
+
c){for(var b=0;b<this.headers.length;b++)this.headers[b].classList.remove(_$_5e7a[310]),this.headers[b].classList.remove(_$_5e7a[304]);c?this.headers[a].classList.add(_$_5e7a[310]):this.headers[a].classList.add(_$_5e7a[304])};return k}(),qa=function(){var k=function(a){a.whichPage=k.whichPage;a.quantityOfPages=k.quantityOfPages;a.page=k[_$_5e7a[11]];a.updatePagination=k.update};k.build=function(){this.pageNumber=0;var a=document.createElement(_$_5e7a[20]),c=document.createElement(_$_5e7a[20]);this.pagination=
|
|
295
|
+
document.createElement(_$_5e7a[20]);this.pagination.classList.add(_$_5e7a[311]);this.pagination.appendChild(a);this.pagination.appendChild(c);this.options.pagination||(this.pagination.style.display=_$_5e7a[40]);this.element.appendChild(this.pagination)};k.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,k[_$_5e7a[11]].call(this,this.pageNumber))};k.pageDown=function(){this.pageNumber<k.quantityOfPages.call(this)-1&&(this.pageNumber++,k[_$_5e7a[11]].call(this,this.pageNumber))};k.whichPage=
|
|
296
|
+
function(a){if(0<this.options.pagination)return this.rows[a]?(this.results&&(a=this.results.indexOf(parseInt(a))),Math.ceil((parseInt(a)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_5e7a[312]);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(_$_5e7a[312]);return!1};k[_$_5e7a[11]]=function(a,c){var b=this.pageNumber,d=parseInt(this.options.pagination);
|
|
297
|
+
if(d){if(null==a||-1==a)a=Math.ceil((this.results?this.results:this.rows).length/d)-1;if(!1===B.call(this.parent,_$_5e7a[314],this,a,b,d))return!1;this.pageNumber=a;C.resetY.call(this);X.refresh.call(this);typeof c==_$_5e7a[85]&&c.call(this);B.call(this.parent,_$_5e7a[315],this,a,b,d)}else console.error(_$_5e7a[313])};k.update=function(){this.pagination.children[0].innerHTML=_$_5e7a[3];this.pagination.children[1].innerHTML=_$_5e7a[3];if(this.options.pagination){var a=this.results?this.results.length:
|
|
298
|
+
this.rows.length;if(a){a=Math.ceil(a/this.options.pagination);if(6>this.pageNumber)var c=1,b=10>a?a:10;else 5>a-this.pageNumber?(c=a-9,b=a,1>c&&(c=1)):(c=this.pageNumber-4,b=this.pageNumber+5);if(1<c){var d=document.createElement(_$_5e7a[20]);d.className=_$_5e7a[317];d.innerHTML=_$_5e7a[215];d.title=1;this.pagination.children[1].appendChild(d)}for(;c<=b;c++)d=document.createElement(_$_5e7a[20]),d.className=_$_5e7a[317],d.innerHTML=c,this.pagination.children[1].appendChild(d),this.pageNumber==c-1&&
|
|
299
|
+
d.classList.add(_$_5e7a[318]);b<a&&(d=document.createElement(_$_5e7a[20]),d.className=_$_5e7a[317],d.innerHTML=_$_5e7a[216],d.title=a,this.pagination.children[1].appendChild(d));this.pagination.children[0].innerHTML=z(_$_5e7a[319],[this.pageNumber+1,a])}else this.pagination.children[0].innerHTML=z(_$_5e7a[316])}};return k}(),ja=function(){var k=function(a){a.setFreezeColumns=k[_$_5e7a[11]];a.resetFreezeColumns=k.reset};k.update=function(a){var c,b;if(b=this.options.freezeColumns){var d=50;if(this.rows[a].element)for(var e=
|
|
300
|
+
0;e<b;e++){if(c=this.records[a][e].element)c.classList.add(_$_5e7a[50]),c.style.left=d+1+_$_5e7a[44];d+=this.options.columns[e].width}}};k.headers=function(){var a=50,c;if(c=this.options.freezeColumns)for(var b=0;b<c;b++){this.headers[b].classList.add(_$_5e7a[50]);this.headers[b].style.left=a+1+_$_5e7a[44];if(this.options.footers)for(var d=0;d<this.options.footers.length;d++)this.footers.content[d][b].element.classList.add(_$_5e7a[50]),this.footers.content[d][b].element.style.left=a+1+_$_5e7a[44];
|
|
301
|
+
a+=this.options.columns[b].width}else k.reset.call(this)};k[_$_5e7a[11]]=function(a){a&&(this.options.freezeColumns=a,C.reset.call(this,!0),C[_$_5e7a[46]].call(this,null,0));if(this.options.freezeColumns)for(k.headers.call(this),a=0;a<this.rows.length;a++)this.rows[a].element&&k.update.call(this,a)};k.reset=function(){for(var a,c=1;c<=this.options.freezeColumns;c++){if(a=this.thead.lastChild)a.children[c].classList.remove(_$_5e7a[50]),a.children[c].style.left=_$_5e7a[3];for(var b=0;b<this.rows.length;b++)if(a=
|
|
302
|
+
this.rows[b].element)a.children[c].classList.remove(_$_5e7a[50]),a.children[c].style.left=_$_5e7a[3];if(this.options.footers)for(b=0;b<this.options.footers.length;b++)this.tfoot.children[b].children[c].classList.remove(_$_5e7a[50]),this.tfoot.children[b].children[c].style.left=_$_5e7a[3]}this.options.freezeColumns=0};k.getWidth=function(){var a=0;if(0<this.options.freezeColumns)for(var c=0;c<=this.options.freezeColumns;c++)a+=this.thead.lastChild.children[c].offsetWidth;return a};return k}(),T=function(){var k=
|
|
303
|
+
function(b,d){if(this.options[b]){for(var e={},f=Object.keys(this.options[b]),g=0;g<f.length;g++)e[d&&void 0!=d[f[g]]?d[f[g]]:f[g]]=this.options[b][f[g]];this.options[b]=e}},a=function(){if(0<this.options.minSpareRows){for(var b=0,d=this.rows.length-1;0<=d;d--){for(var e=!1,f=0;f<this.options.columns.length;f++)K.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareRows-b&&this.insertRow(this.options.minSpareRows-b)}if(0<this.options.minSpareCols){b=0;for(f=this.options.columns.length-
|
|
304
|
+
1;0<=f;f--){e=!1;for(d=0;d<this.rows.length;d++)K.call(this,f,d)&&(e=!0);if(e)break;else b++}0<this.options.minSpareCols-b&&this.insertColumn(this.options.minSpareCols-b)}},c=function(){};c.build=function(){var b=this;this.content=document.createElement(_$_5e7a[20]);this.content.classList.add(_$_5e7a[320]);this.content.addEventListener(_$_5e7a[321],function(f){if(C.limited.call(b)&&!b.options.pagination){var g=Math.abs(f.deltaX),h=Math.abs(f.deltaY);f.shiftKey||g>h?0>f.deltaX||0>f.deltaY?C.pageLeft.call(b,
|
|
305
|
+
1,null,f):C.pageRight.call(b,1,null,f):0>f.deltaY?C.pageUp.call(b,1,null,f):C.pageDown.call(b,1,null,f)}});this.content.addEventListener(_$_5e7a[322],function(f){if(!b.edition)return f.preventDefault(),!1});this.table=document.createElement(_$_5e7a[323]);this.thead=document.createElement(_$_5e7a[324]);this.tbody=document.createElement(_$_5e7a[325]);this.tfoot=document.createElement(_$_5e7a[326]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_5e7a[327]);var d=document.createElement(_$_5e7a[169]);
|
|
306
|
+
d.setAttribute(_$_5e7a[152],_$_5e7a[328]);this.colgroupContainer.appendChild(d);this.headerContainer=document.createElement(_$_5e7a[145]);d=document.createElement(_$_5e7a[147]);d.classList.add(_$_5e7a[329]);this.headerContainer.appendChild(d);this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_5e7a[330]);this.table.setAttribute(_$_5e7a[331],_$_5e7a[97]);this.table.setAttribute(_$_5e7a[332],_$_5e7a[97]);this.table.setAttribute(_$_5e7a[333],_$_5e7a[334]);this.table.appendChild(this.colgroupContainer);
|
|
307
|
+
this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.parent.config.wordWrap&&this.table.classList.add(_$_5e7a[335]);this.options.textOverflow||this.table.classList.add(_$_5e7a[336]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_5e7a[337]);this.corner=document.createElement(_$_5e7a[20]);this.corner.className=_$_5e7a[338];this.corner.setAttribute(_$_5e7a[333],_$_5e7a[339]);this.corner.setAttribute(_$_5e7a[340],_$_5e7a[341]);
|
|
308
|
+
0==this.options.selectionCopy&&(this.corner.style.display=_$_5e7a[40]);this.scrollX=P.build.call(b,_$_5e7a[45]);this.scrollY=P.build.call(b,_$_5e7a[342]);d=document.createElement(_$_5e7a[20]);d.appendChild(this.content);d.appendChild(this.scrollY);d.classList.add(_$_5e7a[343]);var e=document.createElement(_$_5e7a[20]);e.appendChild(d);e.appendChild(this.scrollX);e.classList.add(_$_5e7a[344]);this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(e);1==
|
|
309
|
+
this.options.tableOverflow&&(this.options.tableHeight||(this.options.tableHeight=300),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-8),this.content.style.maxHeight=parseInt(this.options.tableHeight)+_$_5e7a[44],this.content.style.maxWidth=parseInt(this.options.tableWidth)+_$_5e7a[44],1==this.options.tableOverflowResizable&&(this.content.style.resize=_$_5e7a[345]));ma.build.call(this);ka.build.call(this);qa.build.call(this);za.build.call(this);Y.build.call(this);X.build.call(this);
|
|
310
|
+
C.call(this);Z.onload.call(this);a.call(this)};c.references=function(b){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(_$_5e7a[42]),h!=f&&(g.setAttribute(_$_5e7a[42],f),g.getAttribute(_$_5e7a[166])||(g.innerHTML=A.getColumnName(f)));for(var n=0;n<this.rows.length;n++)g=this.rows[n],l=g.y,l!=n&&(g.y=n,d[l]=n,g.element&&(g.element.setAttribute(_$_5e7a[43],n),g.element.children[0].setAttribute(_$_5e7a[43],n),f=this.options.rows&&
|
|
311
|
+
this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:n+1,g.element.children[0].innerHTML=f));var q=function(r,w){g=this.records[w][r];h=g.x;l=g.y;h!=r&&(g.x=r,g.element&&g.element.setAttribute(_$_5e7a[42],r));l!=w&&(g.y=w,g.element&&g.element.setAttribute(_$_5e7a[43],w));if(h!=r||l!=w){var m=A.getColumnNameFromCoords(h,l);r=A.getColumnNameFromCoords(r,w);e[m]=r}};if(b){n=function(r,w){r&&r[w]&&delete r[w]};var p=Object.keys(b);for(f=0;f<p.length;f++)n(this,p[f]),n(this.options.meta,
|
|
312
|
+
p[f]),n(this.options.cells,p[f]),n(this.options.style,p[f]),n(this.options.comments,p[f])}for(n=0;n<this.rows.length;n++)for(f=0;f<this.options.columns.length;f++)q.call(this,f,n);k.call(this,_$_5e7a[346],d);k.call(this,_$_5e7a[276],e);k.call(this,_$_5e7a[277],e);k.call(this,_$_5e7a[98],e);k.call(this,_$_5e7a[278],e);k.call(this,_$_5e7a[261],e);this.options.mergeCells&&Y.build.call(this);S.updateAll.call(this,e,b);return e};c.update=function(b){b&&a.call(this);if(typeof this.parent.config.updateTable==
|
|
313
|
+
_$_5e7a[85])for(var d=0;d<this.rows.length;d++)for(var e=0;e<this.options.columns.length;e++)b=this.records[d][e],this.parent.config.updateTable.call(this,this,b.element,e,d,K.call(this,e,d),b.r?b.r:b.v);P.call(this);X.refresh.call(this)};return c}(),ia=function(){var k={spreadsheet:function(a,c){var b={name:null,config:{},el:a,element:a,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};xa.spreadsheet.call(b,c);b.config.license&&(t.license=
|
|
314
|
+
b.config.license);a.spreadsheet=b;a.jspreadsheet=a.jexcel=b.worksheets;t.spreadsheet.push(b);b.name||(b.name=jSuites.guid());k.bind(b.config.root?b.config.root:document);var d=b.config.tabs;typeof d!==_$_5e7a[84]&&(d={allowCreate:d?!0:!1,hideHeaders:d?!1:!0,allowChangePosition:b.config.allowMoveWorksheet?!0:!1});d.maxWidth||(d.maxWidth=a.offsetWidth-50+_$_5e7a[44]);d.animation=void 0==d.animation?!0:d.animation;d.onbeforecreate=function(){b.createWorksheet();return!1};d.onclick=function(f,g,h,l,n){0<=
|
|
315
|
+
h&&b.openWorksheet(h)};d.onchangeposition=function(f,g,h){b.updateWorksheet(g,h)};jSuites.tabs(a,d);a.classList.add(_$_5e7a[347]);1==c.fullscreen&&a.classList.add(_$_5e7a[15]);var e=document.createElement(_$_5e7a[20]);b.toolbar=document.createElement(_$_5e7a[20]);b.toolbar.className=_$_5e7a[348];e.appendChild(b.toolbar);b.filter=Z.build.call(b);e.appendChild(b.filter);b.helper=document.createElement(_$_5e7a[20]);b.helper.className=_$_5e7a[349];e.appendChild(b.helper);b.loading=document.createElement(_$_5e7a[20]);
|
|
316
|
+
b.loading.classList.add(_$_5e7a[350]);e.appendChild(b.loading);e.appendChild(aa.build(b));e.appendChild(Ma(b));b.textarea=document.createElement(_$_5e7a[351]);b.textarea.className=_$_5e7a[352];b.textarea.tabIndex=_$_5e7a[353];e.appendChild(b.textarea);d.position===_$_5e7a[354]?a.insertBefore(e,a.children[0]):a.insertBefore(e,a.children[1]);a.appendChild(Da.call(b,t.license));b.createWorksheet=fa.createWorksheet;b.deleteWorksheet=fa.deleteWorksheet;b.renameWorksheet=fa.renameWorksheet;b.updateWorksheet=
|
|
317
|
+
fa.updateWorksheet;b.openWorksheet=fa.openWorksheet;b.moveWorksheet=fa.moveWorksheet;b.getWorksheet=fa.getWorksheet;b.getWorksheetActive=fa.getWorksheetActive;b.getWorksheetInstance=fa.getWorksheetInstance;b.getConfig=function(){var f=b.config;f.worksheets=[];for(var g=0;g<b.worksheets.length;g++)f.worksheets.push(b.worksheets[g].getConfig());return f};b.fullscreen=Ea;b.progress=Fa;b.undo=Q.undo;b.redo=Q.redo;b.setToolbar=da[_$_5e7a[11]];b.getToolbar=da[_$_5e7a[51]];b.showToolbar=da.show;b.hideToolbar=
|
|
318
|
+
da.hide;b.tools=e;1!==b.edition&&(a=Object.keys(b.config.definedNames))&&a.length&&(b.config.definedNames={},console.log(_$_5e7a[355]));c.plugins&&la.call(b,c.plugins);b.setPlugins=function(f){la.call(b,f)};a=Object.keys(t.extensions);if(a.length)for(d=0;d<a.length;d++)if(typeof t.extensions[a[d]].oninit==_$_5e7a[85])t.extensions[a[d]].oninit(b,c);return b},worksheet:function(a,c){var b={};a.worksheets.push(b);b.parent=a;xa(b);Na(b);ta(b);ea(b);aa(b);za(b);Pa(b);Y(b);La(b);Qa(b);ba(b);S(b);I(b);ua(b);
|
|
319
|
+
Ba(b);Sa(b);Ra(b);wa(b);X(b);ka(b);ma(b);Z(b);da(b);pa(b);Ua(b);Va(b);qa(b);fa(b);ja(b);Oa(b);Ta(b);Ca(b);xa.worksheet.call(b,c);!t.license&&b.options.license&&(t.license=b.options.license);a.element.jexcel=a.worksheets?a.worksheets:b;b.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_5e7a[356]+fa.nextName());var d=this.options.worksheetName;D(d)&&console.log(_$_5e7a[357]+d+_$_5e7a[358]);D(d,b);this.element=a.element.tabs.appendElement(this.options.worksheetName,function(e,
|
|
320
|
+
f){b.options.worksheetState===_$_5e7a[49]&&(f.style.display=_$_5e7a[40])});this.element.classList.add(_$_5e7a[359]);this.element.jexcel=this;T.build.call(this);la.execute.call(this.parent,_$_5e7a[360],[this]);this.options.data&&500<this.options.data.length&&!C.limited.call(this)&&!this.options.pagination&&console.error(_$_5e7a[361])};return b},row:function(a,c){this.rows[a]||(this.rows[a]={element:null,y:a});c&&(this.rows[a].id=c,pa[_$_5e7a[11]].call(this,c));this.options.rows&&this.options.rows[a]&&
|
|
321
|
+
this.options.rows[a].height&&(this.rows[a].height=this.options.rows[a].height);this.records[a]||(this.records[a]=[]);this.options.data[a]||(this.options.data[a]=this.dataType?{}:[]);for(c=0;c<this.options.columns.length;c++)k.cell.call(this,c,a)},cell:function(a,c,b){typeof b==_$_5e7a[13]&&(b=K.call(this,a,c),null===b||void 0===b)&&(b=_$_5e7a[3],K.call(this,a,c,b));this.records[c][a]||(this.records[c][a]={element:null,x:a,y:c,v:b})},bind:function(a){for(var c=Object.keys(va),b=0;b<c.length;b++)(c[b]==
|
|
322
|
+
_$_5e7a[362]?window:a).addEventListener(c[b],va[c[b]],c[b]==_$_5e7a[363]||c[b]==_$_5e7a[364]||c[b]==_$_5e7a[365]?{passive:!1}:{})},unbind:function(a){for(var c=Object.keys(va),b=0;b<c.length;b++)(c[b]==_$_5e7a[362]?window:a).removeEventListener(c[b],va[c[b]])}};return k}(),Ua=function(){var k=function(a){a.getWidth=k[_$_5e7a[51]];a.setWidth=k[_$_5e7a[11]]};k[_$_5e7a[51]]=function(a){var c=this.options.columns;if(typeof a===_$_5e7a[13]){a=[];for(var b=0;b<c.length;b++)a.push(c[b].width)}else a=c[a].width;
|
|
323
|
+
return a};k[_$_5e7a[11]]=function(a,c,b){if(!N.call(this.parent,this))return!1;if(c){if(Array.isArray(a)){b||(b=[]);for(var d=0;d<a.length;d++){b[d]||(b[d]=this.colgroup[a[d]].getAttribute(_$_5e7a[152]));var e=Array.isArray(c)&&c[d]?c[d]:c;this.colgroup[a[d]].setAttribute(_$_5e7a[152],e);this.options.columns[a[d]].width=e}}else b||(b=this.colgroup[a].getAttribute(_$_5e7a[152])),this.colgroup[a].setAttribute(_$_5e7a[152],c),this.options.columns[a].width=c;this.refreshBorders();Q.call(this.parent,{worksheet:this,
|
|
324
|
+
action:_$_5e7a[73],column:a,oldValue:b,newValue:c});G.call(this,_$_5e7a[73],{column:a,width:c,oldWidth:b});B.call(this.parent,_$_5e7a[366],this,a,c,b)}C.refresh.call(this)};return k}(),Va=function(){var k=function(c){c.getHeight=k[_$_5e7a[51]];c.setHeight=k[_$_5e7a[11]]};k[_$_5e7a[51]]=function(c){if(c)c=this.rows[c].element.style.height;else{c=[];for(var b=0;b<this.rows.length;b++){var d=this.rows[b].element.style.height;d&&(c[b]=d)}}return c};var a=function(c,b){b=parseInt(b);var d=this.rows[c].height?
|
|
325
|
+
this.rows[c].height:this.rows[c].element.offsetHeight||this.options.defaultRowHeight;this.rows[c].element.style.height=b+_$_5e7a[44];this.options.rows[c]||(this.options.rows[c]={});this.options.rows[c].height=b+_$_5e7a[44];this.rows[c].height=b;return d};k[_$_5e7a[11]]=function(c,b,d){if(!N.call(this.parent,this))return!1;var e,f=typeof d==_$_5e7a[13]?!0:!1;if(b){if(Array.isArray(c))for(!0===f&&(d=[]),e=0;e<c.length;e++){var g=Array.isArray(b)&&b[e]?b[e]:b;a.call(this,c[e],g);1==f&&d.push(f)}else e=
|
|
326
|
+
a.call(this,c,b),1==f&&(d=e);this.refreshBorders();Q.call(this.parent,{worksheet:this,action:_$_5e7a[74],row:c,oldValue:d,newValue:b});G.call(this,_$_5e7a[74],{row:c,height:b,oldHeight:d});B.call(this.parent,_$_5e7a[367],this,c,b,d)}C.refresh.call(this)};return k}(),Z=function(){var k=function(g){var h=e[g];g=b[e[g]];if(!g.element){g.element=document.createElement(_$_5e7a[368]);g.element.innerHTML=g.value;var l=document.createElement(_$_5e7a[220]);l.type=_$_5e7a[249];l.value=h;l.o=g;g.element.insertBefore(l,
|
|
327
|
+
g.element.firstChild)}g.element.firstChild.checked=g.selected;return g.element},a=null,c=null,b=[],d=0,e=null,f=function(g){g.setFilter=f[_$_5e7a[11]];g.getFilter=f[_$_5e7a[51]];g.openFilter=f.open;g.closeFilter=f.close;g.resetFilters=f.reset;g.showFilter=f.show;g.hideFilter=f.hide};f.isVisible=function(){return c};f[_$_5e7a[11]]=function(g,h){var l=this.headers[g];g=this.options.columns[g];Array.isArray(h)&&0<h.length?(l&&l.classList.add(_$_5e7a[369]),g.filters=h):(l&&l.classList.remove(_$_5e7a[369]),
|
|
328
|
+
g.filters=null);f.update.call(this)};f[_$_5e7a[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||null;return g};f.open=function(g){a=parseInt(g);if(this.headers[a].classList.contains(_$_5e7a[168])){c=!0;var h=this.parent.element.getBoundingClientRect(),l=this.headers[a].getBoundingClientRect();g=l.left-h.left;l=l.top-h.top+l.height;h=this.parent.filter;h.style.display=_$_5e7a[16];h.style.top=
|
|
329
|
+
l+_$_5e7a[44];h.style.left=g+_$_5e7a[44];h.children[0].focus();g=h.children[1].selectAll;h.children[1].textContent=_$_5e7a[3];h.children[1].appendChild(g);this.options.columns[a].filters||(g.children[0].checked=!0);g=ma.execute.call(this,null,a);g=A.invert(g);h=[];for(l=0;l<this.rows.length;l++)if(g[l]){var n=_$_5e7a[3]+K.call(this,a,l),q=_$_5e7a[3]+ba.processed.call(this,a,l,!0);n.substr(0,1)==_$_5e7a[12]&&(n=q);h.push([n,q])}h.sort(function(p,r){return p[0]>r[0]?1:p[0]<r[0]?-1:0});b=[];for(l=0;l<
|
|
330
|
+
h.length;l++)b[h[l][0]]={value:h[l][1],element:null};void 0!==b[_$_5e7a[3]]&&(delete b[_$_5e7a[3]],b[_$_5e7a[3]]={value:_$_5e7a[212]+z(_$_5e7a[371])+_$_5e7a[231],element:null});f.search.call(this,_$_5e7a[3])}else console.log(_$_5e7a[370])};f.close=function(g){if(g){g=this.parent.filter.children[1];if(1==g.selectAll.firstChild.checked&&e.length==Object.keys(b).length)g=null;else{g=1==g.currentSelection.firstChild.checked?this.options.columns[a].filters||[]:[];for(var h=0;h<e.length;h++)b[e[h]].selected&&
|
|
331
|
+
g.push(e[h])}f[_$_5e7a[11]].call(this,a,g)}this.parent.filter.style.display=_$_5e7a[3];this.parent.filter.children[0].value=_$_5e7a[3];a=null;c=!1;b=null;d=0;e=null};f.reset=function(g){f.updateDOM.call(this,g,!1);this.results=null;f.update.call(this)};f.execute=function(g){for(var h=this.options.columns,l=[],n=0;n<this.options.data.length;n++){for(var q=!0,p=0;p<h.length;p++)if(h[p].filters&&g!==p){var r=_$_5e7a[3]+K.call(this,p,n),w=_$_5e7a[3]+this.getLabelFromCoords(p,n,!0);-1==h[p].filters.indexOf(r)&&
|
|
332
|
+
-1==h[p].filters.indexOf(w)&&(q=!1)}q&&l.push(n)}return l};f.update=function(){this.resetSelection();this.resetBorders();var g=ma.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_5e7a[85]){var h=f[_$_5e7a[51]].call(this),l=B.call(this.parent,_$_5e7a[372],this,h,g);if(l)g=l;else if(!1===l)return!1}this.pageNumber=0;this.results=g&&g.length<this.rows.length?g:null;C.resetY.call(this);X.refresh.call(this);B.call(this.parent,_$_5e7a[373],this,h,g)};f.show=function(g){f.updateDOM.call(this,
|
|
333
|
+
g,!0)};f.hide=function(g){f.updateDOM.call(this,g,!1,!0);f.update.call(this)};f.search=function(g){for(var h=this.parent.filter.children[1];h.children[1];)h.removeChild(h.lastChild);h.currentSelection.firstChild.checked=!1;if(g){e=[];g=new RegExp(g,_$_5e7a[374]);for(var l=Object.keys(b),n=0;n<l.length;n++)(_$_5e7a[3]+l[n]).match(g)||(_$_5e7a[3]+b[l[n]]).match(g)?(e.push(l[n]),b[l[n]].selected=!0):b[l[n]].selected=!1;h.firstChild.checked=!0;this.options.columns[a].filters&&h.appendChild(h.currentSelection)}else{e=
|
|
334
|
+
Object.keys(b);if(g=this.options.columns[a].filters)for(n=0;n<e.length;n++)b[e[n]].selected=!1,0<=g.indexOf(e[n])&&(b[e[n]].selected=!0);else for(n=0;n<e.length;n++)b[e[n]].selected=!0;h.firstChild.checked=g?!1:!0}for(n=d=0;n<e.length;n++)200>n&&(g=d++,h.appendChild(k(g)))};f.build=function(){var g=document.createElement(_$_5e7a[20]);g.className=_$_5e7a[375];g.onclick=function(q){q.target.tagName==_$_5e7a[376]&&q.target.o&&(q.target.o.selected=q.target.checked);q=!0;for(var p=1;p<this.children.length;p++)this.children[p].children[0].checked||
|
|
335
|
+
(q=!1);this.children[0].children[0].checked=q};var h=document.createElement(_$_5e7a[220]);h.type=_$_5e7a[56];h.placeholder=z(_$_5e7a[377]);h.className=_$_5e7a[378];var l=document.createElement(_$_5e7a[220]);l.type=_$_5e7a[379];l.value=_$_5e7a[380];l.className=_$_5e7a[381];var n=document.createElement(_$_5e7a[20]);n.className=_$_5e7a[382];n.appendChild(h);n.appendChild(g);n.appendChild(l);g.currentSelection=document.createElement(_$_5e7a[368]);g.currentSelection.innerHTML=_$_5e7a[383]+z(_$_5e7a[384]);
|
|
336
|
+
g.selectAll=document.createElement(_$_5e7a[368]);g.selectAll.innerHTML=_$_5e7a[385]+z(_$_5e7a[386])+_$_5e7a[231];g.selectAll.onclick=function(){for(var q=this.children[0].checked,p=1;p<this.parentNode.children.length;p++)this.parentNode.children[p].children[0].checked=q;if(1==q)for(p=0;p<e.length;p++)b[e[p]].selected=!0;else for(q=Object.keys(b),p=0;p<q.length;p++)b[q[p]].selected=!1};jSuites.lazyLoading(g,{loadDown:function(q){for(q=0;d<e.length-1&&10>q;){var p=d++;g.appendChild(k(p));q++}}});return n};
|
|
337
|
+
f.updateDOM=function(g,h,l){var n=this.headers,q=function(p){1==h?n[p].classList.add(_$_5e7a[168]):(this.options.columns[p].filters=null,n[p].classList.remove(_$_5e7a[369]),1==l&&n[p].classList.remove(_$_5e7a[168]))};if(g)q.call(this,g);else for(g=0;g<n.length;g++)q.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(_$_5e7a[369]),h=!0);1==h&&f.update.call(this)};
|
|
338
|
+
return f}(),ma=function(){var k=function(c){var b=document.createElement(_$_5e7a[20]);if(0<c.options.pagination&&c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$_5e7a[387]);c.paginationDropdown.classList.add(_$_5e7a[388]);c.paginationDropdown.onchange=function(){c.options.pagination=parseInt(this.value);c.page(0)};for(var d=0;d<c.options.paginationOptions.length;d++){var e=document.createElement(_$_5e7a[389]);e.value=c.options.paginationOptions[d];
|
|
339
|
+
e.innerHTML=c.options.paginationOptions[d];c.paginationDropdown.appendChild(e)}c.paginationDropdown.value=c.options.pagination;b.appendChild(document.createTextNode(z(_$_5e7a[390])));b.appendChild(c.paginationDropdown);b.appendChild(document.createTextNode(z(_$_5e7a[391])))}return b},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,b){null===c?c=this.searchInput.value||_$_5e7a[3]:c!==this.searchInput.value&&
|
|
340
|
+
(this.searchInput.value=c);this.pageNumber=0;var d=[],e=null;b=Z.execute.call(this,b);if(c)try{c=new RegExp(c,_$_5e7a[374]);for(var f=0;f<this.rows.length;f++){e=!1;if(!b||0<=b.indexOf(f))for(var g=0;g<this.options.columns.length;g++){var h=_$_5e7a[3]+K.call(this,g,f),l=_$_5e7a[3]+this.getLabelFromCoords(g,f);if(h.match(c)||l.match(c))e=!0}if(1==e){g=d;var n=f,q=this.merged.rows;if(q[n]){for(;0<n&&q[n-1];)n--;for(;q[n];)g.push(n++)}else g.push(n)}}}catch(p){}else d=b;return d};a.update=function(c){this.resetSelection();
|
|
341
|
+
this.resetBorders();var b=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$_5e7a[85]){var d=B.call(this.parent,_$_5e7a[393],this,c,b);if(d)b=d;else if(!1===d)return!1}this.pageNumber=0;this.results=b&&b.length<this.rows.length?b:null;C.resetY.call(this);X.refresh.call(this);B.call(this.parent,_$_5e7a[394],this,c,b)};a.refresh=function(){C.resetY.call(this);X.refresh.call(this)};a.reset=function(){this.searchInput.value=_$_5e7a[3];this.results=null;C.resetY.call(this);X.refresh.call(this)};
|
|
342
|
+
a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_5e7a[3]};a.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_5e7a[40]};a.build=function(){this.searchContainer=document.createElement(_$_5e7a[20]);this.searchContainer.classList.add(_$_5e7a[395]);this.searchContainer.appendChild(k(this));var c=this.searchContainer,b=c.appendChild,d=document.createElement(_$_5e7a[20]);d.innerHTML=z(_$_5e7a[377])+_$_5e7a[114];this.searchInput=document.createElement(_$_5e7a[220]);
|
|
343
|
+
this.searchInput.classList.add(_$_5e7a[392]);d.appendChild(this.searchInput);b.call(c,d);0==this.options.search&&(this.searchContainer.style.display=_$_5e7a[40]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return a}(),Ma=function(){var k=function(a){a.contextmenu=document.createElement(_$_5e7a[20]);a.contextmenu.className=_$_5e7a[396];jSuites.contextmenu(a.contextmenu,{onclick:function(c,b,d){c.close()}});return a.contextmenu};k.open=function(a,c){var b=a.target.getAttribute(_$_5e7a[42]),
|
|
344
|
+
d=a.target.getAttribute(_$_5e7a[43]),e=k[_$_5e7a[51]](this,b,d,a,c[0],c[1],c[2]);if(typeof this.parent.config.contextMenu==_$_5e7a[85]){var f=this.parent.config.contextMenu(this,b,d,a,e,c[0],c[1],c[2]);if(f)e=f;else if(!1===f)return!1}a.preventDefault();f=la.execute.call(this.parent,_$_5e7a[86],[this,b,d,a,e,c[0],c[1],c[2]]);e=f[4];this.parent.contextmenu.contextmenu.open(a,e)};k[_$_5e7a[51]]=function(a,c,b,d,e,f,g){var h=[],l=a.parent.config,n=-1!=navigator.userAgent.indexOf(_$_5e7a[397])?_$_5e7a[398]:
|
|
345
|
+
_$_5e7a[399];e==_$_5e7a[400]&&(1==l.allowRenameWorksheet&&h.push({title:z(_$_5e7a[401]),onclick:function(){var p=prompt(z(_$_5e7a[401]),d.target.innerText);p&&a.parent.renameWorksheet(f,p)}}),1==l.allowDeleteWorksheet&&h.push({title:z(_$_5e7a[402]),onclick:function(){confirm(z(_$_5e7a[403]),d.target.innerText)&&a.parent.deleteWorksheet(f)}}),h.push({type:_$_5e7a[404]}));e==_$_5e7a[405]&&(h.push({title:z(_$_5e7a[406]),onclick:function(){var p=prompt(z(_$_5e7a[406]),d.target.innerText);a.setNestedCell(f,
|
|
346
|
+
g,{title:p})}}),h.push({type:_$_5e7a[404]}));if(e==_$_5e7a[407]||e==_$_5e7a[408]||e==_$_5e7a[409]||e==_$_5e7a[405])h.push({title:z(_$_5e7a[410]),icon:_$_5e7a[411],shortcut:n+_$_5e7a[412],onclick:function(){a.cut()}}),h.push({title:z(_$_5e7a[413]),icon:_$_5e7a[414],shortcut:n+_$_5e7a[415],onclick:function(){a.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&h.push({title:z(_$_5e7a[416]),icon:_$_5e7a[417],shortcut:n+_$_5e7a[418],onclick:function(){a.selectedCell&&navigator.clipboard.readText().then(function(p){p&&
|
|
347
|
+
a.paste(a.selectedCell[0],a.selectedCell[1],p)})}}),h.push({type:_$_5e7a[404]});e==_$_5e7a[407]&&(1==a.options.allowInsertColumn&&h.push({title:z(_$_5e7a[419]),onclick:function(){a.insertColumn(1,parseInt(f),1)}}),1==a.options.allowInsertColumn&&h.push({title:z(_$_5e7a[420]),onclick:function(){a.insertColumn(1,parseInt(f),0)}}),1==a.options.allowDeleteColumn&&h.push({title:z(_$_5e7a[421]),onclick:function(){a.deleteColumn(a.getSelectedColumns().length?void 0:parseInt(c))}}),1==a.options.allowRenameColumn&&
|
|
348
|
+
h.push({title:z(_$_5e7a[422]),onclick:function(){a.setHeader(f)}}),a.options.data.length||(h.push({type:_$_5e7a[404]}),h.push({title:z(_$_5e7a[423]),onclick:function(){a.insertRow(0)}})),1==a.options.columnSorting&&(h.push({type:_$_5e7a[404]}),h.push({title:z(_$_5e7a[424]),onclick:function(){a.orderBy(f,0)}}),h.push({title:z(_$_5e7a[425]),onclick:function(){a.orderBy(f,1)}}),h.push({type:_$_5e7a[404]})));if(e==_$_5e7a[409]||e==_$_5e7a[408])1==a.options.allowInsertRow&&(h.push({title:z(_$_5e7a[426]),
|
|
349
|
+
onclick:function(){a.insertRow(1,parseInt(b),1)}}),h.push({title:z(_$_5e7a[427]),onclick:function(){a.insertRow(1,parseInt(b))}})),1==a.options.allowDeleteRow&&h.push({title:z(_$_5e7a[428]),onclick:function(){a.deleteRow(a.getSelectedRows().length?void 0:parseInt(b))}}),h.push({type:_$_5e7a[404]});if(e==_$_5e7a[409]&&1==a.options.allowComments){var q=a.records[g][f].element.getAttribute(_$_5e7a[263])||_$_5e7a[3];h.push({title:q?z(_$_5e7a[429]):z(_$_5e7a[430]),icon:_$_5e7a[431],onclick:function(){var p=
|
|
350
|
+
A.getColumnNameFromCoords(f,g),r=prompt(z(_$_5e7a[432]),q);r&&a.setComments(p,r)}});q&&h.push({title:z(_$_5e7a[433]),onclick:function(){var p=A.getColumnNameFromCoords(f,g);a.setComments(p,_$_5e7a[3])}});h.push({type:_$_5e7a[404]})}l.allowExport&&h.push({title:z(_$_5e7a[434]),icon:_$_5e7a[435],shortcut:n+_$_5e7a[436],onclick:function(){a.download()}});l.about&&h.push({title:z(_$_5e7a[437]),icon:_$_5e7a[438],onclick:function(){!0===l.about?alert(F().print()):alert(l.about)}});return h};return k}(),
|
|
351
|
+
da=function(){var k=function(a){a.showToolbar=function(){k.show.call(a.parent)};a.hideToolbar=function(){k.hide.call(a.parent)};a.refreshToolbar=function(){k.update.call(a.parent,a)}};k[_$_5e7a[11]]=function(a){this.toolbar.innerHTML=_$_5e7a[3];this.config.toolbar=k[_$_5e7a[51]].call(this,a);k.show.call(this)};k[_$_5e7a[51]]=function(a){a||(a=this.config.toolbar);a?Array.isArray(a)?a={items:a}:typeof a===_$_5e7a[85]&&(a=a({items:k.getDefault()})):a={};typeof a!==_$_5e7a[84]&&(a={});a.items||(a.items=
|
|
352
|
+
k.getDefault());typeof a.responsive==_$_5e7a[13]&&(a.responsive=!0,a.bottom=!1,a.maxWidth=this.element.offsetWidth);return a};k.show=function(){this.toolbar.innerHTML||k.build.call(this);this.toolbar.style.display=_$_5e7a[3];this.element.classList.add(_$_5e7a[439])};k.hide=function(){this.toolbar.style.display=_$_5e7a[40];this.element.classList.remove(_$_5e7a[439])};k.update=function(a,c){if(c=this.toolbarInstance)if(c.update(a),c.options.responsive){var b=parseInt(a.content.style.maxWidth);if(!b||
|
|
353
|
+
this.config.fullscreen)b=a.element.offsetWidth;c.options.maxWidth=b;c.refresh()}};k.build=function(){for(var a=k[_$_5e7a[51]].call(this),c=0;c<a.items.length;c++)if(a.items[c].type==_$_5e7a[387]){if(!a.items[c].options&&a.items[c].v){a.items[c].options=[];for(var b=0;b<a.items[c].v.length;b++)a.items[c].options.push(a.items[c].v[b]);a.items[c].k&&(a.items[c].onchange=function(d,e,f,g){t.current.setStyle(t.current.getSelected(),f.k,g)})}}else a.items[c].type==_$_5e7a[254]?(a.items[c].type=_$_5e7a[440],
|
|
354
|
+
a.items[c].onclick=function(d,e,f){f.color||jSuites.color(f,{onchange:function(g,h){t.current.setStyle(t.current.getSelected(),f.k,h)}}).open()}):!a.items[c].onclick&&a.items[c].k&&(a.items[c].onclick=function(){t.current.setStyle(t.current.getSelected(),this.k,this.v)});(c=la.execute.call(this,_$_5e7a[87],[a]))&&(a=c[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,a);this.toolbarInstance.application=this;a=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[a])};k.getDefault=
|
|
355
|
+
function(){return[{content:_$_5e7a[441],onclick:function(){t.current&&t.current.undo()}},{content:_$_5e7a[442],onclick:function(){t.current&&t.current.redo()}},{content:_$_5e7a[435],onclick:function(){t.current&&t.current.download()}},{type:_$_5e7a[443]},{type:_$_5e7a[387],width:_$_5e7a[444],options:[_$_5e7a[445],_$_5e7a[446],_$_5e7a[447]],render:function(a){return _$_5e7a[448]+a+_$_5e7a[227]+a+_$_5e7a[449]},onchange:function(a,c,b,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_5e7a[450],
|
|
356
|
+
d)}},{type:_$_5e7a[387],width:_$_5e7a[451],content:_$_5e7a[452],options:[_$_5e7a[453],_$_5e7a[454],_$_5e7a[455],_$_5e7a[456],_$_5e7a[457]],render:function(a){return _$_5e7a[458]+a+_$_5e7a[227]+a+_$_5e7a[449]},onchange:function(a,c,b,d){t.current&&t.current.setStyle(t.current.getSelected(),_$_5e7a[459],d)}},{type:_$_5e7a[387],columns:4,options:[_$_5e7a[460],_$_5e7a[461],_$_5e7a[462],_$_5e7a[463]],render:function(a){return _$_5e7a[464]+a+_$_5e7a[465]},onchange:function(a,c,b,d){t.current&&t.current.setStyle(t.current.getSelected(),
|
|
357
|
+
_$_5e7a[466],d.split(_$_5e7a[467])[2])}},{type:_$_5e7a[440],content:_$_5e7a[468],k:_$_5e7a[469],v:_$_5e7a[470]},{type:_$_5e7a[254],content:_$_5e7a[471],k:_$_5e7a[254]},{type:_$_5e7a[254],content:_$_5e7a[472],k:_$_5e7a[473]},{type:_$_5e7a[387],content:_$_5e7a[474],width:_$_5e7a[475],options:[_$_5e7a[476],_$_5e7a[477],_$_5e7a[478],_$_5e7a[479]],onchange:function(a,c,b,d,e){a=t.current.table;a.classList.remove(_$_5e7a[480]);a.classList.remove(_$_5e7a[481]);a.classList.remove(_$_5e7a[482]);1==e?a.classList.add(_$_5e7a[480]):
|
|
358
|
+
2==e?a.classList.add(_$_5e7a[481]):3==e&&a.classList.add(_$_5e7a[482]);t.current.refreshBorders()}},{content:_$_5e7a[15],onclick:function(a,c,b){b.children[0].innerText==_$_5e7a[15]?(t.current.fullscreen(!0),b.children[0].innerText=_$_5e7a[483]):(t.current.fullscreen(!1),b.children[0].innerText=_$_5e7a[15])},tooltip:_$_5e7a[484],updateState:function(a,c,b,d){b.children[0].innerText=1==d.parent.config.fullscreen?_$_5e7a[483]:_$_5e7a[15]}},{type:_$_5e7a[387],data:[_$_5e7a[485],_$_5e7a[486],_$_5e7a[487],
|
|
359
|
+
_$_5e7a[488],_$_5e7a[489],_$_5e7a[490],_$_5e7a[491],_$_5e7a[492],_$_5e7a[493],_$_5e7a[494]],columns:5,render:function(a){return _$_5e7a[464]+a+_$_5e7a[465]},right:!0,onchange:function(a,c,b,d,e){if(a=t.current.getHighlighted()){b=c.thickness||1;c=c.color||_$_5e7a[495];e={};for(var f=a[0],g=a[1],h=a[2],l=a[3],n=a[1];n<=a[3];n++)for(var q=a[0];q<=a[2];q++){var p=A.getColumnNameFromCoords(q,n);e[p]||(e[p]=_$_5e7a[3]);e[p]=d!=_$_5e7a[490]&&d!=_$_5e7a[486]||q!=f?(d==_$_5e7a[487]||d==_$_5e7a[489])&&q>f?
|
|
360
|
+
e[p]+(_$_5e7a[496]+b+_$_5e7a[497]+c+_$_5e7a[294]):d==_$_5e7a[485]?e[p]+(_$_5e7a[496]+b+_$_5e7a[497]+c+_$_5e7a[294]):e[p]+_$_5e7a[498]:e[p]+(_$_5e7a[496]+b+_$_5e7a[497]+c+_$_5e7a[294]);e[p]=d!=_$_5e7a[485]&&d!=_$_5e7a[492]&&d!=_$_5e7a[486]||q!=h?e[p]+_$_5e7a[500]:e[p]+(_$_5e7a[499]+b+_$_5e7a[497]+c+_$_5e7a[294]);e[p]=d!=_$_5e7a[491]&&d!=_$_5e7a[486]||n!=g?(d==_$_5e7a[487]||d==_$_5e7a[488])&&n>g?e[p]+(_$_5e7a[501]+b+_$_5e7a[497]+c+_$_5e7a[294]):d==_$_5e7a[485]?e[p]+(_$_5e7a[501]+b+_$_5e7a[497]+c+_$_5e7a[294]):
|
|
361
|
+
e[p]+_$_5e7a[502]:e[p]+(_$_5e7a[501]+b+_$_5e7a[497]+c+_$_5e7a[294]);e[p]=d!=_$_5e7a[485]&&d!=_$_5e7a[493]&&d!=_$_5e7a[486]||n!=l?e[p]+_$_5e7a[504]:e[p]+(_$_5e7a[503]+b+_$_5e7a[497]+c+_$_5e7a[294])}Object.keys(e)&&t.current.setStyle(e,null,null,!0)}},onload:function(a,c){var b=document.createElement(_$_5e7a[20]),d=document.createElement(_$_5e7a[20]);b.appendChild(d);var e=jSuites.color(d,{closeOnChange:!1,onchange:function(f,g){f.parentNode.children[1].style.color=g;c.color=g}});d=document.createElement(_$_5e7a[440]);
|
|
362
|
+
d.classList.add(_$_5e7a[505]);d.innerHTML=_$_5e7a[506];d.onclick=function(){e.open()};b.appendChild(d);a.children[1].appendChild(b);d=document.createElement(_$_5e7a[20]);jSuites.picker(d,{type:_$_5e7a[387],data:[1,2,3,4,5],render:function(f){return _$_5e7a[507]+f+_$_5e7a[508]},onchange:function(f,g,h,l){c.thickness=l},width:_$_5e7a[509]});a.children[1].appendChild(d);d=document.createElement(_$_5e7a[20]);d.style.flex=_$_5e7a[510];a.children[1].appendChild(d)}},{content:_$_5e7a[511],onclick:function(a,
|
|
363
|
+
c,b){b.children[0].innerText==_$_5e7a[511]?(ma.show.call(t.current),b.children[0].innerText=_$_5e7a[512]):(ma.hide.call(t.current),b.children[0].innerText=_$_5e7a[511])},tooltip:_$_5e7a[513],updateState:function(a,c,b,d){b.children[0].innerText=1==d.options.search?_$_5e7a[512]:_$_5e7a[511]}}]};return k}(),fa=function(){var k=function(a){a.createWorksheet=function(c){return a.parent.createWorksheet(c)};a.deleteWorksheet=function(c){return a.parent.deleteWorksheet(c)};a.renameWorksheet=function(c,b){return a.parent.renameWorksheet(c,
|
|
364
|
+
b)};a.moveWorksheet=function(c,b){return a.parent.moveWorksheet(c,b)};a.openWorksheet=function(){return a.parent.openWorksheet(a.parent.getWorksheet(a))};a.getWorksheet=function(c){return a.parent.getWorksheet(c)};a.getWorksheetActive=function(){return a.parent.getWorksheetActive()};a.getWorksheetName=function(){return a.options.worksheetName.toUpperCase()}};k.nextName=function(){var a=1,c,b=t.spreadsheet;if(b.length)for(var d=0;d<b.length;d++){var e=b[d].worksheets;if(e.length)for(var f=0;f<e.length;f++)e[f].options.worksheetName&&
|
|
365
|
+
(c=e[f].options.worksheetName.match(/(\d+)/))&&(c=parseInt(c[0])+1,c>a&&(a=c))}return a};k.createWorksheet=function(a){if(!N.call(this))return!1;a||(a={});var c=this.worksheets.length,b=B.call(this,_$_5e7a[514],a,c);if(typeof b===_$_5e7a[84])a=b;else if(!1===b)return!1;a.data||a.minDimensions||(a.minDimensions=[8,8]);a.worksheetId||(a.worksheetId=jSuites.guid().substring(0,8));a.worksheetName||(a.worksheetName=_$_5e7a[356]+k.nextName());D(a.worksheetName)?jSuites.notification({error:_$_5e7a[510],
|
|
366
|
+
message:_$_5e7a[515]}):(b=ia.worksheet(this,a),b.onload(),G.call(b,_$_5e7a[516],[a]),B.call(this,_$_5e7a[517],b,a,c))};k.deleteWorksheet=function(a){var c=this.worksheets[a];if(!N.call(this,c))return!1;D(c.options.worksheetName,null);this.element.tabs.deleteElement(a);this.worksheets.splice(a,1);G.call(c,_$_5e7a[518],[a]);B.call(this,_$_5e7a[519],c,a)};k.renameWorksheet=function(a,c){var b=this.worksheets[a];if(!N.call(this,b))return!1;var d=b.options.worksheetName;if(d.toLowerCase()==c.toLowerCase())return!1;
|
|
367
|
+
c=c.replace(/[^0-9A-Za-z_\s^]+/gi,_$_5e7a[3]);Number(c)==c&&(c=_$_5e7a[356]+Number(c));D(c)?alert(_$_5e7a[520]):(D(d,null),this.element.tabs.rename(a,c),b.options.worksheetName=c,D(c,b),Q.call(this,{worksheet:b,action:_$_5e7a[80],index:a,oldValue:d,newValue:c}),G.call(b,_$_5e7a[80],{worksheet:a,newValue:c}),Ca.updateWorksheetName.call(b,d,c),S.updateWorksheetNames.call(b,d,c),B.call(this,_$_5e7a[521],b,a,c,d))};k.updateWorksheet=function(a,c){var b=this.worksheets;if(!N.call(this))return!1;this.worksheets.splice(c,
|
|
368
|
+
0,b.splice(a,1)[0]);Q.call(this,{worksheet:b[c],action:_$_5e7a[81],f:a,t:c});G.call(b[c],_$_5e7a[81],{f:a,t:c});B.call(this,_$_5e7a[522],b[c],a,c)};k.moveWorksheet=function(a,c){this.element.tabs.move(a,c)};k.openWorksheet=function(a){var c=this.worksheets[a];!c||t.current&&t.current==c||(this.element.tabs.getActive()!=a?this.element.tabs.open(a):this.element.tabs.setBorder(a),t.current&&t.current.resetSelection(),t.current=c,t.current.refreshBorders(),P.call(t.current),k.state.call(this,a),da.update.call(this,
|
|
369
|
+
t.current),B.call(this,_$_5e7a[523],c,a))};k.getWorksheet=function(a){if(a&&typeof a==_$_5e7a[84]){if(a=this.worksheets.indexOf(a),0<=a)return a}else for(var c=0;c<this.worksheets.length;c++)if(a===this.worksheets[c].options.worksheetId)return c;return!1};k.getWorksheetActive=function(){return this.element.tabs.getActive()};k.getWorksheetInstance=function(a){return a===_$_5e7a[3]||typeof a==_$_5e7a[17]?(a=k.getWorksheet.call(this,a),!1===a?!1:this.worksheets[a]):this.worksheets[a]};k.state=function(a){try{if(typeof localStorage!==
|
|
370
|
+
_$_5e7a[13]){var c=this.config.cloud?this.config.cloud:this.element.id;if(c)if(typeof a!==_$_5e7a[13])localStorage.setItem(_$_5e7a[524]+c,a);else{var b=parseInt(localStorage.getItem(_$_5e7a[524]+c));k.openWorksheet.call(this,b)}}}catch(d){}};return k}(),A=function(){var k={getCaretIndex:function(a){var c=0,b=(this.config.root?this.config.root:window).getSelection();b&&0!==b.rangeCount&&(c=b.getRangeAt(0),b=c.cloneRange(),b.selectNodeContents(a),b.setEnd(c.endContainer,c.endOffset),c=b.toString().length);
|
|
371
|
+
return c},invert:function(a){for(var c=[],b=Object.keys(a),d=0;d<b.length;d++)c[a[b[d]]]=b[d];return c},getColumnName:function(a){var c=_$_5e7a[3];701<a?(c+=String.fromCharCode(64+parseInt(a/676)),c+=String.fromCharCode(64+parseInt(a%676/26))):25<a&&(c+=String.fromCharCode(64+parseInt(a/26)));return c+=String.fromCharCode(65+a%26)},getColumnNameFromCoords:function(a,c){return k.getColumnName(parseInt(a))+(parseInt(c)+1)},getCoordsFromColumnName:function(a){var c=/^[a-zA-Z]+/.exec(a);if(c){for(var b=
|
|
372
|
+
0,d=0;d<c[0].length;d++)b+=parseInt(c[0].charCodeAt(d)-64)*Math.pow(26,c[0].length-1-d);b--;0>b&&(b=0);a=parseInt(/[0-9]+$/.exec(a))||null;0<a&&a--;return[b,a]}}};k.shiftFormula=S.shiftFormula;k.createFromTable=function(a,c){if(a.tagName!=_$_5e7a[525])console.log(_$_5e7a[526]);else{c||(c={});c.columns=[];c.data=[];var b=a.querySelectorAll(_$_5e7a[527]);if(b.length)for(var d=0;d<b.length;d++){var e=b[d].style.width;e||(e=b[d].getAttribute(_$_5e7a[152]));e&&(c.columns[d]||(c.columns[d]={}),c.columns[d].width=
|
|
373
|
+
e)}e=function(u){var x=u.getBoundingClientRect();x=50<x.width?x.width:50;c.columns[d]||(c.columns[d]={});u.getAttribute(_$_5e7a[528])?c.columns[d].type=u.getAttribute(_$_5e7a[528]):c.columns[d].type=_$_5e7a[56];c.columns[d].width=x+_$_5e7a[44];c.columns[d].title=u.innerHTML;c.columns[d].align=u.style.textAlign||(c.defaultColAlign?c.defaultColAlign:_$_5e7a[53]);u.classList.contains(_$_5e7a[529])&&(c.columns[d].readOnly=!0);if(x=u.getAttribute(_$_5e7a[530]))c.columns[d].name=x;if(x=u.getAttribute(_$_5e7a[531]))c.columns[d].id=
|
|
374
|
+
x};var f=[],g=a.querySelectorAll(_$_5e7a[532]);if(g.length){for(b=0;b<g.length-1;b++){var h=[];for(d=0;d<g[b].children.length;d++){var l={title:g[b].children[d].innerText,colspan:g[b].children[d].getAttribute(_$_5e7a[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 n={},q={},p={},r={},w=null;h=a.querySelectorAll(_$_5e7a[533]);for(b=0;b<h.length;b++)if(c.data[l]=[],1!=c.parseTableFirstRowAsHeader||g.length||0!=b){for(d=0;d<h[b].children.length;d++){var m=
|
|
375
|
+
h[b].children[d].getAttribute(_$_5e7a[534]);m?m.substr(0,1)!=_$_5e7a[12]&&(m=_$_5e7a[12]+m):m=h[b].children[d].innerHTML;c.data[l].push(m);m=A.getColumnNameFromCoords(d,b);(w=h[b].children[d].getAttribute(_$_5e7a[535]))&&(r[m]=w);w=parseInt(h[b].children[d].getAttribute(_$_5e7a[52]))||0;var v=parseInt(h[b].children[d].getAttribute(_$_5e7a[164]))||0;if(w||v)n[m]=[w||1,v||1];if(w=h[b].children[d].style&&h[b].children[d].style.display==_$_5e7a[40])h[b].children[d].style.display=_$_5e7a[3];(w=h[b].children[d].getAttribute(_$_5e7a[98]))&&
|
|
376
|
+
(p[m]=w);h[b].children[d].classList.contains(_$_5e7a[536])&&(p[m]=p[m]?p[m]+_$_5e7a[537]:_$_5e7a[538])}h[b].style&&h[b].style.height&&(q[b]={height:h[b].style.height});l++}else for(d=0;d<h[b].children.length;d++)e(h[b].children[d]);0<Object.keys(f).length&&(c.nestedHeaders=f);0<Object.keys(p).length&&(c.style=p);0<Object.keys(n).length&&(c.mergeCells=n);0<Object.keys(q).length&&(c.rows=q);0<Object.keys(r).length&&(c.classes=r);h=a.querySelectorAll(_$_5e7a[539]);if(h.length){a=[];for(b=0;b<h.length;b++){e=
|
|
377
|
+
[];for(d=0;d<h[b].children.length;d++)e.push(h[b].children[d].innerText);a.push(e)}0<Object.keys(a).length&&(c.footers=a)}if(1==c.parseTableAutoCellType)for(a=[],d=0;d<c.columns.length;d++){f=e=!0;a[d]=[];for(b=0;b<c.data.length;b++)if(m=c.data[b][d],a[d][m]||(a[d][m]=0),a[d][m]++,25<m.length&&(e=!1),10==m.length){if(m.substr(4,1)!=_$_5e7a[185]||m.substr(7,1)!=_$_5e7a[185])f=!1}else f=!1;b=Object.keys(a[d]).length;f?c.columns[d].type=_$_5e7a[184]:1==e&&1<b&&b<=parseInt(.1*c.data.length)&&(c.columns[d].type=
|
|
378
|
+
_$_5e7a[58],c.columns[d].source=Object.keys(a[d]))}return c}};k.injectArray=function(a,c,b){return a.slice(0,c).concat(b).concat(a.slice(c))};k.parseCSV=function(a,c){c=c||_$_5e7a[25];for(var b=0,d=0,e=[[]],f=0,g=null,h=!1,l=!1,n=0;n<a.length;n++)if(e[d]||(e[d]=[]),e[d][b]||(e[d][b]=_$_5e7a[3]),a[n]!=_$_5e7a[540])if(a[n]!=_$_5e7a[541]&&a[n]!=c||0!=h&&1!=l&&g){a[n]==_$_5e7a[187]&&(h=!h);if(null===g){if(g=h,1==g)continue}else if(!0===g&&!l&&a[n]==_$_5e7a[187]){a[n+1]==_$_5e7a[187]?(h=!0,e[d][b]+=a[n],
|
|
379
|
+
n++):l=!0;continue}e[d][b]+=a[n]}else{g=null;l=h=!1;if(e[d][b][0]==_$_5e7a[187]){var q=e[d][b].trim();q[q.length-1]==_$_5e7a[187]&&(e[d][b]=q.substr(1,q.length-2))}a[n]==_$_5e7a[541]?(b=0,d++):(b++,b>f&&(f=b))}for(a=0;a<e.length;a++)for(n=0;n<=f;n++)void 0===e[a][n]&&(e[a][n]=_$_5e7a[3]);return e};k.getTokensFromRange=S.getTokensFromRange;k.getRangeFromTokens=S.getRangeFromTokens;return k}(),va=function(){var k={},a=null,c=null,b=null,d=!1,e=null,f=null,g=null,h=function(m){function v(J){J.className&&
|
|
380
|
+
(J.classList.contains(_$_5e7a[347])&&(y=J),J.classList.contains(_$_5e7a[359])&&(H=J),J.classList.contains(_$_5e7a[542])&&(L=J));J.tagName==_$_5e7a[543]?u=1:J.tagName==_$_5e7a[544]?u=2:J.tagName==_$_5e7a[545]&&(u=3);J.parentNode&&!y&&v(J.parentNode)}var u=null,x=null,y=null,H=null,L=null,E=null,ca=null,ra=null;v(m.target);if(null!==L)return!1;if(y)if(m.target.classList.contains(_$_5e7a[329]))x=_$_5e7a[546];else if(m.target.classList.contains(_$_5e7a[338]))x=_$_5e7a[138];else if(m.target.classList.contains(_$_5e7a[266]))x=
|
|
381
|
+
_$_5e7a[408],E=parseInt(m.target.getAttribute(_$_5e7a[43]));else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_5e7a[177]))E=m.target.getAttribute(_$_5e7a[181]),ca=m.target.getAttribute(_$_5e7a[182]),null===E?x=_$_5e7a[546]:(x=_$_5e7a[405],E=parseInt(E),ca=parseInt(ca));else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_5e7a[146]))x=_$_5e7a[547];else if(m.target.classList.contains(_$_5e7a[150]))x=_$_5e7a[547];else if(m.target.parentNode&&m.target.parentNode.classList.contains(_$_5e7a[548]))x=
|
|
382
|
+
_$_5e7a[400],E=Array.prototype.indexOf.call(m.target.parentNode.children,m.target);else if(1==u)x=_$_5e7a[407],E=m.target.clientWidth-m.offsetX,m.target.classList.contains(_$_5e7a[168])&&3<E&&20>E&&(x=_$_5e7a[549]),E=m.target.getAttribute(_$_5e7a[42]);else if(2==u){if(m=l(m,y))x=_$_5e7a[409],E=m[0],ca=m[1],ra=m[2]}else if(3==u){if(E=m.target.getAttribute(_$_5e7a[42]),ca=m.target.getAttribute(_$_5e7a[43]),E||ca)x=_$_5e7a[550]}else u||jSuites.findElement(m.target,_$_5e7a[551])&&(x=_$_5e7a[87]);return[y,
|
|
383
|
+
H,u,x,E,ca,ra]},l=function(m,v){if(m.changedTouches&&m.changedTouches[0]){var u=m.changedTouches[0].clientX;m=m.changedTouches[0].clientY}else u=m.clientX,m=m.clientY;v=(v.spreadsheet.config.root?v.spreadsheet.config.root:document).elementsFromPoint(u,m);for(var x=0;x<v.length;x++)if(u=v[x].getAttribute(_$_5e7a[42]),m=v[x].getAttribute(_$_5e7a[43]),null!=u&&null!=m)return u=parseInt(u),m=parseInt(m),[u,m,v[x]];return!1},n=function(m){var v=h(m);if(!1===v)return!1;v[0]?v[1]?t.current!=v[1].jexcel&&
|
|
384
|
+
(t.current&&t.current.resetSelection(),t.current=v[1].jexcel):(m=v[0].tabs.getActive(),0<=m&&(t.current=v[0].spreadsheet.worksheets[m])):t.current&&!jSuites.findElement(m.target,_$_5e7a[219])&&(t.current.resetSelection(!0),t.current=null);return v};k.input=function(m){if(m.target.tagName==_$_5e7a[552]&&m.target.classList.contains(_$_5e7a[92])){var v=null;t.current?v=t.current:m.target.getAttribute(_$_5e7a[553])&&(v=D(m.target.getAttribute(_$_5e7a[553])));v&&U.parse.call(v,m.target)}};k.keydown=function(m){if(t.current){m.target.tagName==
|
|
385
|
+
_$_5e7a[552]&&m.target.classList.contains(_$_5e7a[92])&&U.onkeydown.call(t.current,m);if(27==m.which){if(t.current.edition)return t.current.closeEditor(t.current.edition,!1),m.preventDefault(),!1;if(na.event)return na.cancel.call(t.current,m),m.preventDefault(),!1;if(ha.event)return ha.cancel.call(t.current,m),!1;if(1==Z.isVisible())return Z.close.call(t.current,!1),m.preventDefault(),!1}if(!m.target.classList.contains(_$_5e7a[219]))if(m.target.classList.contains(_$_5e7a[378])){var v=m.target;e&&
|
|
386
|
+
clearTimeout(e);e=setTimeout(function(){Z.search.call(t.current,v.value);e=null},500)}else if(m.target.classList.contains(_$_5e7a[392]))v=m.target,e&&clearTimeout(e),e=setTimeout(function(){t.current.search(v.value);e=null},400);else if(t.current.edition){var u=t.current.edition.getAttribute(_$_5e7a[42]);13==m.which?t.current.options.columns[u].type==_$_5e7a[184]?t.current.closeEditor(t.current.edition,!0):t.current.options.columns[u].type!=_$_5e7a[58]&&t.current.options.columns[u].type!=_$_5e7a[554]&&
|
|
387
|
+
t.current.options.columns[u].type!=_$_5e7a[431]&&(m.altKey?t.current.parent.input.classList.contains(_$_5e7a[555])||document.execCommand(_$_5e7a[556],!1,_$_5e7a[557]):(t.current.closeEditor(t.current.edition,!0),t.current.down(),m.preventDefault())):9==m.which&&(t.current.closeEditor(t.current.edition,!0),t.current.right(),m.preventDefault())}else if(t.current.selectedCell)if(33==m.which)0<t.current.options.pagination?qa.pageUp.call(t.current):C.pageUp.call(t.current);else if(34==m.which)0<t.current.options.pagination?
|
|
388
|
+
qa.pageDown.call(t.current):C.pageDown.call(t.current);else if(37==m.which)t.current.left(m.shiftKey,m.ctrlKey),m.preventDefault();else if(39==m.which)t.current.right(m.shiftKey,m.ctrlKey),m.preventDefault();else if(38==m.which)t.current.up(m.shiftKey,m.ctrlKey),m.preventDefault();else if(40==m.which)t.current.down(m.shiftKey,m.ctrlKey),m.preventDefault();else if(36==m.which)t.current.first(m.shiftKey,m.ctrlKey),m.preventDefault();else if(35==m.which)t.current.last(m.shiftKey,m.ctrlKey),m.preventDefault();
|
|
389
|
+
else if(32==m.which)t.current.setCheckRadioValue(),m.preventDefault();else if(46==m.which||8==m.which)t.current.isEditable()&&t.current.setValue(t.current.getSelected(!1,!0),_$_5e7a[3]);else if(13==m.which)m.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()),m.preventDefault();else if(9==m.which)m.shiftKey?
|
|
390
|
+
t.current.left():(u=t.current.selectedCell[0],t.current.right(),1==t.current.options.allowInsertColumn&&1==t.current.options.allowManualInsertColumn&&t.current.selectedCell[0]==u&&(t.current.insertColumn(),t.current.right())),m.preventDefault();else if((m.ctrlKey||m.metaKey)&&!m.shiftKey)65==m.which?(t.current.selectAll(),m.preventDefault()):83==m.which?(t.current.download(),m.preventDefault()):89==m.which?(t.current.parent.redo(),m.preventDefault()):90==m.which?(t.current.parent.undo(),m.preventDefault()):
|
|
391
|
+
67==m.which?(t.current.copy(),m.preventDefault()):88==m.which?(t.current.cut(),m.preventDefault()):86==m.which?k.paste(m):189==m.which&&(1==t.current.options.allowDeleteRow&&b==_$_5e7a[408]?(t.current.deleteRow(),m.preventDefault()):1==t.current.options.allowDeleteColumn&&b==_$_5e7a[407]&&(t.current.deleteColumn(),m.preventDefault()));else if(t.current.selectedCell&&t.current.isEditable()){u=t.current.selectedCell[1];var x=t.current.selectedCell[0];t.current.options.columns[x].type!=_$_5e7a[18]&&
|
|
392
|
+
(32==m.keyCode?t.current.options.columns[x].type==_$_5e7a[249]||t.current.options.columns[x].type==_$_5e7a[251]?m.preventDefault():t.current.openEditor(t.current.records[u][x].element,!0,m):113==m.keyCode?t.current.openEditor(t.current.records[u][x].element,!1,m):1!=m.key.length&&m.key!=_$_5e7a[558]||m.altKey||m.ctrlKey||t.current.records[u]&&t.current.openEditor(t.current.records[u][x].element,!0,m))}}};var q=function(m,v,u,x,y,H){if(1==t.current.parent.input.classList.contains(_$_5e7a[92])&&U.update.call(t.current,
|
|
393
|
+
m,v,u,x,y))return!1;if(t.current.edition)t.current.closeEditor(t.current.edition,!0);else if(b&&b!==H)return!1;U.current?U.range.call(t.current,m,v,u,x,y):ta[_$_5e7a[11]].call(t.current,m,v,u,x,y)};k.mousedown=function(m){m=m||window.event;var v=m.buttons?m.buttons:m.button?m.button:m.which;if(t.current)if(1==Z.isVisible()&&(jSuites.findElement(m.target,_$_5e7a[382])||Z.close.call(t.current,!1)),t.current.edition){if(jSuites.findElement(m.target,_$_5e7a[99]))return!1}else if(jSuites.findElement(m.target,
|
|
394
|
+
_$_5e7a[219]))return!1;var u=n(m);if(!1===u)return!1;g=u;if(1<v)if(u[3]==_$_5e7a[407]){if(t.current.isSelected(u[4],null))return!1}else if(u[3]==_$_5e7a[408]){if(t.current.isSelected(null,u[4]))return!1}else if(u[3]==_$_5e7a[409]&&t.current.isSelected(u[4],u[5]))return!1;if(t.current){if(u[3]==_$_5e7a[138])t.current.isEditable()&&(ha.event=!0);else if(u[3]==_$_5e7a[549])Z.open.call(t.current,u[4]);else{if(1==u[2])if(1==t.current.options.columnDrag&&6>m.target.offsetHeight-m.offsetY)na.start.call(t.current,
|
|
395
|
+
m);else if(1==t.current.options.columnResize&&6>m.target.offsetWidth-m.offsetX)sa.start.call(t.current,m);else{v=t.current.options.columns.length-1;var x=t.current.options.data.length-1;if(u[3]==_$_5e7a[546])q(0,0,v,x,m,u[3]),c=a=0;else if(u[3]==_$_5e7a[405]){var y=ka.range.call(t.current,u[5])[u[4]];y[1]>v&&(y[1]=v);q(y[0],0,y[1],x,m,u[3]);a=y[0];c=0}else(m.shiftKey||m.ctrlKey)&&null!=a&&null!=c?q(a,0,u[4],x,m,u[3]):(u[3]==_$_5e7a[407]&&a==u[4]&&1==t.current.options.allowRenameColumn&&(f=setTimeout(function(){t.current.setHeader(u[4])},
|
|
396
|
+
800)),q(u[4],0,u[4],x,m,u[3]),a=u[4],c=0)}if(2==u[2])if(u[3]==_$_5e7a[408])1==t.current.options.rowDrag&&6>m.target.offsetWidth-m.offsetX?na.start.call(t.current,m):1==t.current.options.rowResize&&6>m.target.offsetHeight-m.offsetY?sa.start.call(t.current,m):(v=t.current.options.columns.length-1,x=parseInt(u[4]),(m.shiftKey||m.ctrlKey)&&null!=a&&null!=c?q(0,c,v,x,m,u[3]):(q(0,x,v,x,m,u[3]),a=0,c=x));else if(u[3]==_$_5e7a[409]){v=parseInt(u[4]);x=parseInt(u[5]);if(!t.current.edition&&(y=t.current.options.columns[u[4]].type,
|
|
397
|
+
m.target.tagName==_$_5e7a[559]&&(y==_$_5e7a[252]||y==_$_5e7a[253])&&m.target.parentNode.classList.contains(_$_5e7a[124]))){var H=m.target.innerText;y==_$_5e7a[252]&&(H=_$_5e7a[560]+H);window.open(H,_$_5e7a[561])}(m.shiftKey||m.ctrlKey)&&null!=a&&null!=c?q(a,c,v,x,m,u[3]):(q(v,x,v,x,m,u[3]),a=v,c=x)}}b=u[3];typeof u[3]!==_$_5e7a[13]&&B.call(t.current.parent,_$_5e7a[562],t.current,u[3],u[4],u[5]);d=!0}else d=!1};k.mouseup=function(m){t.current&&(na.event?na.end.call(t.current,m):sa.event?sa.end.call(t.current,
|
|
398
|
+
m):ha.event?ha.end.call(t.current,m):m.target.classList.contains(_$_5e7a[381])?Z.close.call(t.current,!0):t.current.edition&&m.target.classList.contains(_$_5e7a[563])&&50>m.target.clientWidth-m.offsetX&&50>m.offsetY?aa.close.call(t.current,null,!0):m.target.classList.contains(_$_5e7a[317])&&(m=m.target.innerText==_$_5e7a[215]?0:m.target.innerText==_$_5e7a[216]?m.target.getAttribute(_$_5e7a[263])-1:m.target.innerText-1,qa[_$_5e7a[11]].call(t.current,parseInt(m))));f&&(clearTimeout(f),f=null);d=b=!1;
|
|
399
|
+
U.current&&U.close.call(t.current)};k.mousemove=function(m){m=m||window.event;if(t.current){var v=m.target.getAttribute(_$_5e7a[42]),u=m.target.getAttribute(_$_5e7a[43]);if(1==d)na.event?na.update.call(t.current,m):sa.event?sa.update.call(t.current,m):Ka.event&&Ka.update.call(t.current,m);else{var x=m.target.getBoundingClientRect();t.current.cursor&&(t.current.cursor.style.cursor=_$_5e7a[3],t.current.cursor=null);1==t.current.options.editable&&(v||u)&&(1==t.current.options.rowResize&&m.target&&v&&
|
|
400
|
+
!u&&5>x.width-(m.clientX-x.left)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_5e7a[564]):1==t.current.options.columnResize&&m.target&&!v&&u&&5>x.height-(m.clientY-x.top)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_5e7a[565]):1==t.current.options.rowDrag&&m.target&&!v&&u&&5>x.width-(m.clientX-x.left)?(t.current.cursor=m.target,t.current.cursor.style.cursor=_$_5e7a[566]):1==t.current.options.columnDrag&&m.target&&v&&!u&&5>x.height-(m.clientY-x.top)&&(t.current.cursor=
|
|
401
|
+
m.target,t.current.cursor.style.cursor=_$_5e7a[566]))}}};k.mouseover=function(m){m=m||window.event;var v=!1;if(t.current&&1==d){var u=h(m);if(u[0]){if(u[1]&&t.current!=u[1].jexcel&&t.current)return!1;if(!na.event&&!sa.event)if(ha.event){var x=m.target.getAttribute(_$_5e7a[42]),y=m.target.getAttribute(_$_5e7a[43]);t.current.isSelected(x,y)||null===x||null===y||(ha.call(t.current,x,y),v=!0)}else 1==u[2]&&(x=a,u[3]==_$_5e7a[407]&&(x=m.target.getAttribute(_$_5e7a[42])),y=t.current.options.data.length-
|
|
402
|
+
1,q(a,0,x,y,m,u[3])),2==u[2]&&(u[3]==_$_5e7a[408]?(x=t.current.options.columns.length-1,y=parseInt(m.target.getAttribute(_$_5e7a[43])),q(0,c,x,y,m,u[3])):u[3]==_$_5e7a[409]&&(x=m.target.getAttribute(_$_5e7a[42]),y=m.target.getAttribute(_$_5e7a[43]),x&&y&&(q(a,c,x,y,m,u[3]),v=!0)))}}1==v&&!f&&C.limited.call(t.current)?f=setTimeout(function(){var H=t.current.content.getBoundingClientRect();if(m.changedTouches&&m.changedTouches[0])var L=m.changedTouches[0].clientX,E=m.changedTouches[0].clientY;else L=
|
|
403
|
+
m.clientX,E=m.clientY;50>H.height-(E-H.top)?C.pageDown.call(t.current,1,null,m):80>E-H.top&&C.pageUp.call(t.current,1,null,m);50>H.width-(L-H.left)?C.pageRight.call(t.current,1,null,m):80>L-H.left&&C.pageLeft.call(t.current,1,null,m);f=null},100):f&&(clearTimeout(f),f=null)};k.dblclick=function(m){if(t.current)if(m.target.classList.contains(_$_5e7a[338]))ha.execute.call(t.current,!1);else{var v=h(m);1==v[2]?1==t.current.options.columnSorting&&(m=m.target.getAttribute(_$_5e7a[42]))&&t.current.orderBy(m):
|
|
404
|
+
2==v[2]&&t.current.isEditable()&&!t.current.edition&&v[6]&&t.current.openEditor(v[6])}};k.paste=function(m){if(t.current&&t.current.selectedCell&&!t.current.edition){var v=m.clipboardData||window.clipboardData;v&&(t.current.paste(t.current.selectedCell[0],t.current.selectedCell[1],v.getData(_$_5e7a[56])),m&&m.preventDefault())}};k.contextmenu=function(m){var v=n(m);!1!==v&&(v[1]||(v=g),t.current&&!t.current.edition&&(v=Array.prototype.slice.call(v,3),Ma.open.call(t.current,m,v)))};var p=null,r=null,
|
|
405
|
+
w=null;k.touchstart=function(m){var v=h(m);v[0]?v[1]&&t.current!=v[1].jexcel&&(t.current&&t.current.resetSelection(),t.current=v[1].jexcel):t.current&&(t.current.resetSelection(),t.current=null);if(t.current&&!t.current.edition){var u=v[4];v=v[5];r=m.touches[0];p=m.touches.length;w=[u,v];if(null!==u&&null!==v){t.current.updateSelectionFromCoords(u,v,u,v);var x=m.target;f=setTimeout(function(){t.current.openEditor(x,!1,m);f=null},250)}}};k.touchmove=function(m){f&&(clearTimeout(f),f=null);if(t.current){m=
|
|
406
|
+
m.changedTouches[0];if(r)if(1<p){var v=document.elementFromPoint(m.pageX,m.pageY),u=v.getAttribute(_$_5e7a[42]);v=v.getAttribute(_$_5e7a[43]);null!==u&&null!==v&&t.current.updateSelectionFromCoords(w[0],w[1],u,v)}else t.current.scrollY.scrollTop+=-1*(m.clientY-r.clientY),t.current.scrollX.scrollLeft+=-1*(m.clientX-r.clientX);r=m}};k.touchend=function(m){f&&(clearTimeout(f),f=null);w=r=p=null};k.resize=function(){t.current&&1==t.current.parent.config.fullscreen&&C.refresh.call(t.current)};return k}(),
|
|
407
|
+
t=function(k,a,c){a||(a={});if(a.cloud&&!c)typeof a.plugins.cloud==_$_5e7a[85]?a.plugins.cloud.load(a,function(f){t(k,f,!0)}):console.error(_$_5e7a[567]);else{if(k.spreadsheet)b=k.spreadsheet,xa[_$_5e7a[11]].call(b,a);else var b=ia.spreadsheet(k,a);b.processing=!0;1==b.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[b.name]=function(){for(var f=0;f<b.worksheets.length;f++)b.worksheets[f].onload();b.processing=!1;if(Array.isArray(b.queue)&&0<b.queue.length)for(;f=b.queue.shift();)f[0].updateCell(f[1],
|
|
408
|
+
f[2],K.call(f[0],f[1],f[2]),!0);b.config.toolbar&&da.show.call(b);for(f=0;f<b.worksheets.length;f++)X.refresh.call(b.worksheets[f]);if(typeof b.config.onload==_$_5e7a[85])b.config.onload(b);fa.state.call(b);jSuites.loading.hide()};Array.isArray(a.worksheets)&&(a=a.worksheets);if(Array.isArray(a)){c=null;for(var d=[],e=0;e<a.length;e++)c=ia.worksheet(b,a[e]),d.push(c)}else d=ia.worksheet(b,a);jSuites.ajax.pending(b.name)||(jSuites.ajax.oncomplete[b.name](),jSuites.ajax.oncomplete[b.name]=null);return d}};
|
|
409
|
+
t.license=null;t.setLicense=function(k){t.license=k};t.spreadsheet=[];t.picker=U;t.setDictionary=function(k){jSuites.setDictionary(k)};t.extensions={};t.setExtensions=function(k){for(var a=Object.keys(k),c=0;c<a.length;c++)typeof k[a[c]]===_$_5e7a[85]&&(t[a[c]]=k[a[c]],t.extensions[a[c]]=k[a[c]],t.license&&typeof t[a[c]].license==_$_5e7a[85]&&t[a[c]].license.call(t,t.license))};t.destroy=function(k,a){k.spreadsheet&&(a&&ia.unbind(k),a=t.spreadsheet.indexOf(k.spreadsheet),t.spreadsheet.splice(a,1),
|
|
410
|
+
k.spreadsheet=null,k.jexcel=null,k.innerHTML=_$_5e7a[3],k.classList.remove(_$_5e7a[568]),k.classList.remove(_$_5e7a[347]))};t.version=F;t.helpers=A;t.events=va;typeof formula!==_$_5e7a[13]&&(t.formula=formula);t.editors=function(){var k={},a=function(c,b){return 1==c[b]||c.options&&1==c.options[b]?!0:c[b]==_$_5e7a[569]||c.options&&c.options[b]==_$_5e7a[569]?!0:!1};k.createEditor=function(c,b,d,e){e.parent.input.setAttribute(_$_5e7a[100],!1);c==_$_5e7a[220]?(c=document.createElement(_$_5e7a[220]),
|
|
411
|
+
c.type=_$_5e7a[56],c.value=d):c=document.createElement(_$_5e7a[20]);c.style.width=b.offsetWidth-2+_$_5e7a[44];c.style.height=b.offsetHeight-1+_$_5e7a[44];e.parent.input.appendChild(c);return c};k.createDialog=function(c,b,d,e,f,g){c=k.createEditor(_$_5e7a[20],c,b,f);c.classList.add(_$_5e7a[570]);c.classList.add(_$_5e7a[563]);800>window.innerWidth?(f.parent.input.style.top=_$_5e7a[144],f.parent.input.style.left=_$_5e7a[144]):(b=f.parent.input.getBoundingClientRect(),window.innerHeight<b.bottom&&(f.parent.input.style.marginTop=
|
|
412
|
+
-f.parent.input.offsetHeight));return c};k.general=function(){var c={},b=function(e){e=(_$_5e7a[3]+e)[0];return e==_$_5e7a[12]||e==_$_5e7a[571]?!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};c.updateCell=function(e,f,g,h,l,n){g=parseInt(g);h=parseInt(h);if(e){var q=d(n),p=null;f===_$_5e7a[3]||b(f)||typeof f===
|
|
413
|
+
_$_5e7a[14]||(q?(q=jSuites.mask.extract(f,q,!0))&&q.value!==_$_5e7a[3]&&(p=q.value):1==(!1===l.options.autoCasting||!1===n.autoCasting?!1:!0)&&(n.type==_$_5e7a[14]||n.type==_$_5e7a[306]||n.type==_$_5e7a[305]?(q=jSuites.mask.extract(f,n,!0))&&q.value!==_$_5e7a[3]&&(p=q.value):jSuites.isNumeric(Number(f))&&(p=Number(f))));null!==p&&(f=p);f=c.parseValue(g,h,f,l,n,e);f instanceof Element||f instanceof HTMLDocument?(e.innerHTML=_$_5e7a[3],e.appendChild(f)):1==l.parent.config.stripHTML?e.innerText=f:e.innerHTML=
|
|
414
|
+
f;if(null!==p)return p}};c.createCell=c.updateCell;c.openEditor=function(e,f,g,h,l,n){var q=l.parent.input;q.onblur=function(){q.classList.contains(_$_5e7a[92])||l.closeEditor(e,!0)};if(n.type==_$_5e7a[14]||n.type==_$_5e7a[306]||n.type==_$_5e7a[305])q.classList.add(_$_5e7a[555]),b(f)||n.inputmode||(n.inputmode=_$_5e7a[572]);g=null;b(f)||(n.inputmode&&q.setAttribute(_$_5e7a[96],n.inputmode),(g=d(n))?(n.disabledMaskOnEdition||(n.mask?(n=n.mask.split(_$_5e7a[262]),q.setAttribute(_$_5e7a[94],n[0])):n.locale&&
|
|
415
|
+
q.setAttribute(_$_5e7a[573],n.locale)),g.input=l.parent.input,l.parent.input.mask=g,jSuites.mask.render(f,g,!1)):f&&n.type==_$_5e7a[305]&&(f*=100));g||(q.innerText=f,jSuites.focus(l.parent.input))};c.closeEditor=function(e,f,g,h,l,n){e=l.parent.input;f=f?e.innerText:_$_5e7a[3];b(f)?f=f.replace(/(\r\n|\n|\r)/gm,_$_5e7a[3]):n.type==_$_5e7a[305]&&(f+=_$_5e7a[574],e.classList.remove(_$_5e7a[575]));return f};c.parseValue=function(e,f,g,h,l,n){b(g)&&1==h.parent.config.parseFormulas&&(g=h.executeFormula(g,
|
|
416
|
+
e,f));g instanceof Element||g instanceof HTMLDocument||!l||b(g)||!(f=d(l))||(e=jSuites.mask.render(g,f,!0),n&&f.mask&&(f=f.mask.split(_$_5e7a[262]),f[1]&&(f[1].match(new RegExp(_$_5e7a[576],_$_5e7a[374]))&&(0>g?n.classList.add(_$_5e7a[577]):n.classList.remove(_$_5e7a[577])),f[1].match(new RegExp(_$_5e7a[578],_$_5e7a[374]))&&0>g&&(e=_$_5e7a[212]+e+_$_5e7a[231]))),e&&(g=e));return g};c[_$_5e7a[51]]=function(e,f){var g;return(g=d(e))?jSuites.mask.render(f,g,!0):e.type==_$_5e7a[305]?100*parseFloat(f):
|
|
417
|
+
f};return c}();k.text=k.general;k.number=k.general;k.numeric=k.general;k.percent=k.general;k.notes=function(){var c={},b=null;c.updateCell=function(d,e,f,g,h,l){d&&(f=document.createElement(_$_5e7a[20]),f.classList.add(_$_5e7a[579]),1==h.parent.config.stripHTML?f.innerText=e:f.innerHTML=e,d.innerHTML=_$_5e7a[3],d.appendChild(f))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_5e7a[580];n.toolbar=!1;b=k.createDialog(d,
|
|
418
|
+
e,f,g,h,l);b=jSuites.editor(b,n)};c.closeEditor=function(d,e,f,g,h,l){return e?b.getData():_$_5e7a[3]};return c}();k.dropdown=function(){var c={createCell:function(b,d,e,f,g,h){h.render==_$_5e7a[581]?b.classList.add(_$_5e7a[582]):b.classList.add(_$_5e7a[583]);if(b=c.updateCell(b,d,e,f,g,h))return b},destroyCell:function(b){b.classList.remove(_$_5e7a[583])},updateCell:function(b,d,e,f,g,h){if(b){var l=c.getItem(b,d,e,f,g,h);l?b.innerHTML=l:d?(d=c.fromLabel(b,d,e,f,g,h),d.length?(l=c.getItem(b,d,e,
|
|
419
|
+
f,g,h),b.innerHTML=l):b.innerHTML=_$_5e7a[3]):b.innerHTML=_$_5e7a[3];return d}},openEditor:function(b,d,e,f,g,h){var l=k.createEditor(_$_5e7a[20],b,d,g),n=h.delimiter||_$_5e7a[262];h=Object.create(h);h.options||(h.options={});typeof h.filter==_$_5e7a[85]&&(h.source=h.filter(g.el,b,e,f,h.source));typeof h.filterOptions==_$_5e7a[85]&&(h=h.filterOptions(g,b,e,f,d,h));e=h.options;h.source&&(e.data=JSON.parse(JSON.stringify(h.source)));a(h,_$_5e7a[584])&&(e.multiple=!0);a(h,_$_5e7a[57])&&(e.autocomplete=
|
|
420
|
+
!0);e.format=!0;e.opened=!0;e.width=b.offsetWidth-2;e.onclose=function(){g.closeEditor(b,!0)};a(h,_$_5e7a[584])?d&&(e.value=(_$_5e7a[3]+d).split(n)):e.value=d;jSuites.dropdown(l,e)},closeEditor:function(b,d,e,f,g,h){for(var l=g.parent.input.children[0],n=h.delimiter||_$_5e7a[262],q=l.dropdown.getText(!0),p=l.dropdown.getValue(!0),r=0;r<p.length;r++)!1===c.getItem(b,p[r],e,f,g,h)&&h.source.push({id:p[r],name:q[r]});l.dropdown.close(!0);if(d)return p.join(n)},fromLabel:function(b,d,e,f,g,h){b=h.delimiter||
|
|
421
|
+
_$_5e7a[262];e=[];f=[];Array.isArray(d)||(d=(_$_5e7a[3]+d).split(b));for(g=0;g<d.length;g++)f[d[g].trim()]=!0;d=Object.keys(f);!a(h,_$_5e7a[584])&&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(b)},getItem:function(b,d,e,f,g,h){f=h.delimiter||_$_5e7a[262];b=[];e=[];Array.isArray(d)||(d=(_$_5e7a[3]+d).split(f));for(f=0;f<d.length;f++)e[d[f].trim()]=!0;f=Object.keys(e);!a(h,_$_5e7a[584])&&1<Object.keys(f).length&&(d=
|
|
422
|
+
[],d[f[0]]=!0,e=d);if(h.source&&typeof h.source[0]!==_$_5e7a[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]!==_$_5e7a[13]&&b.push(h.render==_$_5e7a[254]?h.source[d].color:h.render==_$_5e7a[585]?h.source[d].image:h.source[d].name);if(b.length){if(typeof h.render!==_$_5e7a[13]){for(d=0;d<b.length;d++)e=d,f=b[d],f=h.render==_$_5e7a[254]?_$_5e7a[586]+f+_$_5e7a[587]:h.render==_$_5e7a[585]?_$_5e7a[586]+f+_$_5e7a[587]:h.render==
|
|
423
|
+
_$_5e7a[581]?_$_5e7a[589]+(h.source[d].color||_$_5e7a[588])+_$_5e7a[590]+f+_$_5e7a[591]:void 0,b[e]=f;return b.join(_$_5e7a[3])}for(d=0;d<b.length;d++)b[d]=(_$_5e7a[3]+b[d]).replace(_$_5e7a[215],_$_5e7a[592]);return b.join(_$_5e7a[294])}return!1}};c[_$_5e7a[51]]=function(b,d){for(var e=0;e<b.source.length;e++)if(b.source[e].id==d)return b.render==_$_5e7a[254]?b.source[e].color:b.render==_$_5e7a[585]?b.source[e].image:b.source[e].name};return c}();k.autocomplete=k.dropdown;k.calendar=function(){var c=
|
|
424
|
+
{},b=null;c.updateCell=function(d,e,f,g,h,l){if(d){f=e;l=c.getFormat(l);0<e&&Number(e)==e&&(f=jSuites.calendar.numToDate(e));g=_$_5e7a[3]+e;g.substr(4,1)==_$_5e7a[185]&&g.substr(7,1)==_$_5e7a[185]?g=!0:(g=g.split(_$_5e7a[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=_$_5e7a[3];return _$_5e7a[3]}};c.createCell=c.updateCell;c.openEditor=
|
|
425
|
+
function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_5e7a[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options||{};f.opened=!0;f.onclose=function(n,q){h.closeEditor(d,!0)};typeof l.timepicker!==_$_5e7a[13]&&(f.time=a(l,_$_5e7a[593])?!0:!1);typeof f.readonly!==_$_5e7a[13]&&(f.readonly=f.readonly);f.value=e||null;f.placeholder=f.format;b=k.createEditor(_$_5e7a[220],d,e,h);jSuites.calendar(b,f);!1===b.calendar.options.readonly&&b.focus()};c.closeEditor=function(d,e,f,g,h){d=b.calendar.close(!0,
|
|
426
|
+
b.value?!0:!1);d=b.value?d:_$_5e7a[3];if(e)return d};c.getFormat=function(d){return d&&d.format?d.format:d&&d.options&&d.options.format?d.options.format:_$_5e7a[594]};c[_$_5e7a[51]]=function(d,e){d=c.getFormat(d);return jSuites.calendar.getDateString(e,d)};return c}();k.color=function(){var c={},b=null;c.updateCell=function(d,e,f,g,h,l){d&&(l.render==_$_5e7a[595]?(f=document.createElement(_$_5e7a[20]),f.className=_$_5e7a[254],f.style.backgroundColor=e,d.innerText=_$_5e7a[3],d.appendChild(f)):(d.style.color=
|
|
427
|
+
e,d.innerText=e))};c.createCell=c.updateCell;c.openEditor=function(d,e,f,g,h,l){l=Object.create(l);typeof l.filterOptions==_$_5e7a[85]&&(l=l.filterOptions(h,d,f,g,e,l));l.value=e;l.onclose=function(n,q){h.closeEditor(d,!0)};b=k.createEditor(_$_5e7a[220],d,e,h);b=jSuites.color(b,l);b.open()};c.closeEditor=function(d,e,f,g,h,l){d=b.close(!0);if(e)return d};c[_$_5e7a[51]]=function(d,e){d=document.createElement(_$_5e7a[20]);d.style.width=_$_5e7a[596];d.style.height=_$_5e7a[22];d.style.backgroundColor=
|
|
428
|
+
e;return d.outerHTML};return c}();k.checkbox=function(){var c={createCell:function(b,d,e,f,g,h){d=d&&d!=_$_5e7a[597]&&d!=_$_5e7a[598]?!0:!1;e=document.createElement(_$_5e7a[220]);e.type=_$_5e7a[249];e.checked=d;e.onclick=function(){g.setValue(b,this.checked)};(h&&1==h.readOnly||!g.isEditable())&&e.setAttribute(_$_5e7a[599],_$_5e7a[599]);b.innerHTML=_$_5e7a[3];b.appendChild(e);return d},updateCell:function(b,d){d=d&&d!=_$_5e7a[597]&&d!=_$_5e7a[598]?!0:!1;b&&(b.children[0].checked=d);return d},openEditor:function(b,
|
|
429
|
+
d,e,f,g){d=b.children[0].checked?!1:!0;g.setValue(b,d);return!1},closeEditor:function(b,d){return!1}};c[_$_5e7a[51]]=function(b,d){return 1==d||1==d||d==_$_5e7a[569]?jSuites.translate(_$_5e7a[569]):jSuites.translate(_$_5e7a[597])};return c}();k.radio=function(){var c={createCell:function(b,d,e,f,g,h){b.getAttribute(_$_5e7a[42]);e=document.createElement(_$_5e7a[220]);e.type=_$_5e7a[251];e.checked=1==d||1==d||d==_$_5e7a[569]?!0:!1;e.onclick=function(){g.setValue(b,!0)};(h&&1==h.readOnly||!g.isEditable())&&
|
|
430
|
+
e.setAttribute(_$_5e7a[599],_$_5e7a[599]);b.innerHTML=_$_5e7a[3];b.appendChild(e)},updateCell:function(b,d,e,f,g){d=1==d||1==d||d==_$_5e7a[569]||d==_$_5e7a[600]?!0:!1;b&&(b.children[0].checked=d);if(1==d){b=[];for(var h=0;h<g.options.data.length;h++)f!=h&&g.options.data[h][e]&&b.push({x:e,y:h,value:0});b.length&&g.setValue(b)}return d},openEditor:function(b,d,e,f,g){return!1},closeEditor:function(b,d){return!1}};c[_$_5e7a[51]]=function(b,d){return 1==d||1==d||d==_$_5e7a[569]?_$_5e7a[569]:_$_5e7a[597]};
|
|
431
|
+
return c}();k.autonumber=function(){var c={},b=null;c.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?c.isValid(e,f,g,h)||(e=_$_5e7a[242]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return d.innerText=e};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){b=k.createEditor(_$_5e7a[220],d,e,h);b.onblur=function(){h.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,h){return e?b.value:_$_5e7a[3]};
|
|
432
|
+
c.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 c}();k.progressbar=function(){var c={},b=null;c.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==_$_5e7a[552])var f=d.children[0];else f=document.createElement(_$_5e7a[20]),f.classList.add(_$_5e7a[255]),d.innerText=_$_5e7a[3],d.classList.add(_$_5e7a[601]),d.appendChild(f);f.style.width=parseInt(e)+_$_5e7a[574];
|
|
433
|
+
f.setAttribute(_$_5e7a[263],parseInt(e)+_$_5e7a[574])};c.destroyCell=function(d){d.classList.remove(_$_5e7a[601])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){b=k.createEditor(_$_5e7a[220],d,e,h);b.type=_$_5e7a[14];b.setAttribute(_$_5e7a[602],0);b.setAttribute(_$_5e7a[603],100);b.onblur=function(){h.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,h){return e?b.value:_$_5e7a[3]};return c}();k.rating=function(){var c={},b=null;c.createCell=function(d,e,f,g,h,
|
|
434
|
+
l){return c.setCell(d,e,l)};c.destroyCell=function(d){d.classList.remove(_$_5e7a[604])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){b=k.createEditor(_$_5e7a[220],d,e,h);b.type=_$_5e7a[14];b.setAttribute(_$_5e7a[602],0);b.setAttribute(_$_5e7a[603],5);b.onblur=function(){h.closeEditor(d,!0)};b.focus();b.value=e};c.closeEditor=function(d,e,f,g,h,l){return e?b.value:_$_5e7a[3]};c.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:_$_5e7a[577];
|
|
435
|
+
var g=document.createElement(_$_5e7a[20]);g.setAttribute(_$_5e7a[263],parseInt(e)+_$_5e7a[605]);g.classList.add(_$_5e7a[256]);for(var h=0;h<e;h++){var l=document.createElement(_$_5e7a[440]);l.className=_$_5e7a[505];l.style.color=f;l.innerHTML=_$_5e7a[606];g.appendChild(l)}d.innerHTML=_$_5e7a[3];d.className=_$_5e7a[604];d.appendChild(g)}return e};return c}();k.email=function(){var c={createCell:function(b,d,e,f,g,h){b&&(b.children&&b.children[0]&&b.children[0].tagName==_$_5e7a[559]?e=b.children[0]:
|
|
436
|
+
(e=document.createElement(_$_5e7a[201]),b.innerText=_$_5e7a[3],b.appendChild(e),h.options&&h.options.url&&e.setAttribute(_$_5e7a[607],h.options.url)),e.innerText=d)}};c.updateCell=c.createCell;c.openEditor=function(b,d,e,f,g,h){g.parent.input.classList.add(_$_5e7a[555]);g.parent.input.onblur=function(){g.closeEditor(b,!0)};g.parent.input.innerText=d;jSuites.focus(g.parent.input)};c.closeEditor=function(b,d,e,f,g){g.parent.input.classList.remove(_$_5e7a[555]);return d?g.parent.input.innerText.replace(new RegExp(/\n/,
|
|
437
|
+
_$_5e7a[188]),_$_5e7a[3]):_$_5e7a[3]};return c}();k.url=k.email;k.image=function(){var c={},b=null;c.createCell=function(d,e,f,g,h,l){d&&(e?d.children&&d.children[0]&&d.children[0].tagName==_$_5e7a[608]?d.children[0].src=e:(f=document.createElement(_$_5e7a[37]),l.render==_$_5e7a[609]&&f.classList.add(_$_5e7a[609]),l.options&&(f.style.maxWidth=_$_5e7a[610],l.options.absolute&&(f.style.position=_$_5e7a[611]),l.options.width&&(f.style.maxWidth=parseInt(l.options.width)+_$_5e7a[44]),l.options.height&&
|
|
438
|
+
(f.style.maxHeight=parseInt(l.options.height)+_$_5e7a[44],f.style.marginTop=-1*parseInt(l.options.height)/2+_$_5e7a[44])),f.src=e,d.innerHTML=_$_5e7a[3],d.appendChild(f)):d.innerHTML=_$_5e7a[3])};c.updateCell=c.createCell;c.openEditor=function(d,e,f,g,h,l){(l&&l.options?l.options:{}).value=e;b=k.createDialog(d,e,f,g,h,l);e&&(d=document.createElement(_$_5e7a[37]),d.src=e,d.classList.add(_$_5e7a[612]),d.style.width=_$_5e7a[610],b.appendChild(d));jSuites.image(b,l)};c.closeEditor=function(d,e,f,g,h,
|
|
439
|
+
l){if(e&&(d=b.children[0]))return d.tagName==_$_5e7a[608]?d.src:_$_5e7a[3]};c[_$_5e7a[51]]=function(d,e){return _$_5e7a[613]+e+_$_5e7a[614]};return c}();k.html=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_5e7a[615]);var f=document.createElement(_$_5e7a[20]);f.innerHTML=e;d.appendChild(f)};c.updateCell=function(d,e){d&&(d.firstChild.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_5e7a[615])};c.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};
|
|
440
|
+
n.focus=!0;n.value=e;n.border=!1;n.height=_$_5e7a[580];e=k.createDialog(d,e,f,g,h,l);b=jSuites.editor(e,n);b.close=function(){h.closeEditor(d,!0)};jSuites.tracking(b,!0)};c.closeEditor=function(d,e,f,g,h,l){jSuites.tracking(b,!1);d=b.getData();if(e)return d};return c}();k.hidden=function(){return{createCell:function(c,b,d,e,f){c.style.display=_$_5e7a[40];c.innerText=b},updateCell:function(c,b,d,e,f){c&&(c.innerText=b)},openEditor:function(c,b,d,e,f){return!1},closeEditor:function(c,b){return!1}}}();
|
|
441
|
+
k.tags=function(){var c={},b=null;c.createCell=function(d,e){d.classList.add(_$_5e7a[616]);c.updateCell(d,e)};c.updateCell=function(d,e){d&&(d.innerHTML=e)};c.destroyCell=function(d){d.classList.remove(_$_5e7a[616])};c.openEditor=function(d,e,f,g,h,l){var n=l&&l.options?l.options:{};n.value=e;b=k.createDialog(d,e,f,g,h,l);d=document.createElement(_$_5e7a[20]);d.style.margin=_$_5e7a[22];d.style.marginRight=_$_5e7a[617];b.appendChild(d);b=jSuites.tags(d,n);d.focus();jSuites.focus(d)};c.closeEditor=
|
|
442
|
+
function(d,e,f,g,h,l){d=b.getValue();if(e)return d};return c}();k.record=function(){var c={},b=null;c.createCell=function(d,e,f,g,h,l){d.classList.add(_$_5e7a[583]);var n;(n=h.parent.getWorksheetInstance(l.worksheetId))?n.rows?c.updateCell(d,e,f,g,h,l):(d.innerText=_$_5e7a[242],h.parent.queue.push([h,f,g])):(d.innerText=_$_5e7a[242],h.parent.queue.push([h,f,g]))};c.destroyCell=function(d){d.classList.remove(_$_5e7a[583])};c.updateCell=function(d,e,f,g,h,l){d&&(typeof l.worksheetId==_$_5e7a[13]?d.innerText=
|
|
443
|
+
_$_5e7a[242]:d.innerHTML=c.getValue(d,e,f,g,h,l))};c.openEditor=function(d,e,f,g,h,l){var n=l.delimiter||_$_5e7a[262];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_5e7a[85]&&(l.source=l.filter(h.el,d,f,g,l.source));typeof l.filterOptions==_$_5e7a[85]&&(l=l.filterOptions(h,d,f,g,e,l));f=l.options;f.data=c.getSource(h,l);a(l,_$_5e7a[584])&&(f.multiple=!0);a(l,_$_5e7a[57])&&(f.autocomplete=!0);f.opened=!0;f.width=d.offsetWidth-2;f.onclose=function(){h.closeEditor(d,!0)};a(l,_$_5e7a[584])?
|
|
444
|
+
e&&(f.value=(_$_5e7a[3]+e).split(n)):f.value=e;b=k.createEditor(_$_5e7a[20],d,e,h);b=jSuites.dropdown(b,f)};c.closeEditor=function(d,e,f,g,h,l){d=l.delimiter||_$_5e7a[262];f=b.getValue(!0);b.close(!0);if(e)return f.join(d)};c.getValue=function(d,e,f,g,h,l){d=[];if(typeof l.worksheetId==_$_5e7a[17]&&(h=h.parent.getWorksheetInstance(l.worksheetId))){f=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(f=l.worksheetImage);if(e==_$_5e7a[3]||0==e||null==e||void 0==e)return _$_5e7a[3];e=(_$_5e7a[3]+
|
|
445
|
+
e).split(_$_5e7a[262]);for(g=0;g<e.length;g++){var n=e[g].trim();var q=h.name(f);n=h.getRowById(n);q=!1===n?_$_5e7a[618]:n[q];0<=l.worksheetImage&&(q=_$_5e7a[619]+q+_$_5e7a[620]);d.push(q)}return 0<=l.worksheetImage?d.join(_$_5e7a[3]):d.join(_$_5e7a[294])}return _$_5e7a[242]};c.getSource=function(d,e){var f=e.worksheetColumn?e.worksheetColumn:0,g=null;typeof e.worksheetId==_$_5e7a[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=
|
|
446
|
+
{id:g.getRowId(d),name:h},void 0!=e.worksheetImage&&(h.image=g.value(e.worksheetImage,d)),l.push(h)}else console.error(_$_5e7a[621]+e.worksheetId);return l};c[_$_5e7a[51]]=function(d,e){for(var f=0;f<d.source.length;f++)if(d.source[f].id==e)return d.render==_$_5e7a[254]?d.source[f].color:d.render==_$_5e7a[585]?d.source[f].image:d.source[f].name};return c}();return k}();typeof jQuery!==_$_5e7a[13]&&function(k){k.fn.jspreadsheet=k.fn.jexcel=function(a){var c=k(this)[_$_5e7a[51]](0);if(c.jspreadsheet){if(typeof arguments[0]==
|
|
447
|
+
_$_5e7a[14])var b=arguments[0],d=2;else b=0,d=1;return c.jspreadsheet[b][a].apply(c.jspreadsheet[b],Array.prototype.slice.call(arguments,d))}return t(k(this)[_$_5e7a[51]](0),arguments[0])}}(jQuery);return t});
|