jspreadsheet 9.1.1 → 9.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +428 -428
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Jspreadsheet v9.1.
|
|
2
|
+
* Jspreadsheet v9.1.3
|
|
3
3
|
*
|
|
4
4
|
* Website: https://jspreadsheet.com
|
|
5
5
|
* Description: Create amazing web based spreadsheets.
|
|
@@ -22,7 +22,7 @@ $jscomp.polyfill=function(E,J,N,W){J&&($jscomp.ISOLATE_POLYFILLS?$jscomp.polyfil
|
|
|
22
22
|
$jscomp.polyfillIsolated=function(E,J,N,W){var S=E.split(".");E=1===S.length;W=S[0];W=!E&&W in $jscomp.polyfills?$jscomp.polyfills:$jscomp.global;for(var aa=0;aa<S.length-1;aa++){var qa=S[aa];if(!(qa in W))return;W=W[qa]}S=S[S.length-1];N=$jscomp.IS_SYMBOL_NATIVE&&"es6"===N?W[S]:null;J=J(N);null!=J&&(E?$jscomp.defineProperty($jscomp.polyfills,S,{configurable:!0,writable:!0,value:J}):J!==N&&(void 0===$jscomp.propertyToPolyfillSymbol[S]&&(N=1E9*Math.random()>>>0,$jscomp.propertyToPolyfillSymbol[S]=
|
|
23
23
|
$jscomp.IS_SYMBOL_NATIVE?$jscomp.global.Symbol(S):$jscomp.POLYFILL_PREFIX+N+"$"+S),$jscomp.defineProperty(W,$jscomp.propertyToPolyfillSymbol[S],{configurable:!0,writable:!0,value:J})))};$jscomp.initSymbol=function(){};$jscomp.iteratorPrototype=function(E){E={next:E};E[Symbol.iterator]=function(){return this};return E};
|
|
24
24
|
$jscomp.iteratorFromArray=function(E,J){E instanceof String&&(E+="");var N=0,W=!1,S={next:function(){if(!W&&N<E.length){var aa=N++;return{value:J(aa,E[aa]),done:!1}}W=!0;return{done:!0,value:void 0}}};S[Symbol.iterator]=function(){return S};return S};$jscomp.polyfill("Array.prototype.values",function(E){return E?E:function(){return $jscomp.iteratorFromArray(this,function(J,N){return N})}},"es8","es3");
|
|
25
|
-
var _$
|
|
25
|
+
var _$_be75=["use strict","{","}","","9.1.3","Base","https://jspreadsheet.com","Unlicensed","Jspreadsheet Pro\r\n"," edition ","\r\n","set","&","<","g","<",">",">","=","!",'"',"undefined","number","fullscreen","block","string","readonly","jss_rotate","span","rotate(","deg)","jss_hidden_index","div","right","10px","pointer","/v9",",","localhost",".","v9"," (Expired)","Licensed to: ","Premium","License required","A valid license is required","This version is not included on the scope of this license",
|
|
26
26
|
"Your license is expired. Please renew your certificate.","jspreadsheet","img","/jspreadsheet/","logo.png","none","status","edition","scope","data-x","data-y","get","px","jss_frozen","0px","scroll","wheel","goto","jss_scroll","jss_hidden","jss_content_overflow","onresize","300px","Jspreadsheet Pro","text","autocomplete","dropdown","GET","json","Jspreadsheet Alert: secureFormulas is set to false.","setConfig","insertRow","deleteRow","insertColumn","deleteColumn","moveRow","moveColumn","setMerge","removeMerge",
|
|
27
27
|
"setStyle","resetStyle","setWidth","setHeight","setHeader","setComments","setFreezeColumns","setFreezeRows","orderBy","setValue","setProperty","updateProperty","renameWorksheet","moveWorksheet","setDefinedNames","onundo","onredo","object","function","contextMenu","toolbar","onevent","Jspreadsheet: cursor not in the viewport","keydown","oneditionstart","oncreateeditor","hidden","jss_focus","jss_formula","oneditionend","data-mask","data-value","inputmode","0","style","jss_input","contentEditable","oninput",
|
|
28
28
|
"setRowId","onchangerowid","setBorder","resetBorders","updateCells","setFormula","updateData","onbeforesave","POST","Authorization","Bearer ","onbeforesend","disconected",": ","Sorry, something went wrong, refreshing your spreadsheet...","_top","onsave","persistence","?","?worksheet=","&worksheet=","add","remove","jss_cursor","selected","main","copying","onblur","onfocus","onselection"," ","'","'!",":","jss_border","cloning","jss_border_","15","jss_resize_corner","data-action","ontouchstart","moveLeft",
|
|
@@ -42,447 +42,447 @@ var _$_bbf0=["use strict","{","}","","9.1.1","Base","https://jspreadsheet.com","
|
|
|
42
42
|
"data-formula","class","styleBold","; font-weight:bold;","font-weight:bold;","tfoot tr","\r","\n","jss_ignore","THEAD","TBODY","TFOOT","selectall","header-group","jtabs-headers","filters","footer","jtoolbar","DIV","html","jss_nowrap","insertHTML","<br/>\n","Process","move","col-resize","grab","row-resize","A","mailto:","_blank","onclick","jclose","DOM el not found",'<table class="jss"><tbody><tr><td>A</td></tr></tbody></table>',"Cloud extension not loaded.","onload","jtabs","jss_dialog","decimal",
|
|
43
43
|
"data-locale","%","jss_percent","[Red]","red","jss_notes","145px","tag","jss_dropdown_tags","jss_dropdown","multiple","image","<div class='jss_dropdown_icon' style='background-color: ","'></div>","orange","<div class='jss_dropdown_tag' style='background-color: ","'>","</div>","timepicker","YYYY-MM-DD","square","100px","false","FALSE","disabled","TRUE","jss_progressbar","min","max","jss_rating"," stars","star","href","IMG","round","100%","jss_image","tabindex","jpanel","delete","jfile",'<img src="',
|
|
44
44
|
'" alt="">',"jss_richtext","jss_tags","40px","#NOTFOUND","<img src='","' class='round small' />","Jspreadsheet: worksheet not found "];
|
|
45
|
-
(function(E,J){typeof exports===_$
|
|
46
|
-
{version:_$
|
|
47
|
-
h=h.replace(new RegExp(_$
|
|
48
|
-
0<=h?qa.call(this,h):h;typeof b===_$
|
|
49
|
-
u.current:null;typeof h===_$
|
|
50
|
-
else return typeof d===_$
|
|
51
|
-
d?(h&&h.classList&&h.classList.contains(_$
|
|
52
|
-
!1:!0;h?b.remove(d):b.add(d);H.call(this,!0)},Ma=function(h){if(void 0===h)return this.status;var d=document.createElement(_$
|
|
53
|
-
_$
|
|
54
|
-
1E3),x=N(),f[1].date<k?(b=f[1].demo||!f[1].plan||f[1].date+2592E3<k?6:7,x.license=f[1].name+_$
|
|
55
|
-
!sessionStorage.getItem(_$
|
|
45
|
+
(function(E,J){typeof exports===_$_be75[103]&&typeof module!==_$_be75[21]?module.exports=J():typeof define===_$_be75[104]&&define.amd?define(J):E.jspreadsheet=E.jexcel=J()})(this,function(){_$_be75[0];var E=function(h,d){h=jSuites.translate(h);if(d&&d.length)for(var b=0;b<d.length;b++)h=h.replace(_$_be75[1]+b+_$_be75[2],d[b]);return h},J=function(h,d){Array.isArray(h)&&(h=h[0]);h=h.replace(new RegExp(/'/g),_$_be75[3]).toUpperCase();if(void 0===d)return window[h]?window[h]:null;window[h]=d},N=function(){var h=
|
|
46
|
+
{version:_$_be75[4],edition:_$_be75[5],host:_$_be75[6],license:_$_be75[7],print:function(){return[_$_be75[8]+this.edition+_$_be75[9]+this.version+_$_be75[10]+this.host+_$_be75[10]+this.license]}};return function(){return h}}(),W=function(h){var d=parseInt(h.y);if(h.id)var b=parseInt(h.id);else h.value&&(b=parseInt(h.value));0<b&&(this.rows[d].id=b,xa[_$_be75[11]].call(this,b))},S=function(h,d){var b=_$_be75[3],a=0;-1!==h.indexOf(_$_be75[12])&&(h=h.replace(new RegExp(_$_be75[13],_$_be75[14]),_$_be75[15]),
|
|
47
|
+
h=h.replace(new RegExp(_$_be75[16],_$_be75[14]),_$_be75[17]));for(var c=[_$_be75[18],_$_be75[19],_$_be75[17],_$_be75[15]],e=0;e<h.length;e++)h[e]==_$_be75[20]&&(a=0==a?1:0),1==a?b+=h[e]:(b+=h[e].toUpperCase(),1==d&&0<e&&h[e]==_$_be75[18]&&-1==c.indexOf(h[e-1])&&-1==c.indexOf(h[e+1])&&(b+=_$_be75[18]));return b},aa=function(h){return(_$_be75[3]+h).substr(0,1)===_$_be75[18]},qa=function(h){var d=this.options.columns;return d[h]&&d[h].name?d[h].name:h},O=function(h,d,b){var a;if(a=this.options.data[d]){var c=
|
|
48
|
+
0<=h?qa.call(this,h):h;typeof b===_$_be75[21]?b=typeof c===_$_be75[22]?a[h]:jSuites.path.call(a,_$_be75[3]+c):(typeof c===_$_be75[22]?a[h]=b:jSuites.path.call(a,_$_be75[3]+c,b),!aa(b)&&this.records[d][h]&&(this.records[d][h].v=b))}else b=null;return b},P=function(h){return 0==this.config.editable||h&&0==h.options.editable?!1:(h=Ma.call(this))?7<=h?!0:!1:!0},Na=function(h){var d=_$_be75[23];if(this.parent)var b=this.parent.config,a=this.parent.element,c=this;else b=this.config,a=this.element,c=u.current?
|
|
49
|
+
u.current:null;typeof h===_$_be75[21]&&(h=!a.classList.contains(d));h?(a.classList.add(d),b.fullscreen=!0):(a.classList.remove(d),b.fullscreen=!1);c&&(H.call(c,!0),ma.update.call(c.parent,c))},Oa=function(h){var d=this.loading;null===h&&(h=d.style.display==_$_be75[24]?!0:!1);d.style.display=h?_$_be75[24]:_$_be75[3];setTimeout(function(){d.style.display=_$_be75[3]},1E3)},Ja=function(h,d){if(typeof h===_$_be75[25]){var b=F.getCoordsFromColumnName(h);b=this.records[b[1]][b[0]];if(b.element)h=b.element;
|
|
50
|
+
else return typeof d===_$_be75[21]?b.readonly:b.readonly=d?!0:!1}b=_$_be75[26];h=h.classList;if(typeof d===_$_be75[21])return h.contains(b)?!0:!1;d?h.add(b):h.remove(b)},Ta=function(h,d){var b,a=[];if(typeof h===_$_be75[25]){var c=F.getCoordsFromColumnName(h);a.push({x:c[0],y:c[1],value:{rotate:d}})}else if(Array.isArray(h))for(b=0;b<h.length;b++)c=F.getCoordsFromColumnName(h[b]),a.push({x:c[0],y:c[1],value:{rotate:d}});for(b=0;b<a.length;b++)(c=this.records[a[b].y][a[b].x])&&c.element&&(h=c.element.firstChild,
|
|
51
|
+
d?(h&&h.classList&&h.classList.contains(_$_be75[27])||(h=document.createElement(_$_be75[28]),h.classList.add(_$_be75[27]),h.innerHTML=c.element.innerHTML,c.element.innerHTML=_$_be75[3],c.element.appendChild(h)),h.style.transform=_$_be75[29]+parseInt(270-d)+_$_be75[30]):h&&h.classList&&h.classList.contains(_$_be75[27])&&(h.classList.remove(_$_be75[27]),h.style.transform=_$_be75[3]));this.updateProperty(a);ba.refresh.call(this)},Aa=function(h){var d=_$_be75[31],b=this.table.classList;if(typeof h==_$_be75[21])return b.contains(d)?
|
|
52
|
+
!1:!0;h?b.remove(d):b.add(d);H.call(this,!0)},Ma=function(h){if(void 0===h)return this.status;var d=document.createElement(_$_be75[32]);d.style.textAlign=_$_be75[33];d.style.fontSize=_$_be75[34];d.style.cursor=_$_be75[35];d.onclick=function(){window.location.href=N().host+_$_be75[36]};var b=null,a=[],c=[74,50,48,50,48,33].join(_$_be75[3]);(function(g){b=1;try{if(g){var f=window.atob(g);f=f.split(_$_be75[37]);if(f[1]){f[1]=window.atob(f[1]);var k=f[0];g=c;var l=f[1],n=jSuites.sha512,q=_$_be75[3],p=
|
|
53
|
+
_$_be75[3];128<g.length&&(g=n(g));for(var v=0;128>v;v++){var w=g[v]?g[v].charCodeAt(0):0;q+=String.fromCharCode(54^w);p+=String.fromCharCode(92^w)}var x=n(p+n(q+l));if(k!=x)b=3;else if(f[1]=JSON.parse(f[1]),f[1].date){var y=window.location.hostname||_$_be75[38];k=!1;for(x=0;x<f[1].domain.length;x++)-1===f[1].domain[x].indexOf(_$_be75[39])?y===f[1].domain[x]&&(k=!0):y.substr(y.indexOf(f[1].domain[x]))==f[1].domain[x]&&(k=!0);!1===k?b=4:f[1].scope&&0<=f[1].scope.indexOf(_$_be75[40])?(y=new Date,k=parseInt(y.getTime()/
|
|
54
|
+
1E3),x=N(),f[1].date<k?(b=f[1].demo||!f[1].plan||f[1].date+2592E3<k?6:7,x.license=f[1].name+_$_be75[41]):(b=8,x.license=_$_be75[42]+f[1].name,x.edition=3==f[1].plan||6==f[1].plan||31==f[1].plan||33==f[1].plan?_$_be75[43]:_$_be75[5],a=f[1].scope)):b=5}else b=4}else b=2}}catch(A){}})(h);h=_$_be75[3];if(1==b)h=_$_be75[44];else if(2==b||3==b||4==b)h=_$_be75[45];else if(5==b)h=_$_be75[46];else if(6==b||7==b)h=_$_be75[47];d.appendChild(document.createTextNode(h));if(8>b)try{if(typeof sessionStorage!==_$_be75[21]&&
|
|
55
|
+
!sessionStorage.getItem(_$_be75[48])){sessionStorage.setItem(_$_be75[48],!0);var e=document.createElement(_$_be75[49]);e.src=N().host+_$_be75[50]+_$_be75[51];e.style.display=_$_be75[52];d.appendChild(e)}}catch(g){}Object.defineProperty(this,_$_be75[53],{value:b,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_be75[54],{value:N().edition===_$_be75[43]?1:0,writable:!1,configurable:!1,enumerable:!1,extensible:!1});Object.defineProperty(this,_$_be75[55],{get:function(){return a},
|
|
56
56
|
configurable:!1,enumerable:!1,extensible:!1});return d},H=function(){var h=function(l){-1==this.indexOf(l)&&this.push(l)},d=function(l,n){if(!l||!n)return!1;var q=l.length;if(q!=n.length)return!1;for(;q--;)if(l[q]!==n[q])return!1;return!0},b=function(l){var n=null,q,p,v=0,w={},x=!1;for(q=0;q<this.options.columns.length;q++)if(-1===l.indexOf(q)){if(ia.attached.call(this,q)){this.headers[q].parentNode.removeChild(this.headers[q]);this.colgroup[q].parentNode.removeChild(this.colgroup[q]);if(this.options.footers)for(p=
|
|
57
57
|
0;p<this.options.footers.length;p++)this.footers.content[p][q].element&&this.footers.content[p][q].element.parentNode&&this.footers.content[p][q].element.parentNode.removeChild(this.footers.content[p][q].element);x=!0}for(p=0;p<this.visibleRows.length;p++){var y=this.records[this.visibleRows[p]][q];y.element&&y.element.parentNode&&y.element.parentNode.removeChild(y.element)}}if(this.options.nestedHeaders)for(p=0;p<this.thead.children.length-1;p++)v+=this.thead.children[p].offsetHeight;for(q=0;q<l.length;q++){var A=
|
|
58
58
|
l[q];var z=Da.create.call(this,A);if(n){if(!z.parentNode){this.headerContainer.insertBefore(z,this.headerContainer.children[n].nextSibling);this.colgroupContainer.insertBefore(this.colgroup[A],this.colgroupContainer.children[n].nextSibling);if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(fa.create.call(this,A,p),this.tfoot.children[p].children[n].nextSibling);v&&(z.style.top+=v);x=!0}for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],
|
|
59
|
-
y=Q[_$
|
|
60
|
-
0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=Q[_$
|
|
59
|
+
y=Q[_$_be75[58]].call(this,A,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[n].nextSibling)}else{if(!z.parentNode){this.headerContainer.insertBefore(z,this.headerContainer.children[1]);this.colgroupContainer.insertBefore(this.colgroup[A],this.colgroupContainer.children[1]);if(this.options.footers)for(p=0;p<this.options.footers.length;p++)this.tfoot.children[p].insertBefore(fa.create.call(this,A,p),this.tfoot.children[p].children[1]);v&&(z.style.top+=v);x=!0}for(p=
|
|
60
|
+
0;p<this.visibleRows.length;p++)y=this.visibleRows[p],y=Q[_$_be75[58]].call(this,A,y),y.parentNode||this.tbody.children[p].insertBefore(y,this.tbody.children[p].children[1])}if(this.options.mergeCells)for(p=0;p<this.visibleRows.length;p++)y=this.visibleRows[p],n=F.getColumnNameFromCoords(A,y),this.options.mergeCells[n]&&(this.records[y][A].merged||(w[n]=!1));n=Array.prototype.indexOf.call(this.headerContainer.children,z)}v=0;if(this.options.nestedHeaders)for(p=0;p<this.options.nestedHeaders.length;p++){n=
|
|
61
61
|
null;A=[];y=ya.getColumns.call(this,p);for(q=0;q<l.length;q++)void 0!==y[l[q]]&&-1==A.indexOf(y[l[q]])&&A.push(y[l[q]]);for(q=0;q<this.options.nestedHeaders[p].length;q++)-1==A.indexOf(q)&&this.nested.content[p][q]&&this.nested.content[p][q].element.offsetHeight&&this.nested.content[p][q].element.remove();for(q=y=0;q<A.length;q++)z=ya.create.call(this,A[q],p),z.parentNode||(n?this.thead.children[p].children[n]?this.thead.children[p].insertBefore(z,this.thead.children[p].children[n].nextSibling):this.thead.children[p].appendChild(z):
|
|
62
|
-
this.thead.children[p].insertBefore(z,this.thead.children[p].children[1]),z.style.top=v+_$
|
|
63
|
-
(this.table.style.left=_$
|
|
64
|
-
v=!0),q=n;v?(this.table.style.top=g.height.call(this,l[this.options.freezeRows||0])+_$
|
|
62
|
+
this.thead.children[p].insertBefore(z,this.thead.children[p].children[1]),z.style.top=v+_$_be75[59],this.options.freezeColumns&&this.options.nestedHeaders[p][A[q]].frozen&&(z.style.left=y+(Aa.call(this)?50:0)+_$_be75[59],z.classList.add(_$_be75[60]))),y+=z.offsetWidth,n=Array.prototype.indexOf.call(this.thead.children[p].children,z);v+=this.thead.children[p].offsetHeight}1==x?this.table.style.left=g.width.call(this,l[this.options.freezeColumns||0])+_$_be75[59]:this.width<parseInt(this.table.style.left)&&
|
|
63
|
+
(this.table.style.left=_$_be75[61]);sa.batch.call(this,w);this.visibleCols=l},a=function(l){var n=[],q=null,p,v=!1;for(p=0;p<this.tbody.children.length;p++)n.push(this.tbody.children[p]);for(p=0;p<n.length;p++){var w=parseInt(n[p].getAttribute(_$_be75[57]));-1===l.indexOf(w)&&(n[p].parentNode.removeChild(n[p]),v=!0)}for(p=0;p<l.length;p++)n=da.create.call(this,l[p]),n.parentNode||(q?this.tbody.insertBefore(n,q.nextSibling):this.tbody.insertBefore(n,this.tbody.firstChild),this.rows[l[p]].height=n.offsetHeight,
|
|
64
|
+
v=!0),q=n;v?(this.table.style.top=g.height.call(this,l[this.options.freezeRows||0])+_$_be75[59],this.visibleCols=null):this.height<parseInt(this.table.style.top)&&(this.table.style.top=_$_be75[61]);this.visibleRows=l},c=function(){var l=[],n=0,q=null;if(H.limited.call(this)){var p=q=0;p=this.content.scrollLeft;var v=p+this.content.offsetWidth;q=this.options.columns;var w=null,x=this.options.freezeColumns||0,y=0;x&&(p+=ca.getWidth.call(this,!0));for(n=0;n<q.length;n++)w=ia.isVisible.call(this,n)?parseInt(q[n].width):
|
|
65
65
|
0,(y+w>p&&y<=v||n<x)&&h.call(l,n),y+=w;for(n=0;n<l.length;n++)if(p=sa.getAffected.call(this.merged.cols,l[n]))for(q=0;q<p.length;q++)h.call(l,p[q]);for(n=0;n<l.length;n++)if(p=ya.getAffected.call(this,l[n]))for(q=0;q<p.length;q++)this.options.columns[p[q]]&&h.call(l,p[q]);l.sort(function(A,z){return A-z})}else for(q=this.options.columns,n=0;n<q.length;n++)l.push(n);d(l,this.visibleCols)||b.call(this,l)},e=function(){var l=[],n=null,q=0,p=0;q=null;var v=0;if(H.limited.call(this)&&!this.options.pagination){var w=
|
|
66
66
|
this.content.scrollTop,x=w+this.content.offsetHeight,y=0,A=this.options.freezeRows||0,z=0;n=this.results?this.results:this.rows;A&&(w+=ja.getHeight.call(this,!0));for(p=0;p<n.length;p++)q=this.results?n[p]:p,y=da.height.call(this,q),(z+y>w&&z<x||p<A)&&l.push(q),z+=y}else for(n=this.results?this.results:this.rows,this.options.pagination?(q=parseInt(this.options.pagination)*this.pageNumber,v=q+parseInt(this.options.pagination),v>n.length&&(v=n.length)):(q=0,v=n.length),p=q;p<v;p++)q=this.results?n[p]:
|
|
67
|
-
p,l.push(q);if(this.options.mergeCells){for(p=0;p<l.length;p++)if(this.merged.rows[l[p]]&&(v=sa.getAffected.call(this.merged.rows,l[p])))for(q=0;q<v.length;q++)-1===l.indexOf(v[q])&&l.push(v[q]);l.sort(function(I,r){return I-r})}d(l,this.visibleRows)||a.call(this,l)},g=function(l,n){n&&(this.visibleCols=this.visibleRows=null);g.calculate.call(this);g.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$
|
|
68
|
-
function(p){if(H.limited.call(q)&&!q.options.pagination){var v=Math.abs(p.deltaX),w=Math.abs(p.deltaY);p.shiftKey||v>w?0>p.deltaX||0>p.deltaY?g.left.call(q):g.right.call(q):0>p.deltaY?g.up.call(q):g.down.call(q);p.preventDefault()}})}};g.calculate=function(){if(H.limited.call(this)){var l=ca.getWidth.call(this),n=ja.getHeight.call(this);this.width=g.width.call(this)+(l?l:1);this.height=g.height.call(this)+(n?n:1);this.scrollX.style.width=this.width+100+_$
|
|
69
|
-
100+_$
|
|
70
|
-
l;){l--;var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){n=q;break}}q=da.height.call(this,n);l=this.tbody.firstChild.getAttribute(_$
|
|
71
|
-
this.rows.length-1;){var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){n=q;break}l++}l=da.height.call(this,n);this.content.scrollTop+=l}};g.left=function(l){var n=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(n=l=this.thead.lastChild.children[1+n].getAttribute(_$
|
|
67
|
+
p,l.push(q);if(this.options.mergeCells){for(p=0;p<l.length;p++)if(this.merged.rows[l[p]]&&(v=sa.getAffected.call(this.merged.rows,l[p])))for(q=0;q<v.length;q++)-1===l.indexOf(v[q])&&l.push(v[q]);l.sort(function(I,r){return I-r})}d(l,this.visibleRows)||a.call(this,l)},g=function(l,n){n&&(this.visibleCols=this.visibleRows=null);g.calculate.call(this);g.update.call(this);if(!0!==l){var q=this;this.content.addEventListener(_$_be75[62],function(){g.ignore||g.update.call(q)});this.content.addEventListener(_$_be75[63],
|
|
68
|
+
function(p){if(H.limited.call(q)&&!q.options.pagination){var v=Math.abs(p.deltaX),w=Math.abs(p.deltaY);p.shiftKey||v>w?0>p.deltaX||0>p.deltaY?g.left.call(q):g.right.call(q):0>p.deltaY?g.up.call(q):g.down.call(q);p.preventDefault()}})}};g.calculate=function(){if(H.limited.call(this)){var l=ca.getWidth.call(this),n=ja.getHeight.call(this);this.width=g.width.call(this)+(l?l:1);this.height=g.height.call(this)+(n?n:1);this.scrollX.style.width=this.width+100+_$_be75[59];this.scrollY.style.height=this.height+
|
|
69
|
+
100+_$_be75[59]}};g.update=function(){e.call(this);c.call(this);Ca.update.call(this);ca.refresh.call(this);ja.refresh.call(this);ba.refresh.call(this)};g[_$_be75[64]]=function(l,n){null!==l&&(l=g.height.call(this,l),this.content.scrollTop=l);void 0!==n&&null!==n&&(n=g.width.call(this,n),this.content.scrollLeft=n)};g.up=function(l){if(l)this.content.scrollTop=0;else if(this.tbody.firstChild){l=this.tbody.lastChild.getAttribute(_$_be75[57]);l=parseInt(l);var n=l;for(this.results&&(l=this.results.indexOf(l));0<
|
|
70
|
+
l;){l--;var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){n=q;break}}q=da.height.call(this,n);l=this.tbody.firstChild.getAttribute(_$_be75[57]);da.attached.call(this,l)||(q+=this.content.scrollTop-this.table.offsetTop);this.content.scrollTop-=q}};g.down=function(l){if(l)this.content.scrollTop=this.content.scrollHeight;else if(this.tbody.firstChild){l=this.tbody.firstChild.getAttribute(_$_be75[57]);l=parseInt(l);var n=l;for(this.results&&(l=this.results.indexOf(l));l<
|
|
71
|
+
this.rows.length-1;){var q=this.results?this.results[l]:l;if(!this.rows[q]||!1!==this.rows[q].visible){n=q;break}l++}l=da.height.call(this,n);this.content.scrollTop+=l}};g.left=function(l){var n=this.options.freezeColumns||0;if(l)this.content.scrollLeft=0;else{for(n=l=this.thead.lastChild.children[1+n].getAttribute(_$_be75[56]);0<l;)if(l--,ia.isVisible.call(this,l)){n=l;break}l=n;n=parseInt(this.options.columns[l].width);this.headers[l]&&this.headers[l].parentNode||(n+=this.content.scrollLeft-this.table.offsetLeft);
|
|
72
72
|
this.content.scrollLeft-=n}};g.right=function(l){var n=this.options.freezeColumns||0;this.content.scrollLeft=l?this.content.scrollWidth:this.content.scrollLeft+this.thead.lastChild.children[1+n].offsetWidth};var f=function(){for(var l,n=this.content.offsetHeight-this.thead.offsetHeight-ja.getHeight.call(this),q=0,p=0;p<this.tbody.children.length;p++)l=this.tbody.children[p].offsetHeight,n>l&&(q+=l,n-=l);return q},k=function(){for(var l,n=this.content.offsetWidth-ca.getWidth.call(this),q=0,p=0;p<this.thead.lastChild.children.length;p++)l=
|
|
73
|
-
this.thead.lastChild.children[p].offsetWidth,n>l&&(q+=l,n-=l);return q};g.pageUp=function(){this.content.scrollTop-=f.call(this)};g.pageDown=function(){this.content.scrollTop+=f.call(this)};g.pageLeft=function(){this.content.scrollLeft-=k.call(this)};g.pageRight=function(){this.content.scrollLeft+=k.call(this)};g.build=function(l){var n=document.createElement(_$
|
|
73
|
+
this.thead.lastChild.children[p].offsetWidth,n>l&&(q+=l,n-=l);return q};g.pageUp=function(){this.content.scrollTop-=f.call(this)};g.pageDown=function(){this.content.scrollTop+=f.call(this)};g.pageLeft=function(){this.content.scrollLeft-=k.call(this)};g.pageRight=function(){this.content.scrollLeft+=k.call(this)};g.build=function(l){var n=document.createElement(_$_be75[32]);n.className=_$_be75[65]+l;return n};g.width=function(l,n){for(var q=this.options.columns,p=0,v=this.options.freezeColumns||0;v<
|
|
74
74
|
this.options.columns.length;v++){if(l===v)return p;ia.isVisible.call(this,v)&&(p+=parseInt(q[v].width));if(p>=n)return v}return n?v:p};g.height=function(l,n){for(var q=0,p=0,v=this.results?this.results:this.rows,w=this.options.freezeRows||0;w<v.length;w++){p=w;this.results&&(p=v[w]);if(l===p)return q;this.rows[p]&&!1!==this.rows[p].visible&&(q+=da.height.call(this,p));if(q>=n)return p}return n?p:q};g.adjust=function(l,n,q){var p=this.records[n][l].element;if(p){if(!this.records[n][l].merged)if(0==
|
|
75
|
-
q||2==q){var v=0,w=Aa.call(this)?50:0;this.options.freezeColumns&&(v=ca.getWidth.call(this,!0));n=this.content.scrollLeft+v;v=this.content.scrollLeft+(this.content.offsetWidth-w);w=this.table.offsetLeft+p.offsetLeft-w;var x=p.offsetWidth;0==q?w+x<v&&l>this.options.freezeColumns-1&&w<n&&(p.offsetHeight?(q=this.content.scrollLeft+(w-n),g.setX.call(this,q)):g[_$
|
|
76
|
-
q)):g[_$
|
|
77
|
-
n)):n>this.options.freezeRows-1&&(w>l?w+x>v&&(p.parentNode?(q=this.content.scrollTop+(w+x-v),g.setY.call(this,q)):g[_$
|
|
78
|
-
Pa=function(h,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var g=this.results?this.results[d]:d;if(!1!==this.rows[g].visible){var f=this.records[g][h].v===_$
|
|
79
|
-
g;else return g}e=f}}return c},Qa=function(h,d,b,a){for(var c=h,e,g=null;0<h;)if(h--,ia.isVisible.call(this,h)){e=!1;this.records[d]&&(e=this.records[d][h].merged?this.records[d-this.records[d][h].merged[1]][h-this.records[d][h].merged[0]].v?!0:!1:this.records[d][h].v?!0:!1);null===g&&(g=e);if(this.records[d]&&this.records[d][h].element&&this.records[d][h].element.classList.contains(_$
|
|
75
|
+
q||2==q){var v=0,w=Aa.call(this)?50:0;this.options.freezeColumns&&(v=ca.getWidth.call(this,!0));n=this.content.scrollLeft+v;v=this.content.scrollLeft+(this.content.offsetWidth-w);w=this.table.offsetLeft+p.offsetLeft-w;var x=p.offsetWidth;0==q?w+x<v&&l>this.options.freezeColumns-1&&w<n&&(p.offsetHeight?(q=this.content.scrollLeft+(w-n),g.setX.call(this,q)):g[_$_be75[64]].call(this,null,l)):l>this.options.freezeColumns-1&&(w>n?w+x>v&&(p.parentNode?(q=this.content.scrollLeft+(w+x-v+16),g.setX.call(this,
|
|
76
|
+
q)):g[_$_be75[64]].call(this,null,l)):g[_$_be75[64]].call(this,null,l))}else v=0,this.options.freezeRows&&(v=ja.getHeight.call(this,!0)),l=this.content.scrollTop+v,v=this.content.scrollTop+this.content.offsetHeight-this.thead.offsetHeight-16,w=this.table.offsetTop+p.offsetTop-this.thead.offsetHeight,x=p.offsetHeight,1==q?w+x<v&&n>this.options.freezeRows-1&&(w<l?p.parentNode?0<l-w&&(q=this.content.scrollTop+(w-l),g.setY.call(this,q)):g[_$_be75[64]].call(this,n):p.offsetHeight||g[_$_be75[64]].call(this,
|
|
77
|
+
n)):n>this.options.freezeRows-1&&(w>l?w+x>v&&(p.parentNode?(q=this.content.scrollTop+(w+x-v),g.setY.call(this,q)):g[_$_be75[64]].call(this,n)):p.offsetHeight||g[_$_be75[64]].call(this,n))}else 0==q||2==q?g[_$_be75[64]].call(this,null,l):g[_$_be75[64]].call(this,n)};g.setX=function(l){g.ignore=!0;this.content.scrollLeft=l;g.ignore=!1};g.setY=function(l){g.ignore=!0;this.content.scrollTop=l;g.ignore=!1};g.limited=function(){return 1==this.options.tableOverflow||1==this.parent.config.fullscreen};return g}(),
|
|
78
|
+
Pa=function(h,d,b,a){var c=d,e=null;if(this.results&&(d=this.results.indexOf(d),-1==d))return c;for(;0<d;){d--;var g=this.results?this.results[d]:d;if(!1!==this.rows[g].visible){var f=this.records[g][h].v===_$_be75[3]?!1:!0;null===e&&(e=f);if(this.records[g][h].element&&this.records[g][h].element.classList.contains(_$_be75[66])){if(this.records[g][h].merged){c=g-this.records[g][h].merged[1];if(!b)break;f=!0}}else{if(b&&f!==e&&!a)break;if(b)c=this.records[g][h].merged?g-this.records[g][h].merged[1]:
|
|
79
|
+
g;else return g}e=f}}return c},Qa=function(h,d,b,a){for(var c=h,e,g=null;0<h;)if(h--,ia.isVisible.call(this,h)){e=!1;this.records[d]&&(e=this.records[d][h].merged?this.records[d-this.records[d][h].merged[1]][h-this.records[d][h].merged[0]].v?!0:!1:this.records[d][h].v?!0:!1);null===g&&(g=e);if(this.records[d]&&this.records[d][h].element&&this.records[d][h].element.classList.contains(_$_be75[66])){if(this.records[d][h].merged&&(c=h-this.records[d][h].merged[0],!b))break}else{if(b&&e!==g&&!a)break;
|
|
80
80
|
if(b)c=h;else return h}g=e}return c},Ua=function(){var h=function(b,a,c,e){1==b||3==b?da.attached.call(this,c)||(0<this.options.pagination?this.page(this.whichPage(c)):1==b?H.up.call(this,e):H.down.call(this,e)):Q.attached.call(this,a,c)||(0==b?H.left.call(this,e):H.right.call(this,e))},d=function(b){b.up=d.up;b.down=d.down;b.right=d.right;b.left=d.left;b.last=d.last;b.first=d.first};d.up=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);
|
|
81
|
-
else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);c=Pa.call(this,e,g,a,c);c!=g&&(g=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,1,e,g,a),ka[_$
|
|
82
|
-
this.results.indexOf(k);if(-1==k){c=l;break a}var q=this.results.length-1}else q=this.rows.length-1;for(;k<q;){k++;var p=this.results?this.results[k]:k;if(!1!==this.rows[p].visible){var v=this.records[p][f].v===_$
|
|
83
|
-
c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,3,e,g,a),ka[_$
|
|
84
|
-
this.records[k-this.records[k][f].merged[1]][f-this.records[k][f].merged[0]].v?!0:!1:this.records[k][f].v?!0:!1);null===p&&(p=q);if(this.records[k]&&this.records[k][f].element&&this.records[k][f].element.classList.contains(_$
|
|
85
|
-
b,c,e,g),H.adjust.call(this,e,g,2))}};d.left=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);c=Qa.call(this,e,g,a,c);c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,0,e,g,a),ka[_$
|
|
86
|
-
b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Va=function(){return function(h){h.save=Ra;h.fullscreen=Na;h.setReadOnly=Ja;h.getReadOnly=Ja;h.isReadOnly=Ja;h.rotate=Ta;h.setPlugins=function(d){ua.call(this.parent,d)};h.showIndex=function(){Aa.call(this,!0)};h.hideIndex=function(){Aa.call(this,!1)};h[_$
|
|
87
|
-
h.isEditable=function(){return P.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.persistence=L;h.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$
|
|
88
|
-
ma.update.call(this.parent,this);G.call(this.parent,_$
|
|
89
|
-
allowManualInsertRow:!0,allowInsertColumn:!0,allowManualInsertColumn:!0,allowDeleteRow:!0,allowDeletingAllRows:!1,allowDeleteColumn:!0,allowRenameColumn:!0,allowComments:!0,selectionCopy:!0,mergeCells:{},search:!1,pagination:!1,paginationOptions:null,textOverflow:!1,tableOverflow:!1,tableHeight:_$
|
|
90
|
-
filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},d={application:_$
|
|
81
|
+
else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);c=Pa.call(this,e,g,a,c);c!=g&&(g=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,1,e,g,a),ka[_$_be75[11]].call(this,b,c,e,g),H.adjust.call(this,e,g,1))}};d.down=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);a:{var f=e,k=g,l=k,n=null;if(this.results){k=
|
|
82
|
+
this.results.indexOf(k);if(-1==k){c=l;break a}var q=this.results.length-1}else q=this.rows.length-1;for(;k<q;){k++;var p=this.results?this.results[k]:k;if(!1!==this.rows[p].visible){var v=this.records[p][f].v===_$_be75[3]?!1:!0;null===n&&(n=v);if(this.records[p][f].element&&this.records[p][f].element.classList.contains(_$_be75[66])){if(this.records[p][f].merged){if(!this.records[p][f].merged[1]&&(l=p,!a))break;v=!0}}else if(a&&v!==n&&!c){c=l;break a}else if(a)l=p;else{c=p;break a}n=v}}c=l}c!=g&&(g=
|
|
83
|
+
c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,3,e,g,a),ka[_$_be75[11]].call(this,b,c,e,g),H.adjust.call(this,e,g,3))}};d.right=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);a:{for(var f=e,k=g,l=this.options.columns,n=f,q,p=null;f<l.length-1;)if(f++,ia.isVisible.call(this,f)){q=!1;this.records[k]&&(q=this.records[k][f].merged?
|
|
84
|
+
this.records[k-this.records[k][f].merged[1]][f-this.records[k][f].merged[0]].v?!0:!1:this.records[k][f].v?!0:!1);null===p&&(p=q);if(this.records[k]&&this.records[k][f].element&&this.records[k][f].element.classList.contains(_$_be75[66])){if(this.records[k][f].merged&&f==f+this.records[k][f].merged[0]&&(n=f,!a))break}else if(a&&q!==p&&!c){c=n;break a}else if(a)n=f;else{c=f;break a}p=q}c=n}c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,2,e,g,a),ka[_$_be75[11]].call(this,
|
|
85
|
+
b,c,e,g),H.adjust.call(this,e,g,2))}};d.left=function(b,a,c){if(Array.isArray(this.selectedCell)){if(b)var e=parseInt(this.selectedCell[2]),g=parseInt(this.selectedCell[3]);else e=parseInt(this.selectedCell[0]),g=parseInt(this.selectedCell[1]);c=Qa.call(this,e,g,a,c);c!=e&&(e=c,b?(b=this.selectedCell[0],c=this.selectedCell[1]):(b=e,c=g,e=b,g=c),h.call(this,0,e,g,a),ka[_$_be75[11]].call(this,b,c,e,g),H.adjust.call(this,e,g,0))}};d.first=function(b,a){Array.isArray(this.selectedCell)&&(a?d.up.call(this,
|
|
86
|
+
b,!0,!0):d.left.call(this,b,!0,!0))};d.last=function(b,a){Array.isArray(this.selectedCell)&&(a?d.down.call(this,b,!0,!0):d.right.call(this,b,!0,!0))};return d}(),Va=function(){return function(h){h.save=Ra;h.fullscreen=Na;h.setReadOnly=Ja;h.getReadOnly=Ja;h.isReadOnly=Ja;h.rotate=Ta;h.setPlugins=function(d){ua.call(this.parent,d)};h.showIndex=function(){Aa.call(this,!0)};h.hideIndex=function(){Aa.call(this,!1)};h[_$_be75[64]]=H[_$_be75[64]];h.undo=function(){R.undo.call(h.parent)};h.redo=function(){R.redo.call(h.parent)};
|
|
87
|
+
h.isEditable=function(){return P.call(h.parent,h)};h.dispatch=function(){return G.apply(this.parent,arguments)};h.persistence=L;h.setViewport=function(d,b){this.options.tableOverflow=!0;d=parseInt(d);b=parseInt(b);this.content.classList.add(_$_be75[67]);150<d&&(this.options.tableWidth=d+_$_be75[59],this.content.style.width=this.options.tableWidth);150<b&&!this.options.pagination&&(this.options.tableHeight=parseInt(b)+_$_be75[59],this.content.style.height=this.options.tableHeight);H.call(this,!0);
|
|
88
|
+
ma.update.call(this.parent,this);G.call(this.parent,_$_be75[68],d,b)};h.helpers=F}}(),Fa=function(){var h={logo:null,url:null,persistence:!1,sequence:!0,data:null,json:null,rows:[],columns:[],cells:{},role:null,nestedHeaders:null,defaultColWidth:100,defaultRowHeight:0,defaultColAlign:null,minSpareRows:0,minSpareCols:0,minDimensions:[0,0],csv:null,csvFileName:_$_be75[48],csvHeaders:!0,csvDelimiter:_$_be75[37],columnSorting:!0,columnDrag:!0,columnResize:!0,rowResize:!0,rowDrag:!0,editable:!0,allowInsertRow:!0,
|
|
89
|
+
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:_$_be75[69],tableWidth:null,resize:null,comments:null,meta:null,style:{},freezeColumns:0,freezeRows:0,freezeColumnControl:!1,freezeRowControl:!1,orderBy:null,worksheetId:_$_be75[3],worksheetName:null,worksheetState:null,
|
|
90
|
+
filters:!1,footers:null,formify:null,applyMaskOnFooters:!1,pluginOptions:null,locked:!1,selectUnLockedCells:!0,selectLockedCells:!0,wrap:!1,gridline:!0},d={application:_$_be75[70],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
91
|
allowRenameWorksheet:!0,allowMoveWorksheet:!0,moveDownOnEnter:!0,onevent:null,onclick:null,onload:null,onundo:null,onredo:null,onbeforesave:null,onsave:null,onbeforechange:null,onchange:null,onafterchanges:null,oncopy:null,onbeforepaste:null,onpaste:null,onbeforeinsertrow:null,oninsertrow:null,onbeforedeleterow:null,ondeleterow:null,onbeforeinsertcolumn:null,oninsertcolumn:null,onbeforedeletecolumn:null,ondeletecolumn:null,onmoverow:null,onmovecolumn:null,onresize:null,onresizerow:null,onresizecolumn:null,
|
|
92
92
|
onselection:null,onbeforecomments:null,oncomments:null,onbeforesort:null,onsort:null,onfocus:null,onblur:null,onmerge:null,onchangeheader:null,onchangefooter:null,onchangefootervalue:null,onchangenested:null,onchangenestedcell:null,oncreateeditor:null,oneditionstart:null,oneditionend:null,onchangestyle:null,onchangemeta:null,onbeforechangepage:null,onchangepage:null,onbeforecreateworksheet:null,oncreateworksheet:null,onrenameworksheet:null,ondeleteworksheet:null,onmoveworksheet:null,onopenworksheet:null,
|
|
93
93
|
onchangerowid:null,onbeforesearch:null,onsearch:null,onbeforefilter:null,onfilter:null,onopenfilter:null,oncreatecell:null,oncreaterow:null,oncreatecolumn:null,onbeforeformula:null,onformulachain:null,onchangereferences:null,onbeforechangereferences:null,onbeforesend:null,onchangedefinednames:null,oninput:null,updateTable:null,contextMenu:null,parseTableFirstRowAsHeader:!1,parseTableAutoCellType:!1,plugins:null,about:!0,license:null,worksheets:null,validations:null},b=function(e,g){g=JSON.parse(JSON.stringify(g));
|
|
94
|
-
var f={},k;for(k in g)e&&e.hasOwnProperty(k)?f[k]=e[k]:f[k]=g[k];return f},a=function(e){e&&(typeof e==_$
|
|
95
|
-
g.length>e&&(e=g.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var f=0;f<e;f++)this.options.columns[f]?this.options.columns[f].type||(this.options.columns[f].type=_$
|
|
96
|
-
(this.options.columns[f].width=parseInt(this.options.defaultColWidth)+_$
|
|
97
|
-
e.setConfig=c[_$
|
|
98
|
-
typeof g.options.columns[l].title===_$
|
|
99
|
-
e.resize?e.resize:_$
|
|
100
|
-
f=0;f<g.length;f++)typeof d[g[f]]!==_$
|
|
101
|
-
1,a.numOfRows);else if(a.action==_$
|
|
102
|
-
else if(a.action==_$
|
|
103
|
-
_$
|
|
104
|
-
a.oldValue);else if(a.action==_$
|
|
105
|
-
a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$
|
|
106
|
-
a.newValue);else if(a.action==_$
|
|
107
|
-
_$
|
|
108
|
-
1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};h.reset=function(){this.historyIndex=-1;this.history=[]};return h}(),ua=function(){var h=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$
|
|
109
|
-
plugin:d[a[c]],options:{}})}if(b&&b.length)for(c=0;c<b.length;c++){if(b[c].name&&b[c].plugin){var e=b[c].name;var g=b[c].plugin;var f=b[c].options}typeof g===_$
|
|
110
|
-
(d==_$
|
|
111
|
-
typeof d.type==_$
|
|
112
|
-
c,e)){if(this.results&&0<this.results.length)return console.error(_$
|
|
113
|
-
e,this,f[1],a)?k=!1:G.call(this.parent,_$
|
|
114
|
-
d&&(d=this.edition);this.parent.input.classList.contains(_$
|
|
115
|
-
null!==g&&O.call(this,c,e)!=g&&this.setValue(d,g)}else a[0].closeEditor(d,!1,c,e,this,a[1]);G.call(this.parent,_$
|
|
116
|
-
this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=d;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$
|
|
117
|
-
_$
|
|
118
|
-
_$
|
|
119
|
-
function(d,b){if(d>this.sequence||b)this.sequence=d};h.next=function(){return 1==this.options.sequence?++this.sequence:null};h.reset=function(){this.sequence=0};h.getId=function(d){if(this.rows[d]&&this.rows[d].id)return this.rows[d].id;var b=this.getPrimaryKey();if(!1!==b)return O.call(this,b,d)};h.setId=function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,h[_$
|
|
120
|
-
_$
|
|
121
|
-
l})},d=function(b){var a=b[0];if(0<=[_$
|
|
122
|
-
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){c&&l.setRequestHeader(_$
|
|
123
|
-
window.open(window.location.href,_$
|
|
124
|
-
_$
|
|
125
|
-
this.cursor=h?this.records[b][d].element:null);for(h=c;h<=g;h++)if(this.headers[h])this.headers[h].classList[f](_$
|
|
126
|
-
return(d=d.main)?[d.x1,d.y1,d.x2,d.y2]:null};h.isSelected=function(d,b,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var c=a[0],e=a[1],g=a[2];a=a[3];g||(g=c);a||(a=e);return null==d?b>=e&&b<=a:null==b?d>=c&&d<=g:d>=c&&d<=g&&b>=e&&b<=a};h.reset=function(){if(this.selectedCell)d=1,this.edition&&na.close.call(this,this.edition,!0),this.resetBorders(_$
|
|
127
|
-
h.refresh=function(){this.selectedCell&&h[_$
|
|
94
|
+
var f={},k;for(k in g)e&&e.hasOwnProperty(k)?f[k]=e[k]:f[k]=g[k];return f},a=function(e){e&&(typeof e==_$_be75[25]&&(e=JSON.parse(e)),this.options.data=e);this.options.json&&(this.options.data=this.options.json);this.options.data||(this.options.data=[]);e=this.options.columns.length;if(this.options.data&&typeof this.options.data[0]!==_$_be75[21]){var g=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]);
|
|
95
|
+
g.length>e&&(e=g.length)}this.options.minDimensions[0]>e&&(e=this.options.minDimensions[0]);e||(e=8);for(var f=0;f<e;f++)this.options.columns[f]?this.options.columns[f].type||(this.options.columns[f].type=_$_be75[71]):this.options.columns[f]={type:_$_be75[71]},this.options.columns[f].type==_$_be75[72]&&(this.options.columns[f].type=_$_be75[73],this.options.columns[f].autocomplete=!0),!this.options.columns[f].name&&g&&g[f]&&Number(g[f])!=g[f]&&(this.options.columns[f].name=g[f]),this.options.columns[f].width||
|
|
96
|
+
(this.options.columns[f].width=parseInt(this.options.defaultColWidth)+_$_be75[59]),this.options.columns[f].type!=_$_be75[73]||this.options.columns[f].source||(this.options.columns[f].source=[]),this.options.columns[f].type==_$_be75[73]&&this.options.columns[f].url&&jSuites.ajax({url:this.options.columns[f].url,index:f,method:_$_be75[74],dataType:_$_be75[75],worksheet:this,group:this.parent.name,success:function(k){this.worksheet.options.columns[this.index].source=k}})},c=function(e){e.getConfig=c[_$_be75[58]];
|
|
97
|
+
e.setConfig=c[_$_be75[11]]};c.spreadsheet=function(e){this.config=b(e,d);1!=this.config.secureFormulas&&console.log(_$_be75[76])};c.worksheet=function(e){var g=this;g.options=b(e,h);g.options.csv?jSuites.ajax({url:g.options.csv,method:_$_be75[74],dataType:_$_be75[71],group:g.parent.name,success:function(f){f=F.parseCSV(f,g.options.csvDelimiter);if(1==g.options.csvHeaders&&0<f.length)for(var k=f.shift(),l=0;l<k.length;l++)g.options.columns[l]||(g.options.columns[l]={type:_$_be75[71],width:g.options.defaultColWidth}),
|
|
98
|
+
typeof g.options.columns[l].title===_$_be75[21]&&(g.options.columns[l].title=k[l]);a.call(g,f)}}):g.options.url?jSuites.ajax({url:g.options.url,method:_$_be75[74],dataType:_$_be75[75],group:g.parent.name,success:function(f){a.call(g,f)}}):a.call(g)};c[_$_be75[58]]=function(){return this.options};c[_$_be75[11]]=function(e){typeof e==_$_be75[25]&&(e=JSON.parse(e));if(this.parent){g=Object.keys(e);for(f=0;f<g.length;f++)typeof h[g[f]]!==_$_be75[21]&&(this.options[g[f]]=e[g[f]]);this.content.style.resize=
|
|
99
|
+
e.resize?e.resize:_$_be75[3];!0===e.filters?la.show.call(this):!1===e.filters&&la.hide.call(this);!0===e.search?va.show.call(this):!1===e.search&&va.hide.call(this);!0===e.toolbar?ma.show.call(this.parent):!1===e.toolbar&&ma.hide.call(this.parent);e.minDimensions&&e.minDimensions[0]&&(g=parseInt(e.minDimensions[0])-this.headers.length,0<g&&this.insertColumn(g),g=parseInt(e.minDimensions[1])-this.rows.length,0<g&&this.insertRow(g));L.call(this,_$_be75[77],{data:JSON.stringify(e)})}else for(var g=Object.keys(e),
|
|
100
|
+
f=0;f<g.length;f++)typeof d[g[f]]!==_$_be75[21]&&(this.config[g[f]]=e[g[f]])};return c}(),R=function(h){h=function(a){if(1!=this.ignoreHistory)if(this.historyCascade)this.history[this.historyIndex].cascade||(this.history[this.historyIndex].cascade=[]),this.history[this.historyIndex].cascade.push(a);else{var c=++this.historyIndex;this.history=this.history.slice(0,c+1);this.history[c]=a}};var d=function(a){var c=a.worksheet;if(a.action==_$_be75[78])c.deleteRow(a.insertBefore?a.rowNumber:a.rowNumber+
|
|
101
|
+
1,a.numOfRows);else if(a.action==_$_be75[79])c.insertRow(a.numOfRows,a.rowNumber,1,a.data),Q.setAttributes.call(c,a.attributes);else if(a.action==_$_be75[80])c.deleteColumn(a.insertBefore?a.columnNumber:a.columnNumber+1,a.numOfColumns);else if(a.action==_$_be75[81])c.insertColumn(a.numOfColumns,a.columnNumber,1,a.properties,a.data,a.extra),Q.setAttributes.call(c,a.attributes);else if(a.action==_$_be75[82])c.moveRow(a.newValue,a.oldValue);else if(a.action==_$_be75[83])c.moveColumn(a.newValue,a.oldValue);
|
|
102
|
+
else if(a.action==_$_be75[84])c.removeMerge(a.newValue,!0),c.setMerge(a.oldValue);else if(a.action==_$_be75[85])c.setMerge(a.oldValue);else if(a.action==_$_be75[86])c.setStyle(a.oldValue,null,null,1);else if(a.action==_$_be75[87])c.setStyle(a.oldValue);else if(a.action==_$_be75[88])c.setWidth(a.column,a.oldValue);else if(a.action==_$_be75[89])c.setHeight(a.row,a.oldValue);else if(a.action==_$_be75[90])c.setHeader(a.column,a.oldValue);else if(a.action==_$_be75[91]||a.action==_$_be75[92]||a.action==
|
|
103
|
+
_$_be75[93])c[a.action](a.oldValue);else if(a.action==_$_be75[94])c.orderBy(a.column,a.direction?0:1,a.oldValue,a.previousState);else if(a.action==_$_be75[95]||a.action==_$_be75[96]||a.action==_$_be75[97]){var e=[];for(var g=0;g<a.records.length;g++){var f={x:a.records[g].x,value:a.records[g].oldValue};void 0!==a.records[g].y&&(f.y=a.records[g].y);a.records[g].oldStyle&&(f.style=a.records[g].oldStyle);e.push(f)}a.action==_$_be75[95]?c.setValue(e):c.setProperty(e)}else if(a.action==_$_be75[98])c.renameWorksheet(a.index,
|
|
104
|
+
a.oldValue);else if(a.action==_$_be75[99])c.moveWorksheet(a.t,a.f);else if(a.action==_$_be75[100]){e=[];for(g=0;g<a.records.length;g++)e.push({index:a.records[g].index,value:a.records[g].oldValue});c.setDefinedNames(e)}G.call(this,_$_be75[101],c,a)};h.undo=function(){if(0<=this.historyIndex)var a=this.history[this.historyIndex--];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();d.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)d.call(this,a.cascade[e]);
|
|
105
|
+
a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};var b=function(a){var c=a.worksheet;if(a.action==_$_be75[78])c.insertRow(a.numOfRows,a.rowNumber,a.insertBefore,a.data);else if(a.action==_$_be75[79])c.deleteRow(a.rowNumber,a.numOfRows);else if(a.action==_$_be75[80])c.insertColumn(a.numOfColumns,a.columnNumber,a.insertBefore,a.properties,a.data);else if(a.action==_$_be75[81])c.deleteColumn(a.columnNumber,a.numOfColumns);else if(a.action==_$_be75[82])c.moveRow(a.oldValue,
|
|
106
|
+
a.newValue);else if(a.action==_$_be75[83])c.moveColumn(a.oldValue,a.newValue);else if(a.action==_$_be75[84])c.setMerge(a.newValue);else if(a.action==_$_be75[85])c.removeMerge(a.newValue);else if(a.action==_$_be75[86])c.setStyle(a.newValue,null,null,1);else if(a.action==_$_be75[87])c.resetStyle(a.cells);else if(a.action==_$_be75[88])c.setWidth(a.column,a.newValue);else if(a.action==_$_be75[89])c.setHeight(a.row,a.newValue);else if(a.action==_$_be75[90])c.setHeader(a.column,a.newValue);else if(a.action==
|
|
107
|
+
_$_be75[91]||a.action==_$_be75[92]||a.action==_$_be75[93])c[a.action](a.newValue);else if(a.action==_$_be75[94])c.orderBy(a.column,a.direction,a.newValue);else if(a.action==_$_be75[95]||a.action==_$_be75[96]||a.action==_$_be75[97])c[a.action](a.records);else a.action==_$_be75[98]?c.renameWorksheet(a.index,a.newValue):a.action==_$_be75[99]?c.moveWorksheet(a.f,a.t):a.action==_$_be75[100]&&c.setDefinedNames(a.records);G.call(this,_$_be75[102],c,a)};h.redo=function(){if(this.historyIndex<this.history.length-
|
|
108
|
+
1)var a=this.history[++this.historyIndex];if(a){this.ignoreHistory=!0;var c=a.worksheet;c.openWorksheet();b.call(this,a);if(a.cascade&&a.cascade.length)for(var e=0;e<a.cascade.length;e++)b.call(this,a.cascade[e]);a.selection&&c.updateSelectionFromCoords(a.selection);this.ignoreHistory=!1}};h.reset=function(){this.historyIndex=-1;this.history=[]};return h}(),ua=function(){var h=function(d){var b=null;if(Array.isArray(d))b=d;else if(typeof d==_$_be75[103]){b=[];var a=Object.keys(d);for(var c=0;c<a.length;c++)b.push({name:a[c],
|
|
109
|
+
plugin:d[a[c]],options:{}})}if(b&&b.length)for(c=0;c<b.length;c++){if(b[c].name&&b[c].plugin){var e=b[c].name;var g=b[c].plugin;var f=b[c].options}typeof g===_$_be75[104]&&(this.plugins[e]=g.call(u,this,f,this.config),typeof g.license==_$_be75[104]&&u.license&&g.license(u.license))}};h.execute=function(d,b){if(this.plugins){var a=Object.keys(this.plugins);if(a.length)for(var c=0;c<a.length;c++)if(typeof this.plugins[a[c]][d]==_$_be75[104]){var e=this.plugins[a[c]][d].apply(this.plugins[a[c]],b);e&&
|
|
110
|
+
(d==_$_be75[105]&&(b[4]=e),d==_$_be75[106]&&(b[0]=e))}return b}};h.onevent=function(d){return function(){var b,a,c=this.plugins;if(c){var e=Object.keys(c);if(e.length)for(a=0;a<e.length;a++)if(typeof c[e[a]][d]==_$_be75[104]){var g=c[e[a]][d].apply(c[e[a]],arguments);typeof g!==_$_be75[21]&&(b=g)}}return b}}(_$_be75[107]);return h}(),na=function(){var h=function(d){d.getEditor=h[_$_be75[58]];d.openEditor=h.open;d.closeEditor=h.close};h[_$_be75[58]]=function(d,b){d=Ka[_$_be75[58]].call(this,d,b);return[d.type&&
|
|
111
|
+
typeof d.type==_$_be75[103]?d.type:u.editors[d.type],d]};h.open=function(d,b,a){if(!P.call(this.parent,this))return!1;if(1!=d.classList.contains(_$_be75[26])){var c=parseInt(d.getAttribute(_$_be75[56])),e=parseInt(d.getAttribute(_$_be75[57]));if(!0===this.options.locked){var g=F.getColumnNameFromCoords(c,e);if(!this.options.cells||!this.options.cells[g]||!1!==this.options.cells[g].locked)return!1}if(g=this.records[e][c].merged)c-=g[0],e-=g[1],d=this.records[e][c].element;if(!Q.attached.call(this,
|
|
112
|
+
c,e)){if(this.results&&0<this.results.length)return console.error(_$_be75[108]),!1;var f=g=null;ia.attached.call(this,c)||(g=c);da.attached.call(this,e)||(f=e);H[_$_be75[64]].call(this,f,g)}h.position.call(this,c,e);g=this.parent.input;if(113===a.keyCode||a.type!==_$_be75[109])g.selected=!0;g.innerText=_$_be75[3];G.call(this.parent,_$_be75[110],this,d,c,e);b=1==b?_$_be75[3]:O.call(this,c,e);f=h[_$_be75[58]].call(this,c,e);var k=!0;typeof f[0].openEditor==_$_be75[104]&&(!1===f[0].openEditor(d,b,c,
|
|
113
|
+
e,this,f[1],a)?k=!1:G.call(this.parent,_$_be75[111],this,d,c,e,g,f[1]));k&&(1==this.options.textOverflow&&(this.records[e][c].element.style.overflow=_$_be75[112],0<c&&this.records[e][c-1].element&&(this.records[e][c-1].element.style.overflow=_$_be75[112])),this.edition=d,g.classList.add(_$_be75[113]),1==this.parent.config.editorFormulas&&aa(b)&&(g.classList.add(_$_be75[114]),ra.parse.call(this,g),d=document.createTextNode(_$_be75[3]),g.appendChild(d),jSuites.focus(g)))}};h.close=function(d,b){null===
|
|
114
|
+
d&&(d=this.edition);this.parent.input.classList.contains(_$_be75[114])&&ra.close.call(this,this.parent.input);var a,c=parseInt(d.getAttribute(_$_be75[56])),e=parseInt(d.getAttribute(_$_be75[57]));1==this.options.textOverflow&&(a=this.records[e][c+1])&&a.element&&a.element.innerText==_$_be75[3]&&(this.records[e][c].element.style.overflow=_$_be75[3]);a=h[_$_be75[58]].call(this,c,e);if(1==b){var g=null;typeof a[0].closeEditor==_$_be75[104]&&(a=a[0].closeEditor(d,!0,c,e,this,a[1]),void 0!==a&&(g=a));
|
|
115
|
+
null!==g&&O.call(this,c,e)!=g&&this.setValue(d,g)}else a[0].closeEditor(d,!1,c,e,this,a[1]);G.call(this.parent,_$_be75[115],this,d,c,e,g,b);a=this.parent.input;a.selected=!1;a.onblur&&(a.onblur=null);a.children[0]&&a.children[0].onblur&&(a.children[0].onblur=null);a.update&&(a.update=null);na.build(this.parent);a.removeAttribute(_$_be75[116]);a.removeAttribute(_$_be75[117]);a.removeAttribute(_$_be75[118]);this.edition=a.mask=null;this.refreshBorders()};h.position=function(d,b){var a=null;if(a=this.records[b][d].element){var c=
|
|
116
|
+
this.parent.element.getBoundingClientRect();a=a.getBoundingClientRect();var e=this.parent.input;e.x=d;e.y=b;0==a.width&&0==a.height?e.style.opacity=_$_be75[119]:(e.setAttribute(_$_be75[120],_$_be75[3]),d=a.top-c.top+1,b=a.left-c.left+1,e.style.top=d+_$_be75[59],e.style.left=b+_$_be75[59],e.style.minWidth=a.width-1+_$_be75[59],e.style.minHeight=a.height-1+_$_be75[59],setTimeout(function(){e.focus()},0))}};h.build=function(d){d.input||(d.input=document.createElement(_$_be75[32]));d.input.className=
|
|
117
|
+
_$_be75[121];d.input.setAttribute(_$_be75[122],!0);d.input.innerText=_$_be75[3];d.input.oninput=function(b){u.current&&(1==u.current.parent.config.editorFormulas&&(aa(b.target.innerText)?(b.target.classList.add(_$_be75[114]),b.target.selected=!0):b.target.classList.contains(_$_be75[114])&&ra.close.call(u.current,this)),G.call(u.current.parent,_$_be75[123],u.current,b))};d.input.onclick=function(){this.selected=!0};return d.input};return h}(),G=function(h){var d;if(!this.ignoreEvents){if(typeof this.config.onevent==
|
|
118
|
+
_$_be75[104]){var b=this.config.onevent.apply(this,arguments);typeof b!==_$_be75[21]&&(d=b)}typeof this.config[h]==_$_be75[104]&&(b=this.config[h].apply(this,Array.prototype.slice.call(arguments,1)),typeof b!==_$_be75[21]&&(d=b));b=ua.onevent.apply(this,arguments);typeof b!==_$_be75[21]&&(d=b)}return d},xa=function(){var h=function(d){d.sequence=0;d.getNextSequence=h.next;d.getRowId=h.getId;d.setRowId=h.setId;d.getRowById=h.getRowById};h[_$_be75[58]]=function(){return this.sequence};h[_$_be75[11]]=
|
|
119
|
+
function(d,b){if(d>this.sequence||b)this.sequence=d};h.next=function(){return 1==this.options.sequence?++this.sequence:null};h.reset=function(){this.sequence=0};h.getId=function(d){if(this.rows[d]&&this.rows[d].id)return this.rows[d].id;var b=this.getPrimaryKey();if(!1!==b)return O.call(this,b,d)};h.setId=function(d,b){if(void 0!==b&&0<=parseInt(d)){var a={};a[d]=b}else a=d;d=Object.keys(a);if(d.length){for(var c=0;c<d.length;c++)b=a[d[c]],this.rows[d[c]].id=b,h[_$_be75[11]].call(this,b);L.call(this,
|
|
120
|
+
_$_be75[124],[a]);G.call(this.parent,_$_be75[125],this,a)}};h.getRowById=function(d,b){for(var a=0;a<this.rows.length;a++)if(h.getId.call(this,a)==d)return!0===b?this.rows[a]:this.options.data[a];return!1};return h}(),Ra=function(){var h=function(b){for(var a=[],c={},e=0;e<b.length;e++){var g=b[e].x,f=b[e].y,k=xa.getId.call(this,f);if(!k)if(c[f])k=c[f];else if(k=xa.next.call(this))c[f]=k;a[f]||(a[f]={id:k,row:f,data:{}});g=qa.call(this,g);a[f].data[g]=b[e].value}xa.setId.call(this,c);return a.filter(function(l){return null!=
|
|
121
|
+
l})},d=function(b){var a=b[0];if(0<=[_$_be75[126],_$_be75[127],_$_be75[124],_$_be75[128]].indexOf(a))return!1;var c={};a==_$_be75[95]||a==_$_be75[129]?(a=_$_be75[130],c[a]=h.call(this,b[1].data)):Array.isArray(b[1])&&1==b[1].length?c[a]=b[1][0]:c[a]=b[1];return c};return function(b,a,c,e){var g=this.parent,f=this,k=d.call(this,a);if(k)a=k;else if(!1===k)return!1;if(k=G.call(g,_$_be75[131],g,f,a))a=k;else if(!1===k)return!1;Oa.call(g,!0);jSuites.ajax({url:b,method:_$_be75[132],dataType:_$_be75[75],
|
|
122
|
+
data:{data:JSON.stringify(a)},queue:!0,beforeSend:function(l){c&&l.setRequestHeader(_$_be75[133],_$_be75[134]+c);G.call(g,_$_be75[135],f,l)},success:function(l){g.element.classList.contains(_$_be75[136])&&g.element.classList.remove(_$_be75[136]);l&&(l.message&&(l.name=g.config.application,jSuites.notification.isVisible()?console.log(l.name+_$_be75[137]+l.message):jSuites.notification(l)),l.success?typeof e===_$_be75[104]?e(l):l.data&&Array.isArray(l.data)&&Q.updateAll.call(f,l.data):l.error&&(alert(_$_be75[138]),
|
|
123
|
+
window.open(window.location.href,_$_be75[139])));G.call(g,_$_be75[140],g,f,a,l)},error:function(){g.element.classList.add(_$_be75[136])}})}}(),L=function(){return function(){ua.execute.call(this.parent,_$_be75[141],[this,arguments[0],arguments[1]]);if(!this.parent.ignorePersistence){var h=null;if(this.parent.config.server){var d=this.parent.worksheets.indexOf(this);h=this.parent.config.server;h=-1==h.indexOf(_$_be75[142])?h+(_$_be75[143]+d):h+(_$_be75[144]+d)}else this.options.persistence&&(h=typeof this.options.persistence==
|
|
124
|
+
_$_be75[25]?this.options.persistence:this.options.url);h&&Ra.call(this,h,arguments)}}}(),Ga=function(h){if(this.selectedCell){var d=this.selectedCell[0],b=this.selectedCell[1];this.records&&this.records[b]&&this.records[b][d]&&this.records[b][d].element||(this.selectedCell=this.getHighlighted(),d=this.selectedCell[0],b=this.selectedCell[1]);var a=this.getHighlighted(),c=a[0],e=a[1],g=a[2];a=a[3];var f=h?_$_be75[145]:_$_be75[146];this.records[b]&&this.records[b][d]&&this.records[b][d].element&&(this.records[b][d].element.classList[f](_$_be75[147]),
|
|
125
|
+
this.cursor=h?this.records[b][d].element:null);for(h=c;h<=g;h++)if(this.headers[h])this.headers[h].classList[f](_$_be75[148]);for(;e<=a;e++)if(this.rows[e]&&this.rows[e].element)this.rows[e].element.classList[f](_$_be75[148])}},ka=function(){var h=function(d){d.resetSelection=h.reset;d.updateSelection=h.fromElements;d.updateSelectionFromCoords=h[_$_be75[11]];d.selectAll=h.all;d.isSelected=h.isSelected;d.getHighlighted=h.getHighlighted;d.getRange=h.getRange};h.getHighlighted=function(){var d=this.borders;
|
|
126
|
+
return(d=d.main)?[d.x1,d.y1,d.x2,d.y2]:null};h.isSelected=function(d,b,a){if(!a&&(a=this.getHighlighted(),!a||null===a[0]))return!1;var c=a[0],e=a[1],g=a[2];a=a[3];g||(g=c);a||(a=e);return null==d?b>=e&&b<=a:null==b?d>=c&&d<=g:d>=c&&d<=g&&b>=e&&b<=a};h.reset=function(){if(this.selectedCell)d=1,this.edition&&na.close.call(this,this.edition,!0),this.resetBorders(_$_be75[149],!0),this.resetBorders(_$_be75[150],!0),this.selectedCell=null,1==d&&G.call(this.parent,_$_be75[151],this);else var d=0;return d};
|
|
127
|
+
h.refresh=function(){this.selectedCell&&h[_$_be75[11]].call(this,this.selectedCell)};h.isValid=function(d,b,a,c){if(!this)return!1;Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);return!(d>=this.options.columns.length||b>=this.rows.length||a>=this.options.columns.length||c>=this.rows.length)};h[_$_be75[11]]=function(d,b,a,c,e,g,f){g||(g=_$_be75[149]);Array.isArray(d)&&(c=d[3],a=d[2],b=d[1],d=d[0]);null==a&&(a=d);null==c&&(c=b);if(!h.isValid.call(this,d,b,a,c))return!1;if(null!=d){if(parseInt(d)<parseInt(a))var k=
|
|
128
128
|
parseInt(d),l=parseInt(a);else k=parseInt(a),l=parseInt(d);if(parseInt(b)<parseInt(c))var n=parseInt(b),q=parseInt(c);else n=parseInt(c),q=parseInt(b);var p;var v={};if(this.options.mergeCells){for(var w=n;w<=q;w++)for(var x=k;x<=l;x++)if(p=this.records[w][x].merged)p=F.getColumnNameFromCoords(x-p[0],w-p[1]),v[p]=!0;w=Object.keys(v);if(w.length)for(x=0;x<w.length;x++)p=F.getCoordsFromColumnName(w[x]),v=this.options.mergeCells[w[x]],p[0]<k&&(k=p[0]),p[0]+v[0]-1>l&&(l=p[0]+v[0]-1),p[1]<n&&(n=p[1]),
|
|
129
|
-
p[1]+v[1]-1>q&&(q=p[1]+v[1]-1)}}g==_$
|
|
130
|
-
_$
|
|
131
|
-
d[1]);d=F.getColumnNameFromCoords(d[2],d[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$
|
|
132
|
-
a,c,e,g))return!1;var l=!1,n=null,q=null,p=null,v=null,w=null,x=this.options.freezeColumns||0;f||(f=0);this.borders[f]?n=this.borders[f]:(n={},n.element=document.createElement(_$
|
|
133
|
-
n[I].classList.add(_$
|
|
134
|
-
_$
|
|
135
|
-
z=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-1]||c>A||e<z&&a>=x||g<y&&c>=k?l=!0:(q=this.headers[a]&&this.headers[a].parentNode?this.headers[a].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(ia.isVisible.call(this,e)||(e=Qa.call(this,e,null)),p=this.headers[e].offsetLeft):(p=this.thead.lastChild.lastChild.getAttribute(_$
|
|
136
|
-
1,q+=this.table.offsetLeft,v=this.rows[c].element&&this.rows[c].element.parentNode?this.rows[c].element.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
a.
|
|
141
|
-
|
|
142
|
-
h
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
h.event.d
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
h.event.d
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
function(d){
|
|
166
|
-
|
|
167
|
-
d);
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
(this.
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
h
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
h
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
this
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
this.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
return
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
0
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
a)
|
|
295
|
-
|
|
296
|
-
this.options.
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
this.headers[
|
|
313
|
-
|
|
314
|
-
this.pageNumber))};h.
|
|
315
|
-
parseInt(this.options.pagination)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
this.rows[b].element.firstChild.style.top=_$
|
|
322
|
-
h.event;null!==d.d&&this.setFreezeRows(d.d);this.parent.helper.style.display=_$
|
|
323
|
-
ca=function(){var h=function(d){d.setFreezeColumns=h[_$
|
|
324
|
-
h.headers=function(){var d=Aa.call(this)?50:0,b;if(b=this.options.freezeColumns)for(var a=0;a<b;a++){if(this.headers[a]){this.headers[a].classList.add(_$
|
|
325
|
-
h.refresh=function(){if(0<this.options.freezeColumns){h.headers.call(this);for(var d=0;d<this.visibleRows.length;d++)h.update.call(this,this.visibleRows[d])}};h[_$
|
|
326
|
-
{worksheet:this,action:_$
|
|
327
|
-
this.tfoot.children[a].children[b].style.left=_$
|
|
328
|
-
d.style.height=this.content.offsetHeight+_$
|
|
329
|
-
a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$
|
|
330
|
-
this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(g=this.options.columns.length-1;0<=g;g--){e=!1;for(c=0;c<this.rows.length;c++)O.call(this,g,c)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},b=function(){};b.build=function(){var a=this;this.content=document.createElement(_$
|
|
331
|
-
!1});this.table=document.createElement(_$
|
|
332
|
-
document.createElement(_$
|
|
333
|
-
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$
|
|
334
|
-
this.table.classList.add(_$
|
|
335
|
-
this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$
|
|
336
|
-
parseInt(this.options.tableHeight)+_$
|
|
337
|
-
f.getAttribute(_$
|
|
338
|
-
(f.x=v,f.element&&f.element.setAttribute(_$
|
|
339
|
-
g,n);h.call(this,_$
|
|
129
|
+
p[1]+v[1]-1>q&&(q=p[1]+v[1]-1)}}g==_$_be75[149]&&(this.selectedCell?(Ga.call(this,!1),p=1):p=0,this.selectedCell=[d,b,a,c],this.records[c][a].element&&e&&(x=e.target.getAttribute(_$_be75[56]),v=e.target.getAttribute(_$_be75[57]),null!==x&&null!==v&&(H.adjust.call(this,a,c,3),H.adjust.call(this,a,c,2),H.adjust.call(this,a,c,1),H.adjust.call(this,a,c,0))),na.position.call(this,d,b),0==p&&G.call(this.parent,_$_be75[152],this));ba[_$_be75[11]].call(this,k,n,l,q,g,f);g==_$_be75[149]&&(G.call(this.parent,
|
|
130
|
+
_$_be75[153],this,k,n,l,q,e),ma.update.call(this.parent,this,this.selectedCell))};h.fromElements=function(d,b,a){var c=d.getAttribute(_$_be75[56]);d=d.getAttribute(_$_be75[57]);if(b){var e=b.getAttribute(_$_be75[56]);b=b.getAttribute(_$_be75[57])}else e=c,b=d;h[_$_be75[11]].call(this,c,d,e,b,a)};h.all=function(){h[_$_be75[11]].call(this,0,0,this.options.columns.length-1,this.records.length-1)};h.getRange=function(){var d=this.selectedCell;if(!d)return _$_be75[3];var b=F.getColumnNameFromCoords(d[0],
|
|
131
|
+
d[1]);d=F.getColumnNameFromCoords(d[2],d[3]);var a=this.options.worksheetName;a=-1!=a.indexOf(_$_be75[154])?_$_be75[155]+a+_$_be75[156]:a+_$_be75[19];return b==d?a+b:a+F.getRangeFromTokens(u.helpers.getTokensFromRange(b+_$_be75[157]+d))};return h}(),ba=function(){var h=function(a){a.borders=[];a.setBorder=h[_$_be75[11]];a.getBorder=h[_$_be75[58]];a.resetBorders=h.reset;a.refreshBorders=h.refresh};h[_$_be75[58]]=function(a){return this.borders[a]};var d=function(a,c,e,g,f,k){if(!ka.isValid.call(this,
|
|
132
|
+
a,c,e,g))return!1;var l=!1,n=null,q=null,p=null,v=null,w=null,x=this.options.freezeColumns||0;f||(f=0);this.borders[f]?n=this.borders[f]:(n={},n.element=document.createElement(_$_be75[32]),n.element.classList.add(_$_be75[158]),f==_$_be75[150]||f==_$_be75[159]||f==_$_be75[149]?n.element.classList.add(_$_be75[160]+f):(k=k?k:jSuites.randomColor(!0),n.color=k,n.element.style.backgroundColor=k+_$_be75[161],n.element.style.borderColor=k),f==_$_be75[149]&&(k=function(I,r){n[I]=document.createElement(_$_be75[32]);
|
|
133
|
+
n[I].classList.add(_$_be75[162]);n[I].setAttribute(_$_be75[163],r);n.element.appendChild(n[I]);!1===_$_be75[164]in document.documentElement&&(n[I].style.display=_$_be75[52])},k(_$_be75[165],0),n.moveLeft.style.left=_$_be75[61],n.moveLeft.style.marginTop=_$_be75[166],n.moveLeft.style.marginLeft=_$_be75[166],k(_$_be75[167],1),n.moveTop.style.left=_$_be75[61],n.moveTop.style.marginTop=_$_be75[166],n.moveTop.style.marginLeft=_$_be75[166],k(_$_be75[168],2),n.moveRight.style.right=_$_be75[61],n.moveRight.style.marginTop=
|
|
134
|
+
_$_be75[166],n.moveRight.style.marginRight=_$_be75[166],k(_$_be75[169],3),n.moveDown.style.bottom=_$_be75[61],n.moveDown.style.marginLeft=_$_be75[166],n.moveDown.style.marginBottom=_$_be75[166]),this.content.appendChild(n.element));n.x1=a;n.y1=c;n.x2=e;n.y2=g;n.element.style.top=_$_be75[170];n.element.style.left=_$_be75[170];n.active=0;k=[];for(x=a;x<=e;x++)k.push(x);x=this.options.freezeColumns||0;k=this.options.freezeRows||0;var y=this.visibleRows[k],A=this.visibleRows[this.visibleRows.length-1],
|
|
135
|
+
z=this.visibleCols[x];a>this.visibleCols[this.visibleCols.length-1]||c>A||e<z&&a>=x||g<y&&c>=k?l=!0:(q=this.headers[a]&&this.headers[a].parentNode?this.headers[a].offsetLeft:0,this.headers[e]&&this.headers[e].parentNode?(ia.isVisible.call(this,e)||(e=Qa.call(this,e,null)),p=this.headers[e].offsetLeft):(p=this.thead.lastChild.lastChild.getAttribute(_$_be75[56]),p=x&&e<p?this.thead.lastChild.children[x].offsetLeft:this.thead.lastChild.lastChild.offsetLeft),p=p-q+parseInt(this.options.columns[e].width)-
|
|
136
|
+
1,q+=this.table.offsetLeft,v=this.rows[c].element&&this.rows[c].element.parentNode?this.rows[c].element.offsetTop:0,this.rows[g].element&&this.rows[g].element.parentNode?(!1===this.rows[g].visible&&(g=Pa.call(this,e,g)),w=this.rows[g].element.offsetTop+this.rows[g].element.offsetHeight,n.element.style.borderBottomWidth=_$_be75[3]):(this.tbody.lastChild?(l=this.tbody.lastChild.getAttribute(_$_be75[57]),w=k&&g<l?this.tbody.children[k].offsetTop:this.tbody.lastChild.offsetTop+this.tbody.lastChild.offsetHeight):
|
|
137
|
+
w=0,l=!0,n.element.style.borderBottomWidth=_$_be75[61]),w=w-v-1,v+=this.table.offsetTop,this.options.freezeColumns&&(n.element.style.borderLeftWidth=_$_be75[3],n.element.style.borderRightWidth=_$_be75[3],x=ca.getWidth.call(this),a=a<this.options.freezeColumns,e=e<this.options.freezeColumns,a&&e||(a&&!e?(e=this.content.scrollLeft+x,e>q+p&&(p+=e-(q+p),n.element.style.borderRightWidth=_$_be75[61],l=!0)):(e=this.content.scrollLeft+x,e>q&&(e-=q,e>p?q=v=-2E3:(q=q+e+1,p-=e,n.element.style.borderLeftWidth=
|
|
138
|
+
_$_be75[61]))))),this.options.freezeRows&&(n.element.style.borderTopWidth=_$_be75[3],n.element.style.borderBottomWidth=_$_be75[3],x=ja.getHeight.call(this),a=c<k,e=g<k,a&&e||(a&&!e?(c=this.content.scrollTop+x,c>v+w&&(w+=c-(v+w),n.element.style.borderBottomWidth=_$_be75[61])):(c=this.content.scrollTop+x,c>v&&(e=c-v,e>w?q=v=-2E3:(v=v+e+1,w-=e,n.element.style.borderTopWidth=_$_be75[61]))))),n.element.style.top=v+_$_be75[59],n.element.style.left=q+_$_be75[59],n.element.style.width=p+_$_be75[59],n.element.style.height=
|
|
139
|
+
w+_$_be75[59],n.t=v,n.l=q,n.w=p,n.h=w,f==_$_be75[149]&&(n.moveLeft.style.top=n.h/2+_$_be75[59],n.moveRight.style.top=n.h/2+_$_be75[59],n.moveTop.style.left=n.w/2+_$_be75[59],n.moveDown.style.left=n.w/2+_$_be75[59]),n.active=1);f==_$_be75[149]&&(l?(this.corner.style.top=_$_be75[170],this.corner.style.left=_$_be75[170]):(this.corner.style.top=v+w-2+_$_be75[59],this.corner.style.left=q+p-2+_$_be75[59]));this.borders[f]=n},b=function(a,c){a.element.style.top=_$_be75[170];a.element.style.left=_$_be75[170];
|
|
140
|
+
a.active=0;c&&(a.x1=null,a.y1=null,a.x2=null,a.y2=null)};h[_$_be75[11]]=function(a,c,e,g,f,k){d.call(this,a,c,e,g,f,k);f==_$_be75[149]&&(Ga.call(this,!0),L.call(this,_$_be75[126],{x1:a,y1:c,x2:e,y2:g}))};h.reset=function(a,c){a&&a!=_$_be75[149]||(this.corner.style.top=_$_be75[170],this.corner.style.left=_$_be75[170],Ga.call(this,!1));if(a)this.borders[a]&&b(this.borders[a],c);else for(var e=Object.keys(this.borders),g=0;g<e.length;g++)b(this.borders[e[g]],c);a&&a!=_$_be75[149]||L.call(this,_$_be75[127])};
|
|
141
|
+
h.refresh=function(a){var c=this.borders;if(a)c[a]&&null!=c[a].x1&&d.call(this,c[a].x1,c[a].y1,c[a].x2,c[a].y2,a);else{a=Object.keys(c);for(var e=0;e<a.length;e++)c[a[e]]&&null!=c[a[e]].x1&&d.call(this,c[a[e]].x1,c[a[e]].y1,c[a[e]].x2,c[a[e]].y2,a[e])}this.edition&&(c=this.parent.input,na.position.call(this,c.x,c.y))};h.destroy=function(a){var c;this&&(c=this.borders[a])&&(c.element.remove(),delete this.borders[a])};return h}(),Wa=function(){var h=function(d){d.setGroup=h[_$_be75[11]];d.unsetGroup=
|
|
142
|
+
h.unset};h[_$_be75[11]]=function(d,b,a){0==d&&(a=document.createElement(_$_be75[171]),a.classList.add(_$_be75[172]),this.thead.insertBefore(a,this.thead.firstChild),d=document.createElement(_$_be75[173]),d.innerHTML=_$_be75[174],a.appendChild(d),d=document.createElement(_$_be75[173]),a.appendChild(d),b=this.headers[b])&&(b=b.querySelector(_$_be75[175]),b||(b=document.createElement(_$_be75[32]),b.classList.add(_$_be75[176]),b.innerText=_$_be75[177],d.appendChild(b)))};h.unset=function(d,b){};return h}(),
|
|
143
|
+
Ba=function(){var h={start:function(d){if(!P.call(this.parent,this))return!1;if(null!==d.target.getAttribute(_$_be75[57])){var b=d.target.getAttribute(_$_be75[57]);h.event={y:parseInt(b),h:d.target.offsetHeight,p:d.pageY}}else null!==d.target.getAttribute(_$_be75[56])&&(b=d.target.getAttribute(_$_be75[56]),h.event={x:parseInt(b),w:d.target.offsetWidth,p:d.pageX})},end:function(d){var b=[];if(null!=h.event.y){var a=parseInt(this.rows[h.event.y].element.offsetHeight);var c=this.getSelectedRows(!0);
|
|
144
|
+
d=c.indexOf(parseInt(h.event.y));if(c.length&&-1<d)for(var e=0;e<c.length;e++)b.push(parseInt(this.rows[c[e]].element.offsetHeight));else c=[];-1==d?(c.push(h.event.y),b.push(h.event.h)):b[d]=h.event.h;this.setHeight(c,a,b)}else if(null!=h.event.x){a=parseInt(this.colgroup[h.event.x].getAttribute(_$_be75[178]));c=this.getSelectedColumns();d=c.indexOf(parseInt(h.event.x));if(c.length&&-1<d)for(e=0;e<c.length;e++)b.push(parseInt(this.options.columns[c[e]].width));else c=[];-1==d?(c.push(h.event.x),
|
|
145
|
+
b.push(h.event.w)):b[d]=h.event.w;this.setWidth(c,a,b)}h.event=null},update:function(d){null!=h.event.y?(d=d.pageY-h.event.p,0<h.event.h+d&&(this.rows[h.event.y].element.style.height=h.event.h+d+_$_be75[59],this.refreshBorders())):null!=h.event.x&&(d=d.pageX-h.event.p,0<h.event.w+d&&(this.colgroup[h.event.x].setAttribute(_$_be75[178],h.event.w+d),this.options.columns[h.event.x].width=h.event.w+d),0<this.options.freezeColumns&&ca.refresh.call(this),this.refreshBorders())},cancel:function(){h.end.call(this)}};
|
|
146
|
+
return h}();(function(){var h={start:function(d){var b=this.parent.helper;d=parseInt(d.target.getAttribute(_$_be75[56]));if(this.merged.cols[d])console.error(_$_be75[179]);else{h.event={x:d,d};this.headers[d].classList.add(_$_be75[180]);for(var a=0;a<this.tbody.children.length;a++){var c=this.tbody.children[a].getAttribute(_$_be75[57]);this.records[c][d].element.classList.add(_$_be75[180])}a=this.parent.element.getBoundingClientRect();d=this.headers[d].getBoundingClientRect();c=this.content.getBoundingClientRect();
|
|
147
|
+
b.style.display=_$_be75[24];b.style.top=c.top-a.top+_$_be75[59];b.style.left=d.left-c.left+_$_be75[59];b.style.width=_$_be75[181];b.style.height=c.height+_$_be75[59];b.classList.add(_$_be75[182])}},end:function(){this.headers[h.event.x].classList.remove(_$_be75[180]);for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$_be75[57]);this.records[b][h.event.x].element.classList.remove(_$_be75[180])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,
|
|
148
|
+
h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_be75[182]);this.parent.helper.style.display=_$_be75[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(d){var b=d.target.getAttribute(_$_be75[56]);if(null!=b)if(b=parseInt(b),this.merged.cols[b])console.error(_$_be75[179]);else{d=d.target.clientWidth/2>d.offsetX;h.event.d=d?h.event.x<b?parseInt(b)-1:parseInt(b):h.event.x>b?parseInt(b)+1:parseInt(b);b=this.headers[b].getBoundingClientRect();var a=
|
|
149
|
+
this.content.getBoundingClientRect();this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_be75[59]}}};return h})();var wa=function(){var h={start:function(d){if(P.call(this.parent,this)){this.resetSelection();var b=this.parent.helper;if(null!==d.target.getAttribute(_$_be75[57])){var a=parseInt(d.target.getAttribute(_$_be75[57]));this.merged.rows[a]?console.error(_$_be75[183]):this.results?console.error(_$_be75[184]):(h.event={y:a,d:a},this.rows[a].element.classList.add(_$_be75[180]),d=this.parent.element.getBoundingClientRect(),
|
|
150
|
+
a=this.rows[a].element.getBoundingClientRect(),b.style.display=_$_be75[24],b.style.top=a.top-d.top+_$_be75[59],b.style.left=_$_be75[185],b.style.width=this.content.offsetWidth-50+_$_be75[59],b.style.height=_$_be75[181],b.classList.add(_$_be75[186]))}else if(null!==d.target.getAttribute(_$_be75[56]))if(a=parseInt(d.target.getAttribute(_$_be75[56])),this.merged.cols[a])console.error(_$_be75[179]);else{h.event={x:a,d:a};this.headers[a].classList.add(_$_be75[180]);for(d=0;d<this.tbody.children.length;d++){var c=
|
|
151
|
+
this.tbody.children[d].getAttribute(_$_be75[57]);this.records[c][a].element.classList.add(_$_be75[180])}d=this.parent.element.getBoundingClientRect();a=this.headers[a].getBoundingClientRect();c=this.content.getBoundingClientRect();b.style.display=_$_be75[24];b.style.top=c.top-d.top+_$_be75[59];b.style.left=a.left-c.left+_$_be75[59];b.style.width=_$_be75[181];b.style.height=c.height+_$_be75[59];b.classList.add(_$_be75[182])}}else return!1},end:function(){if(null!=h.event.y)this.rows[h.event.y].element.classList.remove(_$_be75[180]),
|
|
152
|
+
null!=h.event.d&&h.event.y!=h.event.d&&(this.moveRow(h.event.y,h.event.d),this.updateSelectionFromCoords(0,h.event.d,this.options.columns.length-1,h.event.d)),this.parent.helper.classList.remove(_$_be75[186]);else if(null!=h.event.x){this.headers[h.event.x].classList.remove(_$_be75[180]);for(var d=0;d<this.tbody.children.length;d++){var b=this.tbody.children[d].getAttribute(_$_be75[57]);this.records[b][h.event.x].element.classList.remove(_$_be75[180])}null!=h.event.d&&h.event.x!=h.event.d&&(this.moveColumn(h.event.x,
|
|
153
|
+
h.event.d),this.refreshBorders());this.parent.helper.classList.remove(_$_be75[182])}this.parent.helper.style.display=_$_be75[3];h.event=null},cancel:function(){h.event.d=null;h.end.call(this)},update:function(d){if(null!=h.event.y){var b=d.target.getAttribute(_$_be75[57]);if(null!=b){var a=b=parseInt(b),c=d.target.clientHeight/2>d.offsetY;c?h.event.y<b&&(a=b-1):h.event.y>b&&(a=b+1);d=!1;this.merged.rows[a]&&(h.event.y>a?this.merged.rows[a-1]&&(d=!0):this.merged.rows[a+1]&&(d=!0));d||(h.event.d=a,
|
|
154
|
+
a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(c?b.top:b.bottom)-a.top+_$_be75[59])}}else c=d.target.getAttribute(_$_be75[56]),null!=c&&(a=c=parseInt(c),(b=d.target.clientWidth/2>d.offsetX)?h.event.x<c&&(a=c-1):h.event.x>c&&(a=c+1),d=!1,this.merged.cols[a]&&(h.event.x>a?this.merged.cols[a-1]&&(d=!0):this.merged.cols[a+1]&&(d=!0)),d||(h.event.d=a,a=this.headers[c].getBoundingClientRect(),c=this.content.getBoundingClientRect(),
|
|
155
|
+
this.parent.helper.style.left=(b?a.left:a.right)-c.left+_$_be75[59]))}};return h}(),sa=function(){var h=function(d){d.getMerge=h[_$_be75[58]];d.setMerge=h[_$_be75[11]];d.updateMerge=h.update;d.removeMerge=h.remove;d.destroyMerged=d.destroyMerge=h.destroy};h.isMerged=function(d,b){var a=F.getColumnNameFromCoords(d,b);if(a=this.merged.cells[a])if(i=this.options.mergeCells[a])m&&void 0!==m[a]||(i[1]>t&&(t=i[1]),m&&(m[a]=this.records[b][d].element&&!this.records[b][d].merged?!0:!1))};h.getAffected=function(d){if(void 0!==
|
|
156
|
+
this[d]){for(var b=d,a=this[d],c=[];this[b]==a;)c.push(b),b--;for(b=d+1;this[b]==a;)c.push(b),b++;c.sort(function(e,g){return e-g});return c}return!1};h[_$_be75[58]]=function(d){return d?this.options.mergeCells[d]:this.options.mergeCells};h[_$_be75[11]]=function(d,b,a){if(!P.call(this.parent,this))return!1;this.options.mergeCells||(this.options.mergeCells={});var c,e=null,g={},f={},k={},l=!1;typeof d==_$_be75[25]?k[d]=[b,a]:typeof d==_$_be75[103]?k=d:((e=this.getHighlighted())?e=[F.getColumnNameFromCoords(e[0],
|
|
157
|
+
e[1]),e[2]-e[0]+1,e[3]-e[1]+1]:(jSuites.notification({message:E(_$_be75[187])}),e=!1),e&&(k[e[0]]=[e[1],e[2]]));b=Object.keys(k);if(b.length){for(a=0;a<b.length;a++){var n=b[a],q=k[b[a]][0],p=k[b[a]][1];q=parseInt(q);p=parseInt(p);if((!q||2>q)&&(!p||2>p))console.log(E(_$_be75[188])+_$_be75[157]+n);else if(this.options.mergeCells[n])f[n]=[q,p],g[n]=this.options.mergeCells[n],h.update.call(this,n,q,p);else{e=F.getCoordsFromColumnName(n);for(var v=e[1];v<e[1]+p;v++)for(var w=e[0];w<e[0]+q;w++)d=F.getColumnNameFromCoords(w,
|
|
158
|
+
v),(c=this.merged.cells[d])&&this.options.mergeCells[c]&&(g[c]=this.options.mergeCells[c],h.applyDestroy.call(this,c));f[n]=this.options.mergeCells[n]=[q,p];h.applyCreate.call(this,n);Q.attached.call(this,e[0],e[1])||(l=e)}}Object.keys(f).length&&(l&&H[_$_be75[64]].call(this,e[1],e[0]),R.call(this.parent,{worksheet:this,action:_$_be75[84],newValue:f,oldValue:g}),L.call(this,_$_be75[84],[f]),h.build.call(this),ka.refresh.call(this),ba.refresh.call(this),G.call(this.parent,_$_be75[189],this,f,g))}};
|
|
159
|
+
h.update=function(d,b,a){var c=this.options.mergeCells;if(c[d]){var e=c[d][1];if(b!==c[d][0]||e!==a)h.applyDestroy.call(this,d),b&&a&&(c[d]=[b,a],h.applyCreate.call(this,d));h.build.call(this)}};h.remove=function(d,b){if(!P.call(this.parent,this))return!1;b={};var a={},c={};typeof d==_$_be75[25]?c[d]=!0:typeof d==_$_be75[103]&&(c=d);d=Object.keys(c);for(c=0;c<d.length;c++)this.options.mergeCells[d[c]]&&(b[d[c]]=this.options.mergeCells[d[c]],a[d[c]]=!0,h.applyDestroy.call(this,d[c],!0));h.build.call(this);
|
|
160
|
+
R.call(this.parent,{worksheet:this,action:_$_be75[85],newValue:a,oldValue:b});L.call(this,_$_be75[85],{data:a})};h.destroy=function(){h.remove.call(this,this.options.mergeCells,!0)};h.applyCreate=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=a[d][0]||1,e=a[d][1]||1;d=F.getCoordsFromColumnName(d);if(!this.records[d[1]][d[0]].merged||1==b)if(a=Q[_$_be75[58]].call(this,d[0],d[1])){a.classList.remove(_$_be75[66]);a.style.display=_$_be75[3];1<c?a.setAttribute(_$_be75[190],c):a.removeAttribute(_$_be75[190]);
|
|
161
|
+
1<e?a.setAttribute(_$_be75[191],e):a.removeAttribute(_$_be75[191]);1==this.options.textOverflow&&(a.style.overflow=_$_be75[112]);for(var g=0;g<e;g++)for(var f=0;f<c;f++){b=d[0]+f;var k=d[1]+g;if(a=this.records[k][b])if(a.merged=[f,g,a.v,c,e],0!=f||0!=g)a.element||Q[_$_be75[58]].call(this,b,k),a.element.classList.add(_$_be75[66]),a.merged[3]=a.element.innerText,a.element.innerText=_$_be75[3],O.call(this,b,k,_$_be75[3])}}}};h.applyDestroy=function(d,b){var a=this.options.mergeCells;if(a[d]){var c=F.getCoordsFromColumnName(d),
|
|
162
|
+
e=c[0];c=c[1];var g=a[d][0],f=a[d][1];delete this.options.mergeCells[d];for(d=0;d<f;d++)for(var k=0;k<g;k++)if(a=this.records[c+d][e+k])a.element&&(0==k&&0==d?(a.element.removeAttribute(_$_be75[190]),a.element.removeAttribute(_$_be75[191])):(a.element.classList.remove(_$_be75[66]),1==b&&(O.call(this,e+k,c+d,a.merged[2]),a.element.innerHTML=a.merged[3]))),a.merged&&delete a.merged}};h.updateConfig=function(d,b,a,c){if(1==b)var e=[a];else{e=[];for(var g=a;g<a+c;g++)e.push(g)}var f=this.options.mergeCells,
|
|
163
|
+
k=Object.keys(f),l={};for(g=0;g<k.length;g++){a=F.getCoordsFromColumnName(k[g]);for(var n=a[d];n<a[d]+f[k[g]][d];n++)-1!==e.indexOf(n)&&(l[k[g]]||(l[k[g]]=[f[k[g]][0],f[k[g]][1]],1==b&&(l[k[g]][d]+=c)),0==b&&l[k[g]][d]--)}k=Object.keys(l);for(g=0;g<k.length;g++)h.update.call(this,k[g],l[k[g]][0],l[k[g]][1]);h.build.call(this)};h.build=function(){var d=this.options.mergeCells;this.merged={cols:[],rows:[],cells:[]};if(d)for(var b=Object.keys(d),a=0;a<b.length;a++){for(var c=F.getCoordsFromColumnName(b[a]),
|
|
164
|
+
e=parseInt(d[b[a]][0]),g=parseInt(d[b[a]][1]),f=0;f<e;f++)this.merged.cols[c[0]+f]=!0;for(var k=0;k<g;k++)this.merged.rows[c[1]+k]=!0;for(k=0;k<g;k++)for(f=0;f<e;f++){var l=F.getColumnNameFromCoords(c[0]+f,c[1]+k);this.merged.cells[l]=b[a]}}};h.batch=function(d){var b=Object.keys(d);if(b.length)for(var a=0;a<b.length;a++)!1===d[b[a]]&&h.applyCreate.call(this,b[a])};return h}(),Da=function(){var h=function(d){d.getHeader=h[_$_be75[58]];d.setHeader=h[_$_be75[11]];d.getHeaders=h.all};h[_$_be75[58]]=
|
|
165
|
+
function(d){var b;if(b=this.options.columns)return b[d].title||F.getColumnName(d)};h.all=function(d){for(var b=[],a=0;a<this.options.columns.length;a++)b.push(h[_$_be75[58]].call(this,a));return d?b:b.join(this.options.csvDelimiter)};h[_$_be75[11]]=function(d,b){if(!P.call(this.parent,this))return!1;var a;if(a=this.options.columns[d]){var c=h[_$_be75[58]].call(this,d);if(void 0===b&&(b=prompt(E(_$_be75[192]),c),!b))return!1;a.title=b;if(a=this.headers[d])b?(a.innerHTML=b,a.setAttribute(_$_be75[193],
|
|
166
|
+
b)):(a.innerHTML=F.getColumnName(d),a.removeAttribute(_$_be75[193]));R.call(this.parent,{worksheet:this,action:_$_be75[90],column:d,oldValue:c,newValue:b});L.call(this,_$_be75[90],{column:d,title:b});G.call(this.parent,_$_be75[194],this,d,b,c)}};h.create=function(d){if(this.headers[d])return this.headers[d];var b=document.createElement(_$_be75[173]);b.classList.add(_$_be75[195]);b.setAttribute(_$_be75[56],d);var a=document.createElement(_$_be75[196]);this.headers[d]=b;this.colgroup[d]=a;h.applyProperties.call(this,
|
|
167
|
+
d);G.call(this.parent,_$_be75[197],this,d,b,this.options.columns[d]);return b};h.applyProperties=function(d){var b=this.options.columns[d],a=b.width||this.options.defaultColWidth,c=this.headers[d];b.align&&(c.style.textAlign=b.align);b.title?(c.innerText=b.title,c.setAttribute(_$_be75[193],b.title)):(c.innerText=F.getColumnName(d),c.removeAttribute(_$_be75[193]));b.tooltip&&(c.title=b.tooltip);var e=this.options.filters;!0===b.filter&&(e=!0);!1===b.filter&&(e=!1);!0===e&&c.classList.add(_$_be75[198]);
|
|
168
|
+
if(!1===b.visible||b.type==_$_be75[112])a=_$_be75[119],b.visible=!1;this.colgroup[d].setAttribute(_$_be75[178],a)};return h}(),fa=function(){var h=function(b,a,c){var e=this.footers.content,g;e&&e[a]&&e[a][b]&&(g=e[a][b].element)&&(void 0===c&&(e=this.options.footers,c=e[a]&&e[a][b]?e[a][b]:_$_be75[3]),aa(c)&&1==this.parent.config.parseFormulas&&(c=Z.execute.call(this,c,b,null,!1)),this.options.applyMaskOnFooters&&(e=na[_$_be75[58]].call(this,b),c=u.editors.general.parseValue(b,a,c,this,e[1],g)),
|
|
169
|
+
c instanceof Element||c instanceof HTMLDocument?(g.innerHTML=_$_be75[3],g.appendChild(c)):1==this.parent.config.stripHTML?g.innerText=c:g.innerHTML=c)},d=function(b){b.getFooter=d[_$_be75[58]];b.setFooter=d[_$_be75[11]];b.resetFooter=d.reset;b.refreshFooter=d.refresh;b.getFooterValue=d.value;b.setFooterValue=d.value};d[_$_be75[58]]=function(){return this.options.footers};d[_$_be75[11]]=function(b){if(b){var a=this.options.footers;this.options.footers=b}this.options.footers!=a&&(fa.build.call(this),
|
|
170
|
+
d.render.call(this),L.call(this,_$_be75[199],{data:this.options.footers}),G.call(this.parent,_$_be75[200],this,this.options.footers,a))};d.refresh=function(){var b=this.options.footers;if(b&&b.length)for(var a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++)h.call(this,c,a,b[a][c])};d.value=function(b,a,c){if(void 0===c)return this.options.footers[a][b];h.call(this,b,a,c);L.call(this,_$_be75[201],{x:b,y:a,value:c});G.call(this.parent,_$_be75[202],this,b,a,c)};d.reset=function(){var b=this.options.footers;
|
|
171
|
+
this.options.footers=null;this.footers.content=null;this.tfoot.innerHTML=_$_be75[3];L.call(this,_$_be75[203],{});G.call(this.parent,_$_be75[200],this,null,b)};d.create=function(b,a){var c=this.footers.content[a][b];if(c&&c.element)return c.element;c=this.footers.content[a][b]={};var e=this.options.columns[b].align;c.element=document.createElement(_$_be75[173]);c.element.setAttribute(_$_be75[56],b);c.element.setAttribute(_$_be75[57],a);e&&(c.element.style.textAlign=e);h.call(this,b,a);return c.element};
|
|
172
|
+
d.build=function(){this.footers={element:this.tfoot,content:[]};if(this.options.footers){this.tfoot.innerHTML=_$_be75[3];for(var b=0;b<this.options.footers.length;b++){if(!this.footers.content[b]){this.footers.content[b]=[];var a=document.createElement(_$_be75[171]),c=document.createElement(_$_be75[173]);c.innerHTML=_$_be75[174];a.appendChild(c);this.footers.element.appendChild(a)}for(a=0;a<this.options.columns.length;a++)this.options.footers[b][a]||(this.options.footers[b][a]=_$_be75[3]),this.footers.content[b][a]||
|
|
173
|
+
(this.footers.content[b][a]={})}}};d.render=function(){for(var b=this.options.footers,a=0;a<b.length;a++)for(var c=0;c<b[a].length;c++){var e=fa.create.call(this,c,a);this.tfoot.children[a].appendChild(e)}};d.adjust=function(b,a,c){var e=[],g=this.options.footers,f=this.footers.content;if(g)if(1==c){if(this.headers[b]&&this.headers[b].parentNode)var k=this.headers[b]==this.thead.lastChild.lastChild?!0:!1,l=!0;for(c=0;c<g.length;c++){for(var n=g[c].splice(b),q=b;q<b+a;q++)g[c][q]=_$_be75[3];g[c]=g[c].concat(n);
|
|
174
|
+
n=f[c].splice(b);for(q=b;q<b+a;q++)f[c][q]={element:d.create.call(this,q,c)},l&&(1==k?this.tfoot.children[c].appendChild(f[c][q].element):this.tfoot.children[c].insertBefore(f[c][q].element,this.tfoot.children[c].children[b].nextSibling));f[c]=f[c].concat(n)}}else for(c=0;c<g.length;c++){for(q=b;q<b+a;q++)(k=this.footers.content[c][q].element)&&k.parentNode&&k.parentNode.removeChild(k);f[c].splice(b,a);e[c]=g[c].splice(b,a)}return e};return d}(),ya=function(){var h=function(d){d.setNestedCell=h.cell;
|
|
175
|
+
d.getNestedCell=h.cell;d.setNestedHeaders=h[_$_be75[11]];d.getNestedHeaders=h[_$_be75[58]];d.resetNestedHeaders=h.reset};h[_$_be75[58]]=function(){return this.options.nestedHeaders};h[_$_be75[11]]=function(d){h.reset.call(this);this.options.nestedHeaders=d;h.build.call(this);H.call(this,!0,!0);ba.refresh.call(this);L.call(this,_$_be75[204],{data:d});G.call(this.parent,_$_be75[205],this,d)};h.reset=function(){var d=[],b=this.thead.children;this.options.nestedHeaders=null;for(var a=0;a<b.length;a++)b[a].classList.contains(_$_be75[206])&&
|
|
176
|
+
d.push(b[a]);if(d.length)for(;b=d.shift();)b.remove();this.nested=null;H.call(this,!0,!0);ba.refresh.call(this);L.call(this,_$_be75[207]);G.call(this.parent,_$_be75[205],this,[])};h.cell=function(d,b,a){if(a){if(!P.call(this.parent,this))return!1;var c=this.options.nestedHeaders[b][d],e=this.nested.content[b][d].element;void 0!==a.title&&(e.innerText=a.title);void 0!==a.tooltip&&(e.title=a.tooltip);void 0!==a.colspan&&(c.colspan=a.colspan,e.setAttribute(_$_be75[190],a.colspan),e.style.display=0==
|
|
177
|
+
c.colspan?_$_be75[52]:_$_be75[3]);L.call(this,_$_be75[208],{x:d,y:b,properties:a});G.call(this.parent,_$_be75[209],this,d,b,a)}else return this.nested.content[b][d].element};h.range=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0,c=0;c<d.length;c++){var e=parseInt(d[c].colspan);b[c]=[a,a+e-1];a+=e}return b};h.getColumns=function(d){d=this.options.nestedHeaders[d];for(var b=[],a=0;a<d.length;a++)for(var c=d[a].colspan,e=0;e<c;e++)b.push(a);return b};h.getAffected=function(d){var b=[],
|
|
178
|
+
a=this.options.nestedHeaders;if(a){var c,e,g;for(e=0;e<a.length;e++)if((c=h.getColumns.call(this,e))&&void 0!==c[d]){var f=h.range.call(this,e);for(g=f[c[d]][0];g<=f[c[d]][1];g++)b.push(g)}}return b};h.create=function(d,b){if(this.nested.content[b][d])return this.nested.content[b][d].element;var a=this.options.nestedHeaders[b][d]||{},c=this.nested.content[b][d]={};a.colspan||(a.colspan=1);a.align||(a.align=_$_be75[210]);a.title||(a.title=_$_be75[3]);var e=document.createElement(_$_be75[173]);e.setAttribute(_$_be75[211],
|
|
179
|
+
d);e.setAttribute(_$_be75[212],b);e.setAttribute(_$_be75[190],a.colspan);e.setAttribute(_$_be75[213],a.align);e.innerHTML=a.title;a.tooltip&&(e.title=a.tooltip);return c.element=e};h.build=function(){this.nested||(this.nested={content:[]});var d,b,a=0;if(d=this.options.nestedHeaders){for(b=0;b<d.length;b++){this.nested.content[b]=[];var c=document.createElement(_$_be75[173]);c.innerHTML=_$_be75[174];var e=document.createElement(_$_be75[171]);e.classList.add(_$_be75[206]);e.appendChild(c);this.thead.insertBefore(e,
|
|
180
|
+
this.thead.lastChild)}for(b=0;b<this.thead.children.length;b++)this.thead.children[b].firstChild.style.top=a+_$_be75[59],a+=this.thead.children[b].offsetHeight}};h.adjust=function(d,b,a,c){var e=this.options.nestedHeaders;if(e)if(1==a)if(c&&c.nested)for(a=0;a<e.length;a++)for(var g=0;g<e[a].length;g++)h.cell.call(this,g,a,{colspan:c.nested[a][g]});else for(a=0;a<e.length;a++){if((g=h.getColumns.call(this,a))&&e[a][g]){g=g[d];var f=parseInt(e[a][g].colspan)+b;h.cell.call(this,g,a,{colspan:f})}}else{c=
|
|
181
|
+
[];for(a=0;a<e.length;a++)if(f=h.getColumns.call(this,a)){c[a]=[];for(g=0;g<b;g++){var k=f[d+g];void 0!==k&&(typeof c[a][k]==_$_be75[21]&&(c[a][k]=e[a][k].colspan),e[a][k].colspan--)}f=Object.keys(c[a]);for(g=0;g<f.length;g++)h.cell.call(this,f[g],a,{colspan:e[a][f[g]].colspan})}return c}};return h}(),ha=function(){var h=function(c,e,g,f){aa(c)?c=Z.shiftFormula(c,e,g):f&&(c=jSuites.calendar.dateToNum(c),0>e||0>g?c--:c++,c=jSuites.calendar.numToDate(c));return c},d=function(c,e,g){if(1===c.length){if(1<
|
|
182
|
+
e||u.formula&&typeof u.formula.TREND!==_$_be75[104])g?c[0]--:c[0]++;return c}e=1;g=[];for(var f=[],k=0;k<c.length;k++)f.push(e++);for(k=0;k<c.length;k++)g.push(e++);return u.formula&&typeof u.formula.TREND==_$_be75[104]?u.formula.TREND(c,f,g):c},b=function(c,e,g,f,k){var l=null,n=[],q=null,p=[];for(l=0;l<c.length;l++){if(jSuites.isNumeric(c[l])&&(n.push(c[l]),jSuites.isNumeric(c[l+1])))continue;n.length?(q=d(n,c.length,f),Array.isArray(q)?(q.forEach(function(v){p.push(v)}),n=[]):p.push(q)):(q=void 0!==
|
|
183
|
+
k&&this.options.columns[k].type===_$_be75[214]?!0:!1,f&&(e*=-1,g*=-1),q=h(c[l],e*c.length,g*c.length,q),p.push(q))}return p},a=function(c,e){var g=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w--;for(var y=w;0<=y;y--)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return 0},f=function(w){var x;(x=this.results)?w=x.indexOf(w):x=this.rows;w++;for(var y=w;y<x.length;y++)if(w=this.results?x[y]:y,this.rows[w]&&this.rows[w].element)return w;return x[x.length-1]},k=
|
|
184
|
+
function(w,x){for(;0<=w;w--)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_be75[66]))return w;return 0},l=function(w,x){for(;w<this.options.columns.length;w++)if(this.records[x][w].element&&!this.records[x][w].element.classList.contains(_$_be75[66]))return w;return this.options.columns-1},n=this.getHighlighted(),q=n[0],p=n[1],v=n[2];n=n[3];c=parseInt(c);e=parseInt(e);null!=c&&null!=e&&(0<c-v?(l=l.call(this,parseInt(v)+1,e),c=parseInt(c)):(l=parseInt(c),c=k.call(this,
|
|
185
|
+
parseInt(q)-1,e)),0<e-n?(f=f.call(this,parseInt(n)),e=parseInt(e)):(f=parseInt(e),e=g.call(this,parseInt(p))),c-l<e-f?(l=parseInt(q),c=parseInt(v)):(f=parseInt(p),e=parseInt(n)),this.setBorder(l,f,c,e,_$_be75[159]))};a.execute=function(c){if(!P.call(this.parent,this))return!1;var e=this.getHighlighted(),g=Ha[_$_be75[58]].call(this,e,!1,!1),f=!0,k=!1,l=!1,n=this.borders.cloning;if(c)if(n&&n.active){c=n.x1;var q=n.y1,p=n.x2;n=n.y2;e[0]==c?(k=!0,e[1]>q&&(l=!0)):e[0]>c&&(l=!0)}else return!1;else if(n=
|
|
186
|
+
this.getSelected(),n.length)for(k=!0,c=n[0].x,p=n[n.length-1].x,q=parseInt(n[n.length-1].y)+1,n=parseInt(n[n.length-1].y);1==f;){if(this.options.data[n+1]){this.options.data[n+1][c-1]||this.options.data[n+1][p+1]||(f=!1);for(var v=c;v<=p;v++)this.options.data[n+1][v]&&(f=!1)}else f=!1;f&&n++}else return!1;var w=La.getFromSelection.call(this,e),x=v=0,y=0,A=0,z=[],I=[],r=!0,B=this;if(k)for(f=function(){I.push({x:v,y:x,value:z[A],style:w[A][y]});A++;void 0==g[A]&&(A=0,r&&(z=b.call(B,z,0,1,l,v)))},v=
|
|
187
|
+
c;v<=p;v++){r=void 0!==this.options.columns[v].autoIncrement?this.options.columns[v].autoIncrement:this.parent.config.autoIncrement;A=0;z=[];for(x=0;x<g.length;x++)z.push(g[x][y]);l&&z.reverse();r&&(z=b.call(B,z,0,1,l,v));if(l)for(x=n;x>=q;x--)f();else for(x=q;x<=n;x++)f();y++}else for(r=this.parent.config.autoIncrement,f=function(){I.push({x:v,y:x,value:z[y],style:w[A][y]});y++;void 0==g[A][y]&&(y=0,r&&(z=b(z,1,0,l)))},x=q;x<=n;x++){y=0;z=[];for(v=0;v<g[A].length;v++)z.push(g[A][v]);l&&z.reverse();
|
|
188
|
+
r&&(z=b(z,1,0,l));if(l)for(v=p;v>=c;v--)f();else for(v=c;v<=p;v++)f();A++}I.length&&this.setValue(I);e[0]<c&&(c=e[0]);e[1]<q&&(q=e[1]);e[2]>p&&(p=e[2]);e[3]>n&&(n=e[3]);this.resetBorders(_$_be75[159],!0);this.updateSelectionFromCoords(c,q,p,n)};a.end=function(c){ha.event=!1;ha.execute.call(this,!0);ca.refresh.call(this)};a.cancel=function(c){ha.event=!1;this.resetBorders(_$_be75[159],!0)};return a}(),Ha=function(){var h=function(d){d.getData=h[_$_be75[58]];d.getJson=h[_$_be75[58]];d.setData=h[_$_be75[11]];
|
|
189
|
+
d.loadData=h.load;d.getRowData=h.getRowData;d.setRowData=h.setRowData;d.getColumnData=h.getColumnData;d.setColumnData=h.setColumnData;d.updateData=h.update;d.refresh=h.refresh;d.data=h[_$_be75[58]];d.download=h.download;d.copy=h.copy;d.paste=h.paste;d.cut=function(){return d.copy(!0)}};h[_$_be75[58]]=function(d,b,a,c){!0===d&&(d=this.getHighlighted());var e=d?!0:!1,g=[],f=this.options.columns.length,k=this.options.data.length;void 0===c&&(c=this.dataType&&typeof a==_$_be75[21]?1:0);for(var l=0;l<
|
|
190
|
+
k;l++){var n=null;var q=c?{}:[];for(var p=0;p<f;p++){var v;if(!(v=!e)){v=d[1];var w=d[2],x=d[3];v=p>=d[0]&&p<=w&&l>=v&&l<=x?!0:!1}if(v&&(!e||!this.results||-1!=this.results.indexOf(l))){v=O.call(this,p,l);if(b){if(e&&!1===this.rows[l].visible)continue;n=oa.processed.call(this,p,l);void 0!==n&&(v=n)}a&&v.match&&(v.match(a)||v.match(/\n/)||v.match(/"/))&&(v=v.replace(new RegExp(_$_be75[20],_$_be75[14]),_$_be75[215]),v=_$_be75[20]+v+_$_be75[20]);c?jSuites.path.call(q,_$_be75[3]+qa.call(this,p),v):q.push(v);
|
|
191
|
+
n=!0}}n&&(a?g.push(q.join(a)):g.push(q))}return a?g.join(_$_be75[10])+_$_be75[10]:g};h.parse=function(){for(var d,b={},a=0,c,e=[],g=this.options.data,f=0;f<g.length;f++)d=null,c=f,g[f].data&&(Array.isArray(g[f].data)||typeof g[f].data==_$_be75[103])&&(typeof g[f].id!==_$_be75[21]&&(d=parseInt(g[f].id)),typeof g[f].row!==_$_be75[21]&&(c=g[f].row),e[c]=g[f].data,g[f]=[]),c>a&&(a=c),d&&(b[c]=d);if(Object.keys(e).length)for(f=0;f<=a;f++)e[f]&&(g[f]=e[f]);a=this.getPrimaryKey();if(!1!==a)for(a=qa.call(this,
|
|
192
|
+
a),f=0;f<g.length;f++)b[f]||!1===a||(d=parseInt(g[f][a]),0<d&&(b[f]=d));return b};h.type=function(){for(var d=this.dataType=0;d<this.options.columns.length;d++)typeof this.options.columns[d].name!==_$_be75[21]&&(this.dataType=1)};h[_$_be75[11]]=function(d){d=h.standardize(d);var b={},a=[],c={};var e=Object.keys(d[0]).length-this.options.columns.length;0<e&&this.insertRow(e);var g=d.length-this.options.data.length;0<g&&this.insertRow(g);for(var f=0;f<this.options.data.length;f++){void 0===d[f]&&(d[f]=
|
|
193
|
+
{row:f,data:[]});for(var k=0;k<this.options.columns.length;k++)void 0===d[f].data[k]&&(d[f].data[k]=_$_be75[3])}for(k=0;k<this.options.columns.length;k++){var l=qa.call(this,k);c[l]=k}for(f=0;f<d.length;f++){g=d[f].row;l=Object.keys(d[f].data);for(k=0;k<l.length;k++)e=null,void 0!==c[l[k]]?e=c[l[k]]:-1<l[k]&&(e=parseInt(l[k])),null!==e&&a.push({x:e,y:g,value:d[f].data[l[k]]});d[f].id&&(b[g]=d[f].id)}xa.setId.call(this,b);oa[_$_be75[11]].call(this,a,null,!0)};h.build=function(){this.results=null;this.rows=
|
|
194
|
+
[];this.records=[];this.sequence=0;h.type.call(this);if(this.options.data){var d=h.parse.call(this),b=this.options.data.length;this.options.minDimensions[1]>b&&(b=this.options.minDimensions[1]);for(var a=0;a<b;a++){var c=d[a]?d[a]:null;ta.row.call(this,a,c)}}};h.load=function(d){this.resetBorders();this.resetSelection();this.tbody.innerText=_$_be75[3];this.options.data=d;h.build.call(this);H.call(this,!0,!0);ea.update.call(this)};h.refresh=function(d){if(typeof d!==_$_be75[21])for(var b=0;b<this.options.columns.length;b++){var a=
|
|
195
|
+
this.records[d]&&this.records[d][b].element?this.records[d][b].element:null,c=na[_$_be75[58]].call(this,b,d);typeof c[0].updateCell==_$_be75[104]&&c[0].updateCell(a,O.call(this,b,d),b,d,this,c[1]);a&&Q.applyOverflow.call(this,a,b,d)}else if(this.options.url){var e=this;1==this.parent.config.loadingSpin&&jSuites.loading.show();jSuites.ajax({url:this.options.url,method:_$_be75[74],dataType:_$_be75[75],success:function(g){e.setData(g);jSuites.loading.hide()}})}};h.getRowData=function(d,b){if(typeof this.options.data[d]===
|
|
196
|
+
_$_be75[21])return!1;if(b){if(this.dataType){b={};for(var a=0;a<this.options.columns.length;a++){var c=_$_be75[3]+qa.call(this,a),e=_$_be75[3]+oa.processed.call(this,a,d,!0);jSuites.path.call(b,c,e)}}else for(b=[],a=0;a<this.options.columns.length;a++)b.push(oa.processed.call(this,a,d,!0));return b}return JSON.parse(JSON.stringify(this.options.data[d]))};h.setRowData=function(d,b,a){for(var c=[],e=0;e<this.options.columns.length;e++)typeof b[e]===_$_be75[21]&&(b[e]=_$_be75[3]),c.push({x:e,y:d,value:b[e]});
|
|
197
|
+
c.length&&this.setValue(c,null,a)};h.getColumnData=function(d,b){if(typeof this.options.columns[d]===_$_be75[21])return!1;for(var a=[],c=0;c<this.options.data.length;c++){var e=b?oa.processed.call(this,d,c,!0):O.call(this,d,c);a.push(e)}return a};h.setColumnData=function(d,b,a){for(var c=[],e=0;e<this.rows.length;e++)typeof b[e]===_$_be75[21]&&(b[e]=_$_be75[3]),c.push({x:d,y:e,value:b[e]});c.length&&this.setValue(c,null,a)};h.copy=function(d){var b=this,a=this.getHighlighted(),c=function(){b.setBorder(a[0],
|
|
198
|
+
a[1],a[2],a[3],_$_be75[150]);b.borders.copying.clear=1==d?!0:!1},e=h[_$_be75[58]].call(this,a,!0,_$_be75[216]),g=G.call(this.parent,_$_be75[217],this,a,e);if(g)e=g;else if(!1===g)return!1;navigator.clipboard?navigator.clipboard.writeText(e).then(c):(this.parent.textarea.value=e,this.parent.textarea.select(),document.execCommand(_$_be75[218]),c());return e};h.paste=function(d,b,a){if(!P.call(this.parent,this))return!1;var c=this,e=function(){c.borders.copying&&(c.resetBorders(_$_be75[150],!0),c.borders.copying.clear=
|
|
199
|
+
!1)},g=null,f=this.options.style,k=null,l=null,n=[];if(this.borders.copying){var q=[this.borders.copying.x1,this.borders.copying.y1,this.borders.copying.x2,this.borders.copying.y2];k=q[0];l=q[1];var p=jSuites.hash(a),v=jSuites.hash(h[_$_be75[58]].call(this,q,!0,_$_be75[216]));if(p!=v)e();else{var w=0,x=0;a=h[_$_be75[58]].call(this,q,!1,!1);for(p=q[1];p<=q[3];p++)if(!this.results||-1!=this.results.indexOf(p)){n[x]=[];w=0;for(v=q[0];v<=q[2];v++)g=F.getColumnNameFromCoords(v,p),n[x][w]=f&&f[g]?f[g]:
|
|
200
|
+
_$_be75[219],w++;x++}}}d=parseInt(d);b=parseInt(b);if(a){Array.isArray(a)||(a=F.parseCSV(a,_$_be75[216]));if(p=G.call(this.parent,_$_be75[220],this,a,d,b,n))a=p;else if(!1===p)return!1;100<a.length&&!this.options.pagination&&!H.limited.call(this)&&console.log(_$_be75[221]);if(g=this.getHighlighted()){w=[];x=[];var y=[];f=[];var A=0,z=0;for(p=g[1];p<=g[3];p++)if(!this.results||-1!=this.results.indexOf(p)){w=[];x=[];for(v=g[0];v<=g[2];v++)w.push(a[z][A]),n&&n[z]&&n[z][A]?x.push(n[z][A]):x.push(_$_be75[3]),
|
|
201
|
+
A++,A>=a[0].length&&(A=0);y.push(w);f.push(x);z++;z>=a.length&&(z=0)}0==y.length%a.length&&0==y[0].length%a[0].length&&(a=y,n=f)}f=null;g=[];if(this.borders.copying&&!0===this.borders.copying.clear){for(p=q[1];p<=q[3];p++)for(v=q[0];v<=q[2];v++)(!this.results||this.results&&0<=this.results.indexOf(p))&&g.push({x:v,y:p,value:_$_be75[3],style:_$_be75[3]});e()}p=d+a[0].length-this.options.columns.length;0<p&&this.insertColumn(p);p=b+a.length-this.rows.length;0<p&&this.insertRow(p);x=w=d;A=y=b;z=null;
|
|
202
|
+
this.results&&(f=this.results.indexOf(b));for(p=0;p<a.length;p++)for(v=0;v<a[p].length;v++){null!==k&&null!==l&&a[p][v][0]==_$_be75[18]&&(a[p][v]=Z.shiftFormula(a[p][v],d-k,b-l));x=d+v;A=b+p;this.results&&(A=this.results[f+p]);var I={x,y:A,value:a[p][v]};n&&n[p]&&n[p][v]&&(I.style=n[p][v]);g.push(I);null===z&&ka.isSelected.call(this,x,A,q)&&(z=!0)}z&&e();g.length&&(oa[_$_be75[11]].call(this,g,null,this.parent.config.forceUpdateOnPaste?!0:!1),G.call(this.parent,_$_be75[222],this,g),this.updateSelectionFromCoords(w,
|
|
203
|
+
y,x,A))}};h.download=function(d,b){if(this.parent.config.allowExport)if(u.render)u.render(this.parent);else{void 0===b&&(b=!0);var a=_$_be75[3];if(1==d||1==this.parent.config.includeHeadersOnDownload)a+=this.getHeaders().replace(/\s+/gm,_$_be75[154])+_$_be75[10];a+=h[_$_be75[58]].call(this,null,b,this.options.csvDelimiter);b=new Blob([_$_be75[224]+a],{type:_$_be75[225]});window.navigator&&window.navigator.msSaveOrOpenBlob?window.navigator.msSaveOrOpenBlob(b,this.options.csvFileName+_$_be75[226]):
|
|
204
|
+
(d=document.createElement(_$_be75[227]),b=URL.createObjectURL(b),d.href=b,d.setAttribute(_$_be75[228],this.options.csvFileName+_$_be75[226]),document.body.appendChild(d),d.click(),d.parentNode.removeChild(d))}else console.error(_$_be75[223])};h.standardize=function(d){d||(d=[]);Array.isArray(d)||(d=[d]);void 0==d[0]||Array.isArray(d[0])||typeof d[0]==_$_be75[103]||(d=[d]);for(var b=[],a=0;a<d.length;a++){var c={};Array.isArray(d[a])||void 0==d[a].data?c.data=d[a]:c=d[a];c.row=void 0==d[a].row?a:d[a].row;
|
|
205
|
+
b[c.row]=c}for(a=0;a<b.length;a++)d[a]=b[a]||{row:a,data:[]};return d};return h}(),Xa=function(){var h=function(d){d.getLabel=h[_$_be75[58]];d.getLabelFromCoords=h[_$_be75[58]]};h[_$_be75[58]]=function(d,b,a){if(typeof d==_$_be75[25]){d=F.getCoordsFromColumnName(d);var c=d[0];b=d[1]}else c=d;return this.getProcessed(c,b,a)};return h}(),Ia=function(){var h=function(d){d.getDefinedNames=h[_$_be75[58]];d.setDefinedNames=h[_$_be75[11]]};h[_$_be75[11]]=function(d){if(d.length)if(1!==this.parent.edition)console.log(_$_be75[229]);
|
|
206
|
+
else{for(var b=this.parent.config.definedNames,a,c=[],e=0;e<d.length;e++){var g=d[e].index.toUpperCase();a=b[g]?b[g]:null;d[e].value?(d[e].value=S(d[e].value),this.parent.config.definedNames[g]=d[e].value):b[g]&&delete this.parent.config.definedNames[g];c.push({index:g,value:d[e].value,oldValue:a})}R.call(this.parent,{worksheet:this,action:_$_be75[100],records:c});L.call(this,_$_be75[100],{data:c});G.call(this.parent,_$_be75[230],this,c)}};h[_$_be75[58]]=function(d){var b=this.parent.config.definedNames;
|
|
207
|
+
return d?b[d]:b};h.updateAll=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=!0;var a,c=this.getWorksheetName();if(a=this.parent.config.definedNames){var e=[],g=Object.keys(a);if(g.length){for(var f=0;f<g.length;f++){var k=Z.update.call(this,a[g[f]],d,b,c);k!==a[g[f]]&&(-1!==k.indexOf(_$_be75[231])&&(k=null),e.push({index:g[f],value:k}))}e.length&&h[_$_be75[11]].call(this,e)}}this.parent.historyCascade=!1}};h.updateWorksheetName=function(d,b){if(!this.parent.ignoreHistory){this.parent.historyCascade=
|
|
208
|
+
!0;var a;if(a=this.parent.config.definedNames){var c=[],e=Object.keys(a);if(e.length){for(var g=0;g<e.length;g++){var f=Z.updateWorksheetName(a[e[g]],d,b);f!==a[e[g]]&&c.push({index:e[g],value:f})}c.length&&h[_$_be75[11]].call(this,c)}}this.parent.historyCascade=!1}};h.build=function(){var d=Object.keys(this.config.definedNames);if(d&&d.length)if(1!==this.edition)this.config.definedNames={},console.log(_$_be75[229]);else for(var b=0;b<d.length;b++){var a=(_$_be75[3]+d[b]).toUpperCase(),c=S(this.config.definedNames[d[b]]);
|
|
209
|
+
a!=d[b]&&delete this.config.definedNames[d[b]];this.config.definedNames[a]=c}};return h}(),ra=function(){var h=[_$_be75[232],_$_be75[233],_$_be75[234],_$_be75[235],_$_be75[236]],d=[_$_be75[237],_$_be75[177],_$_be75[238],_$_be75[239],_$_be75[240],_$_be75[241],_$_be75[1],_$_be75[242],_$_be75[37],_$_be75[243],_$_be75[18],_$_be75[15],_$_be75[17],_$_be75[244]],b=[],a=function(){if(0<b.length){for(var f,k=0;k<b.length;k++)f=-1===b[k].indexOf(_$_be75[19])?this:J(b[k].split(_$_be75[19])[0]),ba.destroy.call(f,
|
|
210
|
+
b[k]);b=[]}},c=function(f){a.call(this);for(var k=0,l=[],n,q,p,v=0;v<f.children.length;v++)if(n=f.children[v].getAttribute(_$_be75[245])){l[n]||(l[n]=h[k++],4<k&&(k=0));f.children[v].style.color=l[n];-1===n.indexOf(_$_be75[19])?(q=this,p=n):(q=n.split(_$_be75[19]),p=q[1],q=J(q[0]));if(0<=p.indexOf(_$_be75[157])){var w=p.split(_$_be75[157]);p=F.getCoordsFromColumnName(w[0]);w=F.getCoordsFromColumnName(w[1])}else w=p=F.getCoordsFromColumnName(p);ka[_$_be75[11]].call(q,p[0],p[1],w[0],w[1],null,n,l[n]);
|
|
211
|
+
b.push(n)}},e=function(f){this.worksheet&&(a.call(this.worksheet),typeof this.onchange==_$_be75[104]&&this.onchange.call(this,this.innerText,f),this.worksheet=null)},g=function(f,k){k&&typeof k!=_$_be75[104]||(k={type:_$_be75[246],onchange:k});k.type===_$_be75[246]?(f.classList.add(_$_be75[247]),f.addEventListener(_$_be75[248],function(l){l=l.changedTouches&&l.changedTouches[0]?l.changedTouches[0].clientX:l.clientX;var n=this.getBoundingClientRect();24>n.width-(l-n.left)&&(g.current=f,f.classList.add(_$_be75[249]),
|
|
212
|
+
f.classList.add(_$_be75[114]))})):(f.addEventListener(_$_be75[250],function(l){aa(f.innerText)&&(f.classList.add(_$_be75[114]),u.current&&setTimeout(function(){f.worksheet=u.current;g.parse.call(u.current,f);var n=document.createTextNode(_$_be75[3]);f.appendChild(n);jSuites.focus(f)}))}),f.addEventListener(_$_be75[251],function(l){aa(f.innerText)?f.classList.add(_$_be75[114]):f.classList.contains(_$_be75[114])&&(f.classList.remove(_$_be75[114]),f.worksheet&&a.call(f.worksheet));l.preventDefault()}),
|
|
213
|
+
f.addEventListener(_$_be75[109],function(l){27==l.which&&(f.innerText=_$_be75[3],e.call(f,!1))}));f.classList.add(_$_be75[252]);f.classList.add(_$_be75[251]);f.setAttribute(_$_be75[253],!0);f.addEventListener(_$_be75[254],function(l){e.call(f,!0)});f.val=function(l){if(void 0===l)return f.innerText;f.innerText=l};k.onchange&&(f.onchange=k.onchange);k.onupdate&&(f.onupdate=k.onupdate)};g.current=null;g.parse=function(f){for(var k=_$_be75[3],l=_$_be75[3],n=window.getSelection(),q=document.createRange(),
|
|
214
|
+
p=F.getCaretIndex.call(this.parent,f),v=Z.tokenize(f.innerText.replace(/(\r\n|\n|\r)/gm,_$_be75[3])),w=0;w<v.length;w++)v[w]&&Z.tokenIdentifier.test(v[w].trim())?(w==v.length-1&&(l=_$_be75[255]),k+=_$_be75[256]+l+_$_be75[257]+v[w].trim().replace(/\$/g,_$_be75[3])+_$_be75[258]+v[w]+_$_be75[259]):k+=v[w];f.innerHTML=k;k=null;for(w=0;w<f.childNodes.length&&!(k=f.childNodes[w],l=k.tagName?k.innerText.length:k.length,0>=p-l);w++)p-=l;k&&(k.tagName?q.setStart(k.firstChild,p):(p>k.length&&(p=k.length),q.setStart(k,
|
|
215
|
+
p)),n.removeAllRanges(),n.addRange(q));c.call(this,f)};g.close=function(f){a.call(this);f?f.classList.remove(_$_be75[114]):g.current&&(typeof g.current.onchange==_$_be75[104]&&g.current.onchange.call(g.current),g.current.classList.remove(_$_be75[249]),g.current.classList.remove(_$_be75[114]),g.current.worksheet=null,g.current=null)};g.getName=function(f,k,l,n,q){f=F.getColumnNameFromCoords(f,k);l=F.getColumnNameFromCoords(l,n);q.ctrlKey&&(f=l);return f!==l?(q=f+_$_be75[157]+l,q=Z.getTokensFromRange.call(this,
|
|
216
|
+
q),Z.getRangeFromTokens.call(this,q)):f};g.range=function(f,k,l,n,q){g.current.getAttribute(_$_be75[260])==_$_be75[261]&&(f=l,k=n);f=g.getName.call(this,f,k,l,n,q);k=document.createElement(_$_be75[262]);k.innerText=f;k.setAttribute(_$_be75[245],f);g.current.innerText=_$_be75[3];g.current.appendChild(k);c.call(this,g.current);jSuites.focus(k);q.preventDefault()};g.update=function(f,k,l,n,q,p,v){p.getAttribute(_$_be75[260])==_$_be75[261]&&(f=l,k=n);var w=jSuites.getNode();if(w){var x=g.getName.call(this,
|
|
217
|
+
f,k,l,n,q);this!==v&&(x=v.getWorksheetName()+_$_be75[19]+x);f=function(y){var A=document.createElement(_$_be75[262]);A.innerText=x;A.setAttribute(_$_be75[245],x);w.parentNode===p&&!1===y?w.parentNode.insertBefore(A,w.nextSibling):p.appendChild(A);w=A};if(w.getAttribute(_$_be75[245]))q.ctrlKey?(p.appendChild(document.createTextNode(_$_be75[37])),f(!0)):(w.innerText=x,w.setAttribute(_$_be75[245],x));else{if(!w.innerText||w.innerText!==_$_be75[3]&&-1==d.indexOf(w.innerText.slice(-1))||w.nextElementSibling&&
|
|
218
|
+
w.nextElementSibling.getAttribute(_$_be75[245]))return!1;f(!1)}jSuites.focus(w);c.call(this,p);q.preventDefault();typeof p.onupdate==_$_be75[104]&&p.onupdate.call(p,p.innerText);return!0}return!1};g.onkeydown=function(f){f.target.worksheet=this;if(f.ctrlKey){if(67==f.which||88==f.which)f=window.getSelection().toString().replace(/(\r\n|\n|\r)/gm,_$_be75[3]),navigator.clipboard?navigator.clipboard.writeText(f):(this.parent.textarea.value=f,this.parent.textarea.select(),document.execCommand(_$_be75[218]))}else if(36==
|
|
219
|
+
f.which){var k=window.getSelection(),l=document.createRange();l.setStart(f.target,0);k.removeAllRanges();k.addRange(l)}else 35==f.which?jSuites.focus(f.target):187==f.which?!f.target.innerText.replace(/(\r\n|\n|\r)/gm,_$_be75[3])&&f.target.getAttribute(_$_be75[116])&&f.target.removeAttribute(_$_be75[116]):13==f.which&&f.target.blur()};g.palette=function(f){h=f};return g}(),Z=function(){var h=new RegExp(/^(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?$/i),d=function(f){f=S(f);for(var k=
|
|
220
|
+
_$_be75[3],l=[],n=0,q=0;q<f.length;q++){if(f[q]==_$_be75[20]||f[q]==_$_be75[155])n=0==n?1:0;var p;if(p=0==n)p=f[q],(p=p==_$_be75[237]||p==_$_be75[177]||p==_$_be75[238]||p==_$_be75[239]||p==_$_be75[240]||p==_$_be75[12])||(p=f[q],p=p==_$_be75[241]||p==_$_be75[263]||p==_$_be75[1]||p==_$_be75[2]||p==_$_be75[242]||p==_$_be75[264]||p==_$_be75[37]||p==_$_be75[243]||p==_$_be75[18]||p==_$_be75[15]||p==_$_be75[17]||p==_$_be75[244]);p?(k&&(l.push(k),k=_$_be75[3]),l.push(f[q])):k+=f[q]}k&&l.push(k);for(q=0;q<
|
|
221
|
+
l.length;q++)0==n&&(l[q]=l[q].trim());return l},b=function(f){f.setFormula=b[_$_be75[11]];f.updateFormula=b.update;f.executeFormula=b.execute;f.resetArray=b.resetArray;f.formula=[]};b.run=function(f,k){var l=_$_be75[3],n=Object.keys(k);if(n.length){for(var q={},p=0;p<n.length;p++){var v=n[p].replace(/!/g,_$_be75[39]);0<v.indexOf(_$_be75[39])&&(v=v.split(_$_be75[39]),q[v[0]]=!0)}v=Object.keys(q);for(p=0;p<v.length;p++)l+=_$_be75[265]+v[p]+_$_be75[266];for(p=0;p<n.length;p++)v=n[p].replace(/!/g,_$_be75[39]),
|
|
222
|
+
null===k[n[p]]||jSuites.isNumeric(k[n[p]])||(q=k[n[p]].match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(k[n[p]]=c(q,k[n[p]])),l=0<v.indexOf(_$_be75[39])?l+(v+_$_be75[267]+k[n[p]]+_$_be75[268]):l+(_$_be75[265]+v+_$_be75[267]+k[n[p]]+_$_be75[268])}f=f.replace(/\$/g,_$_be75[3]);(q=f.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&q.length&&(f=c(q,f));f=f.replace(/!/g,_$_be75[39]);f=(new Function(l+_$_be75[269]+f))();null===f&&(f=0);return f};
|
|
223
|
+
b[_$_be75[11]]=function(){};var a=function(f){f=S(f,!0);return f.replace(/\$/g,_$_be75[3])},c=function(f,k){for(var l=0;l<f.length;l++){var n=b.getTokensFromRange.call(this,f[l]);k=k.replace(f[l],_$_be75[242]+n.join(_$_be75[37])+_$_be75[264])}return k},e=function(f,k,l){var n=this.config.definedNames;if(n&&0<Object.keys(n).length){for(var q=0;q<f.length;q++)f[q]&&n&&n[f[q]]&&(k=k.replace(f[q],n[f[q]]),l&&(l[f[q]]=n[f[q]]));return a(k)}return k};b.resetArray=function(f,k){var l;if(l=this.records[k][f].a){for(var n=
|
|
224
|
+
0;n<l.length;n++)for(var q=0;q<l[n].length;q++)this.options.data[k+n][f+q]||(this.records[k+n][f+q].v=_$_be75[3],this.records[k+n][f+q].element&&(this.records[k+n][f+q].element.innerText=_$_be75[3]));this.records[k][f].a=null}};b.execute=function(f,k,l,n,q){if(1==this.parent.processing)return null!==k&&null!==l&&this.parent.queue.push([this,k,l]),_$_be75[3];if(typeof this.parent.config.onbeforeformula==_$_be75[104]){var p=G.call(this.parent,_$_be75[270],this,f,k,l);if(!1===p)return f;p&&(f=p)}var v=
|
|
225
|
+
[],w=function(C,D,M,T){if(void 0!=D&&void 0!=M){var U=F.getColumnNameFromCoords(D,M);D=T.getWorksheetName()+_$_be75[39]+U;v[D]||(v[D]=0);v[D]++;if(3<v[D])throw{error:_$_be75[271],message:_$_be75[272],reference:D};}else D=U=null;q||(C=a(C));var K=C,X=K.match(/[A-Z_]+[A-Z0-9_\.]*/g);X&&X.length&&(K=e.call(T.parent,X,K,x));(X=K.match(/(('.*?'!)|(\w*!))?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&X.length&&(K=c.call(T,X,K));X=[];K=d(K);for(var Y=0;Y<K.length;Y++)K[Y]&&h.test(K[Y])&&X.push(K[Y]);if(X){if(D&&
|
|
226
|
+
-1<X.indexOf(D.replace(_$_be75[39],_$_be75[19])))throw{error:_$_be75[273],message:_$_be75[274]};for(K=0;K<X.length;K++){D=X[K].split(_$_be75[19]);D[1]?(M=D[1],Y=J(D[0]),D=T.getWorksheetName()+_$_be75[39]+U):(M=D[0],Y=T,D=U);if(typeof Y==_$_be75[21]||typeof Y.formula==_$_be75[21])throw{error:_$_be75[275],message:_$_be75[276]};D&&(Y.formula[M]||(Y.formula[M]=[]),0>Y.formula[M].indexOf(D)&&Y.formula[M].push(D));if(!x[X[K]]){M=F.getCoordsFromColumnName(M);D=M[0];M=M[1];var V=Y.records[M]&&void 0!==Y.records[M][D].v?
|
|
227
|
+
Y.records[M][D].v:O.call(Y,D,M);x[X[K]]||(aa(V)?x[X[K]]=w(V,D,M,Y):(V===_$_be75[3]||null===V||void 0===V?V=null:jSuites.isNumeric(V)||(V=_$_be75[20]+V+_$_be75[20]),x[X[K]]=V))}}}return C.substr(1)},x={};try{f=w(f,k,l,this);if(f==_$_be75[3])return _$_be75[3];0==f.indexOf(_$_be75[277])&&(q=!0);var y=q?b.run(f,x):u.formula(f,x,k,l,this);if(!1!==n&&void 0!=k&&void 0!=l)if(y instanceof Date)this.records[l][k].v=jSuites.calendar.dateToNum(y);else if(Array.isArray(y)){n=[];p=null;for(var A=0;A<y.length;A++)for(var z=
|
|
228
|
+
0;z<y[A].length;z++){(0<z||0<A)&&this.options.data[l+A][k+z]!==_$_be75[3]&&(p=_$_be75[278]);var I=F.getColumnNameFromCoords(k+z,l+A);n.push(I)}if(!p){I=F.getColumnNameFromCoords(k,l);var r=Object.keys(this.formula);for(A=0;A<r.length;A++){var B=this.formula[r[A]].indexOf(I);if(0<=B)for(z=0;z<n.length;z++)B=this.formula[r[A]].indexOf(n[z]),-1==B&&this.formula[r[A]].push(n[z])}for(A=0;A<y.length;A++)for(z=0;z<y[A].length;z++)this.records[l+A][k+z].v=y[A][z],this.records[l+A][k+z].element&&(this.records[l+
|
|
229
|
+
A][k+z].element.innerText=y[A][z],jSuites.isNumeric(y[A][z])?this.records[l+A][k+z].element.classList.add(_$_be75[279]):this.records[l+A][k+z].element.classList.remove(_$_be75[279]));this.records[l][k].a=y;p=y[0][0];this.records[l][k].v=p}y=p}else this.records[l][k].v=y;return y}catch(C){return 1==this.parent.config.debugFormulas&&console.log(f,x,C),C&&C.error?C.error:_$_be75[275]}};b.update=function(f,k,l,n){var q=null,p=null,v=this.getWorksheetName(),w=function(I){l&&l[I]&&(I=_$_be75[231]);k[I]&&
|
|
230
|
+
(I=k[I]);return I},x=function(I,r){r=r.split(_$_be75[280]);if(3===r.length){r=_$_be75[280];var B=_$_be75[280]}else r[0]===_$_be75[3]?(r=_$_be75[280],B=_$_be75[3]):(r=_$_be75[3],B=_$_be75[280]);return r+I.match(/[A-Z]+/g)+B+I.match(/[0-9]+/g)};f=S(f,!0);f=d(f);for(var y=0;y<f.length;y++)if(f[y]&&h.test(f[y])){if(-1==f[y].indexOf(_$_be75[19])){if(p=f[y],q=_$_be75[3],n&&n!=v)continue}else if(p=f[y].split(_$_be75[19]),q=p[0],p=p[1],n&&n!=q)continue;var A=p;if(0<=p.indexOf(_$_be75[157])){p=b.getTokensFromRange.call(this,
|
|
231
|
+
p);for(var z=0;z<p.length;z++)p[z]=w(p[z]);p=b.getRangeFromTokens.call(this,p);p!==_$_be75[231]&&-1!==A.indexOf(_$_be75[280])&&(A=A.split(_$_be75[157]),p=p.split(_$_be75[157]),p=x(p[0],A[0])+_$_be75[157]+x(p[1],A[1]))}else-1!==A.indexOf(_$_be75[280])?(p=w(p.replace(/\$/g,_$_be75[3])),p=x(p,A)):p=w(p);q&&(p=q+_$_be75[19]+p);f[y]=p}return f.join(_$_be75[3])};b.getChain=function(f){if(void 0===f)return[];var k=[],l=[],n=[],q=function(w){if(0<=w.indexOf(_$_be75[39])){var x=w.split(_$_be75[39]),y=x.pop(),
|
|
232
|
+
A=x.join(_$_be75[39]);x=J(A)}else x=this,A=x.getWorksheetName(),y=w;if(x.formula[y]&&!n[w]){var z=!1;n[w]=!0;for(w=0;w<x.formula[y].length;w++){var I=x.formula[y][w];-1==I.indexOf(_$_be75[39])&&(I=A+_$_be75[39]+I);if(!l[I]){var r=x.getValue(I);aa(r)?k.push([I,r,b.getTokens.call(x,r,A)]):(z=!0,x.formula[y][w]=null);q.call(x,I);l[I]=!0}}1==z&&(x.formula[y]=x.formula[y].filter(function(B){return null!=B}))}},p=Object.keys(f);for(f=0;f<p.length;f++)q.call(this,p[f]);p=0;for(f=k.length-1;0<=f;f--){for(var v=
|
|
233
|
+
0;v<f;v++)if(0<=k[v][2].indexOf(k[f][0])){k.splice(v,0,k.splice(f,1)[0]);f=k.length;break}p++;if(1E6<p){console.error(_$_be75[281]);break}}l=[];for(f=0;f<k.length;f++)l[k[f][0]]=k[f][1];return l};b.updateAll=function(f,k){var l,n,q,p,v,w={},x=this.getWorksheetName();for(v=0;v<u.spreadsheet.length;v++){var y=u.spreadsheet[v].worksheets;for(q=0;q<y.length;q++){var A=y[q].getWorksheetName();for(n=0;n<y[q].options.data.length;n++)for(l=0;l<y[q].options.data[n].length;l++)if((p=y[q].options.data[n][l])&&
|
|
234
|
+
aa(p)){var z=b.update.call(y[q],p,f,k,x);z!=p&&(w[A]||(w[A]=[]),w[A].push({x:l,y:n,value:z,force:!0}))}}}y=Object.keys(w);for(l=0;l<y.length;l++)if(w[y[l]].length){q=J(y[l]);for(n=0;n<w[y[l]].length;n++)O.call(q,w[y[l]][n].x,w[y[l]][n].y,w[y[l]][n].value);L.call(q,_$_be75[129],{data:w[y[l]]})}w=[];l=Object.keys(this.formula);y=[];n=[];for(q=0;q<l.length;q++)if(z=l[q],p=this.formula[z],k&&k[z])for(v=0;v<p.length;v++)f[p[v]]&&(p[v]=f[p[v]]),n[p[v]]=!0;else{A=[];for(v=0;v<p.length;v++)k&&k[p[v]]||(f[p[v]]&&
|
|
235
|
+
(p[v]=f[p[v]]),n[p[v]]=!0,A.push(p[v]));A.length&&(f[z]&&(z=f[z]),y[z]=A)}this.formula=y;A=this.getWorksheetName();for(var I=0;I<u.spreadsheet.length;I++)for(var r=u.spreadsheet[I].worksheets,B=0;B<r.length;B++)if(r[B].getWorksheetName()!==A)for(l=Object.keys(r[B].formula),q=0;q<l.length;q++){y=[];p=r[B].formula[l[q]];for(v=0;v<p.length;v++)z=p[v].split(_$_be75[39]),z[0]==A&&z[1]?k&&k[z[1]]||(f[z[1]]&&(z[1]=f[z[1]]),y.push(z[0]+_$_be75[39]+z[1])):y.push(p[v]);r[B].formula[l[q]]=y}y=Object.keys(n);
|
|
236
|
+
for(l=0;l<y.length;l++)z=y[l].split(_$_be75[39]),z[1]?(p=z[1],f=J(z[0]),k=z[0]):(p=z[0],f=this,k=x),z=F.getCoordsFromColumnName(p),n=z[0],q=z[1],p=f.options.data[q][n],z=Z.execute.call(f,p,n,q,!1),z!==f.records[q][n].v&&(w[k]||(w[k]=[]),w[k].push({x:n,y:q,value:p,force:!0}));y=Object.keys(w);if(y.length)for(l=0;l<y.length;l++)q=J(y[l]),w[y[l]]=oa.applyValues.call(q,w[y[l]]),oa.setValueChained.call(q,w[y[l]])};b.updateWorksheetName=function(f,k,l){for(var n=d(f),q=0;q<n.length;q++)f=n[q].split(_$_be75[19]),
|
|
237
|
+
f[1]&&(f[0]=f[0].replace(new RegExp(_$_be75[155],_$_be75[14]),_$_be75[3]),f[0].toUpperCase()==k.toUpperCase()&&(f[0]=l,0<=f[0].indexOf(_$_be75[154])&&(f[0]=_$_be75[155]+f[0]+_$_be75[155]),n[q]=f.join(_$_be75[19])));return n.join(_$_be75[3])};b.updateWorksheetNames=function(f,k){var l,n;for(n=0;n<u.spreadsheet.length;n++){var q=u.spreadsheet[n].worksheets;for(var p=0;p<q.length;p++){var v=[];for(var w=0;w<q[p].options.data.length;w++)for(var x=0;x<q[p].options.data[w].length;x++)if((l=q[p].options.data[w][x])&&
|
|
238
|
+
aa(l)){var y=b.updateWorksheetName(l,f,k);y!=l&&(v.push({x,y:w,value:y,force:!0}),O.call(q[p],x,w,y))}v.length&&L.call(q[p],_$_be75[129],{data:v})}}};var g=function(f,k,l){var n=_$_be75[3],q=_$_be75[3],p=f.split(_$_be75[280]);if(3===p.length)return f;2===p.length&&(p[0]?(l=0,q=_$_be75[280]):(k=0,n=_$_be75[280]),f=p.join(_$_be75[3]));f=F.getCoordsFromColumnName(f);k=f[0]+k;f=f[1]+l;return f=0>k||0>f?_$_be75[231]:n+F.getColumnName(k)+q+(f+1)};b.shiftFormula=function(f,k,l){f=d(f,!0);for(var n,q,p=0;p<
|
|
239
|
+
f.length;p++)h.test(f[p])&&(q=-1==f[p].indexOf(_$_be75[19])?[_$_be75[3],f[p]]:f[p].split(_$_be75[19]),-1==q[1].indexOf(_$_be75[157])?q[1]=g(q[1],k,l):(n=q[1].split(_$_be75[157]),q[1]=g(n[0],k,l)+_$_be75[157]+g(n[1],k,l)),f[p]=q[0]?q.join(_$_be75[19]):q[1]);return f.join(_$_be75[3])};b.getTokensFromRange=function(f){var k=this,l=_$_be75[3],n=_$_be75[3];0<=f.indexOf(_$_be75[19])?n=_$_be75[19]:0<=f.indexOf(_$_be75[39])&&(n=_$_be75[39]);f=f.replace(/\$/g,_$_be75[3]);n&&(l=f.split(n),f=l.pop(),l=l.join(_$_be75[39]),
|
|
240
|
+
k=J(l),l+=n);if(-1==f.indexOf(_$_be75[157]))return[l+f];n=[];f=f.split(_$_be75[157]);var q=F.getCoordsFromColumnName(f[0]),p=F.getCoordsFromColumnName(f[1]);if(q[0]<=p[0]){f=q[0];var v=p[0]}else f=p[0],v=q[0];if(null===q[1]&&null==p[1]){var w=0;q=0;k.options&&k.options.data&&(q=k.options.data.length-1)}else q[1]<=p[1]?(w=q[1],q=p[1]):(w=p[1],q=q[1]);for(k=w;k<=q;k++)for(w=f;w<=v;w++)n.push(l+F.getColumnNameFromCoords(w,k));return n};b.getRangeFromTokens=function(f){f=f.filter(function(n){return n!=
|
|
241
|
+
_$_be75[231]});for(var k=_$_be75[3],l=0;l<f.length;l++)0<=f[l].indexOf(_$_be75[19])?(k=f[l].split(_$_be75[19]),f[l]=k.pop(),k=k[0]+_$_be75[19]):0<=f[l].indexOf(_$_be75[39])&&(k=f[l].split(_$_be75[39]),f[l]=k.pop(),k=k.join(_$_be75[39])+_$_be75[39]);f.sort(function(n,q){n=F.getCoordsFromColumnName(n);q=F.getCoordsFromColumnName(q);return n[1]>q[1]?1:n[1]<q[1]?-1:n[0]>q[0]?1:n[0]<q[0]?-1:0});return f.length?k+(f[0]+_$_be75[157]+f[f.length-1]):_$_be75[231]};b.getTokens=function(f,k){var l=a(f);f.replace(/!/g,
|
|
242
|
+
_$_be75[39]);(f=l.match(/[A-Z_]+[A-Z0-9_\.]*/g))&&f.length&&(l=e.call(this.parent,f,l));(f=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]*):(\$?[A-Z]+\$?[0-9]*)?/g))&&f.length&&(l=c.call(this,f,l));if(f=l.match(/('.*?'?|\w*\.)?(\$?[A-Z]+\$?[0-9]+)(:\$?[A-Z]+\$?[0-9]+)?/g))for(l=0;l<f.length;l++)-1==f[l].indexOf(_$_be75[39])&&k&&(f[l]=k+_$_be75[39]+f[l]);return f};b.tokenIdentifier=h;b.tokenize=d;return b}(),oa=function(){var h=function(d){d.name=qa;d.value=O;d.getValue=h[_$_be75[58]];d.getValueFromCoords=
|
|
243
|
+
h.getFromCoords;d.setValue=h[_$_be75[11]];d.setValueFromCoords=h.setFromCoords;d.setCheckRadioValue=h.setCheckRadio;d.getProcessed=h.processed};h[_$_be75[58]]=function(d,b){var a=this;if(typeof d==_$_be75[103]){var c=d.x;d=d.y}else 0<=d.indexOf(_$_be75[39])&&(a=d.split(_$_be75[39]),d=a.pop(),a=J(a.join(_$_be75[39]))),d=F.getCoordsFromColumnName(d),c=d[0],d=d[1];return h.getFromCoords.call(a,c,d,b)};h.getFromCoords=function(d,b,a){var c=null;null!=d&&null!=b&&(c=a?h.processed.call(this,d,b):O.call(this,
|
|
244
|
+
d,b));return c};h[_$_be75[11]]=function(d,b,a){if(!P.call(this.parent,this))return!1;var c=null,e=null,g=null,f=[];a=a?!0:!1;var k=function(q,p){var v=null;typeof q==_$_be75[25]?(g=F.getCoordsFromColumnName(q),c=g[0],e=g[1]):q.tagName?(c=q.getAttribute(_$_be75[56]),e=q.getAttribute(_$_be75[57])):q.element&&q.element.tagName?(c=q.element.getAttribute(_$_be75[56]),e=q.element.getAttribute(_$_be75[57])):(c=q.x,e=q.y,void 0!==q.value&&(p=q.value),void 0!==q.style&&(v=q.style));q={x:c,y:e,value:p,force:a};
|
|
245
|
+
null!==v&&(q.style=v);f.push(q)};if(d&&Array.isArray(d))for(var l=0;l<d.length;l++)k(d[l],b);else if(typeof d==_$_be75[103]&&void 0==d.x&&void 0==d.tagName)for(b=Object.keys(d),l=0;l<b.length;l++)k(b[l],d[b[l]]);else k(d,b);if(f.length){f=h.applyValues.call(this,f);this.parent.config.parseFormulas&&h.setValueChained.call(this,f);this.refreshBorders();var n=this;setTimeout(function(){ba.refresh.call(n)},250);if(f.length){R.call(this.parent,{worksheet:n,action:_$_be75[95],records:f,selection:this.selectedCell});
|
|
246
|
+
d=this.getPrimaryKey();if(!1!==d)for(l=0;l<f.length;l++)f[l].x===d&&f[l].value&&W.call(this,f[l]);L.call(this,_$_be75[95],{data:f});ea.update.call(this,!0);G.call(this.parent,_$_be75[282],this,f)}}};h.setFromCoords=function(d,b,a,c){var e=[];e.push({x:d,y:b,value:a});h[_$_be75[11]].call(this,e,null,c)};h.setCheckRadio=function(){for(var d=[],b=this.getSelected(),a=0;a<b.length;a++){var c=b[a].x,e=b[a].y;if(!this.options.columns[c].readOnly&&this.options.columns[c].type==_$_be75[283]){var g=O.call(this,
|
|
247
|
+
c,e)?!1:!0;d.push({x:c,y:e,value:g})}}d.length&&h[_$_be75[11]].call(this,d)};h.applyValues=function(d){for(var b,a,c=this.options.style||{},e=[],g={},f=0;f<d.length;f++)if(b=d[f],a=this.updateCell(b.x,b.y,b.value,b.force),void 0!==a.value){if(void 0!==b.style){var k=F.getColumnNameFromCoords(b.x,b.y);a.style=g[k]=b.style;a.oldStyle=c&&c[k]?c[k]:_$_be75[219]}e.push(a)}0<Object.keys(g).length&&La.update.call(this,g);return e};h.processed=function(d,b,a){var c=O.call(this,d,b);if(null===c)return null;
|
|
248
|
+
var e=na[_$_be75[58]].call(this,d,b),g=e[1];g.type!=_$_be75[112]&&g.type!=_$_be75[284]&&g.type!=_$_be75[285]&&g.type!=_$_be75[286]&&g.type!=_$_be75[287]&&0!=g.process&&(!0===a||g.type!=_$_be75[288]&&g.type!=_$_be75[289]&&g.type!=_$_be75[290])&&(g.type==_$_be75[283]?c=e[0][_$_be75[58]](g,c,a):this.records[b][d].element?c=1==this.parent.config.stripHTML?this.records[b][d].element.innerText:this.records[b][d].element.innerHTML:((_$_be75[3]+c).substr(0,1)==_$_be75[18]&&(c=this.executeFormula(c,d,b,!1)),
|
|
249
|
+
e[0]&&typeof e[0][_$_be75[58]]==_$_be75[104]&&(c=e[0][_$_be75[58]](g,c,a))));return c};h.setValueChained=function(d){for(var b,a=[],c,e=0;e<d.length;e++)b=d[e],c=F.getColumnNameFromCoords(b.x,b.y),a[c]=b.value;a=Z.getChain.call(this,a);var g=[],f=Object.keys(a);for(e=0;e<f.length;e++)0<=f[e].indexOf(_$_be75[39])?(b=f[e].split(_$_be75[39]),c=b.pop(),b=J(b.join(_$_be75[39]))):(c=f[e],b=this),c=F.getCoordsFromColumnName(c),d=Q.update.call(b,c[0],c[1],a[f[e]],!0),d.w=b,d.value=d.v=b.records[c[1]][c[0]].v,
|
|
250
|
+
d.cell=f[e],d.f=a[f[e]],g.push(d);g.length&&G.call(this.parent,_$_be75[291],this,g)};return h}(),Q=function(){var h=function(d){d.getCell=h[_$_be75[58]];d.getCellFromCoords=h[_$_be75[58]];d.updateCell=h.update;d.updateCells=h.updateAll;d.getSelected=h.selected;d.isAttached=h.attached};h.attached=function(d,b){return this.records[b]&&this.records[b][d]&&this.records[b][d].element&&this.records[b][d].element.parentNode&&this.records[b][d].element.parentNode.parentNode?!0:!1};h[_$_be75[58]]=function(d,
|
|
251
|
+
b){typeof d==_$_be75[25]&&(b=F.getCoordsFromColumnName(d),d=b[0],b=b[1]);d=parseInt(d);b=parseInt(b);if(this.records[b]&&this.records[b][d]&&this.records[b][d].element)return this.records[b][d].element;var a=O.call(this,d,b);null===a&&(a=_$_be75[3]);return Q.create.call(this,d,b,a)};h.getFromCoords=function(d,b,a){if(!d||null===d[0])return null;var c=[],e=d[0],g=d[1],f=d[2];d=d[3];for(a&&(a=this.results?F.invert(this.results):null);g<=d;g++)for(var k=e;k<=f;k++)if(!a||a[g])b?c.push(F.getColumnNameFromCoords(k,
|
|
252
|
+
g)):c.push(this.records[g][k]);return c};h.selected=function(d,b){return h.getFromCoords.call(this,this.getHighlighted(),d,b)};h.getSelectedColumns=function(){var d=[],b=this.getHighlighted();if(b)for(var a=b[0];a<=b[2];a++)d.push(a);return d};h.updateAll=function(d){for(var b=this.getPrimaryKey(),a=[],c=0;c<d.length;c++)void 0!==d[c].id?(W.call(this,d[c]),a.push({id:d[c].id,y:d[c].y}),!1!==b&&h.update.call(this,b,d[c].y,d[c].id,!0)):a.push(h.update.call(this,d[c].x,d[c].y,d[c].value,d[c].force));
|
|
253
|
+
L.call(this,_$_be75[128],[a])};h.update=function(d,b,a,c){var e=this.records[b];if(e=e&&e[d]?e[d]:null){e=e.element;var g={x:d,y:b};if(c||!e||1!=e.classList.contains(_$_be75[26])){if(c=G.call(this.parent,_$_be75[292],this,e,d,b,a))a=c;else if(!1===c)return g;c=na[_$_be75[58]].call(this,d,b);if(typeof c[0].updateCell==_$_be75[104]){var f=c[0].updateCell(e,a,d,b,this,c[1]);void 0!==f&&(a=f)}f=O.call(this,d,b);if(f!==a){var k=O.call(this,d,b,a);g.oldValue=f;g.value=k;e&&h.applyOverflow.call(this,e,d,
|
|
254
|
+
b);c[1]&&typeof c[1].render==_$_be75[104]&&c[1].render(e,a,d,b,this,c[1]);G.call(this.parent,_$_be75[293],this,e,d,b,g.value,g.oldValue)}}}else return!1;return g};h.create=function(d,b,a){var c=document.createElement(_$_be75[173]);c.setAttribute(_$_be75[56],d);c.setAttribute(_$_be75[57],b);var e=na[_$_be75[58]].call(this,d,b);if(e[0]&&typeof e[0].createCell==_$_be75[104]){var g=e[0].createCell(c,a,d,b,this,e[1]);void 0!==g&&(a=g)}O.call(this,d,b,a);this.records[b][d]||ta.cell.call(this,d,b,a);this.records[b][d].element=
|
|
255
|
+
c;!a&&this.records[b][d].v&&(c.innerText=this.records[b][d].v);e[1]&&typeof e[1].render==_$_be75[104]&&e[1].render(c,a,d,b,this,e[1]);h.applyProperties.call(this,c,d,b);h.applyOverflow.call(this,c,d,b);G.call(this.parent,_$_be75[294],this,c,d,b,a);return c};h.getAttributes=function(d,b,a){a[d]||(a[d]={});d==_$_be75[295]?a[d][b]=this.getValue(b):d==_$_be75[296]?this.merged.cells&&(b=this.merged.cells[b])&&(a[d][b]=this.options.mergeCells[b]):this.options[d]&&this.options[d][b]&&(a[d][b]=this.options[d][b])};
|
|
256
|
+
h.setAttributes=function(d){d&&d.style&&this.setStyle(d.style);d&&d.comments&&this.setComments(d.comments);d&&d.meta&&this.setMeta(d.meta);d&&d.cells&&this.setProperty(d.cells);d&&d.mergeCells&&this.setMerge(d.mergeCells);d&&d.values&&h.batch.call(this,d.values);d&&d.formulas&&h.batch.call(this,d.formulas,!0)};h.applyProperties=function(d,b,a){var c=F.getColumnNameFromCoords(b,a),e=this.options.columns,g=this.options.style,f=this.options.comments,k=this.options.cells,l=this.options.rows,n=null,q=
|
|
257
|
+
!1;e[b]&&(e[b].readonly||e[b].readOnly)&&(q=!0);l&&l[a]&&(l[a].readonly||l[a].readOnly)&&(q=!0);if(g&&g[c]){var p=(p=d.getAttribute(_$_be75[120]))?p+(_$_be75[244]+g[c]):g[c];d.setAttribute(_$_be75[120],p)}f&&f[c]&&(typeof f[c]===_$_be75[25]?d.setAttribute(_$_be75[297],f[c]):d.classList.add(_$_be75[298]));if(k&&k[c])if(!1===k[c].locked&&!0===this.options.selectUnLockedCells?d.classList.add(_$_be75[299]):d.classList.remove(_$_be75[299]),k[c].zebra?d.classList.add(_$_be75[300]):d.classList.remove(_$_be75[300]),
|
|
258
|
+
typeof k[c].wrap!==_$_be75[21]&&((n=k[c].wrap)?d.classList.add(_$_be75[301]):d.classList.remove(_$_be75[301])),!0===k[c].readonly||!0===k[c].readOnly)q=!0;else if(!1===k[c].readonly||!1===k[c].readOnly)q=!1;null===n&&(e[b]&&e[b].wrap?d.classList.add(_$_be75[301]):d.classList.remove(_$_be75[301]));d.style.textAlign||(g=null,k&&k[c]&&k[c].align?g=k[c].align:e&&e[b].align&&(g=e[b].align),g&&(d.style.textAlign=g));q?d.classList.add(_$_be75[26]):d.classList.remove(_$_be75[26]);this.records[a][b].readonly=
|
|
259
|
+
q};h.applyOverflow=function(d,b,a){1==this.options.textOverflow&&0<b&&(b==this.options.columns.length-1&&(d.style.overflow=_$_be75[112]),this.records[a][b-1]&&this.records[a][b-1].element&&(this.records[a][b-1].element.style.overflow=this.options.data[a][b]==_$_be75[3]&&this.headers[b-1]&&this.headers[b-1].offsetWidth?_$_be75[3]:_$_be75[112]))};h.batch=function(d,b){var a=[],c=Object.keys(d);if(c.length)for(var e=0;e<c.length;e++){if(0<=c[e].indexOf(_$_be75[39])){var g=c[e].split(_$_be75[39]);var f=
|
|
260
|
+
J(g[0]);var k=g[1];g=g[0]}else f=this,k=c[e],g=this.getWorksheetName();k=F.getCoordsFromColumnName(k);k=f.updateCell(k[0],k[1],d[c[e]],!0);a[g]||(a[g]=[]);a[g].push(k)}if(1==b&&(c=Object.keys(a),c.length))for(e=0;e<c.length;e++)f=J(c[e]),L.call(f,_$_be75[129],a[c[e]])};return h}(),Ka=function(){var h=function(b){b.getColumnOptions=h[_$_be75[58]];b.setColumnOptions=h[_$_be75[11]];b.getCells=h.getCells;b.setCells=h.setCells;b.getProperties=h[_$_be75[58]];b.setProperties=h[_$_be75[11]];b.getProperty=
|
|
261
|
+
h[_$_be75[58]];b.setProperty=h[_$_be75[11]];b.resetProperty=h[_$_be75[11]];b.updateProperty=h.update;b.getOptions=h[_$_be75[58]]};h.getCells=function(b){return b?this.options.cells[b]:this.options.cells};h.setCells=function(b,a){if(!P.call(this.parent,this))return!1;if(typeof b==_$_be75[25])this.options.cells[b]=a;else{a=Object.keys(b);for(var c=0;c<a.length;c++)this.options.cells[a[c]]=b[a[c]]}};h[_$_be75[58]]=function(b,a){var c=null;void 0!==a&&(a=F.getColumnNameFromCoords(b,a),this.options.cells.hasOwnProperty(a)&&
|
|
262
|
+
(c=this.options.cells[a]));c||(c=this.options.columns[b]);if(!c)c={type:_$_be75[71]};else if(!c.type||typeof c.type==_$_be75[25]&&!u.editors[c.type])c.type=_$_be75[71];return c};var d=function(b,a,c,e,g){var f=this.records[a][b].element;f&&(e&&typeof e.destroyCell==_$_be75[104]&&e.destroyCell(f,b,a,this),c&&typeof c.createCell==_$_be75[104]&&(e=O.call(this,b,a),e=c.createCell(f,e,b,a,this,g),void 0!==e&&O.call(this,b,a,e),Q.applyProperties.call(this,f,b,a)))};h[_$_be75[11]]=function(b,a,c){if(!P.call(this.parent,
|
|
263
|
+
this))return!1;this.edition&&this.closeEditor(this.edition,!1);var e=[];if(Array.isArray(b))e=b;else if(jSuites.isNumeric(b)&&jSuites.isNumeric(a))b={x:b,y:a},typeof c==_$_be75[103]&&(b.value=c),e.push(b);else if(typeof a===_$_be75[103])b={x:b,value:a},e.push(b);else if(typeof b==_$_be75[103]&&void 0===a)for(a=Object.keys(b),c=0;c<a.length;c++){var g=F.getCoordsFromColumnName(a[c]);e.push({x:g[0],y:g[1],value:b[a[c]]})}if(Array.isArray(e))for(c=0;c<e.length;c++){var f=e[c];b=f.x;var k=f.y,l=h[_$_be75[58]].call(this,
|
|
264
|
+
b,k);a=f.value;g=u.editors[l.type];var n=null;a&&a.type&&(n=u.editors[a.type]);if(typeof k===_$_be75[21])for(f.oldValue=l,parseInt(a.width)||(a.width=this.options.defaultColWidth||100),a.type&&u.editors[a.type]||(a.type=_$_be75[71]),this.options.columns[b]=a,Da.applyProperties.call(this,b),f=0;f<this.records.length;f++)d.call(this,b,f,n,g,a);else l=F.getColumnNameFromCoords(b,k),f.oldValue=this.options.cells&&this.options.cells[l]?this.options.cells[l]:_$_be75[3],a?(this.options.cells||(this.options.cells=
|
|
265
|
+
{}),this.options.cells[l]=a):(delete this.options.cells[l],a=h[_$_be75[58]].call(this,b,k),n=u.editors[a.type]),d.call(this,b,k,n,g,a)}else return console.error(_$_be75[281]),!1;this.refreshBorders();R.call(this.parent,{worksheet:this,action:_$_be75[96],records:e});L.call(this,_$_be75[96],{data:e});G.call(this.parent,_$_be75[302],this,e);return!0};h.update=function(b,a,c,e){a=typeof b==_$_be75[25]||typeof b==_$_be75[22]?[{x:b,y:a,value:c}]:b;c=JSON.parse(JSON.stringify(a));if(Array.isArray(a))for(var g=
|
|
266
|
+
0;g<a.length;g++){var f=a[g].x,k=a[g].y,l=a[g],n=e,q=F.getColumnNameFromCoords(f,k);(b=this.options.cells[q])?l.oldValue=Object.assign({},b):(l.oldValue=null,b=this.options.cells[q]=Object.assign({},this.options.columns[f]));q=Object.keys(l.value);for(var p=0;p<q.length;p++)b[q[p]]=l.value[q[p]];n||typeof k===_$_be75[21]||(n=h[_$_be75[58]].call(this,f,k),n=u.editors[n.type],l.value.type?(l=l.value,q=null,l&&l.type&&(q=u.editors[l.type]),d.call(this,f,k,q,n,b)):(l=this.records[k][f].element)&&typeof n.updateCell==
|
|
267
|
+
_$_be75[104]&&(q=O.call(this,f,k),q=n.updateCell(l,q,f,k,this,b),void 0!==q&&O.call(this,f,k,q),Q.applyProperties.call(this,l,f,k)))}R.call(this.parent,{worksheet:this,action:_$_be75[97],records:a});L.call(this,_$_be75[97],{data:c});G.call(this.parent,_$_be75[302],this,a)};return h}(),da=function(){var h=function(b,a){Array.isArray(a)||(a=[a]);for(var c,e=b?_$_be75[3]:_$_be75[52],g=Object.keys(a),f=0;f<g.length;f++)if(c=this.rows[a[g[f]]])c.element&&(c.element.style.display=e),c.visible=b;H.call(this,
|
|
268
|
+
!0);this.resetBorders()},d=function(b){b.getRow=d[_$_be75[58]];b.moveRow=d.move;b.insertRow=d.add;b.deleteRow=d.del;b.getSelectedRows=d.selected;b.showRow=h.bind(b,!0);b.hideRow=h.bind(b,!1)};d.height=function(b){var a=0,c=this.rows,e=this.options.rows||{};c[b]&&!1!==c[b].visible&&(a=e[b]&&e[b].height?parseInt(e[b].height):c[b].element&&c[b].element.offsetHeight?c[b].element.offsetHeight:c[b].height?parseInt(c[b].height):this.options.defaultRowHeight||u.defaultRowHeight||24);return a};d[_$_be75[58]]=
|
|
269
|
+
function(b){return this.rows[b]};d.attached=function(b){return this.rows[b]&&this.rows[b].element&&this.rows[b].element.parentNode?!0:!1};d.selected=function(b){var a=[],c=this.getHighlighted();if(c)for(var e=c[1];e<=c[3];e++)this.rows[e]&&(b?a.push(e):a.push(this.rows[e].element));return a};d.create=function(b,a){if(this.rows[b]&&this.rows[b].element)return this.rows[b].element;this.rows[b]||ta.row.call(this,b);var c=document.createElement(_$_be75[171]);c.setAttribute(_$_be75[57],b);this.rows[b].element=
|
|
270
|
+
c;var e=null;this.options.rows[b]&&!a&&(this.options.rows[b].style&&c.setAttribute(_$_be75[120],this.options.rows[b].style),this.options.rows[b].height&&(c.style.height=parseInt(this.options.rows[b].height)+_$_be75[59]),this.options.rows[b].title&&(e=this.options.rows[b].title),0==this.options.rows[b].visible&&(this.rows[b].visible=!1),this.options.rows[b].id&&(this.rows[b].id=this.options.rows[b].id));0==this.rows[b].visible&&(c.style.display=_$_be75[52]);e||(e=parseInt(b+1));a=document.createElement(_$_be75[173]);
|
|
271
|
+
a.innerHTML=e;a.setAttribute(_$_be75[57],b);a.className=_$_be75[303];c.appendChild(a);G.call(this.parent,_$_be75[304],this,b,c);return c};d.move=function(b,a){if(!P.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.rows[a]||!this.rows[b])return console.error(_$_be75[305]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.rows[b]?c=!0:this.merged.rows[a]&&(b>a?this.merged.rows[a-1]&&(c=!0):this.merged.rows[a+1]&&(c=!0));c&&this.destroyMerged()}this.resetBorders();
|
|
272
|
+
da.attached.call(this,a)?(c=da.create.call(this,b),b>a?this.tbody.insertBefore(c,this.rows[a].element):this.tbody.insertBefore(c,this.rows[a].element.nextSibling)):da.attached.call(this,b)&&this.tbody.removeChild(this.rows[b].element);this.rows.splice(a,0,this.rows.splice(b,1)[0]);this.records.splice(a,0,this.records.splice(b,1)[0]);this.options.data.splice(a,0,this.options.data.splice(b,1)[0]);L.call(this,_$_be75[82],{f:b,t:a});R.call(this.parent,{worksheet:this,action:_$_be75[82],oldValue:b,newValue:a});
|
|
273
|
+
ea.references.call(this);H.call(this,!0,!0);ea.update.call(this);G.call(this.parent,_$_be75[306],this,b,a)};d.add=function(b,a,c,e,g){if(!P.call(this.parent,this))return!1;if(!this.options.allowInsertRow)return console.error(_$_be75[307]),!1;var f=[];if(0<b)var k=parseInt(b);else k=1,Array.isArray(b)&&!e&&(Array.isArray(b[0])?e=b:(e=[],e.push(b)));e=Ha.standardize(e);c=c?!0:!1;b=this.options.data?this.options.data.length-1:0;if(void 0==a||a>b||0>a)a=b,c=!1;k||(k=1);if(!1===G.call(this.parent,_$_be75[308],
|
|
274
|
+
this,a,k,c))return console.log(_$_be75[309]),!1;ba.reset.call(this);b=c?a:a+1;for(var l,n,q=0,p=[],v=[],w=this.rows.splice(b),x=this.options.data?this.options.data.splice(b):[],y=this.records.splice(b),A=b;A<k+b;A++){var z=e[q]&&e[q].id?e[q].id:xa.next.call(this);ta.row.call(this,A,z);n=this.dataType?{}:[];for(var I=0;I<this.options.columns.length;I++)l=qa.call(this,I),n[l]=_$_be75[3],e&&e[q]&&e[q].data&&(typeof e[q].data[l]!==_$_be75[21]?n[l]=e[q].data[l]:typeof e[q].data[I]!==_$_be75[21]&&(n[l]=
|
|
275
|
+
e[q].data[I])),f.push({x:I,y:A,value:n[l],force:!0});v.push({id:z,data:n});q++}this.rows=this.rows.concat(w);this.records=this.records.concat(y);Array.prototype.push.apply(this.options.data,x);for(A=b;A<k+b;A++)this.results&&(this.rows[A].results=!0),p.push(this.records[A]);this.merged.rows[b]&&sa.updateConfig.call(this,1,1,b-1,k);L.call(this,_$_be75[78],{numOfRows:k,rowNumber:a,insertBefore:c?1:0,data:v});this.results&&(this.results=za.refresh.call(this));R.call(this.parent,{worksheet:this,action:_$_be75[78],
|
|
276
|
+
rowNumber:a,numOfRows:k,insertBefore:c,data:v});ea.references.call(this);g||ka[_$_be75[11]].call(this,0,b,this.options.columns.length-1,k+b-1);H.call(this,!0,!0);f.length&&oa.applyValues.call(this,f);ea.update.call(this);G.call(this.parent,_$_be75[310],this,a,k,p,c)};d.del=function(b,a){if(!P.call(this.parent,this))return!1;if(!this.options.allowDeleteRow)return console.error(_$_be75[311]),!1;var c={},e=[];void 0==b&&(a=this.getSelectedRows(),a[0]?(b=parseInt(a[0].getAttribute(_$_be75[57])),a=a.length):
|
|
277
|
+
(b=this.options.data.length-1,a=1));var g=this.options.data.length-1;if(void 0==b||b>g||0>b)b=g;a||(a=1);b+a>=this.options.data.length&&(a=this.options.data.length-b,a>=this.options.data.length&&(a=this.options.data.length,this.resetSelection()));if(!1===G.call(this.parent,_$_be75[312],this,b,a))return console.log(_$_be75[313]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);for(var f=b;f<b+a;f++)for(var k=0;k<this.options.columns.length;k++)g=F.getColumnNameFromCoords(k,f),Q.getAttributes.call(this,
|
|
278
|
+
_$_be75[314],g,c),Q.getAttributes.call(this,_$_be75[120],g,c),Q.getAttributes.call(this,_$_be75[315],g,c),Q.getAttributes.call(this,_$_be75[316],g,c),Q.getAttributes.call(this,_$_be75[296],g,c),Q.getAttributes.call(this,_$_be75[295],g,c),e[g]=!0;if(g=Z.getChain.call(this,c.values))c.formulas=g;for(f=b;f<b+a;f++)da.attached.call(this,f)&&this.rows[f].element.remove(),this.options.rows&&this.options.rows[f]&&(this.options.rows[f]=null);g=[];for(f=b;f<b+a;f++)g.push({id:this.getRowId(f),row:f,data:this.getRowData(f)});
|
|
279
|
+
this.rows.splice(b,a);f=this.records.splice(b,a);this.options.data.splice(b,a);sa.updateConfig.call(this,1,0,b,a);this.results&&(this.results=za.refresh.call(this));L.call(this,_$_be75[79],{rowNumber:b,numOfRows:a,data:g});R.call(this.parent,{worksheet:this,action:_$_be75[79],rowNumber:b,numOfRows:a,insertBefore:1,data:g,attributes:c});ea.references.call(this,e);H.call(this,!0,!0);ea.update.call(this,!0);G.call(this.parent,_$_be75[317],this,b,a,f,g,c)}};return d}(),ia=function(){var h=function(b,
|
|
280
|
+
a){Array.isArray(a)||(a=[a]);for(var c,e,g=Object.keys(a),f=0;f<g.length;f++)if(c=a[g[f]],e=this.options.columns[c])this.colgroup[c]&&(this.colgroup[c].style.width=b?parseInt(e.width||this.options.defaultColWidth)+_$_be75[59]:_$_be75[61]),e.visible=b;H.call(this,!0);this.resetBorders()},d=function(b){b.getColumn=d[_$_be75[58]];b.getColumnIdByName=d.getByName;b.getPrimaryKey=d.getPrimaryKey;b.getSelectedColumns=d.selected;b.moveColumn=d.move;b.insertColumn=d.add;b.deleteColumn=d.del;b.showColumn=h.bind(b,
|
|
281
|
+
!0);b.hideColumn=h.bind(b,!1)};d[_$_be75[58]]=function(b){return this.options.columns[b]||!1};d.attached=function(b){return this.headers[b]&&this.headers[b].parentNode?!0:!1};d.getByName=function(b){for(var a=this.options.columns,c=0;c<a.length;c++)if(a[c].name==b)return c;return!1};d.getPrimaryKey=function(){for(var b=0;b<this.options.columns.length;b++)if(1==this.options.columns[b].primaryKey)return b;return!1};d.selected=function(){var b=[],a=this.getHighlighted();if(a)for(var c=a[0];c<=a[2];c++)b.push(c);
|
|
282
|
+
return b};d.move=function(b,a){if(!P.call(this.parent,this))return!1;b=parseInt(b);a=parseInt(a);if(!this.options.columns[b])return console.error(_$_be75[318]),!1;if(!this.options.columns[a])return console.error(_$_be75[319]),!1;if(0<Object.keys(this.getMerge()).length){var c=null;this.merged.cols[b]?c=!0:this.merged.cols[a]&&(b>a?this.merged.cols[a-1]&&(c=!0):this.merged.cols[a+1]&&(c=!0));c&&this.destroyMerged()}ba.reset.call(this);this.options.freezeColumns&&ca.applyReset.call(this);if(ia.attached.call(this,
|
|
283
|
+
a)){Da.create.call(this,b);var e=(b>a?this.headers[a]:this.headers[a].nextSibling)||null;this.headerContainer.insertBefore(this.headers[b],e);e=(b>a?this.colgroup[a]:this.colgroup[a].nextSibling)||null;this.colgroupContainer.insertBefore(this.colgroup[b],e);for(var g=0;g<this.tbody.children.length;g++)c=this.tbody.children[g].getAttribute(_$_be75[57]),e=(b>a?this.records[c][a].element:this.records[c][a].element.nextSibling)||null,this.tbody.children[g].insertBefore(Q[_$_be75[58]].call(this,b,c),e);
|
|
284
|
+
if(this.options.footers)for(g=0;g<this.tfoot.children.length;g++)e=(b>a?this.footers.content[g][a].element:this.footers.content[g][a].element.nextSibling)||null,this.tfoot.children[g].insertBefore(fa.create.call(this,b,g),e)}else if(ia.attached.call(this,b)){this.headerContainer.removeChild(this.headers[b]);this.colgroupContainer.removeChild(this.colgroup[b]);for(g=0;g<this.tbody.children.length;g++)c=parseInt(this.tbody.children[g].getAttribute(_$_be75[57])),this.tbody.children[g].removeChild(this.records[c][b].element);
|
|
285
|
+
if(this.options.footers)for(g=0;g<this.tfoot.children.length;g++)this.tfoot.children[g].removeChild(this.footers.content[g][b].element)}this.options.columns.splice(a,0,this.options.columns.splice(b,1)[0]);this.headers.splice(a,0,this.headers.splice(b,1)[0]);this.colgroup.splice(a,0,this.colgroup.splice(b,1)[0]);for(g=0;g<this.rows.length;g++)this.dataType||this.options.data[g].splice(a,0,this.options.data[g].splice(b,1)[0]),this.records[g].splice(a,0,this.records[g].splice(b,1)[0]);if(this.options.footers)for(g=
|
|
286
|
+
0;g<this.options.footers.length;g++)this.options.footers[g].splice(a,0,this.options.footers[g].splice(b,1)[0]),this.footers.content[g].splice(a,0,this.footers.content[g].splice(b,1)[0]);L.call(this,_$_be75[83],{f:b,t:a});R.call(this.parent,{worksheet:this,action:_$_be75[83],oldValue:b,newValue:a});ea.references.call(this);H.call(this,!0,!0);ea.update.call(this);G.call(this.parent,_$_be75[320],this,b,a)};d.add=function(b,a,c,e,g,f,k){if(!P.call(this.parent,this))return!1;if(!this.options.allowInsertColumn)return console.error(_$_be75[321]),
|
|
287
|
+
!1;var l=[];if(0<b)var n=parseInt(b);else if(n=1,Array.isArray(b)&&!g)if(Array.isArray(b[0]))g=b;else{g=[];for(var q=0;q<b.length;q++)g[q]=[b[q]]}g||(g=[]);c=c?!0:!1;b=this.options.columns.length-1;if(void 0==a||a>b||0>a)a=b,c=!1;n||(n=1);if(!1===G.call(this.parent,_$_be75[322],this,a,n,c))return console.log(_$_be75[323]),!1;ba.reset.call(this);this.options.freezeColumns&&ca.applyReset.call(this);if(1==this.dataType)var p=parseInt((_$_be75[3]+Date.now()).substr(-8));e||(e=[]);for(q=0;q<n;q++)e[q]||
|
|
288
|
+
(e[q]={}),e[q].type||(e[q].type=_$_be75[71]),e[q].width||(e[q].width=this.options.defaultColWidth),e[q].type!=_$_be75[73]&&e[q].type!=_$_be75[324]||e[q].source||(e[q].source=[]),1==this.dataType&&typeof e[q].name==_$_be75[21]&&(e[q].name=_$_be75[325]+(p+q));p=c?a:a+1;this.options.columns=F.injectArray(this.options.columns,p,e);q=this.headers.splice(p);var v=this.colgroup.splice(p);for(b=p;b<n+p;b++)Da.create.call(this,b);this.headers=this.headers.concat(q);this.colgroup=this.colgroup.concat(v);fa.adjust.call(this,
|
|
289
|
+
p,n,1);ya.adjust.call(this,a,n,1,f);v=null;for(var w,x=0;x<this.options.data.length;x++){this.dataType||(v=this.options.data[x].splice(p));w=this.records[x].splice(p);f=0;for(b=p;b<n+p;b++)q=g[x]&&g[x][f]?g[x][f]:_$_be75[3],O.call(this,b,x,q),l.push({x:b,y:x,value:q}),ta.cell.call(this,b,x),f++;this.dataType||(this.options.data[x]=this.options.data[x].concat(v));this.records[x]=this.records[x].concat(w)}this.merged.cols[p]&&sa.updateConfig.call(this,0,1,p-1,n);L.call(this,_$_be75[80],{numOfColumns:n,
|
|
290
|
+
columnNumber:a,insertBefore:c?1:0,properties:e,data:g});R.call(this.parent,{worksheet:this,action:_$_be75[80],columnNumber:a,numOfColumns:n,insertBefore:c,properties:e,data:g});ea.references.call(this);k||ka[_$_be75[11]].call(this,p,0,n+p-1,this.rows.length-1);H.call(this,!0,!0);l.length&&oa.applyValues.call(this,l);ea.update.call(this);G.call(this.parent,_$_be75[326],this,a,n,[],c)};d.del=function(b,a){if(!P.call(this.parent,this))return!1;if(!this.options.allowDeleteColumn)return console.error(_$_be75[327]),
|
|
291
|
+
!1;var c={},e=[];if(1<this.options.columns.length){void 0==b&&(a=this.getSelectedColumns(!0),a.length?(b=parseInt(a[0]),a=parseInt(a.length)):(b=this.options.columns.length-1,a=1));var g=this.options.columns.length-1;if(void 0==b||b>g||0>b)b=g;a||(a=1);b+a>=this.options.columns.length&&(a=this.options.columns.length-b,a>=this.options.columns.length&&(a--,console.error(_$_be75[328])));if(!1===G.call(this.parent,_$_be75[329],this,b,a))return console.log(_$_be75[330]),!1;if(-1<parseInt(b)&&0<parseInt(a)){ba.reset.call(this);
|
|
292
|
+
g=null;var f=[],k=[],l=[];var n=0;for(var q=b;q<b+a;q++)ia.attached.call(this,q)&&(this.colgroup[q].parentNode.removeChild(this.colgroup[q]),this.headers[q].parentNode.removeChild(this.headers[q])),l[n]=this.options.columns[q],n++;for(var p=0;p<this.options.data.length;p++)for(q=b;q<b+a;q++)n=F.getColumnNameFromCoords(q,p),Q.getAttributes.call(this,_$_be75[314],n,c),Q.getAttributes.call(this,_$_be75[120],n,c),Q.getAttributes.call(this,_$_be75[315],n,c),Q.getAttributes.call(this,_$_be75[316],n,c),
|
|
293
|
+
Q.getAttributes.call(this,_$_be75[296],n,c),Q.getAttributes.call(this,_$_be75[295],n,c),e[n]=!0,this.records[p][q].element&&0<=Array.prototype.indexOf.call(this.rows[p].element.children,this.records[p][q].element)&&this.records[p][q].element.parentNode.removeChild(this.records[p][q].element);if(q=Z.getChain.call(this,c.values))c.formulas=q;this.options.columns.splice(b,a);this.headers.splice(b,a);this.colgroup.splice(b,a);for(p=0;p<this.options.data.length;p++)this.dataType||(k[p]=this.options.data[p].splice(b,
|
|
294
|
+
a)),f[p]=this.records[p].splice(b,a);fa.adjust.call(this,b,a,0);(q=ya.adjust.call(this,b,a,0))&&(g={nested:q});sa.updateConfig.call(this,0,0,b,a);L.call(this,_$_be75[81],{columnNumber:b,numOfColumns:a});R.call(this.parent,{worksheet:this,action:_$_be75[81],columnNumber:b,numOfColumns:a,insertBefore:1,data:k,properties:l,attributes:c,extra:g});ea.references.call(this,e);H.call(this,!0,!0);ea.update.call(this,!0);G.call(this.parent,_$_be75[331],this,b,a,f,l,c)}}};d.isVisible=function(b){var a=this.options.columns;
|
|
295
|
+
return!1===a[b].visible||a[b].type===_$_be75[112]||a[b].width===_$_be75[61]||a[b].width===_$_be75[119]?!1:!0};return d}(),La=function(){var h={},d={},b=function(c){if(typeof c==_$_be75[25]){var e=c;c=F.getCoordsFromColumnName(c);var g=c[0];c=c[1]}else g=c.x,c=c.y,e=F.getColumnNameFromCoords(g,c);if(this.records[c]&&this.records[c][g]&&this.records[c][g].element){d[e]=this.options.style[e];this.records[c][g].element.setAttribute(_$_be75[120],_$_be75[3]);if(this.options.cells&&this.options.cells[e]&&
|
|
296
|
+
this.options.cells[e].align)var f=this.options.cells[e].align;else this.options.columns[g].align&&(f=this.options.columns[g].align);f&&(this.records[c][g].element.style.textAlign=f)}this.options.style&&this.options.style[e]&&delete this.options.style[e]},a=function(c){c.getStyle=a[_$_be75[58]];c.setStyle=a[_$_be75[11]];c.resetStyle=a.reset};a[_$_be75[58]]=function(c){var e=this.options.style;if(!e)return!1;if(c){if(typeof c==_$_be75[25])return e[c];var g=[],f=Object.keys(c);if(0<f.length)for(var k=
|
|
297
|
+
0;k<f.length;k++){if(typeof c[k]==_$_be75[25])var l=e&&e[c[k]]?e[c[k]]:_$_be75[3];else l=F.getColumnNameFromCoords(c[k].x,c[k].y),l=e&&e[l]?e[l]:_$_be75[3];g.push(l)}return g}return this.options.style};a.getFromSelection=function(c){var e,g,f=this.options.style,k=0,l=[];for(g=c[1];g<=c[3];g++){var n=0;l[k]=[];for(e=c[0];e<=c[2];e++){var q=F.getColumnNameFromCoords(e,g);l[k][n++]=f&&f[q]?f[q]:_$_be75[3]}k++}return l};a[_$_be75[11]]=function(c,e,g,f){if(!P.call(this.parent,this))return!1;this.options.style||
|
|
298
|
+
(this.options.style={});var k=this.options.style,l=null,n=[],q=[],p={};q=function(x,y,A){if(!p[x]&&(k[x]?n=k[x].split(_$_be75[244]):(k[x]=_$_be75[3],n=[]),p[x]={},n.length))for(var z=0;z<n.length;z++)n[z]&&n[z].trim()&&(l=n[z].split(_$_be75[157]),p[x][l[0].trim()]=l[1].trim());d[x]||(d[x]=[]);h[x]||(h[x]=[]);p[x][y]||(p[x][y]=_$_be75[3]);d[x].push([y+_$_be75[157]+p[x][y]]);p[x][y]=p[x][y]&&p[x][y]==A&&!f?_$_be75[3]:A;h[x].push([y+_$_be75[157]+p[x][y]]);A=F.getCoordsFromColumnName(x);this.records[A[1]]&&
|
|
299
|
+
this.records[A[1]][A[0]]&&this.records[A[1]][A[0]].element&&(this.records[A[1]][A[0]].element.style[y]=p[x][y]);p[x][y]||delete p[x][y]};h={};d={};if(e)if(typeof c==_$_be75[25])q.call(this,c,e,g);else{if(c&&c.length)for(var v=0;v<c.length;v++){var w=F.getColumnNameFromCoords(c[v].x,c[v].y);q.call(this,w,e,g)}}else for(g=Object.keys(c),v=0;v<g.length;v++)if(w=c[g[v]])for(typeof w==_$_be75[25]&&(w=w.split(_$_be75[244])),e=0;e<w.length;e++)w[e]&&(typeof w[e]==_$_be75[25]&&(w[e]=w[e].split(_$_be75[157])),
|
|
300
|
+
w[e][0].trim()&&q.call(this,g[v],w[e][0].trim(),w[e][1].trim()));n={};q=Object.keys(p);if(q.length){for(v=0;v<q.length;v++){n[q[v]]||(n[q[v]]=[]);c=Object.keys(p[q[v]]);for(e=0;e<c.length;e++)n[q[v]].push(c[e]+_$_be75[137]+p[q[v]][c[e]]);this.options.style[q[v]]=n[q[v]].join(_$_be75[332])}q=Object.keys(h);for(v=0;v<q.length;v++)h[q[v]]=h[q[v]].join(_$_be75[244]);q=Object.keys(d);for(v=0;v<q.length;v++)d[q[v]]=d[q[v]].join(_$_be75[244]);this.refreshBorders();R.call(this.parent,{worksheet:this,action:_$_be75[86],
|
|
301
|
+
oldValue:d,newValue:h});L.call(this,_$_be75[86],[h]);G.call(this.parent,_$_be75[333],this,h,d)}};a.reset=function(c){if(!P.call(this.parent,this))return!1;if(c){d={};if(Array.isArray(c))for(var e=0;e<c.length;e++)b.call(this,c[e]);else b.call(this,c);this.refreshBorders();R.call(this.parent,{worksheet:this,action:_$_be75[87],cells:c,oldValue:d});L.call(this,_$_be75[87],[c]);G.call(this.parent,_$_be75[335],this,c)}else console.error(_$_be75[334])};a.update=function(c){h={};d={};for(var e=Object.keys(c),
|
|
302
|
+
g=0;g<e.length;g++){d[e[g]]=this.options.style[e[g]]||_$_be75[3];h[e[g]]=this.options.style[e[g]]=c[e[g]];var f=F.getCoordsFromColumnName(e[g]),k=f[0];f=f[1];if(this.records[f]&&this.records[f][k]&&this.records[f][k].element&&(this.records[f][k].element.setAttribute(_$_be75[120],c[e[g]]),!this.records[f][k].element.style.textAlign)){var l=null;this.options.cells&&this.options.cells[e[g]]&&this.options.cells[e[g]].align?l=this.options.cells[e[g]].align:this.options.columns[k].align&&(l=this.options.columns[k].align);
|
|
303
|
+
l&&(this.records[f][k].element.style.textAlign=l)}}L.call(this,_$_be75[87],[e]);L.call(this,_$_be75[86],[h]);G.call(this.parent,_$_be75[333],this,h,d)};return a}(),Ya=function(){var h=function(d){d.getComments=h[_$_be75[58]];d.setComments=h[_$_be75[11]]};h[_$_be75[58]]=function(d){return d&&typeof d==_$_be75[25]?this.options.comments&&this.options.comments[d]?this.options.comments[d]:!1:this.options.comments};h[_$_be75[11]]=function(d,b){if(!P.call(this.parent,this))return!1;if(typeof d==_$_be75[25]){var a=
|
|
304
|
+
{};a[d]=b}else a=d;if(b=G.call(this.parent,_$_be75[336],this,a))a=b;else if(!1===b)return!1;this.options.comments||(this.options.comments={});d={};var c=Object.keys(a);if(c.length){for(var e=0;e<c.length;e++){var g=F.getCoordsFromColumnName(c[e]);this.records[g[1]]&&this.records[g[1]][g[0]]&&(d[c[e]]=this.options.comments[c[e]]||_$_be75[3],(b=a[c[e]])?this.options.comments[c[e]]=b:delete this.options.comments[c[e]],this.records[g[1]][g[0]].element&&(b?this.records[g[1]][g[0]].element.setAttribute(_$_be75[297],
|
|
305
|
+
b):this.records[g[1]][g[0]].element.removeAttribute(_$_be75[297])))}R.call(this.parent,{worksheet:this,action:_$_be75[91],newValue:a,oldValue:d});L.call(this,_$_be75[91],[a]);G.call(this.parent,_$_be75[337],this,a,d)}};return h}(),Za=function(){var h=function(d){d.getMeta=h[_$_be75[58]];d.setMeta=h[_$_be75[11]];d.resetMeta=h.reset};h[_$_be75[58]]=function(d,b){if(d){if(this.options.meta[d])return b?this.options.meta[d][b]:this.options.meta[d]}else return this.options.meta};h[_$_be75[11]]=function(d,
|
|
306
|
+
b,a){if(!P.call(this.parent,this))return!1;this.options.meta||(this.options.meta={});if(typeof d==_$_be75[25]&&b){a||(a=_$_be75[3]);var c={};c[d]={};c[d][b]=a;d=c}b=Object.keys(d);if(b.length){a={};for(c=0;c<b.length;c++){this.options.meta[b[c]]||(this.options.meta[b[c]]={});a[b[c]]||(a[b[c]]={});for(var e=Object.keys(d[b[c]]),g=0;g<e.length;g++)this.options.meta[b[c]][e[g]]=d[b[c]][e[g]],a[b[c]][e[g]]=d[b[c]][e[g]]}Object.keys(a).length&&(L.call(this,_$_be75[338],[a]),G.call(this.parent,_$_be75[339],
|
|
307
|
+
this,a))}};h.reset=function(d){if(!P.call(this.parent,this))return!1;if(d){if(this.options.meta){typeof d==_$_be75[25]&&(d=[d]);for(var b=0;b<d.length;b++)this.options.meta[d[b]]&&delete this.options.meta[d[b]]}}else d={},this.options.meta=d;L.call(this,_$_be75[340],d);G.call(this.parent,_$_be75[341],this,d)};return h}(),$a=function(){var h=function(d){d.orderBy=h.execute};h.handler=function(d,b){return function(a,c){a=a[1];c=c[1];return d?a===_$_be75[3]&&c!==_$_be75[3]?1:a!==_$_be75[3]&&c===_$_be75[3]?
|
|
308
|
+
-1:a>c?-1:a<c?1:0:a===_$_be75[3]&&c!==_$_be75[3]?1:a!==_$_be75[3]&&c===_$_be75[3]?-1:a>c?1:a<c?-1:0}};h.execute=function(d,b,a,c){if(0<=d){b=null==b?this.headers[d].classList.contains(_$_be75[342])?1:0:b?1:0;for(var e,g,f=[],k=0;k<this.options.data.length;k++)e=Ka[_$_be75[58]].call(this,d,k),g=this.records[k][d].v,g=e.type==_$_be75[284]||e.type==_$_be75[289]||e.type==_$_be75[290]||e.type==_$_be75[343]||e.type==_$_be75[22]||e.type==_$_be75[344]?Number(g):jSuites.isNumeric(g)?Number(g):g.toLowerCase(),
|
|
309
|
+
f[k]=[k,g];k=typeof this.parent.config.sorting===_$_be75[104]?this.parent.config.sorting(b,d):h.handler(b,d);f.sort(k);e=a?!0:!1;if(!a)for(a=[],k=0;k<f.length;k++)a[k]=f[k][0];if(k=G.call(this.parent,_$_be75[345],this,d,b,a))a=k;else if(!1===k)return!1;if(e)this.destroyMerged();else if(0<Object.keys(this.getMerge()).length)if(confirm(E(_$_be75[346])))this.destroyMerged();else return!1;if(a.length<f.length)for(k=0;k<f.length;k++)-1==a.indexOf(f[k][0])&&a.push(f[k][0]);f=[];for(k=0;k<a.length;k++)f[a[k]]=
|
|
310
|
+
k;Ga.call(this,!1);ba.reset.call(this);L.call(this,_$_be75[94],{column:d,direction:b,order:a});R.call(this.parent,{worksheet:this,action:_$_be75[94],column:d,newValue:a,oldValue:f,direction:b,previousState:h.getState.call(this)});h.update.call(this,a);h.arrow.call(this,d,b,c);ba.refresh.call(this);G.call(this.parent,_$_be75[347],this,d,b,a);return!0}};h.update=function(d){for(var b=[],a=0;a<d.length;a++)b[a]=this.options.data[d[a]];for(a=0;a<d.length;a++)this.options.data[a]=b[a];b=[];for(a=0;a<d.length;a++)b[a]=
|
|
311
|
+
this.records[d[a]];this.records=b;b=[];for(a=0;a<d.length;a++)b[a]=this.rows[d[a]];this.rows=b;ea.references.call(this);this.tbody.innerHTML=_$_be75[3];H.call(this,!0,!0);this.searchInput&&this.searchInput.value?va.update.call(this,null):la.update.call(this)};h.arrow=function(d,b,a){for(var c=0;c<this.headers.length;c++)this.headers[c].classList.remove(_$_be75[348]),this.headers[c].classList.remove(_$_be75[342]);void 0===a?this.headers[d].classList.add(b?_$_be75[348]:_$_be75[342]):Array.isArray(a)&&
|
|
312
|
+
this.headers[a[0]].classList.add(a[1]?_$_be75[348]:_$_be75[342])};h.getState=function(){for(var d=0;d<this.headers.length;d++){if(this.headers[d].classList.contains(_$_be75[348]))return[d,1];if(this.headers[d].classList.contains(_$_be75[342]))return[d,0]}return null};return h}(),Ca=function(){var h=function(d){d.whichPage=h.whichPage;d.quantityOfPages=h.quantityOfPages;d.page=h[_$_be75[11]];d.updatePagination=h.update};h.build=function(){this.pageNumber=0;var d=document.createElement(_$_be75[32]),
|
|
313
|
+
b=document.createElement(_$_be75[32]);this.pagination=document.createElement(_$_be75[32]);this.pagination.classList.add(_$_be75[349]);this.pagination.appendChild(d);this.pagination.appendChild(b);this.options.pagination||(this.pagination.style.display=_$_be75[52]);this.element.appendChild(this.pagination)};h.pageUp=function(){0<this.pageNumber&&(this.pageNumber--,h[_$_be75[11]].call(this,this.pageNumber))};h.pageDown=function(){this.pageNumber<h.quantityOfPages.call(this)-1&&(this.pageNumber++,h[_$_be75[11]].call(this,
|
|
314
|
+
this.pageNumber))};h.whichPage=function(d){if(0<this.options.pagination)return this.rows[d]?(this.results&&(d=this.results.indexOf(parseInt(d))),Math.ceil((parseInt(d)+1)/parseInt(this.options.pagination))-1):null;console.log(_$_be75[350]);return!1};h.quantityOfPages=function(){if(0<this.options.pagination)return Math.ceil((this.results?this.results.length:this.rows.length)/parseInt(this.options.pagination));console.log(_$_be75[350]);return!1};h[_$_be75[11]]=function(d,b){var a=this.pageNumber,c=
|
|
315
|
+
parseInt(this.options.pagination);if(c){if(null==d||-1==d)d=Math.ceil((this.results?this.results:this.rows).length/c)-1;if(!1===G.call(this.parent,_$_be75[352],this,d,a,c))return!1;this.pageNumber=d;H.update.call(this);fa.refresh.call(this);typeof b==_$_be75[104]&&b.call(this);G.call(this.parent,_$_be75[353],this,d,a,c)}else console.error(_$_be75[351])};h.update=function(){this.pagination.children[0].innerHTML=_$_be75[3];this.pagination.children[1].innerHTML=_$_be75[3];if(this.options.pagination){var d=
|
|
316
|
+
this.results?this.results.length:this.rows.length;if(d){d=Math.ceil(d/this.options.pagination);if(6>this.pageNumber)var b=1,a=10>d?d:10;else 5>d-this.pageNumber?(b=d-9,a=d,1>b&&(b=1)):(b=this.pageNumber-4,a=this.pageNumber+5);if(1<b){var c=document.createElement(_$_be75[32]);c.className=_$_be75[355];c.innerHTML=_$_be75[15];c.title=1;this.pagination.children[1].appendChild(c)}for(;b<=a;b++)c=document.createElement(_$_be75[32]),c.className=_$_be75[355],c.innerHTML=b,this.pagination.children[1].appendChild(c),
|
|
317
|
+
this.pageNumber==b-1&&c.classList.add(_$_be75[356]);a<d&&(c=document.createElement(_$_be75[32]),c.className=_$_be75[355],c.innerHTML=_$_be75[17],c.title=d,this.pagination.children[1].appendChild(c));this.pagination.children[0].innerHTML=E(_$_be75[357],[this.pageNumber+1,d])}else this.pagination.children[0].innerHTML=E(_$_be75[354]);this.options.tableOverflow&&(this.content.style.height=this.table.offsetHeight+16+_$_be75[59],this.table.style.top=0)}};return h}(),ja=function(){var h=function(d){d.setFreezeRows=
|
|
318
|
+
h[_$_be75[11]];d.resetFreezeRows=h.reset};h.update=function(d){var b,a;if(a=this.options.freezeRows)for(var c=this.thead.offsetHeight,e=0;e<a;e++){if(b=this.records[e][d].element)b.classList.add(_$_be75[358]),b.style.top=c+_$_be75[59];c+=parseInt(this.rows[e].element.offsetHeight)}};h.headers=function(){var d=this.thead.offsetHeight,b;if(b=this.options.freezeRows)for(var a=0;a<b;a++)this.rows[a]&&this.rows[a].element&&(this.rows[a].element.firstChild.classList.add(_$_be75[358]),this.rows[a].element.firstChild.style.top=
|
|
319
|
+
d+_$_be75[59],d+=parseInt(this.rows[a].element.offsetHeight));else h.reset.call(this)};h.refresh=function(){if(0<this.options.freezeRows){h.headers.call(this);for(var d=0;d<this.visibleCols.length;d++)h.update.call(this,this.visibleCols[d])}};h[_$_be75[11]]=function(d){h.applyReset.call(this);var b=this.options.freezeRows;this.options.freezeRows=d;this.options.freezeRowControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_be75[359]):this.thead.lastChild.firstChild.classList.remove(_$_be75[359]);
|
|
320
|
+
h.refresh.call(this);H.call(this,!0);ba.refresh.call(this);R.call(this.parent,{worksheet:this,action:_$_be75[93],newValue:d,oldValue:b});L.call(this,_$_be75[93],{row:d})};h.reset=function(){h[_$_be75[11]].call(this,0)};h.getHeight=function(d){d=d?0:this.thead.offsetHeight;if(0<this.options.freezeRows)for(var b=0;b<this.options.freezeRows;b++)d+=parseInt(da.height.call(this,b));return d};h.applyReset=function(){for(var d,b=0;b<this.options.freezeRows;b++)if(this.rows[b].element){this.rows[b].element.firstChild.classList.remove(_$_be75[358]);
|
|
321
|
+
this.rows[b].element.firstChild.style.top=_$_be75[3];for(var a=0;a<this.options.columns.length;a++)if(d=this.records[b][a].element)d.classList.remove(_$_be75[358]),d.style.top=_$_be75[3]}};h.start=function(d,b){d=this.parent.helper;h.event={y:b,d:b};this.content.scrollTop=0;b=this.content.offsetTop+h.getHeight.call(this);d.style.display=_$_be75[24];d.style.top=b+_$_be75[59];d.style.left=_$_be75[61];d.style.width=this.content.offsetWidth+_$_be75[59];d.style.height=_$_be75[181]};h.end=function(d){d=
|
|
322
|
+
h.event;null!==d.d&&this.setFreezeRows(d.d);this.parent.helper.style.display=_$_be75[3];h.event=null};h.cancel=function(){h.event.d=null;h.end.call(this,!1)};h.move=function(d){var b=d.target.getAttribute(_$_be75[57]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientHeight/2>d.offsetY)?b:b+1;this.merged.rows[a]&&0<a||(h.event.d=a,a=this.parent.element.getBoundingClientRect(),b=this.rows[b].element.getBoundingClientRect(),this.parent.helper.style.top=(d?b.top:b.bottom)-a.top+_$_be75[59])}};return h}(),
|
|
323
|
+
ca=function(){var h=function(d){d.setFreezeColumns=h[_$_be75[11]];d.resetFreezeColumns=h.reset};h.width=function(){if(this.options.freezeColumns){h.headers.call(this);for(var d=0;d<this.rows.length;d++)this.rows[d].element&&h.update.call(this,d)}};h.update=function(d){var b,a;if(a=this.options.freezeColumns){var c=Aa.call(this)?50:0;if(this.rows[d].element)for(var e=0;e<a;e++){if(b=this.records[d][e].element)b.classList.add(_$_be75[60]),b.style.left=c+_$_be75[59];ia.isVisible.call(this,e)&&(c+=parseInt(this.options.columns[e].width))}}};
|
|
324
|
+
h.headers=function(){var d=Aa.call(this)?50:0,b;if(b=this.options.freezeColumns)for(var a=0;a<b;a++){if(this.headers[a]){this.headers[a].classList.add(_$_be75[60]);this.headers[a].style.left=d+_$_be75[59];if(this.options.footers)for(var c=0;c<this.options.footers.length;c++)this.footers.content[c][a].element.classList.add(_$_be75[60]),this.footers.content[c][a].element.style.left=d+_$_be75[59];!1!==this.options.columns[a].visible&&(d+=parseInt(this.options.columns[a].width))}}else h.reset.call(this)};
|
|
325
|
+
h.refresh=function(){if(0<this.options.freezeColumns){h.headers.call(this);for(var d=0;d<this.visibleRows.length;d++)h.update.call(this,this.visibleRows[d])}};h[_$_be75[11]]=function(d){h.applyReset.call(this);var b=this.options.freezeColumns;this.options.freezeColumns=d;this.options.freezeColumnControl&&!d?this.thead.lastChild.firstChild.classList.add(_$_be75[360]):this.thead.lastChild.firstChild.classList.remove(_$_be75[360]);h.width.call(this);H.call(this,!0);ba.refresh.call(this);R.call(this.parent,
|
|
326
|
+
{worksheet:this,action:_$_be75[92],newValue:d,oldValue:b});L.call(this,_$_be75[92],{column:d})};h.reset=function(){h[_$_be75[11]].call(this,0)};h.applyReset=function(){for(var d,b=1;b<=this.options.freezeColumns;b++){if(d=this.thead.lastChild)d.children[b].classList.remove(_$_be75[60]),d.children[b].style.left=_$_be75[3];for(var a=0;a<this.rows.length;a++)if(d=this.rows[a].element)d.children[b].classList.remove(_$_be75[60]),d.children[b].style.left=_$_be75[3];if(this.options.footers)for(a=0;a<this.options.footers.length;a++)this.tfoot.children[a].children[b].classList.remove(_$_be75[60]),
|
|
327
|
+
this.tfoot.children[a].children[b].style.left=_$_be75[3]}};h.getWidth=function(d){d=d?0:Aa.call(this)?50:0;if(0<this.options.freezeColumns)for(var b=0;b<this.options.freezeColumns;b++)ia.isVisible.call(this,b)&&(d+=parseInt(this.options.columns[b].width));return d};h.start=function(d,b){d=this.parent.helper;h.event={x:b,d:b};this.content.scrollLeft=0;b=h.getWidth.call(this);d.style.display=_$_be75[24];d.style.top=this.content.offsetTop+_$_be75[59];d.style.left=b+_$_be75[59];d.style.width=_$_be75[181];
|
|
328
|
+
d.style.height=this.content.offsetHeight+_$_be75[59];this.thead.lastChild.firstChild.classList.remove(_$_be75[360])};h.end=function(d){d=h.event;null!==d.d&&this.setFreezeColumns(d.d);this.parent.helper.style.display=_$_be75[3];h.event=null};h.cancel=function(){h.event.d=null;h.end.call(this,!1)};h.move=function(d){var b=d.target.getAttribute(_$_be75[56]);if(null!=b){b=parseInt(b);var a=(d=d.target.clientWidth/2>d.offsetX)?b:b+1;this.merged.cols[a]&&0<a||(h.event.d=a,b=this.headers[b].getBoundingClientRect(),
|
|
329
|
+
a=this.content.getBoundingClientRect(),this.parent.helper.style.left=(d?b.left:b.right)-a.left+_$_be75[59])}};return h}(),ea=function(){var h=function(a,c){if(this.options[a]){for(var e={},g=Object.keys(this.options[a]),f=0;f<g.length;f++)e[c&&void 0!=c[g[f]]?c[g[f]]:g[f]]=this.options[a][g[f]];this.options[a]=e}},d=function(){if(0<this.options.minSpareRows){for(var a=0,c=this.rows.length-1;0<=c;c--){for(var e=!1,g=0;g<this.options.columns.length;g++)O.call(this,g,c)&&(e=!0);if(e)break;else a++}0<
|
|
330
|
+
this.options.minSpareRows-a&&this.insertRow(this.options.minSpareRows-a)}if(0<this.options.minSpareCols){a=0;for(g=this.options.columns.length-1;0<=g;g--){e=!1;for(c=0;c<this.rows.length;c++)O.call(this,g,c)&&(e=!0);if(e)break;else a++}0<this.options.minSpareCols-a&&this.insertColumn(this.options.minSpareCols-a)}},b=function(){};b.build=function(){var a=this;this.content=document.createElement(_$_be75[32]);this.content.classList.add(_$_be75[361]);this.content.addEventListener(_$_be75[362],function(e){if(!a.edition)return e.preventDefault(),
|
|
331
|
+
!1});this.table=document.createElement(_$_be75[363]);this.thead=document.createElement(_$_be75[364]);this.tbody=document.createElement(_$_be75[365]);this.tfoot=document.createElement(_$_be75[366]);!1===this.options.gridline&&this.table.classList.add(_$_be75[367]);this.headers=[];this.colgroup=[];this.colgroupContainer=document.createElement(_$_be75[368]);var c=document.createElement(_$_be75[196]);c.setAttribute(_$_be75[178],_$_be75[369]);this.colgroupContainer.appendChild(c);this.headerContainer=
|
|
332
|
+
document.createElement(_$_be75[171]);c=document.createElement(_$_be75[173]);c.classList.add(_$_be75[370]);if(1==this.parent.edition)this.options.freezeRowControl&&!this.options.freezeRows&&c.classList.add(_$_be75[359]),this.options.freezeColumnControl&&!this.options.freezeColumns&&c.classList.add(_$_be75[360]);else if(this.options.freezeRowControl||this.options.freezeColumnControl)this.options.freezeRowControl=!1,this.options.freezeColumnControl=!1,console.log(_$_be75[371]);this.headerContainer.appendChild(c);
|
|
333
|
+
this.thead.appendChild(this.headerContainer);this.table.classList.add(_$_be75[372]);this.table.setAttribute(_$_be75[373],_$_be75[119]);this.table.setAttribute(_$_be75[374],_$_be75[119]);this.table.setAttribute(_$_be75[375],_$_be75[376]);this.table.appendChild(this.colgroupContainer);this.table.appendChild(this.thead);this.table.appendChild(this.tbody);this.table.appendChild(this.tfoot);this.options.defaultColAlign&&this.table.classList.add(_$_be75[377]+this.options.defaultColAlign);this.options.textOverflow||
|
|
334
|
+
this.table.classList.add(_$_be75[378]);!1===this.options.selectLockedCells&&this.table.classList.add(_$_be75[379]);this.corner=document.createElement(_$_be75[32]);this.corner.className=_$_be75[380];this.corner.setAttribute(_$_be75[375],_$_be75[381]);this.corner.setAttribute(_$_be75[382],_$_be75[383]);0==this.options.selectionCopy&&(this.corner.style.display=_$_be75[52]);this.scrollX=H.build.call(a,_$_be75[384]);this.scrollY=H.build.call(a,_$_be75[385]);this.content.appendChild(this.scrollX);this.content.appendChild(this.scrollY);
|
|
335
|
+
this.content.appendChild(this.table);this.content.appendChild(this.corner);this.element.appendChild(this.content);1==this.options.tableOverflow&&(this.content.classList.add(_$_be75[67]),this.options.tableHeight||(this.options.tableHeight=document.body.offsetHeight-18),this.options.tableWidth||(this.options.tableWidth=document.body.offsetWidth-18),this.content.style.width=parseInt(this.options.tableWidth)+_$_be75[59],this.options.pagination?this.content.classList.add(_$_be75[386]):this.content.style.height=
|
|
336
|
+
parseInt(this.options.tableHeight)+_$_be75[59]);this.options.resize&&(this.content.style.resize=this.options.resize);this.options.freezeColumns>this.options.columns.length&&console.error(_$_be75[387]);va.build.call(this);ya.build.call(this);Ca.build.call(this);Ha.build.call(this);sa.build.call(this);fa.build.call(this);la.onload.call(this);d.call(this);H.call(this)};b.references=function(a){var c=[],e=[],g=null,f=null,k=null,l=null;for(g=0;g<this.options.columns.length;g++)if(f=this.headers[g])k=
|
|
337
|
+
f.getAttribute(_$_be75[56]),k!=g&&(f.setAttribute(_$_be75[56],g),f.getAttribute(_$_be75[193])||(f.innerHTML=F.getColumnName(g)));for(var n=0;n<this.rows.length;n++)f=this.rows[n],l=f.y,l!=n&&(f.y=n,c[l]=n,f.element&&(f.element.setAttribute(_$_be75[57],n),f.element.children[0].setAttribute(_$_be75[57],n),g=this.options.rows&&this.options.rows[l]&&this.options.rows[l].title?this.options.rows[l].title:n+1,f.element.children[0].innerHTML=g));var q=function(v,w){f=this.records[w][v];k=f.x;l=f.y;k!=v&&
|
|
338
|
+
(f.x=v,f.element&&f.element.setAttribute(_$_be75[56],v));l!=w&&(f.y=w,f.element&&f.element.setAttribute(_$_be75[57],w));if(k!=v||l!=w){var x=F.getColumnNameFromCoords(k,l);v=F.getColumnNameFromCoords(v,w);e[x]=v}};if(a){n=function(v,w){v&&v[w]&&delete v[w]};var p=Object.keys(a);for(g=0;g<p.length;g++)n(this,p[g]),n(this.options.meta,p[g]),n(this.options.cells,p[g]),n(this.options.style,p[g]),n(this.options.comments,p[g])}for(n=0;n<this.rows.length;n++)for(g=0;g<this.options.columns.length;g++)q.call(this,
|
|
339
|
+
g,n);h.call(this,_$_be75[388],c);h.call(this,_$_be75[314],e);h.call(this,_$_be75[315],e);h.call(this,_$_be75[120],e);h.call(this,_$_be75[316],e);h.call(this,_$_be75[296],e);this.options.mergeCells&&sa.build.call(this);G.call(this.parent,_$_be75[389],this,e,a);Z.updateAll.call(this,e,a);Ia.updateAll.call(this,e,a);G.call(this.parent,_$_be75[390],this,e,a);return e};b.update=function(a){a&&d.call(this);if(typeof this.parent.config.updateTable==_$_be75[104])for(var c=0;c<this.rows.length;c++)for(var e=
|
|
340
340
|
0;e<this.options.columns.length;e++)a=this.records[c][e],this.parent.config.updateTable.call(this,this,a.element,e,c,O.call(this,e,c),a.r?a.r:a.v);fa.refresh.call(this)};return b}(),ta=function(){var h={spreadsheet:function(d,b){var a={name:null,config:{},el:d,element:d,plugins:[],worksheets:[],history:[],historyIndex:-1,queue:[],ignoreEvents:!1,ignoreHistory:!1,ignorePersistence:!1};Fa.spreadsheet.call(a,b);a.config.license&&(u.license=a.config.license);d.spreadsheet=a;d.jspreadsheet=d.jexcel=a.worksheets;
|
|
341
|
-
u.spreadsheet.push(a);a.name||(a.name=jSuites.guid());h.bind(a.config.root?a.config.root:document);var c=a.config.tabs;typeof c!==_$
|
|
342
|
-
k)};jSuites.tabs(d,c);d.classList.add(_$
|
|
343
|
-
e.appendChild(na.build(a));e.appendChild(Sa(a));a.textarea=document.createElement(_$
|
|
344
|
-
pa.moveWorksheet;a.getWorksheet=pa.getWorksheet;a.getWorksheetActive=pa.getWorksheetActive;a.getWorksheetInstance=pa.getWorksheetInstance;a.getConfig=function(){var g=a.config;g.worksheets=[];for(var f=0;f<a.worksheets.length;f++)g.worksheets.push(a.worksheets[f].getConfig());return g};a.fullscreen=Na;a.progress=Oa;a.dispatch=G;a.setHistory=R;a.resetHistory=R.reset;a.undo=R.undo;a.redo=R.redo;a.setToolbar=ma[_$
|
|
345
|
-
e;Ia.build.call(a);b.plugins&&ua.call(a,b.plugins);a.setPlugins=function(g){ua.call(a,g)};d=Object.keys(u.extensions);if(d.length)for(c=0;c<d.length;c++)if(typeof u.extensions[d[c]].oninit==_$
|
|
346
|
-
Ka(a);Fa.worksheet.call(a,b);!u.license&&a.options.license&&(u.license=a.options.license);d.element.jexcel=d.element.jexcel?d.worksheets:a;ua.execute.call(a.parent,_$
|
|
347
|
-
_$
|
|
348
|
-
this.records[d]||(this.records[d]=[]);this.options.data[d]||(this.options.data[d]=this.dataType?{}:[]);for(b=0;b<this.options.columns.length;b++)h.cell.call(this,b,d)},cell:function(d,b,a){typeof a==_$
|
|
349
|
-
b[a]==_$
|
|
350
|
-
this))return!1;if(b){if(Array.isArray(d)){a||(a=[]);for(var c=0;c<d.length;c++){a[c]||(a[c]=this.options.columns[d[c]].width);var e=Array.isArray(b)&&b[c]?b[c]:b;this.options.columns[d[c]].width=e;this.colgroup[d[c]]&&this.colgroup[d[c]].setAttribute(_$
|
|
351
|
-
newValue:b});L.call(this,_$
|
|
352
|
-
a+_$
|
|
353
|
-
L.call(this,_$
|
|
354
|
-
g[_$
|
|
355
|
-
this.options.columns.length;k++)f[k]=this.options.columns[k].filters||null;return f};g.open=function(f){d=parseInt(f);if(this.headers[d].classList.contains(_$
|
|
356
|
-
l.children[1].textContent=_$
|
|
357
|
-
this,d,a))&&(a=f);void 0!==a[_$
|
|
358
|
-
d,f)}this.parent.filter.style.display=_$
|
|
359
|
-
(q=!1)}q&&l.push(n)}return l};g.update=function(){za.reset.call(this);this.resetSelection();this.resetBorders();var f=va.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$
|
|
360
|
-
f,!0)};g.hide=function(f){g.updateDOM.call(this,f,!1,!0);g.update.call(this)};g.search=function(f){for(var k=this.parent.filter.children[1];k.children[1];)k.removeChild(k.lastChild);k.currentSelection.firstChild.checked=!1;if(f){e=[];f=new RegExp(f,_$
|
|
361
|
-
Object.keys(a);if(f=this.options.columns[d].filters)for(n=0;n<e.length;n++)a[e[n]].selected=!1,0<=f.indexOf(e[n])&&(a[e[n]].selected=!0);else for(n=0;n<e.length;n++)a[e[n]].selected=!0;k.firstChild.checked=f?!1:!0}for(n=c=0;n<e.length;n++)200>n&&(f=c++,k.appendChild(h(f)))};g.build=function(){var f=document.createElement(_$
|
|
362
|
-
(q=!1);this.children[0].children[0].checked=q};var k=document.createElement(_$
|
|
363
|
-
_$
|
|
364
|
-
q++}}});return n};g.updateDOM=function(f,k,l){var n=this.headers,q=function(p){1==k?n[p].classList.add(_$
|
|
365
|
-
1==k&&g.update.call(this)};return g}(),za=function(){var h={};h[_$
|
|
366
|
-
c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$
|
|
367
|
-
c.options.pagination;e.appendChild(document.createTextNode(E(_$
|
|
368
|
-
return e},b=function(c,e){var g=this.merged.rows;if(g[e]){for(;0<e&&g[e-1];)e--;for(;g[e];)c.push(e++)}else c.push(e)},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,e){null===c?c=this.searchInput.value||_$
|
|
369
|
-
{};for(k=0;k<e.length;k++)p[e[k]]=!0}else p=null;for(k=0;k<this.rows.length;k++){q=!1;if(!p||p[k])for(f=0;f<this.options.columns.length;f++){l=_$
|
|
370
|
-
var e=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$
|
|
371
|
-
za.reset.call(this);H.update.call(this);fa.refresh.call(this)};a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$
|
|
372
|
-
_$
|
|
373
|
-
_$
|
|
374
|
-
k.push({title:E(_$
|
|
375
|
-
e==_$
|
|
376
|
-
d.selectedCell[1],p)})}}),k.push({type:_$
|
|
377
|
-
onclick:function(){d.setHeader(g)}}),d.options.data.length||(k.push({type:_$
|
|
378
|
-
parseInt(a),1)}}),k.push({title:E(_$
|
|
379
|
-
f),v=prompt(E(_$
|
|
380
|
-
function(){h.show.call(d.parent)};d.hideToolbar=function(){h.hide.call(d.parent)};d.refreshToolbar=function(){h.update.call(d.parent,d,d.selectedCell)}};h[_$
|
|
381
|
-
_$
|
|
382
|
-
null,a.options.maxWidth=b,a.refresh()),a.update(d),P.call(this,d)?a.setReadonly(!1):a.setReadonly(!0))};h.build=function(){for(var d=h[_$
|
|
383
|
-
(d.items[b].type=_$
|
|
384
|
-
this.k,this.v)});(b=ua.execute.call(this,_$
|
|
385
|
-
b.push({type:_$
|
|
386
|
-
onchange:function(c,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$
|
|
387
|
-
(f.records[c[1]][c[0]].element.style.textAlign||f.options.defaultColAlign||_$
|
|
388
|
-
c+_$
|
|
389
|
-
u.current.removeMerge(e):u.current.setMerge(e,c[2]-c[0]+1,c[3]-c[1]+1))},tooltip:E(_$
|
|
390
|
-
c[0];w<=c[2];w++){var x=F.getColumnNameFromCoords(w,v);k[x]||(k[x]=_$
|
|
391
|
-
_$
|
|
392
|
-
g.appendChild(f);var k=jSuites.color(f,{closeOnChange:!1,onchange:function(l,n){l.parentNode.children[1].style.color=n;e.color=n}});f=document.createElement(_$
|
|
393
|
-
c.children[1].appendChild(f);f=document.createElement(_$
|
|
394
|
-
b.push({content:_$
|
|
341
|
+
u.spreadsheet.push(a);a.name||(a.name=jSuites.guid());h.bind(a.config.root?a.config.root:document);var c=a.config.tabs;typeof c!==_$_be75[103]&&(c={allowCreate:c?!0:!1,hideHeaders:c?!1:!0,allowChangePosition:a.config.allowMoveWorksheet?!0:!1});c.maxWidth||(c.maxWidth=d.offsetWidth-50+_$_be75[59]);c.animation=void 0==c.animation?!0:c.animation;c.onbeforecreate=function(){a.createWorksheet();return!1};c.onclick=function(g,f,k,l,n){0<=k&&a.openWorksheet(k,!0)};c.onchangeposition=function(g,f,k){a.updateWorksheet(f,
|
|
342
|
+
k)};jSuites.tabs(d,c);d.classList.add(_$_be75[391]);1==b.fullscreen&&d.classList.add(_$_be75[23]);var e=document.createElement(_$_be75[32]);a.toolbar=document.createElement(_$_be75[32]);a.toolbar.className=_$_be75[392];e.appendChild(a.toolbar);a.filter=la.build.call(a);e.appendChild(a.filter);a.helper=document.createElement(_$_be75[32]);a.helper.className=_$_be75[393];e.appendChild(a.helper);a.loading=document.createElement(_$_be75[32]);a.loading.classList.add(_$_be75[394]);e.appendChild(a.loading);
|
|
343
|
+
e.appendChild(na.build(a));e.appendChild(Sa(a));a.textarea=document.createElement(_$_be75[395]);a.textarea.className=_$_be75[396];a.textarea.tabIndex=_$_be75[397];e.appendChild(a.textarea);c.position===_$_be75[398]?d.insertBefore(e,d.children[0]):d.insertBefore(e,d.children[1]);d.appendChild(Ma.call(a,u.license));a.createWorksheet=pa.createWorksheet;a.deleteWorksheet=pa.deleteWorksheet;a.renameWorksheet=pa.renameWorksheet;a.updateWorksheet=pa.updateWorksheet;a.openWorksheet=pa.openWorksheet;a.moveWorksheet=
|
|
344
|
+
pa.moveWorksheet;a.getWorksheet=pa.getWorksheet;a.getWorksheetActive=pa.getWorksheetActive;a.getWorksheetInstance=pa.getWorksheetInstance;a.getConfig=function(){var g=a.config;g.worksheets=[];for(var f=0;f<a.worksheets.length;f++)g.worksheets.push(a.worksheets[f].getConfig());return g};a.fullscreen=Na;a.progress=Oa;a.dispatch=G;a.setHistory=R;a.resetHistory=R.reset;a.undo=R.undo;a.redo=R.redo;a.setToolbar=ma[_$_be75[11]];a.getToolbar=ma[_$_be75[58]];a.showToolbar=ma.show;a.hideToolbar=ma.hide;a.tools=
|
|
345
|
+
e;Ia.build.call(a);b.plugins&&ua.call(a,b.plugins);a.setPlugins=function(g){ua.call(a,g)};d=Object.keys(u.extensions);if(d.length)for(c=0;c<d.length;c++)if(typeof u.extensions[d[c]].oninit==_$_be75[104])u.extensions[d[c]].oninit(a,b);return a},worksheet:function(d,b){var a={};d.worksheets.push(a);a.parent=d;Fa(a);Ua(a);ka(a);ba(a);na(a);Ha(a);Wa(a);sa(a);La(a);Xa(a);oa(a);Z(a);Q(a);da(a);ia(a);Za(a);Ya(a);Da(a);fa(a);ya(a);va(a);la(a);ma(a);xa(a);ab(a);bb(a);Ca(a);pa(a);ca(a);ja(a);Va(a);$a(a);Ia(a);
|
|
346
|
+
Ka(a);Fa.worksheet.call(a,b);!u.license&&a.options.license&&(u.license=a.options.license);d.element.jexcel=d.element.jexcel?d.worksheets:a;ua.execute.call(a.parent,_$_be75[399],[a]);a.onload=function(){this.options.worksheetName||(this.options.worksheetName=_$_be75[400]+pa.nextName());var c=this.options.worksheetName;J(c)&&console.log(_$_be75[401]+c+_$_be75[402]);J(c,a);this.element=d.element.tabs.appendElement(this.options.worksheetName,function(e,g){a.options.worksheetState===_$_be75[112]&&(g.style.display=
|
|
347
|
+
_$_be75[52])});this.element.classList.add(_$_be75[403]);this.element.jexcel=this;ea.build.call(this);ua.execute.call(this.parent,_$_be75[404],[this]);this.options.data&&500<this.options.data.length&&!H.limited.call(this)&&!this.options.pagination&&console.error(_$_be75[405])};return a},row:function(d,b){this.rows[d]||(this.rows[d]={element:null,y:d});b&&(this.rows[d].id=b,xa[_$_be75[11]].call(this,b));this.options.rows&&this.options.rows[d]&&this.options.rows[d].height&&(this.rows[d].height=this.options.rows[d].height);
|
|
348
|
+
this.records[d]||(this.records[d]=[]);this.options.data[d]||(this.options.data[d]=this.dataType?{}:[]);for(b=0;b<this.options.columns.length;b++)h.cell.call(this,b,d)},cell:function(d,b,a){typeof a==_$_be75[21]&&(a=O.call(this,d,b),null===a||void 0===a)&&(a=_$_be75[3],O.call(this,d,b,a));this.records[b][d]||(this.records[b][d]={element:null,x:d,y:b},aa(a)||(this.records[b][d].v=a))},bind:function(d){for(var b=Object.keys(Ea),a=0;a<b.length;a++)(b[a]==_$_be75[406]?window:d).addEventListener(b[a],Ea[b[a]],
|
|
349
|
+
b[a]==_$_be75[407]||b[a]==_$_be75[408]||b[a]==_$_be75[409]?{passive:!1}:{})},unbind:function(d){for(var b=Object.keys(Ea),a=0;a<b.length;a++)(b[a]==_$_be75[406]?window:d).removeEventListener(b[a],Ea[b[a]])}};return h}(),ab=function(){var h=function(d){d.getWidth=h[_$_be75[58]];d.setWidth=h[_$_be75[11]]};h[_$_be75[58]]=function(d){var b=this.options.columns;if(typeof d===_$_be75[21]){d=[];for(var a=0;a<b.length;a++)d.push(b[a].width)}else d=b[d].width;return d};h[_$_be75[11]]=function(d,b,a){if(!P.call(this.parent,
|
|
350
|
+
this))return!1;if(b){if(Array.isArray(d)){a||(a=[]);for(var c=0;c<d.length;c++){a[c]||(a[c]=this.options.columns[d[c]].width);var e=Array.isArray(b)&&b[c]?b[c]:b;this.options.columns[d[c]].width=e;this.colgroup[d[c]]&&this.colgroup[d[c]].setAttribute(_$_be75[178],e)}}else a||(a=this.options.columns[d].width),this.options.columns[d].width=b,this.colgroup[d]&&this.colgroup[d].setAttribute(_$_be75[178],b);this.refreshBorders();R.call(this.parent,{worksheet:this,action:_$_be75[88],column:d,oldValue:a,
|
|
351
|
+
newValue:b});L.call(this,_$_be75[88],{column:d,width:b,oldWidth:a});G.call(this.parent,_$_be75[410],this,d,b,a);H.call(this,!0)}};return h}(),bb=function(){var h=function(b){b.getHeight=h[_$_be75[58]];b.setHeight=h[_$_be75[11]]};h[_$_be75[58]]=function(b){if(void 0===b){b=[];for(var a=0;a<this.rows.length;a++){var c=da.height.call(this,a);c&&(b[a]=c)}}else b=da.height.call(this,b);return b};var d=function(b,a){a=parseInt(a);var c=da.height.call(this,b);this.rows[b].element&&(this.rows[b].element.style.height=
|
|
352
|
+
a+_$_be75[59]);this.options.rows[b]||(this.options.rows[b]={});this.options.rows[b].height=a;this.rows[b].height=a;return c};h[_$_be75[11]]=function(b,a,c){if(!P.call(this.parent,this))return!1;var e,g=typeof c==_$_be75[21]?!0:!1;if(a){if(Array.isArray(b))for(!0===g&&(c=[]),e=0;e<b.length;e++){var f=Array.isArray(a)&&a[e]?a[e]:a;d.call(this,b[e],f);1==g&&c.push(g)}else e=d.call(this,b,a),1==g&&(c=e);this.refreshBorders();R.call(this.parent,{worksheet:this,action:_$_be75[89],row:b,oldValue:c,newValue:a});
|
|
353
|
+
L.call(this,_$_be75[89],{row:b,height:a,oldHeight:c});G.call(this.parent,_$_be75[411],this,b,a,c);H.call(this,!0)}};return h}(),la=function(){var h=function(f){var k=e[f];f=a[e[f]];if(!f.element){f.element=document.createElement(_$_be75[412]);f.element.innerHTML=f.value;var l=document.createElement(_$_be75[251]);l.type=_$_be75[283];l.value=k;l.o=f;f.element.insertBefore(l,f.element.firstChild)}f.element.firstChild.checked=f.selected;return f.element},d=null,b=null,a=[],c=0,e=null,g=function(f){f.setFilter=
|
|
354
|
+
g[_$_be75[11]];f.getFilter=g[_$_be75[58]];f.openFilter=g.open;f.closeFilter=g.close;f.resetFilters=g.reset;f.showFilter=g.show;f.hideFilter=g.hide};g.isVisible=function(){return b};g[_$_be75[11]]=function(f,k){var l=this.headers[f];f=this.options.columns[f];Array.isArray(k)&&0<k.length?(l&&l.classList.add(_$_be75[413]),f.filters=k):(l&&l.classList.remove(_$_be75[413]),f.filters=null);g.update.call(this)};g[_$_be75[58]]=function(f){if(f)return this.options.columns[f].filters||null;f={};for(var k=0;k<
|
|
355
|
+
this.options.columns.length;k++)f[k]=this.options.columns[k].filters||null;return f};g.open=function(f){d=parseInt(f);if(this.headers[d].classList.contains(_$_be75[198])){b=!0;var k=this.parent.element.getBoundingClientRect(),l=this.headers[d].getBoundingClientRect();f=l.left-k.left;var n=l.top-k.top+l.height;l=this.parent.filter;k=k.left+k.width;l.style.display=_$_be75[24];f+l.offsetWidth>k&&(f=k-(l.offsetWidth+18));l.style.top=n+_$_be75[59];l.style.left=f+_$_be75[59];l.children[0].focus();f=l.children[1].selectAll;
|
|
356
|
+
l.children[1].textContent=_$_be75[3];l.children[1].appendChild(f);f.children[0].checked=this.options.columns[d].filters?!1:!0;f=va.execute.call(this,null,d);f=F.invert(f);l=[];for(k=0;k<this.rows.length;k++)if(f[k]){n=_$_be75[3]+O.call(this,d,k);var q=_$_be75[3]+oa.processed.call(this,d,k,!0);n.substr(0,1)==_$_be75[18]&&(n=q);l.push([n,q])}l.sort(function(p,v){return p[0]>v[0]?1:p[0]<v[0]?-1:0});a=[];for(k=0;k<l.length;k++)a[l[k][0]]={value:l[k][1],element:null};(f=G.call(this.parent,_$_be75[415],
|
|
357
|
+
this,d,a))&&(a=f);void 0!==a[_$_be75[3]]&&(delete a[_$_be75[3]],a[_$_be75[3]]={value:_$_be75[241]+E(_$_be75[416])+_$_be75[263],element:null});g.search.call(this,_$_be75[3])}else console.log(_$_be75[414])};g.close=function(f){if(f){f=this.parent.filter.children[1];if(1==f.selectAll.firstChild.checked&&e.length==Object.keys(a).length)f=null;else{f=1==f.currentSelection.firstChild.checked?this.options.columns[d].filters||[]:[];for(var k=0;k<e.length;k++)a[e[k]].selected&&f.push(e[k])}g[_$_be75[11]].call(this,
|
|
358
|
+
d,f)}this.parent.filter.style.display=_$_be75[3];this.parent.filter.children[0].value=_$_be75[3];d=null;b=!1;a=null;c=0;e=null};g.reset=function(f){g.updateDOM.call(this,f,!1);za.reset.call(this);g.update.call(this)};g.execute=function(f){for(var k=this.options.columns,l=[],n=0;n<this.options.data.length;n++){for(var q=!0,p=0;p<k.length;p++)if(k[p].filters&&f!==p){var v=_$_be75[3]+O.call(this,p,n),w=_$_be75[3]+this.getLabelFromCoords(p,n,!0);-1==k[p].filters.indexOf(v)&&-1==k[p].filters.indexOf(w)&&
|
|
359
|
+
(q=!1)}q&&l.push(n)}return l};g.update=function(){za.reset.call(this);this.resetSelection();this.resetBorders();var f=va.execute.call(this,null);if(typeof this.parent.config.onbeforefilter==_$_be75[104]){var k=g[_$_be75[58]].call(this),l=G.call(this.parent,_$_be75[417],this,k,f);if(l)f=l;else if(!1===l)return!1}this.pageNumber=0;f&&f.length<this.rows.length&&za[_$_be75[11]].call(this,f);fa.refresh.call(this);H.call(this,!0);G.call(this.parent,_$_be75[418],this,k,f)};g.show=function(f){g.updateDOM.call(this,
|
|
360
|
+
f,!0)};g.hide=function(f){g.updateDOM.call(this,f,!1,!0);g.update.call(this)};g.search=function(f){for(var k=this.parent.filter.children[1];k.children[1];)k.removeChild(k.lastChild);k.currentSelection.firstChild.checked=!1;if(f){e=[];f=new RegExp(f,_$_be75[419]);for(var l=Object.keys(a),n=0;n<l.length;n++)a[l[n]]&&(_$_be75[3]+a[l[n]].value).match(f)?(e.push(l[n]),a[l[n]].selected=!0):a[l[n]].selected=!1;e.length&&this.options.columns[d].filters&&(k.firstChild.checked=!0,k.appendChild(k.currentSelection))}else{e=
|
|
361
|
+
Object.keys(a);if(f=this.options.columns[d].filters)for(n=0;n<e.length;n++)a[e[n]].selected=!1,0<=f.indexOf(e[n])&&(a[e[n]].selected=!0);else for(n=0;n<e.length;n++)a[e[n]].selected=!0;k.firstChild.checked=f?!1:!0}for(n=c=0;n<e.length;n++)200>n&&(f=c++,k.appendChild(h(f)))};g.build=function(){var f=document.createElement(_$_be75[32]);f.className=_$_be75[420];f.onclick=function(q){q.target.tagName==_$_be75[421]&&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||
|
|
362
|
+
(q=!1);this.children[0].children[0].checked=q};var k=document.createElement(_$_be75[251]);k.type=_$_be75[71];k.placeholder=E(_$_be75[422]);k.classList.add(_$_be75[423]);k.classList.add(_$_be75[252]);var l=document.createElement(_$_be75[251]);l.type=_$_be75[424];l.value=_$_be75[425];l.className=_$_be75[426];var n=document.createElement(_$_be75[32]);n.className=_$_be75[427];n.appendChild(k);n.appendChild(f);n.appendChild(l);f.currentSelection=document.createElement(_$_be75[412]);f.currentSelection.innerHTML=
|
|
363
|
+
_$_be75[428]+E(_$_be75[429]);f.selectAll=document.createElement(_$_be75[412]);f.selectAll.innerHTML=_$_be75[430]+E(_$_be75[431])+_$_be75[263];f.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++)a[e[p]].selected=!0;else for(q=Object.keys(a),p=0;p<q.length;p++)a[q[p]].selected=!1};jSuites.lazyLoading(f,{loadDown:function(q){for(q=0;c<e.length-1&&10>q;){var p=c++;f.appendChild(h(p));
|
|
364
|
+
q++}}});return n};g.updateDOM=function(f,k,l){var n=this.headers,q=function(p){1==k?n[p].classList.add(_$_be75[198]):(this.options.columns[p].filters=null,n[p].classList.remove(_$_be75[413]),1==l&&n[p].classList.remove(_$_be75[198]))};if(f)q.call(this,f);else for(f=0;f<n.length;f++)q.call(this,f)};g.onload=function(){var f,k=!1;if(f=this.options.columns)for(var l=0;l<f.length;l++)Array.isArray(f[l].filters)&&0<f[l].filters.length&&this.headers[l]&&(this.headers[l].classList.add(_$_be75[413]),k=!0);
|
|
365
|
+
1==k&&g.update.call(this)};return g}(),za=function(){var h={};h[_$_be75[11]]=function(d){for(var b=0;b<d.length;b++)this.rows[d[b]].results=!0;this.results=d};h.reset=function(){for(var d=0;d<this.rows.length;d++)!0===this.rows[d].results&&delete this.rows[d].results;this.results=null};h.refresh=function(){for(var d=[],b=0;b<this.rows.length;b++)!0===this.rows[b].results&&d.push(b);return d};return h}(),va=function(){var h=function(c){var e=document.createElement(_$_be75[32]);if(0<c.options.pagination&&
|
|
366
|
+
c.options.paginationOptions&&0<c.options.paginationOptions.length){c.paginationDropdown=document.createElement(_$_be75[432]);c.paginationDropdown.classList.add(_$_be75[433]);c.paginationDropdown.onchange=function(){c.options.pagination=parseInt(this.value);c.page(0)};for(var g=0;g<c.options.paginationOptions.length;g++){var f=document.createElement(_$_be75[434]);f.value=c.options.paginationOptions[g];f.innerHTML=c.options.paginationOptions[g];c.paginationDropdown.appendChild(f)}c.paginationDropdown.value=
|
|
367
|
+
c.options.pagination;e.appendChild(document.createTextNode(E(_$_be75[435])));e.appendChild(c.paginationDropdown);e.appendChild(document.createTextNode(E(_$_be75[436])))}return e},d=function(c){var e=document.createElement(_$_be75[32]);e.innerHTML=E(_$_be75[422])+_$_be75[137];c.searchInput=document.createElement(_$_be75[251]);c.searchInput.classList.add(_$_be75[437]);c.searchInput.classList.add(_$_be75[252]);c.searchInput.oninput=function(){this.parentNode.classList.add(_$_be75[438])};e.appendChild(c.searchInput);
|
|
368
|
+
return e},b=function(c,e){var g=this.merged.rows;if(g[e]){for(;0<e&&g[e-1];)e--;for(;g[e];)c.push(e++)}else c.push(e)},a=function(c){c.search=a.update;c.resetSearch=a.reset;c.updateSearch=a.refresh;c.showSearch=a.show;c.hideSearch=a.hide};a.execute=function(c,e){null===c?c=this.searchInput.value||_$_be75[3]:c!==this.searchInput.value&&(this.searchInput.value=c);this.pageNumber=0;var g=[],f=null,k=null,l=null,n=null,q=null;e=la.execute.call(this,e);if(c)try{c=new RegExp(c,_$_be75[419]);if(e&&e.length){var p=
|
|
369
|
+
{};for(k=0;k<e.length;k++)p[e[k]]=!0}else p=null;for(k=0;k<this.rows.length;k++){q=!1;if(!p||p[k])for(f=0;f<this.options.columns.length;f++){l=_$_be75[3]+O.call(this,f,k);if(l.match(c)){q=!0;break}n=_$_be75[3]+this.getLabelFromCoords(f,k);if(n.match(c)){q=!0;break}}1==q&&b.call(this,g,k)}}catch(v){}else g=e;if(g.length){for(k=0;k<this.rows.length;k++)!0===this.rows[k].results&&g.push(k);g.sort(function(v,w){return v-w})}return g};a.update=function(c){za.reset.call(this);this.resetSelection();this.resetBorders();
|
|
370
|
+
var e=a.execute.call(this,c);if(typeof this.parent.config.onbeforesearch==_$_be75[104]){var g=G.call(this.parent,_$_be75[439],this,c,e);if(g)e=g;else if(!1===g)return!1}this.pageNumber=0;e&&e.length<this.rows.length&&za[_$_be75[11]].call(this,e);fa.refresh.call(this);H.call(this,!0);G.call(this.parent,_$_be75[440],this,c,e);this.searchInput.parentNode.classList.remove(_$_be75[438])};a.refresh=function(){H.update.call(this);fa.refresh.call(this)};a.reset=function(){this.searchInput.value=_$_be75[3];
|
|
371
|
+
za.reset.call(this);H.update.call(this);fa.refresh.call(this)};a.show=function(){this.options.search=!0;this.searchContainer.style.display=_$_be75[3]};a.hide=function(){this.options.search=!1;this.searchContainer.style.display=_$_be75[52]};a.build=function(){this.searchContainer=document.createElement(_$_be75[32]);this.searchContainer.classList.add(_$_be75[441]);this.searchContainer.appendChild(h(this));this.searchContainer.appendChild(d(this));0==this.options.search&&(this.searchContainer.style.display=
|
|
372
|
+
_$_be75[52]);this.element.insertBefore(this.searchContainer,this.element.firstChild)};return a}(),Sa=function(){var h=function(d){d.contextmenu=document.createElement(_$_be75[32]);d.contextmenu.className=_$_be75[442];jSuites.contextmenu(d.contextmenu,{onclick:function(b,a,c){b.close()}});return d.contextmenu};h.open=function(d,b){if(b[0]===_$_be75[443])var a=b[1],c=b[2];else b[0]===_$_be75[444]?(a=null,c=b[1]):b[0]===_$_be75[445]&&(a=b[1],c=null);var e=h[_$_be75[58]](this,a,c,d,b[0],b[1],b[2]);if(typeof this.parent.config.contextMenu==
|
|
373
|
+
_$_be75[104]){var g=this.parent.config.contextMenu(this,a,c,d,e,b[0],b[1],b[2]);if(g)e=g;else if(!1===g)return!1}d.preventDefault();g=ua.execute.call(this.parent,_$_be75[105],[this,a,c,d,e,b[0],b[1],b[2]]);e=g[4];this.parent.contextmenu.contextmenu.open(d,e)};h.isOpened=function(){return this.parent.contextmenu.contextmenu.isOpened()};h[_$_be75[58]]=function(d,b,a,c,e,g,f){var k=[],l=d.parent.config,n=-1!=navigator.userAgent.indexOf(_$_be75[446])?_$_be75[447]:_$_be75[448];e==_$_be75[449]&&(1==l.allowRenameWorksheet&&
|
|
374
|
+
k.push({title:E(_$_be75[450]),onclick:function(){var p=prompt(E(_$_be75[450]),c.target.innerText);p&&d.parent.renameWorksheet(g,p)}}),1==l.allowDeleteWorksheet&&k.push({title:E(_$_be75[451]),onclick:function(){confirm(E(_$_be75[452]),c.target.innerText)&&d.parent.deleteWorksheet(g)}}),k.push({type:_$_be75[453]}));e==_$_be75[454]&&(k.push({title:E(_$_be75[455]),onclick:function(){var p=prompt(E(_$_be75[455]),c.target.innerText);d.setNestedCell(g,f,{title:p})}}),k.push({type:_$_be75[453]}));if(e==_$_be75[445]||
|
|
375
|
+
e==_$_be75[444]||e==_$_be75[443]||e==_$_be75[454])k.push({title:E(_$_be75[456]),icon:_$_be75[457],shortcut:n+_$_be75[458],onclick:function(){d.cut()}}),k.push({title:E(_$_be75[459]),icon:_$_be75[460],shortcut:n+_$_be75[461],onclick:function(){d.copy()}}),navigator&&navigator.clipboard&&navigator.clipboard.readText&&k.push({title:E(_$_be75[462]),icon:_$_be75[463],shortcut:n+_$_be75[464],onclick:function(){d.selectedCell&&navigator.clipboard.readText().then(function(p){p&&d.paste(d.selectedCell[0],
|
|
376
|
+
d.selectedCell[1],p)})}}),k.push({type:_$_be75[453]});e==_$_be75[445]&&(1==d.options.allowInsertColumn&&k.push({title:E(_$_be75[465]),onclick:function(){d.insertColumn(1,parseInt(g),1)}}),1==d.options.allowInsertColumn&&k.push({title:E(_$_be75[466]),onclick:function(){d.insertColumn(1,parseInt(g),0)}}),1==d.options.allowDeleteColumn&&k.push({title:E(_$_be75[467]),onclick:function(){d.deleteColumn(d.getSelectedColumns().length?void 0:parseInt(b))}}),1==d.options.allowRenameColumn&&k.push({title:E(_$_be75[468]),
|
|
377
|
+
onclick:function(){d.setHeader(g)}}),d.options.data.length||(k.push({type:_$_be75[453]}),k.push({title:E(_$_be75[469]),onclick:function(){d.insertRow(0)}})),1==d.options.columnSorting&&(k.push({type:_$_be75[453]}),k.push({title:E(_$_be75[470]),onclick:function(){d.orderBy(g,0)}}),k.push({title:E(_$_be75[471]),onclick:function(){d.orderBy(g,1)}}),k.push({type:_$_be75[453]})));if(e==_$_be75[443]||e==_$_be75[444])1==d.options.allowInsertRow&&(k.push({title:E(_$_be75[472]),onclick:function(){d.insertRow(1,
|
|
378
|
+
parseInt(a),1)}}),k.push({title:E(_$_be75[473]),onclick:function(){d.insertRow(1,parseInt(a))}})),1==d.options.allowDeleteRow&&k.push({title:E(_$_be75[474]),onclick:function(){d.deleteRow(d.getSelectedRows().length?void 0:parseInt(a))}}),k.push({type:_$_be75[453]});if(e==_$_be75[443]&&1==d.options.allowComments){var q=d.records[f][g].element.getAttribute(_$_be75[297])||_$_be75[3];k.push({title:q?E(_$_be75[475]):E(_$_be75[476]),icon:_$_be75[477],onclick:function(){var p=F.getColumnNameFromCoords(g,
|
|
379
|
+
f),v=prompt(E(_$_be75[478]),q);v&&d.setComments(p,v)}});q&&k.push({title:E(_$_be75[479]),onclick:function(){var p=F.getColumnNameFromCoords(g,f);d.setComments(p,_$_be75[3])}});k.push({type:_$_be75[453]})}l.allowExport&&k.push({title:E(_$_be75[480]),icon:_$_be75[481],shortcut:n+_$_be75[482],onclick:function(){d.download()}});l.about&&k.push({title:E(_$_be75[483]),icon:_$_be75[484],onclick:function(){!0===l.about?alert(N().print()):alert(l.about)}});return k};return h}(),ma=function(){var h=function(d){d.showToolbar=
|
|
380
|
+
function(){h.show.call(d.parent)};d.hideToolbar=function(){h.hide.call(d.parent)};d.refreshToolbar=function(){h.update.call(d.parent,d,d.selectedCell)}};h[_$_be75[11]]=function(d){this.toolbar.innerHTML=_$_be75[3];this.config.toolbar=h[_$_be75[58]].call(this,d);h.show.call(this)};h[_$_be75[58]]=function(d){d||(d=this.config.toolbar);var b=h.getDefault(d);d?Array.isArray(d)?d={items:d}:typeof d===_$_be75[104]&&(d=d({items:b})):d={};typeof d!==_$_be75[103]&&(d={});d.items||(d.items=b);typeof d.responsive==
|
|
381
|
+
_$_be75[21]&&(d.responsive=!0,d.bottom=!1,d.maxWidth=this.element.offsetWidth);return d};h.show=function(){this.toolbar.innerHTML||h.build.call(this);this.toolbar.style.display=_$_be75[3];this.element.classList.add(_$_be75[485])};h.hide=function(){this.toolbar.style.display=_$_be75[52];this.element.classList.remove(_$_be75[485])};h.update=function(d,b){var a=this.toolbarInstance;a&&(a.options.responsive&&(b=this.config.fullscreen?d.element.offsetWidth:d.options.tableWidth?parseInt(d.options.tableWidth):
|
|
382
|
+
null,a.options.maxWidth=b,a.refresh()),a.update(d),P.call(this,d)?a.setReadonly(!1):a.setReadonly(!0))};h.build=function(){for(var d=h[_$_be75[58]].call(this),b=0;b<d.items.length;b++)if(d.items[b].type==_$_be75[432]){if(!d.items[b].options&&d.items[b].v){d.items[b].options=[];for(var a=0;a<d.items[b].v.length;a++)d.items[b].options.push(d.items[b].v[a]);d.items[b].k&&(d.items[b].onchange=function(c,e,g,f){u.current.setStyle(u.current.getSelected(!1,!0),g.k,f)})}}else d.items[b].type==_$_be75[288]?
|
|
383
|
+
(d.items[b].type=_$_be75[486],d.items[b].onclick=function(c,e,g){if(!g.color){var f=null;jSuites.color(g,{onchange:function(k,l){(f=u.current.getSelected(!1,!0))&&u.current.setStyle(f,g.k,l)},onopen:function(k){var l;u.current.cursor?(l=u.current.cursor.style[g.k])?k.color.select(k.color.toHex(l)):k.color.select(_$_be75[3]):k.color.select(_$_be75[3])}});g.color.open()}}):!d.items[b].onclick&&d.items[b].k&&(d.items[b].onclick=function(){var c=u.current.getSelected(!1,!0);c&&c.length&&u.current.setStyle(c,
|
|
384
|
+
this.k,this.v)});(b=ua.execute.call(this,_$_be75[106],[d]))&&(d=b[0]);this.toolbarInstance=jSuites.toolbar(this.toolbar,d);this.toolbarInstance.application=this;d=this.element.tabs.getActive();this.toolbarInstance.update(this.worksheets[d])};h.getDefault=function(d){var b=[];b.push({content:_$_be75[487],onclick:function(){u.current&&u.current.undo()}});b.push({content:_$_be75[488],onclick:function(){u.current&&u.current.redo()}});b.push({content:_$_be75[481],onclick:function(){u.current&&u.current.download()}});
|
|
385
|
+
b.push({type:_$_be75[489]});b.push({type:_$_be75[432],width:_$_be75[490],options:[_$_be75[491],_$_be75[492],_$_be75[493]],render:function(c){return _$_be75[494]+c+_$_be75[258]+c+_$_be75[495]},onchange:function(c,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_be75[496],f)}});b.push({type:_$_be75[432],width:_$_be75[497],content:_$_be75[498],options:[_$_be75[499],_$_be75[500],_$_be75[501],_$_be75[502],_$_be75[503]],render:function(c){return _$_be75[504]+c+_$_be75[258]+c+_$_be75[495]},
|
|
386
|
+
onchange:function(c,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_be75[505],f)}});b.push({type:_$_be75[432],options:[_$_be75[506],_$_be75[507],_$_be75[508],_$_be75[509]],render:function(c){return _$_be75[510]+c+_$_be75[511]},onchange:function(c,e,g,f){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_be75[512],f.split(_$_be75[513])[2])},updateState:function(c,e,g,f){(c=f.selectedCell)&&c.length&&f.records[c[1]][c[0]].element&&(f=this.picker.options.data.indexOf(_$_be75[514]+
|
|
387
|
+
(f.records[c[1]][c[0]].element.style.textAlign||f.options.defaultColAlign||_$_be75[210])),g.picker.setValue(f))}});b.push({type:_$_be75[486],content:_$_be75[515],k:_$_be75[516],v:_$_be75[517]});b.push({type:_$_be75[288],content:_$_be75[518],k:_$_be75[288]});b.push({type:_$_be75[288],content:_$_be75[519],k:_$_be75[520]});if(d===_$_be75[521]||typeof d===_$_be75[104]){var a=[_$_be75[522],_$_be75[523],_$_be75[398]];b.push({type:_$_be75[432],options:[_$_be75[524],_$_be75[525],_$_be75[526]],render:function(c){return _$_be75[510]+
|
|
388
|
+
c+_$_be75[511]},value:1,onchange:function(c,e,g,f,k){u.current&&u.current.setStyle(u.current.getSelected(!1,!0),_$_be75[527],a[k])},updateState:function(c,e,g,f){(c=f.selectedCell)&&c.length&&f.records[c[1]][c[0]].element&&(f=a.indexOf(f.records[c[1]][c[0]].element.style.verticalAlign||_$_be75[523]),g.picker.setValue(f))}});b.push({content:_$_be75[528],onclick:function(c,e,g){u.current&&(c=u.current.getHighlighted())&&c.length&&(e=u.helpers.getColumnNameFromCoords(c[0],c[1]),u.current.records[c[1]][c[0]].merged?
|
|
389
|
+
u.current.removeMerge(e):u.current.setMerge(e,c[2]-c[0]+1,c[3]-c[1]+1))},tooltip:E(_$_be75[529])})}b.push({type:_$_be75[432],data:[_$_be75[530],_$_be75[531],_$_be75[532],_$_be75[533],_$_be75[534],_$_be75[535],_$_be75[536],_$_be75[537],_$_be75[538],_$_be75[539]],columns:5,render:function(c){return _$_be75[510]+c+_$_be75[511]},right:!0,onchange:function(c,e,g,f,k){if(c=u.current.getHighlighted()){g=e.thickness||1;e=e.color||_$_be75[540];k={};for(var l=c[0],n=c[1],q=c[2],p=c[3],v=c[1];v<=c[3];v++)for(var w=
|
|
390
|
+
c[0];w<=c[2];w++){var x=F.getColumnNameFromCoords(w,v);k[x]||(k[x]=_$_be75[3]);k[x]=f!=_$_be75[535]&&f!=_$_be75[531]||w!=l?(f==_$_be75[532]||f==_$_be75[534])&&w>l?k[x]+(_$_be75[541]+g+_$_be75[542]+e+_$_be75[332]):f==_$_be75[530]?k[x]+(_$_be75[541]+g+_$_be75[542]+e+_$_be75[332]):k[x]+_$_be75[543]:k[x]+(_$_be75[541]+g+_$_be75[542]+e+_$_be75[332]);k[x]=f!=_$_be75[530]&&f!=_$_be75[537]&&f!=_$_be75[531]||w!=q?k[x]+_$_be75[545]:k[x]+(_$_be75[544]+g+_$_be75[542]+e+_$_be75[332]);k[x]=f!=_$_be75[536]&&f!=
|
|
391
|
+
_$_be75[531]||v!=n?(f==_$_be75[532]||f==_$_be75[533])&&v>n?k[x]+(_$_be75[546]+g+_$_be75[542]+e+_$_be75[332]):f==_$_be75[530]?k[x]+(_$_be75[546]+g+_$_be75[542]+e+_$_be75[332]):k[x]+_$_be75[547]:k[x]+(_$_be75[546]+g+_$_be75[542]+e+_$_be75[332]);k[x]=f!=_$_be75[530]&&f!=_$_be75[538]&&f!=_$_be75[531]||v!=p?k[x]+_$_be75[549]:k[x]+(_$_be75[548]+g+_$_be75[542]+e+_$_be75[332])}Object.keys(k)&&u.current.setStyle(k,null,null,!0)}},onload:function(c,e){var g=document.createElement(_$_be75[32]),f=document.createElement(_$_be75[32]);
|
|
392
|
+
g.appendChild(f);var k=jSuites.color(f,{closeOnChange:!1,onchange:function(l,n){l.parentNode.children[1].style.color=n;e.color=n}});f=document.createElement(_$_be75[486]);f.classList.add(_$_be75[550]);f.innerHTML=_$_be75[551];f.onclick=function(){k.open()};g.appendChild(f);c.children[1].appendChild(g);f=document.createElement(_$_be75[32]);jSuites.picker(f,{type:_$_be75[432],data:[1,2,3,4,5],render:function(l){return _$_be75[552]+l+_$_be75[553]},onchange:function(l,n,q,p){e.thickness=p},width:_$_be75[554]});
|
|
393
|
+
c.children[1].appendChild(f);f=document.createElement(_$_be75[32]);f.style.flex=_$_be75[555];c.children[1].appendChild(f)}});b.push({type:_$_be75[489]});b.push({content:_$_be75[23],onclick:function(c,e,g){g.children[0].innerText==_$_be75[23]?(u.current.fullscreen(!0),g.children[0].innerText=_$_be75[556]):(u.current.fullscreen(!1),g.children[0].innerText=_$_be75[23])},tooltip:_$_be75[557],updateState:function(c,e,g,f){g.children[0].innerText=1==f.parent.config.fullscreen?_$_be75[556]:_$_be75[23]}});
|
|
394
|
+
b.push({content:_$_be75[558],onclick:function(c,e,g){u.current&&u.current.parent.tools.search?u.current.parent.tools.search.open(!0):g.children[0].innerText==_$_be75[558]?(va.show.call(u.current),g.children[0].innerText=_$_be75[559]):(va.hide.call(u.current),g.children[0].innerText=_$_be75[558])},tooltip:_$_be75[560],updateState:function(c,e,g,f){g.children[0].innerText=1==f.options.search?_$_be75[559]:_$_be75[558]}});return b};return h}(),pa=function(){var h=function(d){d.createWorksheet=function(b){return d.parent.createWorksheet(b)};
|
|
395
395
|
d.deleteWorksheet=function(b){return d.parent.deleteWorksheet(b)};d.renameWorksheet=function(b,a){return d.parent.renameWorksheet(b,a)};d.moveWorksheet=function(b,a){return d.parent.moveWorksheet(b,a)};d.openWorksheet=function(){return d.parent.openWorksheet(d.parent.getWorksheet(d))};d.getWorksheet=function(b){return d.parent.getWorksheet(b)};d.getWorksheetActive=function(){return d.parent.getWorksheetActive()};d.getWorksheetName=function(){return d.options.worksheetName.toUpperCase()}};h.nextName=
|
|
396
|
-
function(){var d=1,b,a=u.spreadsheet;if(a.length)for(var c=0;c<a.length;c++){var e=a[c].worksheets;if(e.length)for(var g=0;g<e.length;g++)e[g].options.worksheetName&&(b=e[g].options.worksheetName.match(/(\d+)/))&&(b=parseInt(b[0])+1,b>d&&(d=b))}return d};h.createWorksheet=function(d){if(!P.call(this))return!1;d||(d={});var b=this.worksheets.length,a=G.call(this,_$
|
|
397
|
-
(d.worksheetId=jSuites.guid().substring(0,8));d.worksheetName||(d.worksheetName=_$
|
|
398
|
-
this.worksheets.splice(d,1);L.call(b,_$
|
|
399
|
-
L.call(a,_$
|
|
400
|
-
!b||u.current&&u.current==b||(this.element.tabs.getActive()!=d?this.element.tabs.open(d):this.element.tabs.setBorder(d),u.current&&u.current.resetSelection(),u.current=b,u.current.refreshBorders(),h.state.call(this,d),ma.update.call(this,u.current),G.call(this,_$
|
|
401
|
-
function(){return this.element.tabs.getActive()};h.getWorksheetInstance=function(d){return d===_$
|
|
402
|
-
return h}(),F=function(){var h={getCaretIndex:function(d){var b=0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(b=a.getRangeAt(0),a=b.cloneRange(),a.selectNodeContents(d),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(d){for(var b=[],a=Object.keys(d),c=0;c<a.length;c++)b[d[a[c]]]=a[c];return b},getColumnName:function(d){var b=_$
|
|
403
|
-
676/26))):25<d&&(b+=String.fromCharCode(64+parseInt(d/26)));return b+=String.fromCharCode(65+d%26)},getColumnNameFromCoords:function(d,b){return h.getColumnName(parseInt(d))+(parseInt(b)+1)},getCoordsFromColumnName:function(d){if(!d)return[];d=(_$
|
|
404
|
-
h.shiftFormula=Z.shiftFormula;h.updateWorksheetName=Z.updateWorksheetName;h.createFromTable=function(d,b){if(d.tagName!=_$
|
|
405
|
-
b.columns[c].type=A.getAttribute(_$
|
|
406
|
-
{title:f[a].children[c].innerText,colspan:f[a].children[c].getAttribute(_$
|
|
407
|
-
x=F.getColumnNameFromCoords(c,a);(w=k[a].children[c].getAttribute(_$
|
|
408
|
-
k[a].style.height&&(q[a]={height:k[a].style.height});l++}else for(c=0;c<k[a].children.length;c++)e(k[a].children[c]);0<Object.keys(g).length&&(b.nestedHeaders=g);0<Object.keys(p).length&&(b.style=p);0<Object.keys(n).length&&(b.mergeCells=n);0<Object.keys(q).length&&(b.rows=q);0<Object.keys(v).length&&(b.classes=v);k=d.querySelectorAll(_$
|
|
409
|
-
(b.footers=d)}if(1==b.parseTableAutoCellType)for(d=[],c=0;c<b.columns.length;c++){g=e=!0;d[c]=[];for(a=0;a<b.data.length;a++)if(x=b.data[a][c],d[c][x]||(d[c][x]=0),d[c][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$
|
|
410
|
-
b).concat(a).concat(d.slice(b))};h.parseCSV=function(d,b){b=b||_$
|
|
411
|
-
1]==_$
|
|
412
|
-
return h}(),Ea=function(){var h={},d=null,b=null,a=null,c=null,e=!1,g=null,f=null,k=null,l=function(r){function B(V){V.className&&(V.classList.contains(_$
|
|
413
|
-
K=null,X=null,Y=null;B(r.target);if(null!==U)return!1;if(M)if(r.target.classList.contains(_$
|
|
414
|
-
(D=_$
|
|
415
|
-
3<K&&20>K&&(D=_$
|
|
416
|
-
B.spreadsheet.config.root:document;if(B.elementsFromPoint)var D=B.elementsFromPoint(C,r);else B.msElementsFromPoint&&(D=B.msElementsFromPoint(C,r));for(B=0;B<D.length;B++)if(C=D[B].getAttribute(_$
|
|
417
|
-
B[1].jexcel):u.current!=B[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=B[1].jexcel):u.current||(r=B[0].tabs.getActive(),0<=r&&(u.current=B[0].spreadsheet.worksheets[r])):u.current&&!jSuites.findElement(r.target,_$
|
|
418
|
-
h.keydown=function(r){if(u.current){r.target.tagName==_$
|
|
419
|
-
g&&clearTimeout(g);g=setTimeout(function(){la.search.call(u.current,B.value);g=null},500)}else if(r.target.classList.contains(_$
|
|
420
|
-
u.current.options.columns[C].type!=_$
|
|
396
|
+
function(){var d=1,b,a=u.spreadsheet;if(a.length)for(var c=0;c<a.length;c++){var e=a[c].worksheets;if(e.length)for(var g=0;g<e.length;g++)e[g].options.worksheetName&&(b=e[g].options.worksheetName.match(/(\d+)/))&&(b=parseInt(b[0])+1,b>d&&(d=b))}return d};h.createWorksheet=function(d){if(!P.call(this))return!1;d||(d={});var b=this.worksheets.length,a=G.call(this,_$_be75[561],d,b);if(typeof a===_$_be75[103])d=a;else if(!1===a)return!1;d.data||d.minDimensions||(d.minDimensions=[8,8]);d.worksheetId||
|
|
397
|
+
(d.worksheetId=jSuites.guid().substring(0,8));d.worksheetName||(d.worksheetName=_$_be75[400]+h.nextName());if(J(d.worksheetName))jSuites.notification({error:_$_be75[555],message:_$_be75[562]});else return a=ta.worksheet(this,d),a.onload(),u.current&&u.current.resetSelection(),u.current=a,L.call(a,_$_be75[563],[d]),ma.update.call(this,u.current),G.call(this,_$_be75[564],a,d,b),a};h.deleteWorksheet=function(d){var b=this.worksheets[d];if(!P.call(this,b))return!1;J(b.options.worksheetName,null);this.element.tabs.deleteElement(d);
|
|
398
|
+
this.worksheets.splice(d,1);L.call(b,_$_be75[565],[d]);G.call(this,_$_be75[566],b,d)};h.renameWorksheet=function(d,b){var a=this.worksheets[d];if(!P.call(this,a))return!1;var c=a.options.worksheetName;if(c.toLowerCase()==b.toLowerCase())return!1;b=b.replace(/[^0-9A-Za-z_\s^]+/gi,_$_be75[3]);Number(b)==b&&(b=_$_be75[400]+Number(b));J(b)?alert(_$_be75[567]):(J(c,null),this.element.tabs.rename(d,b),a.options.worksheetName=b,J(b,a),R.call(this,{worksheet:a,action:_$_be75[98],index:d,oldValue:c,newValue:b}),
|
|
399
|
+
L.call(a,_$_be75[98],{worksheet:d,newValue:b}),Ia.updateWorksheetName.call(a,c,b),Z.updateWorksheetNames.call(a,c,b),G.call(this,_$_be75[568],a,d,b,c))};h.updateWorksheet=function(d,b){var a=this.worksheets;if(!P.call(this))return!1;this.worksheets.splice(b,0,a.splice(d,1)[0]);R.call(this,{worksheet:a[b],action:_$_be75[99],f:d,t:b});L.call(a[b],_$_be75[99],{f:d,t:b});G.call(this,_$_be75[569],a[b],d,b)};h.moveWorksheet=function(d,b){this.element.tabs.move(d,b)};h.openWorksheet=function(d){var b=this.worksheets[d];
|
|
400
|
+
!b||u.current&&u.current==b||(this.element.tabs.getActive()!=d?this.element.tabs.open(d):this.element.tabs.setBorder(d),u.current&&u.current.resetSelection(),u.current=b,u.current.refreshBorders(),h.state.call(this,d),ma.update.call(this,u.current),G.call(this,_$_be75[570],b,d))};h.getWorksheet=function(d){if(d&&typeof d==_$_be75[103]){if(d=this.worksheets.indexOf(d),0<=d)return d}else for(var b=0;b<this.worksheets.length;b++)if(d===this.worksheets[b].options.worksheetId)return b;return!1};h.getWorksheetActive=
|
|
401
|
+
function(){return this.element.tabs.getActive()};h.getWorksheetInstance=function(d){return d===_$_be75[3]||typeof d==_$_be75[25]?(d=h.getWorksheet.call(this,d),!1===d?!1:this.worksheets[d]):this.worksheets[d]};h.state=function(d){try{if(typeof localStorage!==_$_be75[21]){var b=this.config.cloud?this.config.cloud:this.element.id;if(b)if(typeof d!==_$_be75[21])localStorage.setItem(_$_be75[377]+b,d);else{var a=parseInt(localStorage.getItem(_$_be75[377]+b));h.openWorksheet.call(this,a)}}}catch(c){}};
|
|
402
|
+
return h}(),F=function(){var h={getCaretIndex:function(d){var b=0,a=(this.config.root?this.config.root:window).getSelection();a&&0!==a.rangeCount&&(b=a.getRangeAt(0),a=b.cloneRange(),a.selectNodeContents(d),a.setEnd(b.endContainer,b.endOffset),b=a.toString().length);return b},invert:function(d){for(var b=[],a=Object.keys(d),c=0;c<a.length;c++)b[d[a[c]]]=a[c];return b},getColumnName:function(d){var b=_$_be75[3];701<d?(b+=String.fromCharCode(64+parseInt(d/676)),b+=String.fromCharCode(64+parseInt(d%
|
|
403
|
+
676/26))):25<d&&(b+=String.fromCharCode(64+parseInt(d/26)));return b+=String.fromCharCode(65+d%26)},getColumnNameFromCoords:function(d,b){return h.getColumnName(parseInt(d))+(parseInt(b)+1)},getCoordsFromColumnName:function(d){if(!d)return[];d=(_$_be75[3]+d).replace(new RegExp(/\$/),_$_be75[3]);var b=/^[a-zA-Z]+/.exec(d);if(b){for(var a=0,c=0;c<b[0].length;c++)a+=parseInt(b[0].charCodeAt(c)-64)*Math.pow(26,b[0].length-1-c);a--;0>a&&(a=0);d=parseInt(/[0-9]+$/.exec(d))||null;0<d&&d--;return[a,d]}}};
|
|
404
|
+
h.shiftFormula=Z.shiftFormula;h.updateWorksheetName=Z.updateWorksheetName;h.createFromTable=function(d,b){if(d.tagName!=_$_be75[571])console.log(_$_be75[572]);else{b||(b={});b.columns=[];b.data=[];var a=d.querySelectorAll(_$_be75[573]);if(a.length)for(var c=0;c<a.length;c++){var e=a[c].style.width;e||(e=a[c].getAttribute(_$_be75[178]));e&&(b.columns[c]||(b.columns[c]={}),b.columns[c].width=e)}e=function(A){var z=A.getBoundingClientRect();z=50<z.width?z.width:50;b.columns[c]||(b.columns[c]={});A.getAttribute(_$_be75[574])?
|
|
405
|
+
b.columns[c].type=A.getAttribute(_$_be75[574]):b.columns[c].type=_$_be75[71];b.columns[c].width=z+_$_be75[59];b.columns[c].title=A.innerHTML;A.style.textAlign&&(b.columns[c].align=A.style.textAlign);A.classList.contains(_$_be75[575])&&(b.columns[c].readOnly=!0);if(z=A.getAttribute(_$_be75[576]))b.columns[c].name=z;if(z=A.getAttribute(_$_be75[577]))b.columns[c].id=z};var g=[],f=d.querySelectorAll(_$_be75[578]);if(f.length){for(a=0;a<f.length-1;a++){var k=[];for(c=0;c<f[a].children.length;c++){var l=
|
|
406
|
+
{title:f[a].children[c].innerText,colspan:f[a].children[c].getAttribute(_$_be75[190])||1};k.push(l)}g.push(k)}f=f[f.length-1].children;for(c=0;c<f.length;c++)e(f[c])}l=0;var n={},q={},p={},v={},w=null;k=d.querySelectorAll(_$_be75[579]);for(a=0;a<k.length;a++)if(b.data[l]=[],1!=b.parseTableFirstRowAsHeader||f.length||0!=a){for(c=0;c<k[a].children.length;c++){var x=k[a].children[c].getAttribute(_$_be75[580]);x?x.substr(0,1)!=_$_be75[18]&&(x=_$_be75[18]+x):x=k[a].children[c].innerHTML;b.data[l].push(x);
|
|
407
|
+
x=F.getColumnNameFromCoords(c,a);(w=k[a].children[c].getAttribute(_$_be75[581]))&&(v[x]=w);w=parseInt(k[a].children[c].getAttribute(_$_be75[190]))||0;var y=parseInt(k[a].children[c].getAttribute(_$_be75[191]))||0;if(w||y)n[x]=[w||1,y||1];if(w=k[a].children[c].style&&k[a].children[c].style.display==_$_be75[52])k[a].children[c].style.display=_$_be75[3];(w=k[a].children[c].getAttribute(_$_be75[120]))&&(p[x]=w);k[a].children[c].classList.contains(_$_be75[582])&&(p[x]=p[x]?p[x]+_$_be75[583]:_$_be75[584])}k[a].style&&
|
|
408
|
+
k[a].style.height&&(q[a]={height:k[a].style.height});l++}else for(c=0;c<k[a].children.length;c++)e(k[a].children[c]);0<Object.keys(g).length&&(b.nestedHeaders=g);0<Object.keys(p).length&&(b.style=p);0<Object.keys(n).length&&(b.mergeCells=n);0<Object.keys(q).length&&(b.rows=q);0<Object.keys(v).length&&(b.classes=v);k=d.querySelectorAll(_$_be75[585]);if(k.length){d=[];for(a=0;a<k.length;a++){e=[];for(c=0;c<k[a].children.length;c++)e.push(k[a].children[c].innerText);d.push(e)}0<Object.keys(d).length&&
|
|
409
|
+
(b.footers=d)}if(1==b.parseTableAutoCellType)for(d=[],c=0;c<b.columns.length;c++){g=e=!0;d[c]=[];for(a=0;a<b.data.length;a++)if(x=b.data[a][c],d[c][x]||(d[c][x]=0),d[c][x]++,25<x.length&&(e=!1),10==x.length){if(x.substr(4,1)!=_$_be75[237]||x.substr(7,1)!=_$_be75[237])g=!1}else g=!1;a=Object.keys(d[c]).length;g?b.columns[c].type=_$_be75[214]:1==e&&1<a&&a<=parseInt(.1*b.data.length)&&(b.columns[c].type=_$_be75[73],b.columns[c].source=Object.keys(d[c]))}return b}};h.injectArray=function(d,b,a){return d.slice(0,
|
|
410
|
+
b).concat(a).concat(d.slice(b))};h.parseCSV=function(d,b){b=b||_$_be75[37];for(var a=0,c=0,e=[[]],g=0,f=null,k=!1,l=!1,n=0;n<d.length;n++)if(e[c]||(e[c]=[]),e[c][a]||(e[c][a]=_$_be75[3]),d[n]!=_$_be75[586])if(d[n]!=_$_be75[587]&&d[n]!=b||0!=k&&1!=l&&f){d[n]==_$_be75[20]&&(k=!k);if(null===f){if(f=k,1==f)continue}else if(!0===f&&!l&&d[n]==_$_be75[20]){d[n+1]==_$_be75[20]?(k=!0,e[c][a]+=d[n],n++):l=!0;continue}e[c][a]+=d[n]}else{f=null;l=k=!1;if(e[c][a][0]==_$_be75[20]){var q=e[c][a].trim();q[q.length-
|
|
411
|
+
1]==_$_be75[20]&&(e[c][a]=q.substr(1,q.length-2))}d[n]==_$_be75[587]?(a=0,c++):(a++,a>g&&(g=a))}for(d=0;d<e.length;d++)for(n=0;n<=g;n++)void 0===e[d][n]&&(e[d][n]=_$_be75[3]);return e};h.getTokensFromRange=Z.getTokensFromRange;h.getRangeFromTokens=Z.getRangeFromTokens;h.getCoordsFromRange=function(d){-1!==d.indexOf(_$_be75[19])&&(d=d.split(_$_be75[19]),d=d[1]);d=d.split(_$_be75[157]);d[1]||(d[1]=d[0]);var b=F.getCoordsFromColumnName(d[0]);d=F.getCoordsFromColumnName(d[1]);return[b[0],b[1],d[0],d[1]]};
|
|
412
|
+
return h}(),Ea=function(){var h={},d=null,b=null,a=null,c=null,e=!1,g=null,f=null,k=null,l=function(r){function B(V){V.className&&(V.classList.contains(_$_be75[391])&&(M=V),V.classList.contains(_$_be75[403])&&(T=V),V.classList.contains(_$_be75[588])&&(U=V));V.parentNode&&V.parentNode.classList&&V.parentNode.classList.contains(_$_be75[372])&&(V.tagName==_$_be75[589]?C=1:V.tagName==_$_be75[590]?C=2:V.tagName==_$_be75[591]&&(C=3));V.parentNode&&!M&&B(V.parentNode)}var C=null,D=null,M=null,T=null,U=null,
|
|
413
|
+
K=null,X=null,Y=null;B(r.target);if(null!==U)return!1;if(M)if(r.target.classList.contains(_$_be75[370]))D=_$_be75[592];else if(r.target.classList.contains(_$_be75[380]))D=_$_be75[159];else if(r.target.classList.contains(_$_be75[303]))D=_$_be75[444],K=parseInt(r.target.getAttribute(_$_be75[57]));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_be75[206]))K=r.target.getAttribute(_$_be75[211]),X=r.target.getAttribute(_$_be75[212]),null===K?D=_$_be75[592]:
|
|
414
|
+
(D=_$_be75[454],K=parseInt(K),X=parseInt(X));else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_be75[172]))D=_$_be75[593];else if(r.target.classList.contains(_$_be75[176]))D=_$_be75[593];else if(r.target.parentNode&&r.target.parentNode.classList&&r.target.parentNode.classList.contains(_$_be75[594]))D=_$_be75[449],K=Array.prototype.indexOf.call(r.target.parentNode.children,r.target);else if(1==C)D=_$_be75[445],K=r.target.clientWidth-r.offsetX,r.target.classList.contains(_$_be75[198])&&
|
|
415
|
+
3<K&&20>K&&(D=_$_be75[595]),K=r.target.getAttribute(_$_be75[56]);else if(2==C){if(r=n(r,M))D=_$_be75[443],K=r[0],X=r[1],Y=r[2]}else if(3==C){if(K=r.target.getAttribute(_$_be75[56]),X=r.target.getAttribute(_$_be75[57]),K||X)D=_$_be75[596]}else C||jSuites.findElement(r.target,_$_be75[597])&&(D=_$_be75[106]);return[M,T,C,D,K,X,Y]},n=function(r,B){if(r.changedTouches&&r.changedTouches[0]){var C=r.changedTouches[0].clientX;r=r.changedTouches[0].clientY}else C=r.clientX,r=r.clientY;B=B.spreadsheet.config.root?
|
|
416
|
+
B.spreadsheet.config.root:document;if(B.elementsFromPoint)var D=B.elementsFromPoint(C,r);else B.msElementsFromPoint&&(D=B.msElementsFromPoint(C,r));for(B=0;B<D.length;B++)if(C=D[B].getAttribute(_$_be75[56]),r=D[B].getAttribute(_$_be75[57]),null!=C&&null!=r)return C=parseInt(C),r=parseInt(r),[C,r,D[B]];return!1},q=function(r){var B=l(r);if(!1===B)return!1;B[0]?B[1]?u.current&&document.activeElement.classList.contains(_$_be75[114])?document.activeElement.worksheet||(document.activeElement.worksheet=
|
|
417
|
+
B[1].jexcel):u.current!=B[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=B[1].jexcel):u.current||(r=B[0].tabs.getActive(),0<=r&&(u.current=B[0].spreadsheet.worksheets[r])):u.current&&!jSuites.findElement(r.target,_$_be75[252])&&(u.current.resetSelection(!0),u.current=null);return B};h.input=function(r){if(r.target.tagName==_$_be75[598]&&r.target.classList.contains(_$_be75[114])){var B=null;r.target.worksheet?B=r.target.worksheet:u.current&&(B=u.current);B&&ra.parse.call(B,r.target)}};
|
|
418
|
+
h.keydown=function(r){if(u.current){r.target.tagName==_$_be75[598]&&r.target.classList.contains(_$_be75[114])&&ra.onkeydown.call(u.current,r);if(27==r.which){if(u.current.edition){u.current.closeEditor(u.current.edition,!1);r.preventDefault();return}if(wa.event){wa.cancel.call(u.current,r);r.preventDefault();return}if(ha.event){ha.cancel.call(u.current,r);return}if(1==la.isVisible()){la.close.call(u.current,!1);r.preventDefault();return}}if(r.target.classList.contains(_$_be75[423])){var B=r.target;
|
|
419
|
+
g&&clearTimeout(g);g=setTimeout(function(){la.search.call(u.current,B.value);g=null},500)}else if(r.target.classList.contains(_$_be75[437]))B=r.target,g&&clearTimeout(g),g=setTimeout(function(){u.current.search(B.value);g=null},400);else if(!r.target.classList.contains(_$_be75[252]))if(u.current.edition){var C=u.current.edition.getAttribute(_$_be75[56]);13==r.which?u.current.options.columns[C].type==_$_be75[214]?u.current.closeEditor(u.current.edition,!0):u.current.options.columns[C].type!=_$_be75[73]&&
|
|
420
|
+
u.current.options.columns[C].type!=_$_be75[599]&&u.current.options.columns[C].type!=_$_be75[477]&&(r.altKey?u.current.parent.input.classList.contains(_$_be75[600])||document.execCommand(_$_be75[601],!1,_$_be75[602]):(u.current.closeEditor(u.current.edition,!0),u.current.parent.config.moveDownOnEnter&&u.current.down(),r.preventDefault())):9==r.which?(u.current.closeEditor(u.current.edition,!0),u.current.right(),r.preventDefault()):39!=r.which&&37!=r.which&&38!=r.which&&40!=r.which||u.current.parent.input.selected||
|
|
421
421
|
(u.current.closeEditor(u.current.edition,!0),37==r.which?u.current.left(r.shiftKey,r.ctrlKey):39==r.which?u.current.right(r.shiftKey,r.ctrlKey):38==r.which?u.current.up(r.shiftKey,r.ctrlKey):40==r.which&&u.current.down(r.shiftKey,r.ctrlKey),r.preventDefault())}else{if((r.ctrlKey||r.metaKey)&&!r.shiftKey){if(65==r.which){u.current.selectAll();r.preventDefault();return}if(83==r.which){u.current.download();r.preventDefault();return}if(89==r.which){u.current.parent.redo();r.preventDefault();return}if(90==
|
|
422
422
|
r.which){u.current.parent.undo();r.preventDefault();return}if(70==r.which&&u.current.parent.tools.search){u.current.parent.tools.search.open(!0);r.preventDefault();return}}if(u.current.selectedCell)if(33==r.which)0<u.current.options.pagination?Ca.pageUp.call(u.current):r.altKey?H.pageLeft.call(u.current):H.pageUp.call(u.current);else if(34==r.which)0<u.current.options.pagination?Ca.pageDown.call(u.current):r.altKey?H.pageRight.call(u.current):H.pageDown.call(u.current);else if(37==r.which)u.current.left(r.shiftKey,
|
|
423
423
|
r.ctrlKey),r.preventDefault();else if(39==r.which)u.current.right(r.shiftKey,r.ctrlKey),r.preventDefault();else if(38==r.which)u.current.up(r.shiftKey,r.ctrlKey),r.preventDefault();else if(40==r.which)u.current.down(r.shiftKey,r.ctrlKey),r.preventDefault();else if(36==r.which)u.current.first(r.shiftKey,r.ctrlKey),r.preventDefault();else if(35==r.which)u.current.last(r.shiftKey,r.ctrlKey),r.preventDefault();else if(32==r.which)u.current.setCheckRadioValue(),r.preventDefault();else if(46==r.which||
|
|
424
|
-
8==r.which)u.current.isEditable()&&u.current.setValue(u.current.getSelected(!1,!0),_$
|
|
425
|
-
1==u.current.options.allowInsertColumn&&1==u.current.options.allowManualInsertColumn&&u.current.selectedCell[0]==C&&(u.current.insertColumn(null,null,null,null,null,null,r),u.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)67==r.which?(u.current.copy(),r.preventDefault()):88==r.which?(u.current.cut(),r.preventDefault()):86==r.which?r.target.classList.contains(_$
|
|
426
|
-
u.current.selectedCell)&&u.current.deleteRow(),r.preventDefault()):1==u.current.options.allowDeleteColumn&&k[3]==_$
|
|
427
|
-
!0,r):113==r.keyCode?u.current.openEditor(u.current.records[C][D].element,!1,r):1!=r.key.length&&r.key!=_$
|
|
428
|
-
H.right.call(u.current):80>B-D.left&&H.left.call(u.current);v(r)}f=null},100))},w=function(r,B,C,D,M,T,U){if(document.activeElement.classList.contains(_$
|
|
429
|
-
window.event;var B=r.buttons?r.buttons:r.button?r.button:r.which;if(u.current)if(1==la.isVisible()&&(jSuites.findElement(r.target,_$
|
|
430
|
-
u.current.isSelected(C[4],0))return!1;if(u.current){if(C[3]==_$
|
|
431
|
-
1;var D=u.current.options.data.length-1;if(C[3]==_$
|
|
432
|
-
C[2])if(C[3]==_$
|
|
433
|
-
r.target.tagName==_$
|
|
434
|
-
C[3]!==_$
|
|
435
|
-
_$
|
|
436
|
-
1==e)wa.event?wa.update.call(u.current,r):Ba.event?Ba.update.call(u.current,r):ca.event?ca.move.call(u.current,r):ja.event?ja.move.call(u.current,r):u.current.options.tableOverflow&&(r=u.current.content,(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&u.current.setViewport(r.offsetWidth,r.offsetHeight),r.w=r.offsetWidth,r.h=r.offsetHeight);else{var D=r.target.getBoundingClientRect();d&&(d.style.cursor=_$
|
|
437
|
-
u.current.options.freezeRowControl&&!u.current.options.freezeRows&&5>D.height-(r.clientY-D.top)?(d=r.target,d.style.cursor=_$
|
|
438
|
-
(r.clientX-D.left)?(d=r.target,d.style.cursor=_$
|
|
439
|
-
d.style.cursor=_$
|
|
440
|
-
D=u.current.options.data.length-1,w(b,0,C,D,r,B[3],B[1].jexcel)),2==B[2]&&(B[3]==_$
|
|
441
|
-
2==B[2]&&u.current.isEditable()&&!u.current.edition&&B[6]&&u.current.openEditor(B[6],null,r)}};h.paste=function(r){if(!r.target.classList.contains(_$
|
|
442
|
-
3),Sa.open.call(u.current,r,B)))};var x=null,y=null,A=null,z=null,I=null;h.touchstart=function(r){var B=l(r);B[0]?B[1]&&u.current!=B[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=B[1].jexcel):u.current&&(u.current.resetSelection(),u.current=null);u.current&&!u.current.edition?B[3]==_$
|
|
443
|
-
!1,r):(y=setTimeout(function(){x=y=z=null},400),A=setTimeout(function(){h.contextmenu(r);A=null},800)),x=r.target):z=null:z=null};h.touchmove=function(r){if(u.current){var B=null,C=null,D=null,M=null;if(r.changedTouches&&r.changedTouches[0]){var T=r.changedTouches[0].clientX;var U=r.changedTouches[0].clientY}else T=r.clientX,U=r.clientY;if(U=document.elementFromPoint(T,U))if(T=U.getAttribute(_$
|
|
444
|
-
T,U),v(r)),r.preventDefault();else if(null!==I){T=parseInt(T);U=parseInt(U);var K=u.current.selectedCell;0==I?T<=K[2]&&(B=T,D=K[2],C=K[1],M=K[3]):2==I?T>=K[0]&&(B=K[0],C=K[1],D=T,M=K[3]):1==I?U<=K[3]&&(B=K[0],C=U,D=K[2],M=K[3]):3==I&&U>=K[1]&&(B=K[0],C=K[1],D=K[2],M=U);null!==B&&u.current.updateSelectionFromCoords(B,C,D,M);r.preventDefault()}else z=null;A&&clearInterval(A)}};h.touchend=function(r){if(ha.event)ha.end.call(u.current,r);else if(null!==I)I=null;else if(z){r=null;if(z[3]===_$
|
|
445
|
-
z[4];var C=z[5];var D=B;r=C}else z[3]===_$
|
|
446
|
-
u.defaultRowHeight=a.querySelector(_$
|
|
447
|
-
_$
|
|
448
|
-
0;b<d.length;b++)ta.worksheet(e,d[b]);c=e.worksheets}else c=ta.worksheet(e,d);jSuites.ajax.pending(e.name)||(jSuites.ajax.oncomplete[e.name](),jSuites.ajax.oncomplete[e.name]=null);return c}console.error(_$
|
|
449
|
-
h[d[b]],u.extensions[d[b]]=h[d[b]],u.license&&typeof u[d[b]].license==_$
|
|
450
|
-
Ea;typeof formula!==_$
|
|
451
|
-
return b};h.createDialog=function(b,a,c,e,g,f){b=h.createEditor(_$
|
|
452
|
-
e.mask||e.locale){var g={};e.mask?g.mask=e.mask:e.format?g.mask=e.format:g.locale=e.locale;e.options&&(g.options=e.options);e.decimal&&(g.options||(g.options={}),g.options={decimal:e.decimal});return g}return null};b.createCell=function(e,g,f,k,l,n){return b.updateCell(e,g,f,k,l,n)};b.updateCell=function(e,g,f,k,l,n){f=parseInt(f);k=parseInt(k);if(e){var q=c(n),p=null;g===_$
|
|
453
|
-
!1===n.autoCasting?!1:!0)&&(n.type==_$
|
|
454
|
-
_$
|
|
455
|
-
(f=c(n))?n.disabledMaskOnEdition||(n.mask?(k=n.mask.split(_$
|
|
456
|
-
_$
|
|
457
|
-
jSuites.mask.render(-1*f,e,!0):jSuites.mask.render(f,e,!0)):(e.mask=g[0],n&&n.classList.remove(_$
|
|
458
|
-
function(c,e,g,f,k,l){c&&(g=document.createElement(_$
|
|
459
|
-
{createCell:function(a,c,e,g,f,k){k.render==_$
|
|
460
|
-
a,c,f),n=k.delimiter||_$
|
|
461
|
-
e.value=c;jSuites.dropdown(l,e)},closeEditor:function(a,c,e,g,f,k){for(var l=f.parent.input.children[0],n=k.delimiter||_$
|
|
462
|
-
1<Object.keys(c).length&&(g=[],g[c[0]]=!0);for(c=0;c<k.source.length;c++)g[k.source[c].name]&&e.push(k.source[c].id);return e.join(a)},getItem:function(a,c,e,g,f,k){g=k.delimiter||_$
|
|
463
|
-
k.source.length;c++)typeof e[k.source[c].id]!==_$
|
|
464
|
-
(_$
|
|
465
|
-
_$
|
|
466
|
-
function(n,q){k.closeEditor(c,!0)};typeof l.timepicker!==_$
|
|
467
|
-
_$
|
|
468
|
-
c,g,f,e,l));g=l.options||{};g.value=e;g.onclose=function(n,q){k.closeEditor(c,!0)};a=h.createEditor(_$
|
|
469
|
-
e=document.createElement(_$
|
|
470
|
-
c){return 1==c||1==c||c==_$
|
|
471
|
-
1==c||c==_$
|
|
472
|
-
(e=parseInt(c.innerText));l.sequence||(l.sequence=0);e?b.isValid(e,g,f,k)||(e=_$
|
|
473
|
-
h.progressbar=function(){var b={},a=null;b.createCell=function(c,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(c.children[0]&&c.children[0].tagName==_$
|
|
474
|
-
b.createCell;b.openEditor=function(c,e,g,f,k,l){a=h.createEditor(_$
|
|
475
|
-
e,g,f,k,l){a=h.createEditor(_$
|
|
476
|
-
0;k<e;k++){var l=document.createElement(_$
|
|
477
|
-
e.innerText=c)}};b.updateCell=b.createCell;b.openEditor=function(a,c,e,g,f,k){f.parent.input.classList.add(_$
|
|
478
|
-
l){if(c)if(e)if(c.children&&c.children[0]&&c.children[0].tagName==_$
|
|
479
|
-
f,_$
|
|
480
|
-
l)};b.closeEditor=function(c,e,g,f,k,l){if(e&&(c=a.children[0]))return c.tagName==_$
|
|
481
|
-
f,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$
|
|
482
|
-
h.tags=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$
|
|
483
|
-
function(c,e,g,f,k,l){c=a.getValue();if(e)return c};return b}();h.record=function(){var b={},a=null;b.createCell=function(c,e,g,f,k,l){c.classList.add(_$
|
|
484
|
-
_$
|
|
485
|
-
d(l,_$
|
|
486
|
-
e=(_$
|
|
487
|
-
f.value(g,c))k={id:f.getRowId(c),name:k},void 0!=e.worksheetImage&&(k.image=f.value(e.worksheetImage,c)),l.push(k)}else console.error(_$
|
|
488
|
-
_$
|
|
424
|
+
8==r.which)u.current.isEditable()&&u.current.setValue(u.current.getSelected(!1,!0),_$_be75[3]);else if(13==r.which)r.shiftKey?u.current.up():(1==u.current.options.allowManualInsertRow&&u.current.selectedCell[1]==(u.current.results?u.current.results[u.current.results.length-1]:u.current.rows.length-1)&&u.current.insertRow(null,null,null,null,r),u.current.selectedCell&&u.current.down()),r.preventDefault();else if(9==r.which)r.shiftKey?u.current.left():(C=u.current.selectedCell[0],u.current.right(),
|
|
425
|
+
1==u.current.options.allowInsertColumn&&1==u.current.options.allowManualInsertColumn&&u.current.selectedCell[0]==C&&(u.current.insertColumn(null,null,null,null,null,null,r),u.current.right())),r.preventDefault();else if((r.ctrlKey||r.metaKey)&&!r.shiftKey)67==r.which?(u.current.copy(),r.preventDefault()):88==r.which?(u.current.cut(),r.preventDefault()):86==r.which?r.target.classList.contains(_$_be75[252])||h.paste(r):189==r.which&&(1==u.current.options.allowDeleteRow&&k[3]==_$_be75[444]?(ka.isValid.call(u.current,
|
|
426
|
+
u.current.selectedCell)&&u.current.deleteRow(),r.preventDefault()):1==u.current.options.allowDeleteColumn&&k[3]==_$_be75[445]&&(ka.isValid.call(u.current,u.current.selectedCell)&&u.current.deleteColumn(),r.preventDefault()));else if(u.current.isEditable()){C=u.current.selectedCell[1];var D=u.current.selectedCell[0];u.current.options.columns[D].type!=_$_be75[26]&&(32==r.keyCode?u.current.options.columns[D].type==_$_be75[283]||u.current.options.columns[D].type==_$_be75[285]?r.preventDefault():u.current.openEditor(u.current.records[C][D].element,
|
|
427
|
+
!0,r):113==r.keyCode?u.current.openEditor(u.current.records[C][D].element,!1,r):1!=r.key.length&&r.key!=_$_be75[603]||r.altKey||r.ctrlKey||u.current.records[C]&&u.current.openEditor(u.current.records[C][D].element,!0,r))}}}};var p=[0,0],v=function(r){e&&H.limited.call(u.current)&&(f&&(clearTimeout(f),f=null),f=setTimeout(function(){if(e){var B=p[0],C=p[1],D=u.current.content.getBoundingClientRect();50>D.height-(C-D.top)?H.down.call(u.current):80>C-D.top&&H.up.call(u.current);50>D.width-(B-D.left)?
|
|
428
|
+
H.right.call(u.current):80>B-D.left&&H.left.call(u.current);v(r)}f=null},100))},w=function(r,B,C,D,M,T,U){if(document.activeElement.classList.contains(_$_be75[114])&&ra.update.call(u.current,r,B,C,D,M,document.activeElement,U))return!1;if(u.current.edition)u.current.closeEditor(u.current.edition,!0);else if(c&&c!==T)return!1;u.current!==U&&(u.current.resetSelection(),u.current=U);ra.current?ra.range.call(u.current,r,B,C,D,M):ka[_$_be75[11]].call(u.current,r,B,C,D,M)};h.mousedown=function(r){r=r||
|
|
429
|
+
window.event;var B=r.buttons?r.buttons:r.button?r.button:r.which;if(u.current)if(1==la.isVisible()&&(jSuites.findElement(r.target,_$_be75[427])||la.close.call(u.current,!1)),u.current.edition){if(jSuites.findElement(r.target,_$_be75[121]))return!1}else if(jSuites.findElement(r.target,_$_be75[252]))return!1;var C=q(r);if(!1===C)return!1;k=C;if(1<B)if(C[3]==_$_be75[443]){if(u.current.isSelected(C[4],C[5]))return!1}else if(C[3]==_$_be75[444]){if(u.current.isSelected(0,C[4]))return!1}else if(C[3]==_$_be75[445]&&
|
|
430
|
+
u.current.isSelected(C[4],0))return!1;if(u.current){if(C[3]==_$_be75[159])u.current.isEditable()&&(ha.event=!0);else if(C[3]==_$_be75[595])la.open.call(u.current,C[4]);else{if(1==C[2])if(d)d.style.cursor==_$_be75[604]?wa.start.call(u.current,r):d.style.cursor==_$_be75[605]?Ba.start.call(u.current,r):d.style.cursor==_$_be75[606]&&(!0===d.column?ca.start.call(u.current,r,0):!1===d.column?ja.start.call(u.current,r,0):ca.start.call(u.current,r,parseInt(C[4])+1));else{B=u.current.options.columns.length-
|
|
431
|
+
1;var D=u.current.options.data.length-1;if(C[3]==_$_be75[592])w(0,0,B,D,r,C[3],C[1].jexcel),a=b=0;else if(C[3]==_$_be75[454]){var M=ya.range.call(u.current,C[5])[C[4]];M[1]>B&&(M[1]=B);w(M[0],0,M[1],D,r,C[3],C[1].jexcel);b=M[0];a=0}else C[4]&&((r.shiftKey||r.ctrlKey)&&null!=b&&null!=a?w(b,0,C[4],D,r,C[3],C[1].jexcel):(C[3]==_$_be75[445]&&b==C[4]&&1==u.current.options.allowRenameColumn&&(f=setTimeout(function(){u.current.setHeader(C[4])},800)),w(C[4],0,C[4],D,r,C[3],C[1].jexcel),b=C[4],a=0))}if(2==
|
|
432
|
+
C[2])if(C[3]==_$_be75[444])d?d.style.cursor==_$_be75[604]?wa.start.call(u.current,r):d.style.cursor==_$_be75[607]?Ba.start.call(u.current,r):d.style.cursor==_$_be75[606]&&ja.start.call(u.current,r,parseInt(C[4])+1):(B=u.current.options.columns.length-1,D=parseInt(C[4]),(r.shiftKey||r.ctrlKey)&&null!=b&&null!=a?w(0,a,B,D,r,C[3],C[1].jexcel):(w(0,D,B,D,r,C[3],C[1].jexcel),b=0,a=D));else if(C[3]==_$_be75[443]){B=parseInt(C[4]);D=parseInt(C[5]);if(!u.current.edition&&(M=u.current.options.columns[C[4]].type,
|
|
433
|
+
r.target.tagName==_$_be75[608]&&(M==_$_be75[286]||M==_$_be75[287])&&r.target.parentNode.classList.contains(_$_be75[147]))){var T=r.target.innerText;M==_$_be75[286]&&(T=_$_be75[609]+T);window.open(T,_$_be75[610])}(r.shiftKey||r.ctrlKey)&&u.current.selectedCell?w(u.current.selectedCell[0],u.current.selectedCell[1],B,D,r,C[3],C[1].jexcel):(w(B,D,B,D,r,C[3],C[1].jexcel),b=B,a=D)}}c=C[3];typeof C[3]!==_$_be75[21]&&G.call(u.current.parent,_$_be75[611],u.current,C[3],C[4],C[5]);e=!0;C[3]!==_$_be75[443]&&
|
|
434
|
+
C[3]!==_$_be75[159]||v(r)}else e=!1};h.mouseup=function(r){u.current&&(wa.event?wa.end.call(u.current,r):Ba.event?Ba.end.call(u.current,r):ca.event?ca.end.call(u.current,r):ja.event?ja.end.call(u.current,r):ha.event?ha.end.call(u.current,r):r.target.classList.contains(_$_be75[426])?la.close.call(u.current,!0):u.current.edition&&r.target.classList.contains(_$_be75[612])&&50>r.target.clientWidth-r.offsetX&&50>r.offsetY?na.close.call(u.current,null,!0):r.target.classList.contains(_$_be75[355])&&(r=r.target.innerText==
|
|
435
|
+
_$_be75[15]?0:r.target.innerText==_$_be75[17]?r.target.getAttribute(_$_be75[297])-1:r.target.innerText-1,Ca[_$_be75[11]].call(u.current,parseInt(r))));f&&(clearTimeout(f),f=null);e=c=!1;ra.current&&ra.close.call(u.current)};h.mousemove=function(r){r=r||window.event;if(r.changedTouches&&r.changedTouches[0]){var B=r.changedTouches[0].clientX;var C=r.changedTouches[0].clientY}else B=r.clientX,C=r.clientY;p=[B,C];if(u.current)if(B=r.target.getAttribute(_$_be75[56]),C=r.target.getAttribute(_$_be75[57]),
|
|
436
|
+
1==e)wa.event?wa.update.call(u.current,r):Ba.event?Ba.update.call(u.current,r):ca.event?ca.move.call(u.current,r):ja.event?ja.move.call(u.current,r):u.current.options.tableOverflow&&(r=u.current.content,(r.w&&r.w!==r.offsetWidth||r.h&&r.h!==r.offsetHeight)&&u.current.setViewport(r.offsetWidth,r.offsetHeight),r.w=r.offsetWidth,r.h=r.offsetHeight);else{var D=r.target.getBoundingClientRect();d&&(d.style.cursor=_$_be75[3],d=null);1==u.current.options.editable&&r.target&&(r.target.classList.contains(_$_be75[370])?
|
|
437
|
+
u.current.options.freezeRowControl&&!u.current.options.freezeRows&&5>D.height-(r.clientY-D.top)?(d=r.target,d.style.cursor=_$_be75[606],d.column=!1):u.current.options.freezeColumnControl&&!u.current.options.freezeColumns&&5>D.width-(r.clientX-D.left)&&(d=r.target,d.style.cursor=_$_be75[606],d.column=!0):r.target.classList.contains(_$_be75[303])?u.current.options.freezeRowControl&&u.current.options.freezeRows==parseInt(C)+1&&5>D.height-(r.clientY-D.top)?(d=r.target,d.style.cursor=_$_be75[606]):6>D.width-
|
|
438
|
+
(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_be75[604]):6>D.height-(r.clientY-D.top)&&(d=r.target,d.style.cursor=_$_be75[607]):r.target.classList.contains(_$_be75[195])&&(u.current.options.freezeColumnControl&&u.current.options.freezeColumns==parseInt(B)+1&&5>D.width-(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_be75[606]):1==u.current.options.rowResize&&6>D.width-(r.clientX-D.left)?(d=r.target,d.style.cursor=_$_be75[605]):1==u.current.options.columnDrag&&6>D.height-(r.clientY-D.top)&&(d=r.target,
|
|
439
|
+
d.style.cursor=_$_be75[604])))}};h.mouseover=function(r){r=r||window.event;if(u.current&&1==e){var B=l(r);if(B[0]){if(!document.activeElement.classList.contains(_$_be75[114])&&B[1]&&u.current!=B[1].jexcel&&u.current)return!1;if(!(wa.event||Ba.event||ca.event||ja.event))if(ha.event){var C=r.target.getAttribute(_$_be75[56]),D=r.target.getAttribute(_$_be75[57]);u.current.isSelected(C,D)||null===C||null===D||ha.call(u.current,C,D)}else null!==b&&null!==a&&(1==B[2]&&(C=b,B[3]==_$_be75[445]&&(C=r.target.getAttribute(_$_be75[56])),
|
|
440
|
+
D=u.current.options.data.length-1,w(b,0,C,D,r,B[3],B[1].jexcel)),2==B[2]&&(B[3]==_$_be75[444]?(C=u.current.options.columns.length-1,D=parseInt(r.target.getAttribute(_$_be75[57])),w(0,a,C,D,r,B[3],B[1].jexcel)):B[3]==_$_be75[443]&&(C=B[4],D=B[5],w(b,a,C,D,r,B[3],B[1].jexcel))))}}};h.dblclick=function(r){if(u.current)if(r.target.classList.contains(_$_be75[380]))ha.execute.call(u.current,!1);else{var B=l(r);1==B[2]?1==u.current.options.columnSorting&&(r=r.target.getAttribute(_$_be75[56]))&&u.current.orderBy(r):
|
|
441
|
+
2==B[2]&&u.current.isEditable()&&!u.current.edition&&B[6]&&u.current.openEditor(B[6],null,r)}};h.paste=function(r){if(!r.target.classList.contains(_$_be75[252])&&u.current&&u.current.selectedCell&&!u.current.edition){var B=r.clipboardData||window.clipboardData;B&&(u.current.paste(u.current.selectedCell[0],u.current.selectedCell[1],B.getData(_$_be75[71])),r&&r.preventDefault())}};h.contextmenu=function(r){var B=q(r);!1!==B&&(B[1]||(B=k),u.current&&!u.current.edition&&(B=Array.prototype.slice.call(B,
|
|
442
|
+
3),Sa.open.call(u.current,r,B)))};var x=null,y=null,A=null,z=null,I=null;h.touchstart=function(r){var B=l(r);B[0]?B[1]&&u.current!=B[1].jexcel&&(u.current&&u.current.resetSelection(),u.current=B[1].jexcel):u.current&&(u.current.resetSelection(),u.current=null);u.current&&!u.current.edition?B[3]==_$_be75[159]?u.current.isEditable()&&(ha.event=!0):r.target&&r.target.classList.contains(_$_be75[162])?I=parseInt(r.target.getAttribute(_$_be75[163])):B[3]==_$_be75[443]?(z=B,x===r.target&&y?u.current.openEditor(r.target,
|
|
443
|
+
!1,r):(y=setTimeout(function(){x=y=z=null},400),A=setTimeout(function(){h.contextmenu(r);A=null},800)),x=r.target):z=null:z=null};h.touchmove=function(r){if(u.current){var B=null,C=null,D=null,M=null;if(r.changedTouches&&r.changedTouches[0]){var T=r.changedTouches[0].clientX;var U=r.changedTouches[0].clientY}else T=r.clientX,U=r.clientY;if(U=document.elementFromPoint(T,U))if(T=U.getAttribute(_$_be75[56]),U=U.getAttribute(_$_be75[57]),null!==T&&null!==U&&ha.event)u.current.isSelected(T,U)||(ha.call(u.current,
|
|
444
|
+
T,U),v(r)),r.preventDefault();else if(null!==I){T=parseInt(T);U=parseInt(U);var K=u.current.selectedCell;0==I?T<=K[2]&&(B=T,D=K[2],C=K[1],M=K[3]):2==I?T>=K[0]&&(B=K[0],C=K[1],D=T,M=K[3]):1==I?U<=K[3]&&(B=K[0],C=U,D=K[2],M=K[3]):3==I&&U>=K[1]&&(B=K[0],C=K[1],D=K[2],M=U);null!==B&&u.current.updateSelectionFromCoords(B,C,D,M);r.preventDefault()}else z=null;A&&clearInterval(A)}};h.touchend=function(r){if(ha.event)ha.end.call(u.current,r);else if(null!==I)I=null;else if(z){r=null;if(z[3]===_$_be75[443]){var B=
|
|
445
|
+
z[4];var C=z[5];var D=B;r=C}else z[3]===_$_be75[444]?(B=0,C=z[4],D=u.current.options.columns.length-1,r=C):z[3]===_$_be75[445]&&(B=z[4],C=0,D=B,r=u.current.rows.length-1);null!=B&&u.current.updateSelectionFromCoords(B,C,D,r)}A&&clearInterval(A)};h.resize=function(){u.current&&1==u.current.parent.config.fullscreen&&H.call(u.current,!0)};return h}(),u=function(h,d,b){if(h){d||(d={});if(!u.defaultRowHeight){var a=document.createElement(_$_be75[32]);a.innerHTML=_$_be75[614];document.body.appendChild(a);
|
|
446
|
+
u.defaultRowHeight=a.querySelector(_$_be75[173]).offsetHeight;a.parentNode.removeChild(a)}var c=[];if(d.cloud&&!b)return typeof u.cloud==_$_be75[104]?u.cloud.load(d,function(g){if((g=u(h,g,!0))&&g.length)for(var f=0;f<g.length;f++)c.push(g[f])}):console.error(_$_be75[615]),c;if(h.spreadsheet)e=h.spreadsheet,Fa[_$_be75[11]].call(e,d);else var e=ta.spreadsheet(h,d);e.processing=!0;1==e.config.loadingSpin&&jSuites.loading.show();jSuites.ajax.oncomplete[e.name]=function(){for(var g=0;g<e.worksheets.length;g++)typeof e.worksheets[g].onload==
|
|
447
|
+
_$_be75[104]&&(e.worksheets[g].onload(),e.worksheets[g].onload=null);e.processing=!1;if(Array.isArray(e.queue)&&0<e.queue.length)for(;g=e.queue.shift();)g[0].updateCell(g[1],g[2],O.call(g[0],g[1],g[2]),!0);e.config.toolbar&&ma.show.call(e);for(g=0;g<e.worksheets.length;g++)fa.refresh.call(e.worksheets[g]);G.call(e,_$_be75[616],e);pa.state.call(e);for(g=0;g<e.worksheets.length;g++)ea.update.call(e.worksheets[g]);jSuites.loading.hide()};Array.isArray(d.worksheets)&&(d=d.worksheets);if(Array.isArray(d)){for(b=
|
|
448
|
+
0;b<d.length;b++)ta.worksheet(e,d[b]);c=e.worksheets}else c=ta.worksheet(e,d);jSuites.ajax.pending(e.name)||(jSuites.ajax.oncomplete[e.name](),jSuites.ajax.oncomplete[e.name]=null);return c}console.error(_$_be75[613])};u.defaultRowHeight=null;u.license=null;u.setLicense=function(h){u.license=h};u.spreadsheet=[];u.picker=ra;u.setDictionary=function(h){jSuites.setDictionary(h)};u.extensions={};u.setExtensions=function(h){for(var d=Object.keys(h),b=0;b<d.length;b++)typeof h[d[b]]===_$_be75[104]&&(u[d[b]]=
|
|
449
|
+
h[d[b]],u.extensions[d[b]]=h[d[b]],u.license&&typeof u[d[b]].license==_$_be75[104]&&u[d[b]].license.call(u,u.license))};u.destroy=function(h,d){if(h.spreadsheet){d&&ta.unbind(h);d=u.spreadsheet.indexOf(h.spreadsheet);u.spreadsheet.splice(d,1);for(d=0;d<h.spreadsheet.worksheets.length;d++)J(h.spreadsheet.worksheets[d].options.worksheetName,null);h.spreadsheet=null;h.jexcel=null;h.innerHTML=_$_be75[3];h.classList.remove(_$_be75[617]);h.classList.remove(_$_be75[391])}};u.version=N;u.helpers=F;u.events=
|
|
450
|
+
Ea;typeof formula!==_$_be75[21]&&(u.formula=formula);u.editors=function(){var h={},d=function(b,a){return 1==b[a]||b.options&&1==b.options[a]?!0:b[a]==_$_be75[261]||b.options&&b.options[a]==_$_be75[261]?!0:!1};h.createEditor=function(b,a,c,e){e.parent.input.setAttribute(_$_be75[122],!1);b==_$_be75[251]?(b=document.createElement(_$_be75[251]),b.type=_$_be75[71],b.value=c):b=document.createElement(_$_be75[32]);b.style.width=a.offsetWidth-2+_$_be75[59];b.style.height=a.offsetHeight-1+_$_be75[59];e.parent.input.appendChild(b);
|
|
451
|
+
return b};h.createDialog=function(b,a,c,e,g,f){b=h.createEditor(_$_be75[32],b,a,g);b.classList.add(_$_be75[618]);b.classList.add(_$_be75[612]);800>window.innerWidth?(g.parent.input.style.top=_$_be75[61],g.parent.input.style.left=_$_be75[61]):(a=g.parent.input.getBoundingClientRect(),window.innerHeight<a.bottom&&(g.parent.input.style.marginTop=-g.parent.input.offsetHeight));return b};h.general=function(){var b={},a=function(e){return(_$_be75[3]+e)[0]==_$_be75[18]?!0:!1},c=function(e){if(e.format||
|
|
452
|
+
e.mask||e.locale){var g={};e.mask?g.mask=e.mask:e.format?g.mask=e.format:g.locale=e.locale;e.options&&(g.options=e.options);e.decimal&&(g.options||(g.options={}),g.options={decimal:e.decimal});return g}return null};b.createCell=function(e,g,f,k,l,n){return b.updateCell(e,g,f,k,l,n)};b.updateCell=function(e,g,f,k,l,n){f=parseInt(f);k=parseInt(k);if(e){var q=c(n),p=null;g===_$_be75[3]||a(g)||typeof g===_$_be75[22]||(q?(q=jSuites.mask.extract(g,q,!0))&&q.value!==_$_be75[3]&&(p=q.value):1==(!1===l.parent.config.autoCasting||
|
|
453
|
+
!1===n.autoCasting?!1:!0)&&(n.type==_$_be75[22]||n.type==_$_be75[344]||n.type==_$_be75[343]?(q=jSuites.mask.extract(g,n,!0))&&q.value!==_$_be75[3]&&(p=q.value):jSuites.isNumeric(Number(g))&&(p=Number(g))));null!==p&&(g=p);g=b.parseValue(f,k,g,l,n,e);g instanceof Element||g instanceof HTMLDocument?(e.innerHTML=_$_be75[3],e.appendChild(g)):n.rotate?(e.firstChild&&e.firstChild.classList.contains(_$_be75[27])?l=e.firstChild:(l=document.createElement(_$_be75[28]),l.classList.add(_$_be75[27])),l.style.transform=
|
|
454
|
+
_$_be75[29]+parseInt(270-n.rotate)+_$_be75[30],l.innerHTML=g,e.appendChild(l)):1==l.parent.config.stripHTML?e.innerText=g:e.innerHTML=g;if(null!==p)return p}};b.openEditor=function(e,g,f,k,l,n){var q=l.parent.input;q.onblur=function(){q.classList.contains(_$_be75[114])||l.closeEditor(e,!0)};if(n.type==_$_be75[22]||n.type==_$_be75[344]||n.type==_$_be75[343])q.classList.add(_$_be75[600]),a(g)||n.inputmode||(n.inputmode=_$_be75[619]);f=null;a(g)||(n.inputmode&&q.setAttribute(_$_be75[118],n.inputmode),
|
|
455
|
+
(f=c(n))?n.disabledMaskOnEdition||(n.mask?(k=n.mask.split(_$_be75[244]),q.setAttribute(_$_be75[116],k[0])):n.locale&&q.setAttribute(_$_be75[620],n.locale),f.input=q,q.mask=f,jSuites.mask.render(g,f,!1)):g&&n.type==_$_be75[343]&&(g*=100));if(!f||n.disabledMaskOnEdition)l.parent.config.stripHTML?q.innerText=g:q.innerHTML=g,jSuites.focus(q)};b.closeEditor=function(e,g,f,k,l,n){e=l.parent.input;g=g&&e.innerText.trim().length?e.innerText:_$_be75[3];a(g)?g=g.replace(/(\r\n|\n|\r)/gm,_$_be75[3]):n.type==
|
|
456
|
+
_$_be75[343]&&(g+=_$_be75[621],e.classList.remove(_$_be75[622]));return g};b.parseValue=function(e,g,f,k,l,n){1==k.parent.config.parseFormulas&&(k.resetArray(e,g),a(f)&&(f=k.executeFormula(f,e,g)));f instanceof Element||f instanceof HTMLDocument||(n&&(!l.rotate&&jSuites.isNumeric(f)?n.classList.add(_$_be75[279]):n.classList.remove(_$_be75[279])),l&&!a(f)&&(e=c(l))&&(e.mask?(g=e.mask.split(_$_be75[244]),0>f&&g[1]?(n&&-1!==g[1].indexOf(_$_be75[623])&&n.classList.add(_$_be75[624]),n=-1===g[1].indexOf(_$_be75[237])?
|
|
457
|
+
jSuites.mask.render(-1*f,e,!0):jSuites.mask.render(f,e,!0)):(e.mask=g[0],n&&n.classList.remove(_$_be75[624]),n=jSuites.mask.render(f,e,!0))):n=jSuites.mask.render(f,e,!0),n&&(f=n)));return f};b[_$_be75[58]]=function(e,g){var f;return(f=c(e))?jSuites.mask.render(g,f,!0):e.type==_$_be75[343]?100*parseFloat(g):g};b.destroyCell=function(e){e.classList.remove(_$_be75[279])};return b}();h.text=h.general;h.number=h.general;h.numeric=h.general;h.percent=h.general;h.notes=function(){var b={},a=null;b.updateCell=
|
|
458
|
+
function(c,e,g,f,k,l){c&&(g=document.createElement(_$_be75[32]),g.classList.add(_$_be75[625]),1==k.parent.config.stripHTML?g.innerText=e:g.innerHTML=e,c.innerHTML=_$_be75[3],c.appendChild(g))};b.createCell=b.updateCell;b.openEditor=function(c,e,g,f,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_be75[626];n.toolbar=!1;a=h.createDialog(c,e,g,f,k,l);a=jSuites.editor(a,n)};b.closeEditor=function(c,e,g,f,k,l){return e?a.getData():_$_be75[3]};return b}();h.dropdown=function(){var b=
|
|
459
|
+
{createCell:function(a,c,e,g,f,k){k.render==_$_be75[627]?a.classList.add(_$_be75[628]):a.classList.add(_$_be75[629]);if(a=b.updateCell(a,c,e,g,f,k))return a},destroyCell:function(a){a.classList.remove(_$_be75[629])},updateCell:function(a,c,e,g,f,k){if(a){var l=b.getItem(a,c,e,g,f,k);l?a.innerHTML=l:c?(c=b.fromLabel(a,c,e,g,f,k),c.length?(l=b.getItem(a,c,e,g,f,k),a.innerHTML=l):a.innerHTML=_$_be75[3]):a.innerHTML=_$_be75[3];return c}},openEditor:function(a,c,e,g,f,k){var l=h.createEditor(_$_be75[32],
|
|
460
|
+
a,c,f),n=k.delimiter||_$_be75[244];k=Object.create(k);k.options||(k.options={});typeof k.filter==_$_be75[104]&&(k.source=k.filter(f.el,a,e,g,k.source));typeof k.filterOptions==_$_be75[104]&&(k=k.filterOptions(f,a,e,g,c,k));e=k.options;k.source&&(e.data=JSON.parse(JSON.stringify(k.source)));d(k,_$_be75[630])&&(e.multiple=!0);d(k,_$_be75[72])&&(e.autocomplete=!0);e.format=!0;e.opened=!0;e.width=a.offsetWidth-2;e.onclose=function(){f.closeEditor(a,!0)};d(k,_$_be75[630])?c&&(e.value=(_$_be75[3]+c).split(n)):
|
|
461
|
+
e.value=c;jSuites.dropdown(l,e)},closeEditor:function(a,c,e,g,f,k){for(var l=f.parent.input.children[0],n=k.delimiter||_$_be75[244],q=l.dropdown.getText(!0),p=l.dropdown.getValue(!0),v=0;v<p.length;v++)!1===b.getItem(a,p[v],e,g,f,k)&&k.source.push({id:p[v],name:q[v]});l.dropdown.close(!0);if(c)return p.join(n)},fromLabel:function(a,c,e,g,f,k){a=k.delimiter||_$_be75[244];e=[];g=[];Array.isArray(c)||(c=(_$_be75[3]+c).split(a));for(f=0;f<c.length;f++)g[c[f].trim()]=!0;c=Object.keys(g);!d(k,_$_be75[630])&&
|
|
462
|
+
1<Object.keys(c).length&&(g=[],g[c[0]]=!0);for(c=0;c<k.source.length;c++)g[k.source[c].name]&&e.push(k.source[c].id);return e.join(a)},getItem:function(a,c,e,g,f,k){g=k.delimiter||_$_be75[244];a=[];e=[];Array.isArray(c)||(c=(_$_be75[3]+c).split(g));for(g=0;g<c.length;g++)e[c[g].trim()]=!0;g=Object.keys(e);!d(k,_$_be75[630])&&1<Object.keys(g).length&&(c=[],c[g[0]]=!0,e=c);if(k.source&&typeof k.source[0]!==_$_be75[103])for(c=0;c<k.source.length;c++)g=k.source[c],k.source[c]={id:g,name:g};for(c=0;c<
|
|
463
|
+
k.source.length;c++)typeof e[k.source[c].id]!==_$_be75[21]&&a.push(k.render==_$_be75[288]?k.source[c].color:k.render==_$_be75[631]?k.source[c].image:k.source[c].name);if(a.length){if(typeof k.render!==_$_be75[21]){for(c=0;c<a.length;c++)e=c,g=a[c],g=k.render==_$_be75[288]?_$_be75[632]+g+_$_be75[633]:k.render==_$_be75[631]?_$_be75[632]+g+_$_be75[633]:k.render==_$_be75[627]?_$_be75[635]+(k.source[c].color||_$_be75[634])+_$_be75[636]+g+_$_be75[637]:void 0,a[e]=g;return a.join(_$_be75[3])}for(c=0;c<a.length;c++)a[c]=
|
|
464
|
+
(_$_be75[3]+a[c]).replace(_$_be75[15],_$_be75[13]);return a.join(_$_be75[332])}return!1}};b[_$_be75[58]]=function(a,c){for(var e=0;e<a.source.length;e++)if(a.source[e].id==c)return a.render==_$_be75[288]?a.source[e].color:a.render==_$_be75[631]?a.source[e].image:a.source[e].name};return b}();h.autocomplete=h.dropdown;h.calendar=function(){var b={},a=null;b.updateCell=function(c,e,g,f,k,l){if(c){g=e;l=b.getFormat(l);0<e&&Number(e)==e&&(g=jSuites.calendar.numToDate(e));f=_$_be75[3]+e;f.substr(4,1)==
|
|
465
|
+
_$_be75[237]&&f.substr(7,1)==_$_be75[237]?f=!0:(f=f.split(_$_be75[237]),f=4==f[0].length&&f[0]==Number(f[0])&&2==f[1].length&&f[1]==Number(f[1])?!0:!1);f||(f=jSuites.calendar.extractDateFromString(e,l))&&(g=f);if(g=jSuites.calendar.getDateString(g,l))return c.innerText=g,e;c.innerText=_$_be75[3];return _$_be75[3]}};b.createCell=b.updateCell;b.openEditor=function(c,e,g,f,k,l){l=Object.create(l);typeof l.filterOptions==_$_be75[104]&&(l=l.filterOptions(k,c,g,f,e,l));g=l.options||{};g.opened=!0;g.onclose=
|
|
466
|
+
function(n,q){k.closeEditor(c,!0)};typeof l.timepicker!==_$_be75[21]&&(g.time=d(l,_$_be75[638])?!0:!1);typeof g.readonly!==_$_be75[21]&&(g.readonly=g.readonly);g.value=e||null;g.placeholder=g.format;a=h.createEditor(_$_be75[251],c,e,k);jSuites.calendar(a,g);!1===a.calendar.options.readonly&&a.focus()};b.closeEditor=function(c,e,g,f,k){c=a.calendar.close(!0,a.value?!0:!1);c=a.value?c:_$_be75[3];if(e)return c};b.getFormat=function(c){return c&&c.format?c.format:c&&c.options&&c.options.format?c.options.format:
|
|
467
|
+
_$_be75[639]};b[_$_be75[58]]=function(c,e){c=b.getFormat(c);return jSuites.calendar.getDateString(e,c)};return b}();h.color=function(){var b={},a=null;b.updateCell=function(c,e,g,f,k,l){c&&(l.render==_$_be75[640]?(g=document.createElement(_$_be75[32]),g.className=_$_be75[288],g.style.backgroundColor=e,c.innerText=_$_be75[3],c.appendChild(g)):(c.style.color=e,c.innerText=e))};b.createCell=b.updateCell;b.openEditor=function(c,e,g,f,k,l){l=Object.create(l);typeof l.filterOptions==_$_be75[104]&&(l=l.filterOptions(k,
|
|
468
|
+
c,g,f,e,l));g=l.options||{};g.value=e;g.onclose=function(n,q){k.closeEditor(c,!0)};a=h.createEditor(_$_be75[251],c,e,k);a=jSuites.color(a,g);a.open()};b.closeEditor=function(c,e,g,f,k,l){c=a.close(!0);if(e)return c};b[_$_be75[58]]=function(c,e){c=document.createElement(_$_be75[32]);c.style.width=_$_be75[641];c.style.height=_$_be75[34];c.style.backgroundColor=e;return c.outerHTML};return b}();h.checkbox=function(){var b={createCell:function(a,c,e,g,f,k){c=c&&c!=_$_be75[642]&&c!=_$_be75[643]?!0:!1;
|
|
469
|
+
e=document.createElement(_$_be75[251]);e.type=_$_be75[283];e.checked=c;e.onclick=function(){f.setValue(a,this.checked)};(k&&1==k.readOnly||!f.isEditable())&&e.setAttribute(_$_be75[644],_$_be75[644]);a.innerHTML=_$_be75[3];a.appendChild(e);return c},updateCell:function(a,c){c=c&&c!=_$_be75[642]&&c!=_$_be75[643]?!0:!1;a&&(a.children[0].checked=c);return c},openEditor:function(a,c,e,g,f){c=a.children[0].checked?!1:!0;f.setValue(a,c);return!1},closeEditor:function(a,c){return!1}};b[_$_be75[58]]=function(a,
|
|
470
|
+
c){return 1==c||1==c||c==_$_be75[261]?jSuites.translate(_$_be75[261]):jSuites.translate(_$_be75[642])};return b}();h.radio=function(){var b={createCell:function(a,c,e,g,f,k){a.getAttribute(_$_be75[56]);e=document.createElement(_$_be75[251]);e.type=_$_be75[285];e.checked=1==c||1==c||c==_$_be75[261]?!0:!1;e.onclick=function(){f.setValue(a,!0)};(k&&1==k.readOnly||!f.isEditable())&&e.setAttribute(_$_be75[644],_$_be75[644]);a.innerHTML=_$_be75[3];a.appendChild(e)},updateCell:function(a,c,e,g,f){c=1==c||
|
|
471
|
+
1==c||c==_$_be75[261]||c==_$_be75[645]?!0:!1;a&&(a.children[0].checked=c);if(1==c){a=[];for(var k=0;k<f.options.data.length;k++)g!=k&&f.options.data[k][e]&&a.push({x:e,y:k,value:0});a.length&&f.setValue(a)}return c},openEditor:function(a,c,e,g,f){return!1},closeEditor:function(a,c){return!1}};b[_$_be75[58]]=function(a,c){return 1==c||1==c||c==_$_be75[261]?_$_be75[261]:_$_be75[642]};return b}();h.autonumber=function(){var b={},a=null;b.createCell=function(c,e,g,f,k,l){(e=parseInt(e))||0<parseInt(c.innerText)&&
|
|
472
|
+
(e=parseInt(c.innerText));l.sequence||(l.sequence=0);e?b.isValid(e,g,f,k)||(e=_$_be75[275]):e=l.sequence+1;e>l.sequence&&(l.sequence=e);return c.innerText=e};b.updateCell=b.createCell;b.openEditor=function(c,e,g,f,k,l){a=h.createEditor(_$_be75[251],c,e,k);a.onblur=function(){k.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=function(c,e,g,f,k){return e?a.value:_$_be75[3]};b.isValid=function(c,e,g,f){for(var k,l=0;l<f.options.data.length;l++)if(k=f.value(e,l),k==c&&l!=g)return!1;return!0};return b}();
|
|
473
|
+
h.progressbar=function(){var b={},a=null;b.createCell=function(c,e){e=parseInt(e);if(100<e)e=100;else if(!e||0>e)e=0;if(c.children[0]&&c.children[0].tagName==_$_be75[598])var g=c.children[0];else g=document.createElement(_$_be75[32]),g.classList.add(_$_be75[289]),c.innerText=_$_be75[3],c.classList.add(_$_be75[646]),c.appendChild(g);g.style.width=parseInt(e)+_$_be75[621];g.setAttribute(_$_be75[297],parseInt(e)+_$_be75[621])};b.destroyCell=function(c){c.classList.remove(_$_be75[646])};b.updateCell=
|
|
474
|
+
b.createCell;b.openEditor=function(c,e,g,f,k,l){a=h.createEditor(_$_be75[251],c,e,k);a.type=_$_be75[22];a.setAttribute(_$_be75[647],0);a.setAttribute(_$_be75[648],100);a.onblur=function(){k.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=function(c,e,g,f,k){return e?a.value:_$_be75[3]};return b}();h.rating=function(){var b={},a=null;b.createCell=function(c,e,g,f,k,l){return b.setCell(c,e,l)};b.destroyCell=function(c){c.classList.remove(_$_be75[649])};b.updateCell=b.createCell;b.openEditor=function(c,
|
|
475
|
+
e,g,f,k,l){a=h.createEditor(_$_be75[251],c,e,k);a.type=_$_be75[22];a.setAttribute(_$_be75[647],0);a.setAttribute(_$_be75[648],5);a.onblur=function(){k.closeEditor(c,!0)};a.focus();a.value=e};b.closeEditor=function(c,e,g,f,k,l){return e?a.value:_$_be75[3]};b.setCell=function(c,e,g){e=parseInt(e);if(5<e)e=5;else if(!e||0>e)e=0;if(c){g=g&&g.color?g.color:_$_be75[624];var f=document.createElement(_$_be75[32]);f.setAttribute(_$_be75[297],parseInt(e)+_$_be75[650]);f.classList.add(_$_be75[290]);for(var k=
|
|
476
|
+
0;k<e;k++){var l=document.createElement(_$_be75[486]);l.className=_$_be75[550];l.style.color=g;l.innerHTML=_$_be75[651];f.appendChild(l)}c.innerHTML=_$_be75[3];c.className=_$_be75[649];c.appendChild(f)}return e};return b}();h.email=function(){var b={createCell:function(a,c,e,g,f,k){a&&(a.children&&a.children[0]&&a.children[0].tagName==_$_be75[608]?e=a.children[0]:(e=document.createElement(_$_be75[227]),a.innerText=_$_be75[3],a.appendChild(e),k.options&&k.options.url&&e.setAttribute(_$_be75[652],k.options.url)),
|
|
477
|
+
e.innerText=c)}};b.updateCell=b.createCell;b.openEditor=function(a,c,e,g,f,k){f.parent.input.classList.add(_$_be75[600]);f.parent.input.onblur=function(){f.closeEditor(a,!0)};f.parent.input.innerText=c;jSuites.focus(f.parent.input)};b.closeEditor=function(a,c,e,g,f){f.parent.input.classList.remove(_$_be75[600]);return c?f.parent.input.innerText.replace(new RegExp(/\n/,_$_be75[14]),_$_be75[3]):_$_be75[3]};return b}();h.url=h.email;h.image=function(){var b={},a=null;b.createCell=function(c,e,g,f,k,
|
|
478
|
+
l){if(c)if(e)if(c.children&&c.children[0]&&c.children[0].tagName==_$_be75[653])c.children[0].src=e;else{var n=document.createElement(_$_be75[49]);l.render==_$_be75[654]&&n.classList.add(_$_be75[654]);l.options&&(n.style.maxWidth=_$_be75[655],l.options.absolute&&(c.classList.add(_$_be75[656]),n.setAttribute(_$_be75[657],-1),n.classList.add(_$_be75[252]),n.classList.add(_$_be75[658]),n.settings=function(){k.openEditor(c,e,g,f,k,l)},n.dblclick=function(){k.openEditor(c,!0)},n[_$_be75[659]]=function(){k.setValueFromCoords(g,
|
|
479
|
+
f,_$_be75[3])}),l.options.width&&(n.style.width=parseInt(l.options.width)+_$_be75[59]),l.options.height&&(n.style.height=parseInt(l.options.height)+_$_be75[59]));n.src=e;c.innerHTML=_$_be75[3];c.appendChild(n)}else c.innerHTML=_$_be75[3]};b.updateCell=b.createCell;b.openEditor=function(c,e,g,f,k,l){(l&&l.options?l.options:{}).value=e;a=h.createDialog(c,e,g,f,k,l);e&&(c=document.createElement(_$_be75[49]),c.src=e,c.classList.add(_$_be75[660]),c.style.width=_$_be75[655],a.appendChild(c));jSuites.image(a,
|
|
480
|
+
l)};b.closeEditor=function(c,e,g,f,k,l){if(e&&(c=a.children[0]))return c.tagName==_$_be75[653]?c.src:_$_be75[3]};b[_$_be75[58]]=function(c,e){return _$_be75[661]+e+_$_be75[662]};return b}();h.html=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_be75[663]);var g=document.createElement(_$_be75[32]);g.innerHTML=e;c.appendChild(g)};b.updateCell=function(c,e){c&&(c.firstChild.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_be75[663])};b.openEditor=function(c,e,g,
|
|
481
|
+
f,k,l){var n=l&&l.options?l.options:{};n.focus=!0;n.value=e;n.border=!1;n.height=_$_be75[626];e=h.createDialog(c,e,g,f,k,l);a=jSuites.editor(e,n);a.close=function(){k.closeEditor(c,!0)};jSuites.tracking(a,!0)};b.closeEditor=function(c,e,g,f,k,l){jSuites.tracking(a,!1);c=a.getData();if(e)return c};return b}();h.hidden=function(){return{createCell:function(b,a,c,e,g){b.innerText=a},updateCell:function(b,a,c,e,g){b&&(b.innerText=a)},openEditor:function(b,a,c,e,g){return!1},closeEditor:function(b,a){return!1}}}();
|
|
482
|
+
h.tags=function(){var b={},a=null;b.createCell=function(c,e){c.classList.add(_$_be75[664]);b.updateCell(c,e)};b.updateCell=function(c,e){c&&(c.innerHTML=e)};b.destroyCell=function(c){c.classList.remove(_$_be75[664])};b.openEditor=function(c,e,g,f,k,l){var n=l&&l.options?l.options:{};n.value=e;a=h.createDialog(c,e,g,f,k,l);c=document.createElement(_$_be75[32]);c.style.margin=_$_be75[34];c.style.marginRight=_$_be75[665];a.appendChild(c);a=jSuites.tags(c,n);c.focus();jSuites.focus(c)};b.closeEditor=
|
|
483
|
+
function(c,e,g,f,k,l){c=a.getValue();if(e)return c};return b}();h.record=function(){var b={},a=null;b.createCell=function(c,e,g,f,k,l){c.classList.add(_$_be75[629]);var n;(n=k.parent.getWorksheetInstance(l.worksheetId))?n.rows?b.updateCell(c,e,g,f,k,l):(c.innerText=_$_be75[275],k.parent.queue.push([k,g,f])):(c.innerText=_$_be75[275],k.parent.queue.push([k,g,f]))};b.destroyCell=function(c){c.classList.remove(_$_be75[629])};b.updateCell=function(c,e,g,f,k,l){c&&(typeof l.worksheetId==_$_be75[21]?c.innerText=
|
|
484
|
+
_$_be75[275]:c.innerHTML=b.getValue(c,e,g,f,k,l))};b.openEditor=function(c,e,g,f,k,l){var n=l.delimiter||_$_be75[244];l=Object.create(l);l.options||(l.options={});typeof l.filter==_$_be75[104]&&(l.source=l.filter(k.el,c,g,f,l.source));typeof l.filterOptions==_$_be75[104]&&(l=l.filterOptions(k,c,g,f,e,l));g=l.options;g.data=b.getSource(k,l);d(l,_$_be75[630])&&(g.multiple=!0);d(l,_$_be75[72])&&(g.autocomplete=!0);g.format=!0;g.opened=!0;g.width=c.offsetWidth-2;g.onclose=function(){k.closeEditor(c,!0)};
|
|
485
|
+
d(l,_$_be75[630])?e&&(g.value=(_$_be75[3]+e).split(n)):g.value=e;a=h.createEditor(_$_be75[32],c,e,k);a=jSuites.dropdown(a,g)};b.closeEditor=function(c,e,g,f,k,l){c=l.delimiter||_$_be75[244];g=a.getValue(!0);a.close(!0);if(e)return g.join(c)};b.getValue=function(c,e,g,f,k,l){c=[];if(typeof l.worksheetId==_$_be75[25]&&(k=k.parent.getWorksheetInstance(l.worksheetId))){g=l.worksheetColumn?l.worksheetColumn:0;0<=l.worksheetImage&&(g=l.worksheetImage);if(e==_$_be75[3]||0==e||null==e||void 0==e)return _$_be75[3];
|
|
486
|
+
e=(_$_be75[3]+e).split(_$_be75[244]);for(f=0;f<e.length;f++){var n=e[f].trim();var q=k.name(g);n=k.getRowById(n);q=!1===n?_$_be75[666]:n[q];0<=l.worksheetImage&&(q=_$_be75[667]+q+_$_be75[668]);c.push(q)}return 0<=l.worksheetImage?c.join(_$_be75[3]):c.join(_$_be75[332])}return _$_be75[275]};b.getSource=function(c,e){var g=e.worksheetColumn?e.worksheetColumn:0,f=null;typeof e.worksheetId==_$_be75[25]&&(f=c.parent.getWorksheetInstance(e.worksheetId));if(f){var k,l=[];for(c=0;c<f.rows.length;c++)if(k=
|
|
487
|
+
f.value(g,c))k={id:f.getRowId(c),name:k},void 0!=e.worksheetImage&&(k.image=f.value(e.worksheetImage,c)),l.push(k)}else console.error(_$_be75[669]+e.worksheetId);return l};b[_$_be75[58]]=function(c,e){for(var g=0;g<c.source.length;g++)if(c.source[g].id==e)return c.render==_$_be75[288]?c.source[g].color:c.render==_$_be75[631]?c.source[g].image:c.source[g].name};return b}();return h}();typeof jQuery!==_$_be75[21]&&function(h){h.fn.jspreadsheet=h.fn.jexcel=function(d){var b=h(this)[_$_be75[58]](0);if(b.jspreadsheet){if(typeof arguments[0]==
|
|
488
|
+
_$_be75[22])var a=arguments[0],c=2;else a=0,c=1;return b.jspreadsheet[a][d].apply(b.jspreadsheet[a],Array.prototype.slice.call(arguments,c))}return u(h(this)[_$_be75[58]](0),arguments[0])}}(jQuery);return u});
|