@syncfusion/ej2-spreadsheet
Version:
Feature-rich JavaScript Spreadsheet (Excel) control with built-in support for selection, editing, formatting, importing and exporting to Excel
10 lines • 1.46 MB
JavaScript
/*!
* filename: ej2-spreadsheet.umd.min.js
* version : 31.1.20
* Copyright Syncfusion Inc. 2001 - 2024. All rights reserved.
* Use of this code is subject to the terms of our license.
* A copy of the current license can be obtained at any time by e-mailing
* licensing@syncfusion.com. Any infringement will be prosecuted under
* applicable laws.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@syncfusion/ej2-base"),require("@syncfusion/ej2-data"),require("@syncfusion/ej2-popups"),require("@syncfusion/ej2-navigations"),require("@syncfusion/ej2-inputs"),require("@syncfusion/ej2-buttons"),require("@syncfusion/ej2-dropdowns"),require("@syncfusion/ej2-lists"),require("@syncfusion/ej2-splitbuttons"),require("@syncfusion/ej2-grids"),require("@syncfusion/ej2-charts")):"function"==typeof define&&define.amd?define(["exports","@syncfusion/ej2-base","@syncfusion/ej2-data","@syncfusion/ej2-popups","@syncfusion/ej2-navigations","@syncfusion/ej2-inputs","@syncfusion/ej2-buttons","@syncfusion/ej2-dropdowns","@syncfusion/ej2-lists","@syncfusion/ej2-splitbuttons","@syncfusion/ej2-grids","@syncfusion/ej2-charts"],t):t((e=e||self).ej={},e.ej2Base,e.ej2Data,e.ej2Popups,e.ej2Navigations,e.ej2Inputs,e.ej2Buttons,e.ej2Dropdowns,e.ej2Lists,e.ej2Splitbuttons,e.ej2Grids,e.ej2Charts)}(this,function(j,he,U,g,D,S,w,I,m,f,F,v){"use strict";function de(e,t,r){var n,i,o=[];return e&&(i=void 0,t&&!he.isNullOrUndefined(r)&&(i=ge(t,r)),e=-1===(e=-1<e.lastIndexOf("!")?e.substring(e.lastIndexOf("!")+1):e).indexOf(":")?e+":"+e:e,new RegExp(/^(?=.*[a-zA-Z])(?=.*\d)/g).test(e)||(t=e.split(":"),e=he.isNullOrUndefined(e.match(/[0-9]/))?t[0]+"1:"+t[1]+(i?i.rowCount-1:"1"):"A"+t[0]+":"+(i?ne(i.colCount):"A")+t[1]),e.split(":").forEach(function(e){n=W(e),o.push(n[0]),o.push(n[1])})),o}function W(e){return[parseInt(e.match(/\d+/)[0],10)-1,A(e.match(/[A-Z]+/i)[0].toUpperCase())]}function A(e){for(var t=0,r=(e=e.split("").reverse().join("")).length-1;0<=r;r--)t+=(e[r].charCodeAt(0)-64)*Math.pow(26,r);return t-1}function G(e,t){return ne(t+1)+(e+1)}function pe(e){return G(e[0],e[1])+":"+(he.isNullOrUndefined(e[2])?G(e[0],e[1]):G(e[2],e[3]))}function ne(e){return 1<e/26?ne(e%26==0?e/26-1:Math.floor(e/26))+String.fromCharCode(e%26==0?"Z".charCodeAt(0):64+e%26):String.fromCharCode(64+e)}function B(e,t,r){return de(x(e),t,r)}function x(e){var t=e.lastIndexOf("!");return-1<t?e.substring(t+1):e}function y(e){return e.name+"!"+e.selectedRange}function E(e,t){var r=R(e,t);return{sheetIndex:r,indices:B(t,e,r)}}function R(e,t){t=-1<t.indexOf("!")?M(e,Mi(t)):e.activeSheetIndex;return t}function ce(e){var t=e.slice();return e[0]>e[2]&&C(t,0,2),e[1]>e[3]&&C(t,1,3),t}function C(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function be(e){return e[0]===e[2]&&e[1]===e[3]}function b(e,t,r,n,i,o){return new N(e,t,r,n,i,o)}k.prototype.terminate=function(){this.worker.terminate(),URL.revokeObjectURL(this.workerUrl)},k.prototype.initWorker=function(){var e=new Blob([this.getFnCode()],{type:"text/javascript"});this.workerUrl=URL.createObjectURL(e),this.worker=new Worker(this.workerUrl),this.worker.onmessage=this.messageFromWorker.bind(this),this.worker.onerror=this.onError.bind(this),this.parent.isVue?(e=JSON.parse(JSON.stringify(this.workerData)),this.worker.postMessage(e)):this.worker.postMessage(this.workerData)},k.prototype.messageFromWorker=function(e){this.terminate(),this.defaultListener.apply(this.context,[e.data])},k.prototype.onError=function(e){if(this.terminate(),!e.message||!e.message.includes("FormData"))throw e.message||e;this.defaultListener.apply(this.context,[{isFormDataError:!0}])},k.prototype.getFnCode=function(){var e,t,r="",n="",i=!1;if("function"==typeof this.workerTask)this.workerTask.toString().indexOf("function")<0?n="function "+this.workerTask.toString():(n=this.workerTask.toString(),i=!0),r+="self.workerTask = "+n+"; \n";else if("object"==typeof this.workerTask)for(t=Object.keys(this.workerTask),e=0;e<t.length;e++)this.workerTask[t[e]].toString().indexOf("function")<0?n="function "+this.workerTask[t[e]].toString():(n=this.workerTask[t[e]].toString(),i=!0),r+=(0===e?"self.workerTask":t[e])+"= "+n+"; \n";return r+="self.onmessage = "+(i?"":" function ")+(this.preventCallback?this.getMessageFn:this.getCallbackMessageFn).toString()+"; \n"},k.prototype.getCallbackMessageFn=function(e){postMessage(this.workerTask.apply(this,e.data))},k.prototype.getMessageFn=function(e){this.workerTask.apply(this,e.data)};var N=k;function k(e,t,r,n,i,o){this.preventCallback=!1,this.context=e,this.workerTask=t,this.defaultListener=r,this.workerData=n,this.parent=o,i&&(this.preventCallback=!0),this.initWorker()}function L(e,t){return(t=void 0===t?[]:t).push({member:"dataBind",args:[e]}),t.push({member:"workbookProtectSheet",args:[e]}),e.allowSave&&t.push({member:"workbookSave",args:[e]}),e.allowPrint&&t.push({member:"print",args:[e]}),e.allowOpen&&t.push({member:"workbookOpen",args:[e]}),e.allowEditing&&(t.push({member:"workbookEdit",args:[e]}),t.push({member:"workbookFormula",args:[e]})),e.allowNumberFormatting&&t.push({member:"workbookNumberFormat",args:[e]}),e.allowCellFormatting&&t.push({member:"workbookcellformat",args:[e]}),e.allowSorting&&t.push({member:"workbookSort",args:[e]}),e.allowHyperlink&&t.push({member:"workbookHyperlink",args:[e]}),e.allowFiltering&&t.push({member:"workbookFilter",args:[e]}),e.allowFindAndReplace&&t.push({member:"workbookfindAndReplace",args:[e]}),e.allowInsert&&t.push({member:"workbookinsert",args:[e]}),e.allowDelete&&t.push({member:"workbookdelete",args:[e]}),e.allowDataValidation&&t.push({member:"workbookDataValidation",args:[e]}),e.allowMerge&&t.push({member:"workbookmerge",args:[e]}),e.allowCellFormatting&&t.push({member:"workbookConditionalFormatting",args:[e]}),e.allowImage&&t.push({member:"workbookImage",args:[e]}),e.allowChart&&t.push({member:"workbookChart",args:[e]}),e.allowAutoFill&&t.push({member:"workbookautofill",args:[e]}),t}P=function(e,t){return(P=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var P,H,V=function(e,t){function r(){this.constructor=e}P(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},e=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,r,a):i(t,r))||a);return 3<o&&a&&Object.defineProperty(t,r,a),a},z=(H=he.ChildProperty,V(_,H),e([he.Property("Calibri")],_.prototype,"fontFamily",void 0),e([he.Property("bottom")],_.prototype,"verticalAlign",void 0),e([he.Property("left")],_.prototype,"textAlign",void 0),e([he.Property("0pt")],_.prototype,"textIndent",void 0),e([he.Property("#000000")],_.prototype,"color",void 0),e([he.Property("#ffffff")],_.prototype,"backgroundColor",void 0),e([he.Property("normal")],_.prototype,"fontWeight",void 0),e([he.Property("normal")],_.prototype,"fontStyle",void 0),e([he.Property("11pt")],_.prototype,"fontSize",void 0),e([he.Property("none")],_.prototype,"textDecoration",void 0),e([he.Property("")],_.prototype,"border",void 0),e([he.Property("")],_.prototype,"borderTop",void 0),e([he.Property("")],_.prototype,"borderBottom",void 0),e([he.Property("")],_.prototype,"borderLeft",void 0),e([he.Property("")],_.prototype,"borderRight",void 0),_);function _(){return null!==H&&H.apply(this,arguments)||this}q=he.ChildProperty,V(K,q),e([he.Property()],K.prototype,"sheetIndex",void 0),e([he.Property()],K.prototype,"filterRange",void 0),e([he.Property(!1)],K.prototype,"hasFilter",void 0),e([he.Property()],K.prototype,"column",void 0),e([he.Property()],K.prototype,"criteria",void 0),e([he.Property()],K.prototype,"value",void 0),e([he.Property()],K.prototype,"dataType",void 0),e([he.Property()],K.prototype,"predicates",void 0);var q,X=K;function K(){return null!==q&&q.apply(this,arguments)||this}$=he.ChildProperty,V(J,$),e([he.Property()],J.prototype,"sortRange",void 0),e([he.Property()],J.prototype,"columnIndex",void 0),e([he.Property()],J.prototype,"order",void 0),e([he.Property()],J.prototype,"sheetIndex",void 0);var $,Z=J;function J(){return null!==$&&$.apply(this,arguments)||this}Q=he.ChildProperty,V(oe,Q),e([he.Property("")],oe.prototype,"name",void 0),e([he.Property("")],oe.prototype,"scope",void 0),e([he.Property("")],oe.prototype,"comment",void 0),e([he.Property("")],oe.prototype,"refersTo",void 0);var Q,ie=oe;function oe(){return null!==Q&&Q.apply(this,arguments)||this}ae=he.ChildProperty,V(le,ae),e([he.Property(!1)],le.prototype,"selectCells",void 0),e([he.Property(!1)],le.prototype,"selectUnLockedCells",void 0),e([he.Property(!1)],le.prototype,"formatCells",void 0),e([he.Property(!1)],le.prototype,"formatRows",void 0),e([he.Property(!1)],le.prototype,"formatColumns",void 0),e([he.Property(!1)],le.prototype,"insertLink",void 0);var ae,se=le;function le(){return null!==ae&&ae.apply(this,arguments)||this}xe=he.ChildProperty,V(we,xe),e([he.Property("")],we.prototype,"address",void 0);var xe,Se=we;function we(){return null!==xe&&xe.apply(this,arguments)||this}Ie=he.ChildProperty,V(Re,Ie),e([he.Property("WholeNumber")],Re.prototype,"type",void 0),e([he.Property("Between")],Re.prototype,"operator",void 0),e([he.Property("0")],Re.prototype,"value1",void 0),e([he.Property("0")],Re.prototype,"value2",void 0),e([he.Property(!0)],Re.prototype,"ignoreBlank",void 0),e([he.Property(!0)],Re.prototype,"inCellDropDown",void 0),e([he.Property(!1)],Re.prototype,"isHighlighted",void 0),e([he.Property("")],Re.prototype,"address",void 0);var Ie,Ee=Re;function Re(){return null!==Ie&&Ie.apply(this,arguments)||this}Ne=he.ChildProperty,V(Fe,Ne),e([he.Property("General")],Fe.prototype,"format",void 0),e([he.Complex({},z)],Fe.prototype,"style",void 0),e([he.Property(!0)],Fe.prototype,"isLocked",void 0);var Ne,Ae=Fe;function Fe(){return null!==Ne&&Ne.apply(this,arguments)||this}ke=he.ChildProperty,V(Te,ke),e([he.Property("GreaterThan")],Te.prototype,"type",void 0),e([he.Complex({},Ae)],Te.prototype,"format",void 0),e([he.Property("RedFT")],Te.prototype,"cFColor",void 0),e([he.Property("")],Te.prototype,"value",void 0),e([he.Property("")],Te.prototype,"range",void 0),e([he.Property("")],Te.prototype,"action",void 0);var ke,Oe=Te;function Te(){return null!==ke&&ke.apply(this,arguments)||this}De=he.ChildProperty,V(Pe,De),e([he.Property(!0)],Pe.prototype,"visible",void 0),e([he.Property("Auto")],Pe.prototype,"position",void 0);var De,Le=Pe;function Pe(){return null!==De&&De.apply(this,arguments)||this}Me=he.ChildProperty,V(He,Me),e([he.Property(!1)],He.prototype,"visible",void 0),e([he.Property("Auto")],He.prototype,"position",void 0);var Me,Be=He;function He(){return null!==Me&&Me.apply(this,arguments)||this}Ue=he.ChildProperty,V(ze,Ue),e([he.Property("")],ze.prototype,"color",void 0),e([he.Property(1)],ze.prototype,"width",void 0);var Ue,Ve=ze;function ze(){return null!==Ue&&Ue.apply(this,arguments)||this}je=he.ChildProperty,V(qe,je),e([he.Property(!1)],qe.prototype,"visible",void 0),e([he.Property("Circle")],qe.prototype,"shape",void 0),e([he.Property(5)],qe.prototype,"size",void 0),e([he.Property(null)],qe.prototype,"fill",void 0),e([he.Property(!0)],qe.prototype,"isFilled",void 0),e([he.Complex({},Ve)],qe.prototype,"border",void 0);var je,_e=qe;function qe(){return null!==je&&je.apply(this,arguments)||this}We=he.ChildProperty,V(Ye,We),e([he.Property(0)],Ye.prototype,"width",void 0);var We,Ge=Ye;function Ye(){return null!==We&&We.apply(this,arguments)||this}Xe=he.ChildProperty,V($e,Xe),e([he.Property(0)],$e.prototype,"width",void 0);var Xe,Ke=$e;function $e(){return null!==Xe&&Xe.apply(this,arguments)||this}Ze=he.ChildProperty,V(Qe,Ze),e([he.Property("")],Qe.prototype,"title",void 0),e([he.Complex({},Ge)],Qe.prototype,"majorGridLines",void 0),e([he.Complex({},Ke)],Qe.prototype,"minorGridLines",void 0),e([he.Property(!0)],Qe.prototype,"visible",void 0);var Ze,Je=Qe;function Qe(){return null!==Ze&&Ze.apply(this,arguments)||this}et=he.ChildProperty,V(rt,et),e([he.Property("Line")],rt.prototype,"type",void 0),e([he.Property("Material")],rt.prototype,"theme",void 0),e([he.Property(!1)],rt.prototype,"isSeriesInRows",void 0),e([he.Complex({},_e)],rt.prototype,"markerSettings",void 0),e([he.Property("")],rt.prototype,"range",void 0),e([he.Property("")],rt.prototype,"id",void 0),e([he.Property("")],rt.prototype,"title",void 0),e([he.Property(290)],rt.prototype,"height",void 0),e([he.Property(480)],rt.prototype,"width",void 0),e([he.Property(0)],rt.prototype,"top",void 0),e([he.Property(0)],rt.prototype,"left",void 0),e([he.Complex({},Le)],rt.prototype,"legendSettings",void 0),e([he.Complex({},Je)],rt.prototype,"primaryXAxis",void 0),e([he.Complex({},Je)],rt.prototype,"primaryYAxis",void 0),e([he.Complex({},Be)],rt.prototype,"dataLabelSettings",void 0);var et,tt=rt;function rt(){return null!==et&&et.apply(this,arguments)||this}nt=he.ChildProperty,V(ot,nt),e([he.Property("")],ot.prototype,"src",void 0),e([he.Property("")],ot.prototype,"id",void 0),e([he.Property(300)],ot.prototype,"height",void 0),e([he.Property(400)],ot.prototype,"width",void 0),e([he.Property(0)],ot.prototype,"top",void 0),e([he.Property(0)],ot.prototype,"left",void 0);var nt,it=ot;function ot(){return null!==nt&&nt.apply(this,arguments)||this}at=he.ChildProperty,V(st,at),e([he.Property("FillSeries")],st.prototype,"fillType",void 0),e([he.Property(!0)],st.prototype,"showFillOptions",void 0);var at,V=st;function st(){return null!==at&&at.apply(this,arguments)||this}var lt="workbookDestroyed",ht="updateSheetFromDataSource",dt="dataSourceChanged",pt="dataChanged",ct="triggerDataChange",ut="workbookOpen",ft="beginSave",gt="actionBegin",mt="sortImport",vt="findToolDlg",yt="exportDialog",Ct="setFilteredCollection",bt="saveCompleted",xt="applyNumber",St="getFormattedCell",wt="calculateFormula",It="refreshCellElem",Et="setCellFormat",Rt="findAllValues",Nt="textDecorationUpdate",At="applyCellFormat",Ft="updateRowColCount",ue="workbookFormulaOperation",kt="workbookEditOperation",Ot="checkDateFormat",Tt="checkNumberFormat",Dt="parseDecimalNumber",Lt="getFormattedBarText",Pt="activeCellChanged",Mt="openSuccess",Bt="openFailure",Ht="sheetCreated",Ut="sheetsDestroyed",Vt="aggregateComputation",zt="getUniqueRange",jt="removeUniquecol",_t="checkUniqueRange",qt="reApplyFormula",Wt="clearFormulaDependentCells",Gt="formulaInValidation",Yt="beforeSort",Xt="initiateSort",Kt="updateSortedDataOnCell",$t="sortComplete",Zt="beforeHyperlinkCreate",Jt="afterHyperlinkCreate",Qt="beforeHyperlinkClick",er="afterHyperlinkClick",tr="setLinkModel",rr="initiateFilter",nr="filterRangeAlert",ir="wrapText",or="onSave",ar="insert",sr="delete",lr="insertModel",hr="deleteModel",dr="isValidation",pr="cellValidation",cr="addHighlight",ur="find",fr="gotoHandler",gr="replace",mr="replaceAll",vr="showFindAlert",yr="findKeyUp",Cr="removeHighlight",br="queryCellInfo",xr="count",Sr="protectSheet",wr="updateToggleItem",Ir="protectsheetHandler",Er="replaceAllDialog",Rr="unprotectsheetHandler",Nr="editAlert",Ar="readonlyAlert",Fr="setLockCells",kr="setMerge",Or="applyMerge",Tr="mergedRange",Dr="activeCellMergedRange",Lr="insertMerge",Pr="hideShow",Mr="setCFRule",Br="applyCF",Hr="clearCFRule",Ur="clear",Vr="clearCF",zr="setImage",jr="setChart",_r="initiateChart",qr="refreshRibbonIcons",Wr="refreshChart",Gr="refreshChartSize",Yr="deleteChartColl",Xr="focusChartBorder",Kr="saveError",$r="updateHighlight",Zr="beforeInsert",Jr="beforeDelete",Qr="deleteHyperlink",en="moveOrDuplicateSheet",tn="setAutoFill",rn="refreshCell",nn="getFillInfo",on="getautofillDDB",an="rowFillHandler",sn="getTextSpace",ln="refreshClipboard",hn="updateView",dn="selectionComplete",pn="refreshInsertDelete",cn="getUpdatedFormulaOnInsertDelete",un="beforeCellUpdate",fn="duplicateSheetFilterHandler",gn="unMerge",mn="checkFormulaRef",vn="parseFormulaArgument",yn="getCellRefValue",Cn="commputeFormulaValue",bn="getChartRowIdxFromClientY",xn="getChartColIdxFromClientX",Sn="refreshChartCellOnInit",wn="localizedFormatAction",In="moveSheetHandler",En="addListValidationDropdown",Rn="sheetRenameUpdate",Nn="updateSortCollection",An="importModelUpdate";function Fn(e,t,r,n,i,o,a){if((s=e.value)&&"string"==typeof s){if(s.includes("\n"))return{isNumber:!1,value:s};if(ee(s))return{isNumber:!0,value:s};if(i&&s.includes(i)&&(a||e.format.includes(i)||e.format.includes("$"))&&(s=s.replace(i,"").trim()),r&&s.includes(r)&&kn(s,t,r,n)&&(s=s.split(r).join("").trim()),ee(s="."!==(n=n||he.getNumericObject(t).decimal)&&s.includes(n)?s.replace(n,".").trim():s))return{isNumber:!0,value:s};if(o&&2===s.split("/").length)try{var s,l=s.split(" ");return{isNumber:!0,value:s=2===l.length&&1===l[0].split("/").length?vi(l[0])+vi(l[1]):vi(s)}}catch(e){}}else if(ee(s))return{isNumber:!0,value:s};return{isNumber:!1,value:s}}function kn(e,t,r,n){for(var i=!1,o=123456..toLocaleString(t).split(r).reverse(),a=e.split(n)[0].split(r),s=0;s<a.length&&(i=s===a.length-1?a[s].length===o[0].length:!he.isUndefined(o[1])&&(0===s?a[s].length<=o[1].length:a[s].length===o[1].length));s++);return i}function fe(e,t){return e&&"="===e[0]&&(1<e.length||t)}function On(e){if(-1<(e=e.split("$").join("")).indexOf(":")){var t=e.split(":");if(Vn(t[0])&&Vn(t[1]))return!0}else if(e.indexOf(":")<0&&Vn(e))return!0;return!1}function Tn(e){return 65<=e.charCodeAt(0)&&e.charCodeAt(0)<=90||97<=e.charCodeAt(0)&&e.charCodeAt(0)<=122}function Dn(e,t){return 0===t[1]&&t[3]===e.colCount-1}function Ln(e,t){return 0===t[0]&&t[2]===e.rowCount-1}function Pn(e,t,r){return e&&t>=e[0]&&t<=e[2]&&r>=e[1]&&r<=e[3]}function Mn(e,t,r){for(var n,i=e.split(" "),o=0,a=i.length;o<a&&!(n=Pn(de(i[o]),t,r));o++);return n}function Bn(e,t,r){var n=e[0]<=t[0]&&e[2]>=t[2]&&e[1]<=t[1]&&e[3]>=t[3];if(n)return!0;if(r){if(t[0]<e[0]&&t[2]<e[0]||t[0]>e[2]&&t[2]>e[2])return!1;if(t[0]<e[0]&&t[2]>e[0]&&(t[0]=e[0],n=!0),t[2]>e[2]&&(t[2]=e[2],n=!0),t[1]<e[1]&&t[3]<e[1]||t[1]>e[3]&&t[3]>e[3])return!1;t[1]<e[1]&&t[3]>e[1]&&(t[1]=e[1],n=!0),t[3]>e[3]&&(t[3]=e[3],n=!0)}return n}function Hn(n,i,e){var o=ne(e+1);return n?n.split(" ").forEach(function(e){var t,r=de(e);Bn(r,i)?n=n.split(e).join(o+(r[0]+1)+":"+o+i[0]+" "+o+(i[2]+2)+":"+o+(r[2]+1)):Bn(r,i,!0)&&(t=void 0,t=i[0]>r[0]?o+(r[0]+1)+":"+o+i[0]:o+(i[2]+2)+":"+o+(r[2]+1),n=n.split(e).join(t))}):n=o+"1:"+o+i[0]+" "+o+(i[2]+2)+":"+o+"1048576",n}function Un(e,t){return!!(e=e||{}).isLocked||!(!1===e.isLocked||(!t||!t.isLocked)&&(e.isLocked||!t||!1===t.isLocked))}function Vn(e){for(var t=e,r=0,n=t.length,i=0;i<n;i++)Tn(t[i])&&r++;var e=t.substring(0,r),o=e.length;if(o!==n&&o<4&&1!==n&&isNaN(parseInt(t,10))){o=zn(e);if(o<1||16384<o)return!1;var a=t.substring(r,n);if(0<a.length){for(var s=!0,l=0;l<a.length;l++){var h=a.charCodeAt(l);if(h<48||57<h){s=!1;break}}if(s){e=parseFloat(a);if(0<e&&e<1048577)return!0}}}return!1}function zn(e){var t=0,r=0;if(t<(e=e.toUpperCase()).length&&"!"===e[t]){for(t++;t<e.length&&"!"!==e[t];)t++;t++}for(;t<e.length&&Tn(e[t]);){r=26*r+e[t].charCodeAt(0)-64;t++}return 0===r?-1:r}function Y(e,t,r,n,i){var o;if(void 0===n&&(n="rows"),e)if(r)for(var a=t;a<1/0;a++){if(!(o=e[""+n])[t]||!o[t].hidden){if(!i)break;i--}t++}else for(a=t;-1<a&&((o=e[""+n])[t]&&o[t].hidden);a--)t--;return t}function jn(e,t){var r=Object.keys(e);return(t?-1<r.indexOf("fontSize"):-1<r.indexOf("fontSize")&&12<Number(e.fontSize.split("pt")[0]))||-1<r.indexOf("fontFamily")||-1<r.indexOf("borderTop")||-1<r.indexOf("borderBottom")}function _n(e){return 1048575<e?e-1048576:e<0?e+1048576:e}function qn(e){return 16383<e?e-16384:e<0?e+16384:e}function Wn(e,t,r,n,i,o,a){var s;if(l=t?(s=i||me(t[0],t[1],r,!1,!0)).formula||"":l){o&&n.notify(Wt,{cellRef:G(t[0],t[1])});for(var l,h=["+","-","*","/",">=","<=","<>",">","<","=","%","&","^"],d=void 0,p=l=(l=0===l.indexOf("=")?l.slice(1):l).split("(").join(n.listSeparator).split(")").join(n.listSeparator),c=0;c<h.length;c++)p=(d=p.split(h[c])).join(n.listSeparator);for(var u,f,g,m,v,d=p.split(n.listSeparator),y=[],C=void 0,b=void 0,x=void 0,S=void 0,w=0;w<d.length;w++)!On((S=((v=d[w].includes("!"))?(u=d[w].lastIndexOf("!"),x=d[w].substring(0,u),d[w].substring(u+1)):d[w]).toUpperCase()).trim())||S.includes("$")||o&&v||(u=Gn(S),f=Yn(S),g=de(S),m=void 0,C=!((m=a?[_n(e[0]-(t[0]-g[0])),qn(e[1]-(t[1]-g[1])),_n(e[0]-(t[0]-g[2])),qn(e[1]-(t[1]-g[3]))]:[e[0]-(t[0]-g[0]),e[1]-(t[1]-g[1]),e[0]-(t[0]-g[2]),e[1]-(t[1]-g[3])])[1]<0||m[2]<0||m[3]<0||!o&&m[0]<0)&&(o&&m[0]<0&&(m[0]=m[2]),C=G(m[0],m[1]),S.includes(":")&&(C+=":"+G(m[2],m[3])),On(C))?C:"#REF!",(b={})[d[w]]=""+u+(C=v?x+"!"+C:C)+f,d[w].includes(":")?y.splice(0,0,b):y.push(b));for(var I=l=s.formula,w=0;w<y.length;w++){for(var E=Object.keys(y[w])[0],R=y[w][""+E],N=E.length,E=I.indexOf(E),A="",F=0;F<R.length;F++)A+=" ";l=l.slice(0,E)+R+l.slice(E+N),I=I.slice(0,E)+A+I.slice(E+N)}return l}return null}function Gn(e){for(var t="",r=0;r<e.length&&" "===e[r];r++)t+=" ";return t}function Yn(e){for(var t="",r=e.length-1;0<=r&&" "===e[r];r--)t=" "+t;return t}function Xn(e,t,r,n,i){var o,a,s,l={cell:r.cell,rowIndex:r.rowIdx,colIndex:r.colIdx,cancel:!1,sheet:t.name};return r.preventEvt||e.trigger(un,l),r.eventOnly||l.cancel||(r.valChange?(a=me(l.rowIndex,l.colIndex,t),o=!r.preventEvt&&e.getDisplayText(a),a=!(!a||!a.formula),$i(l.rowIndex,l.colIndex,t,l.cell,!r.pvtExtend),s=me(l.rowIndex,l.colIndex,t,!1,!0),r.mergedCells&&(delete s.value,delete s.formula),s.formattedText&&delete s.formattedText,l.cell&&l.cell.style&&Kn(s.style),a={action:"updateCellValue",address:[l.rowIndex,l.colIndex],sheetIndex:M(e,t.name),value:a&&!s.formula?s.value||(0===s.value?"0":""):s.formula||s.value||(0===s.value?"0":""),skipFormatCheck:r.skipFormatCheck,isRandomFormula:r.isRandomFormula,isDelete:r.isDelete,deletedRange:r.deletedRange,fillType:r.fillType,cellInformation:n,isRedo:!i,actionName:r.fillType,isPaste:"paste"===r.requestType},e.notify(kt,a),r.isFormulaDependent=a.isFormulaDependent,r.requestType&&null===l.cell&&$i(l.rowIndex,l.colIndex,t,l.cell,!r.pvtExtend),r.cellDelete&&(delete s.value,delete s.formula,delete s.hyperlink),r.uiRefresh&&e.serviceLocator.getService("cell").refresh(l.rowIndex,l.colIndex,r.lastCell,r.td,r.checkCF,r.checkWrap,r.skipFormatCheck,r.isRandomFormula,r.fillType),r.preventEvt||(n=e.getDisplayText(s))!==o&&(a={value:i=(i=me(l.rowIndex,l.colIndex,t,!1,!0).value)||(0===i?"0":""),oldValue:o,formula:s.formula||"",address:t.name+"!"+G(l.rowIndex,l.colIndex),displayText:n},r.requestType&&(a.requestType=r.requestType),e.trigger("cellSave",a))):($i(l.rowIndex,l.colIndex,t,l.cell,!r.pvtExtend),l.cell&&l.cell.style&&Kn((s=me(l.rowIndex,l.colIndex,t,!1,!0)).style))),l.cancel}function Kn(e){""===e.border?(delete e.border,delete e.borderTop,delete e.borderBottom,delete e.borderLeft,delete e.borderRight):(""===e.borderTop&&delete e.borderTop,""===e.borderBottom&&delete e.borderBottom,""===e.borderLeft&&delete e.borderLeft,""===e.borderRight&&delete e.borderRight)}function $n(e,t,r){for(var n=e,i=e,o=t,a=t,s=r.usedRange.rowIndex,l=r.usedRange.colIndex,h=function(e){for(var t=0;t<=l;t++)if(!he.isUndefined(me(e,t,r,null,!0).value))return!1;return!0},d=function(e){for(var t=n;t<=i;t++)if(!he.isUndefined(me(t,e,r,null,!0).value))return!1;return!0},p=n;p<=s&&(!he.isUndefined(me(p,t,r,null,!0).value)||!h(p));p++)i=p;for(p=n;0<=p&&(!he.isUndefined(me(p,t,r,null,!0).value)||!h(p));p--)n=p;for(p=o;p<=l&&(!he.isUndefined(me(e,p,r,null,!0).value)||!d(p));p++)a=p;for(p=o;0<=p&&(!he.isUndefined(me(e,p,r,null,!0).value)||!d(p));p--)o=p;return[n,o,i,a]}function Zn(e,t,r){var n,i=de(e.model.selectedRange),o=0,a=0;return"Column"===e.modelType?((r||"before"===e.insertType&&e.isUndoRedo)&&(i=[0,e.start,0,e.end]),"before"===e.insertType?t[1]<=i[1]&&t[3]>=i[1]?(o=0,a=i[3]-i[1]+1):i[1]<t[1]&&(o=a=i[3]-i[1]+1):(e.isUndoRedo&&(n=e.end-e.start+1,i=[0,e.start-n,0,e.end-n]),t[1]<=i[3]&&t[3]>=i[3]?(o=0,a=i[3]-i[1]+1):i[3]<t[3]&&(o=a=i[3]-i[1]+1)),[t[0],t[1]+o,t[2],t[3]+a]):((r||"above"===e.insertType&&e.isUndoRedo)&&(i=[e.start,0,e.end,0]),"above"===e.insertType?t[0]<=i[0]&&t[2]>=i[0]?a=i[2]-i[o=0]+1:i[0]<t[0]&&(o=a=i[2]-i[0]+1):(e.isUndoRedo&&(n=e.end-e.start+1,i=[e.start-n,0,e.end-n,0]),t[0]<=i[2]&&t[2]>=i[2]?a=i[2]-i[o=0]+1:i[2]<t[2]&&(o=a=i[2]-i[0]+1)),[t[0]+o,t[1],t[2]+a,t[3]])}function Jn(e,t){var r,n=0,i=0;return"Column"===e.modelType?((r=[0,e.start,e.model.usedRange.rowIndex,e.end])[3]<t[1]?n=i=r[3]-r[1]+1:r[1]>=t[1]&&r[3]<=t[3]?i=r[3]-r[1]+1:r[1]>=t[1]&&r[1]<=t[3]?i=t[3]-r[1]+1:r[1]<t[1]&&r[3]>=t[1]?(n=t[1]-r[1],i=r[3]-r[1]+1):r[1]<t[1]&&r[3]<t[3]&&(n=r[3]-t[1]+(r[3]-r[1])+1,i=r[3]-r[1]+1),[t[0],t[1]-n,t[2],t[3]-i]):((r=[e.start,0,e.end,e.model.usedRange.colIndex])[2]<t[0]?n=i=r[2]-r[0]+1:r[0]>=t[0]&&r[2]<=t[2]?i=r[2]-r[0]+1:r[0]>=t[0]&&r[0]<=t[2]?i=t[2]-r[0]+1:r[0]<t[0]&&r[2]>=t[0]?(n=t[0]-r[0],i=r[2]-r[0]+1):r[0]<t[0]&&r[2]<t[2]&&(n=r[2]-t[0]+(r[2]-r[0])+1,i=r[2]-r[0]+1),[t[0]-n,t[1],t[2]-i,t[3]])}function Qn(e,t,r,n,i,o,a){for(var s,l=e.length-1;0<=l;l--)for(var h=e[l].range.trim().split(","),d=0;d<h.length;d++){if(r>=(s=de(h[d].includes(":")?h[d]:h[d]+":"+h[d]))[0]&&n>=s[1]&&r<=s[2]&&n<=s[3]){t.push(e[l]),e.splice(l,1);break}if(i&&i[0]>=s[0]&&i[1]>=s[1]&&i[0]<=s[2]&&i[1]<=s[3]){var p={action:"autofillWithCF",cFColor:e[l].cFColor,range:pe(o),type:e[l].type,value:e[l].value};e.splice(l,1);for(var c=0,u=a.conditionalFormats;c<u.length&&("autofillWithCF"!==u[c].action||u[c].range!==p.range);c++)c===u.length-1&&(t.push(p),a.conditionalFormats.push(p));break}}}function ei(e,t){for(var r,n,i,o,a,s=t.trim().split(","),l=0;l<e.length;l++)if(function(e){for(var t=0;t<s.length;t++){if(a=de(s[t].includes(":")?s[t]:s[t]+":"+s[t]),e[0]<=a[0]&&e[1]<=a[1]&&e[2]>=a[2]&&e[3]>=a[3])return!0;if(i=e[0]>=a[0]&&e[0]<=a[2],o=e[2]>=a[0]&&e[2]<=a[2],r=e[1]>=a[1]&&e[1]<=a[3],n=e[3]>=a[1]&&e[3]<=a[3],i&&o){if(r||n||e[1]<a[1]&&e[3]>a[3]){if(0<e[0]-a[0])return!0;if(0<a[2]-e[2])return!0}if(r&&e[1]!==a[1])return!0;if(n&&e[3]!==a[3])return!0}else if(r&&n){if(i||o||e[0]<a[0]&&e[2]>a[2]){if(0<e[1]-a[1])return!0;if(0<a[3]-e[3])return!0}if(i){if(e[0]!==a[0])return!0}else if(o&&e[2]!==a[2])return!0}else if(i||o){if(r){if(e[1]!==a[1])return!0;if(0<e[0]-a[0])return!0;if(0<a[2]-e[2])return!0}else if(n){if(e[3]!==a[3])return!0;if(0<e[0]-a[0])return!0;if(0<a[2]-e[2])return!0}else if(e[1]<a[1]&&e[3]>a[3])return!0}else if((r||n)&&e[0]<a[0]&&e[2]>a[2])return!0}return!1}(e[l]))return!0;return!1}function ti(e,t,r){var n;r=r||he.getNumericObject(t.locale);for(var i=0;i<e.length;i++)ee(e[i])?"."===r.group&&(e[i]=e[i].toString(),e[i].indexOf("."))&&kn(e[i],t.locale,r.group,r.decimal)&&(e[i]=e[i].split(r.group).join("")):(n={formattedText:e[i],value:e[i],format:"General",cell:{value:e[i],format:"General"},isEdit:!0},t.notify(St,n),ee(n.value)&&(e[i]=n.value.toString()));return e}function ri(e,t){var r,n,i=e.getActiveSheet(),o=[[t.topIndex+e.frozenRowCount(i),t.leftIndex+e.frozenColCount(i),t.bottomIndex,t.rightIndex]];return(i.frozenRows||i.frozenColumns)&&(r=e.frozenRowCount(i),e=e.frozenColCount(i),n=W(i.topLeftCell),r&&e&&(o.push([n[0],n[1],r-1,e-1]),i=W(i.paneTopLeftCell),o.push([i[0],n[1],t.bottomIndex,e-1])),r&&o.push([n[0],t.leftIndex+e,r-1,t.rightIndex]),e)&&o.push([t.topIndex+r,n[1],t.bottomIndex,e-1]),o}function ni(e){var t;te(e.sheet,e.rowIdx)&&(t=Y(e.sheet,e.rowIdx,!0))<e.rowIdx+e.cell.rowSpan&&(e.rowIdx=t,e.isMergedHiddenCell=!0),re(e.sheet,e.colIdx)&&(t=Y(e.sheet,e.colIdx,!0,"columns"))<e.colIdx+e.cell.colSpan&&(e.colIdx=t,e.isMergedHiddenCell=!0)}function ii(e){return e.workbookOpenModule&&e.workbookOpenModule.preventFormatCheck}function oi(r){var e=new he.Internationalization,n={intl:e,updateValue:!0,value:"",curSymbol:he.getNumberDependable(r.locale,he.defaultCurrencyCode)},i={args:n,intl:e},o=he.getNumericObject(r.locale);return function(e){var t;e.format||!e.value||ee(e.value)||(n.cell=e,n.value=e.value,r.notify(Ot,n),e.format)||((t=e.value.toString()).includes(i.args.curSymbol)||t.includes(o.group)||t.includes("%")?(i.fResult=t,r.notify(Tt,i)):"."===o.decimal||ee(t)||t.includes(o.decimal)&&ee(t=t.replace(o.decimal,"."))&&(e.value=t))}}function ai(e,t,r){var n=new U.Query,i=(t.length&&n.where(U.Predicate.and(t)),e.executeLocal(n));if(r)for(var o=0,a=r.length;o<a&&i.length;o++)n=new U.Query,r[o].length&&n.where(U.Predicate.or(r[o])),i=new U.DataManager(i).executeLocal(n);return i}function si(e,t,r){return e&&e.isReadOnly||r&&r.isReadOnly||t&&t.isReadOnly}function li(e,t,r){for(var n=e.getActiveSheet(),i=he.isNullOrUndefined(t)?ce(de(n.selectedRange)):t,o=i[0];o<=i[2];o++)for(var a=i[1];a<=i[3];a++)if(si(me(o,a,n),ye(n,a),kh(n,o)))return r&&e.notify(Ar,null),!0;return!1}function hi(e,t){var t=t||e.selectedRange,r=de(t),n=e.colCount,e=e.rowCount;return r[2]===e-1&&0===r[0]?t=t.replace(/[0-9]/g,""):r[3]===n-1&&0===r[2]&&(t=t.replace(/\D/g,"")),t}function di(e){var t;return 0<window.devicePixelRatio%1?e+((t=e*window.devicePixelRatio%1)?(.5<t?1-t:-1*t)/window.devicePixelRatio:0):e}function pi(i,e,t){var o,a,s,l,h,d;e.length&&(o=i.getActiveSheet(),l=(s=i).frozenColCount(o),h=t&&t[0]||(l?W(o.topLeftCell)[1]:s.viewport.leftIndex),d=t&&t[1]||s.viewport.rightIndex,e.forEach(function(e){for(var t=h;t<=d;t++){t===l&&(t+=s.viewport.leftIndex);var r,n=me(e-1,t,o,!1,!0);n.rowSpan&&1!==n.rowSpan&&n.colSpan&&1!==n.colSpan||n.style&&n.style.borderBottom&&"none"!==n.style.borderBottom||(a=me(e,t,o,!1,!0).style)&&a.borderTop&&(n=i.getCell(e-1,t))&&n.style.borderBottom&&(r=i.getCell(e,t))&&(n.style.borderBottom="",r.style.borderTop=a.borderTop)}}))}function ci(e){var t=e.toString();return e===parseInt(t,10)?parseInt(t,10)+" ":(e=-1<t.indexOf(".")?t.split(".")[1]:0,t=Math.pow(10,e.toString().replace("-","").length),e/(e=Math.abs(ui(e,t)))+"/"+t/e)}function ui(e,t){return e=Number(e),(t=Number(t))?ui(t,e%t):e}function fi(e){60<(e=0<(e=Number(e))&&e<1?1+e:0===e?1:e)&&--e;var t=new Date("01/01/1900"),t=Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds());return new Date(new Date(864e5*(e-1)+t).toUTCString().replace(" GMT",""))}function gi(e,t,r){var n=new Date("01/01/1900"),e=mi(e)?e:new Date(e),n=Date.UTC(n.getFullYear(),n.getMonth(),n.getDate(),n.getHours(),n.getMinutes(),n.getSeconds(),n.getMilliseconds()),e=(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds())-n)/864e5;return(t?e:parseInt(e.toString(),10))+(r?0:60<e?2:1)}function mi(e){return"[object Date]"===Object.prototype.toString.call(e)&&!isNaN(e.valueOf())}function ee(e){return 0<=e-parseFloat(e)}function vi(e){return Function('"use strict";return ('+e+")")()}function yi(e,h,t,r,n,i){function d(){"time"===u.type&&(u.dateObj=new Date((o?o.toDateString():"01/01/1900")+" "+u.dateObj.toLocaleTimeString()))}var o,p=he.IntlBase.getDependables(he.cldrData,t,null).dateObject,c=p.dateTimeFormats.availableFormats,u={dateObj:null,isCustom:!1,type:""};if(r&&(u.dateObj=h.parseDate(e,{format:r}),u.dateObj)&&(u.type=-1<e.toString().indexOf(":")?"time":"datetime",d(),u.isCustom=!0),he.isNullOrUndefined(u.dateObj)){if((e=e.toString())&&-1<e.indexOf("/")||0<e.indexOf("-")){t=n&&n.format||r;if(t){n=t.toLowerCase().includes("dd-mm-yy");if((n||t.toLowerCase().includes("dd/mm/yy"))&&(u.dateObj=h.parseDate(e,{format:t=n?"d-M-y":"d/M/y",skeleton:"yMd"}),u.dateObj))return u.type="date",u}}r=function(e){if(e.indexOf(":")<0)for(var t=0,r=Object.keys(p.dateFormats);t<r.length;t++){var n=r[t];if(u.dateObj=h.parseDate(e,{format:p.dateFormats[""+n],skeleton:n}),u.dateObj){u.type="date",u.isCustom=!1;break}}if(he.isNullOrUndefined(u.dateObj))for(var i=void 0,o=0,a=Object.keys(c);o<a.length;o++){n=a[o],i=c[""+n];if(u.dateObj=h.parseDate(e,{format:i,skeleton:n}),!u.dateObj&&-1<e.indexOf(":")&&-1<i.indexOf(":")&&(u.dateObj=h.parseDate(e,{format:i.split(" ")[0]})),u.dateObj){u.type=-1<e.toString().indexOf(":")?"time":"datetime",d(),u.isCustom=!0;break}}if(he.isNullOrUndefined(u.dateObj))for(var s=0,l=Object.keys(p.timeFormats);s<l.length;s++){n=l[s];if(u.dateObj=h.parseDate(e,{format:p.timeFormats[""+n],skeleton:n}),u.dateObj){u.type="time",d(),u.isCustom=!1;break}}};i?2<=(n=e.split(" ")).length&&(r(n.shift()),u.dateObj)&&(o=u.dateObj,u.dateObj=null,r(n.join(" ")),u.dateObj)&&(u.type="datetime"):r(e)}return"#DIV/0!"===e||u.dateObj||"Invalid Date"===new Date(e).toString()||(u.dateObj=new Date(e),u.type="date"),u}function Ci(e,t,r){if(e&&"."!==e&&"-"!==e){var n=e.toString(),i=Number.MAX_SAFE_INTEGER.toString().length;if(n.startsWith("-")&&(n=(n=n.slice(1)).includes("-")?e:n),/^\d*\.?\d*$/.test(n))return t&&(n.length>i||r&&(n.startsWith("0")||n.endsWith("0")))?e:parseFloat(e)}return e}var bi="spreadsheetLocale",xi={SortOutOfRangeError:"Select a cell or range inside the used range and try again."};function Si(N,A,F,k,O,T,t,r,D,n,L,P){return void 0===D&&(D=!0),new Promise(function(e){var I,E,R;e((-1<(e=A.lastIndexOf("!"))?(I=M(N,A.substring(0,e)),A=A.substring(e+1)):I=N.activeSheetIndex,E=ge(N,I),R=B(n||A),e={sheet:E,indexes:R,formulaCellRef:t,sheetIndex:r,promise:new Promise(function(e){e(void 0)})},N.notify(ht,e),e.promise.then(function(){var i,o,a=R[0],e=N.frozenRowCount(E),t=N.frozenColCount(E),s=!!P;if(F){var l,h,d,p,c,u,f,g,m=[];k?(u=he.getNumericObject(N.locale),f=new he.Internationalization(N.locale)):g=oi(N),A.split(",").forEach(function(e,t){for(R=de(e),a=R[l=0];a<=R[2];){for(h=m[l]||{},o=kh(E,a),i=R[1];i<=R[3];)if(!D||!te(E,a)||T&&Th(E,a)){p=ne(i+1);var r,n=o?me(a,i,E):null;if(k)n&&(n.value||0===n.value||n.formula)?(n.formattedText&&n.format&&!n.format.includes("*")?to(n.format,!1)?h[p]=fi(n.value):h[p]=n.formattedText.toString().trim():h[p]=wi(N,n,a,i,I,!1,f),"string"==typeof(c=n.value)&&("."!==u.decimal&&c.includes(u.decimal)?ee(d=c.replace(u.decimal,"."))&&(c=parseFloat(d)):ee(c)&&(c=parseFloat(c)))):c=n&&n.hyperlink?"string"==typeof(r=n.hyperlink)?h[p]=r:r.address?(h[p]=r.address,r.address):h[p]="":(h[p]="",null),h[p+"_value"]=c;else if((n&&(n.formula||!he.isNullOrUndefined(n.value)||n.hyperlink)||Object.keys(h).length)&&(i===L?((c={value:wi(N,n,a,i,I,!0)}).value&&"string"==typeof c.value&&(ee(c.value)&&!n.value.toString().includes("\n")?n.format&&"@"===n.format||(c.value=parseFloat(c.value)):n.format||(g(n),ee(n.value)&&!n.value.toString().includes("\n")&&(c.value=parseFloat(n.value)))),h[p]=he.extend({},n,c)):h[p]=n),n&&(n.rowSpan&&1!==n.rowSpan||n.colSpan&&1!==n.colSpan))return void(m=[{throwMergeAlert:!0}]);i===R[3]&&Object.keys(h).length&&(h.__rowIndex=(a+1).toString(),m[l]=h,s&&0===t&&!Th(E,a)&&P.push(h),l++),i++}else a++;a++}})}else{m=new Map;for(var r=!(k||!O||!O.length);a<=R[2];)if(r&&e<=a&&a<O[0])a=O[0];else{if(k||!te(E,a))for(o=kh(E,a),i=R[1];i<=R[3];){var n,v={cell:me(a,i,E),address:G(a,i),rowIndex:a,colIndex:i},y=(N.trigger(br,v),me(a,i,E,!1,!0));if(y.formula&&y.formula.toUpperCase().includes("UNIQUE")&&N.notify(wt,{cell:y,rowIdx:a,colIdx:i,sheetIndex:N.activeSheetIndex,address:v.address}),1<y.colSpan&&1<y.rowSpan)for(var C=void 0,b=a,x=a+y.rowSpan;b<x;b++)for(var S=i,w=i+y.colSpan;S<w;S++)b===a&&S===i||(C=new Object,b!==a&&(C.rowSpan=a-b),S!==i&&(C.colSpan=i-S),E.rows[b]&&E.rows[b].cells&&E.rows[b].cells[S]&&(delete E.rows[b].cells[S].value,delete E.rows[b].cells[S].formula),$i(b,S,E,C,!0));else if(1<y.colSpan)for(b=i+1,x=i+y.colSpan;b<x;b++)$i(a,b,E,{colSpan:i-b},!0),E.rows[a]&&E.rows[a].cells&&E.rows[a].cells[b]&&(delete E.rows[a].cells[b].value,delete E.rows[a].cells[b].formula);else if(1<y.rowSpan)for(b=a+1,x=a+y.rowSpan;b<x;b++)$i(b,i,E,{rowSpan:a-b},!0),E.rows[b]&&E.rows[b].cells&&E.rows[b].cells[i]&&(delete E.rows[b].cells[i].value,delete E.rows[b].cells[i].formula);!k&&re(E,i)?i++:r&&t<=i&&i<O[1]?i=O[1]:(y.style&&(n={},Object.assign(n,y.style),y.style=n),m.set(v.address,y),i++)}a++}}return m})))})}function wi(e,t,r,n,i,o,a){return!t||(t.formula&&he.isNullOrUndefined(t.value)&&e.notify(wt,{cell:t,rowIdx:r,colIdx:n,sheetIndex:i}),he.isNullOrUndefined(t.value))?"":t.format?(i={value:t.value,formattedText:t.value,cell:t,format:t.format,checkDate:!o,rowIndex:r,colIndex:n,dataUpdate:!0},e.notify(St,i),i.dateObj&&"Invalid Date"!==i.dateObj.toString()?i.dateObj:o?i.value:i.formattedText.toString().trim()):o?t.value:(ee(r=t.value)&&((r=Number(t.value).toString()).includes(".")||11<r.length)&&(e.notify(Dt,n={args:{value:r,updateValue:!0},fResult:r,cellVal:r,intl:a}),r=n.fResult),r)}function Ii(r,n,i,e){for(var o,a,s,l=0,h=r.length,t=(e&&0<r.length&&r.sort(function(e,t){return he.isNullOrUndefined(e)||he.isUndefined(e.index)||he.isNullOrUndefined(t)||he.isUndefined(t.index)?0:e.index-t.index}),0);t<h;t++)!function(e){if(he.isNullOrUndefined(r[e])||he.isUndefined(r[e].index)||(a=l=r[e].index-e,delete r[e].index),0<l){for(o=0;l--;)n?(i.createSheet(e+o),o++):r.splice(e,0,null);e+=a,h+=a}var t;n&&(r[e].id<1&&(r[e].id=zi(i.sheets),r[e].properties)&&(r[e].properties.id=r[e].id),r[e].name||i.setSheetPropertyOnMute(r[e],"name","Sheet"+Vi(i)),t=0,r[e].rows.forEach(function(e){t=Math.max(t,e&&e.cells&&e.cells.length-1||0)}),i.setSheetPropertyOnMute(r[e],"usedRange",{rowIndex:r[e].rows.length?r[e].rows.length-1:0,colIndex:t})),s=e}(t),t=s}Ei=function(e,t){return(Ei=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var Ei,Ri,e=function(e,t){function r(){this.constructor=e}Ei(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},t=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,r,a):i(t,r))||a);return 3<o&&a&&Object.defineProperty(t,r,a),a},Ni=(Ri=he.ChildProperty,e(Ai,Ri),Ai.prototype.setProperties=function(e,t){var r=this;if(this.parentObj.isComplexArraySetter&&this.controlParent&&this.controlParent.isAngular)if(Object.keys(e).length){void 0===this.parentObj.currRangeIdx?this.parentObj.currRangeIdx=0:this.parentObj.currRangeIdx+=1;var n=this.parentObj.ranges[this.parentObj.currRangeIdx];n&&n.info&&(this.info=n.info),setTimeout(function(){void 0!==r.parentObj.currRangeIdx&&delete r.parentObj.currRangeIdx})}else if(this.controlParent.tagObjects[0].instance&&this.controlParent.tagObjects[0].instance.hasChanges&&!this.controlParent.tagObjects[0].instance.isInitChanges){n=this.controlParent.sheets.indexOf(this.parentObj);if(void 0===this.parentObj.changedRangeIdx){for(var i,o=this.controlParent.tagObjects[0].instance.list[n].tagObjects,a=0;a<o.length;a++)if("ranges"===o[a].name){o[a].instance.list.forEach(function(e,t){e.hasChanges&&(i=t)});break}this.parentObj.changedRangeIdx=i}}Ri.prototype.setProperties.call(this,e,t)},t([he.Property(null)],Ai.prototype,"dataSource",void 0),t([he.Property("A1")],Ai.prototype,"startCell",void 0),t([he.Property(null)],Ai.prototype,"query",void 0),t([he.Property(null)],Ai.prototype,"fieldsOrder",void 0),t([he.Property(!0)],Ai.prototype,"showFieldAsHeader",void 0),t([he.Property("")],Ai.prototype,"template",void 0),t([he.Property("A1")],Ai.prototype,"address",void 0),Ai);function Ai(){return null!==Ri&&Ri.apply(this,arguments)||this}Fi=he.ChildProperty,e(Oi,Fi),t([he.Property(0)],Oi.prototype,"rowIndex",void 0),t([he.Property(0)],Oi.prototype,"colIndex",void 0);var Fi,ki=Oi;function Oi(){return null!==Fi&&Fi.apply(this,arguments)||this}Ti=he.ChildProperty,e(Li,Ti),t([he.Property(null)],Li.prototype,"rows",void 0),t([he.Property(null)],Li.prototype,"columns",void 0),t([he.Complex({},se)],Li.prototype,"protectSettings",void 0),t([he.Collection([],Ni)],Li.prototype,"ranges",void 0),t([he.Collection([],Oe)],Li.prototype,"conditionalFormats",void 0),t([he.Property(0)],Li.prototype,"index",void 0),t([he.Property("")],Li.prototype,"name",void 0),t([he.Property(100)],Li.prototype,"rowCount",void 0),t([he.Property(100)],Li.prototype,"colCount",void 0),t([he.Property("A1:A1")],Li.prototype,"selectedRange",void 0),t([he.Property("A1")],Li.prototype,"activeCell",void 0),t([he.Complex({},ki)],Li.prototype,"usedRange",void 0),t([he.Property("A1")],Li.prototype,"topLeftCell",void 0),t([he.Property(!0)],Li.prototype,"showHeaders",void 0),t([he.Property(!0)],Li.prototype,"showGridLines",void 0),t([he.Property(!1)],Li.prototype,"isProtected",void 0),t([he.Property("Visible")],Li.prototype,"state",void 0),t([he.Property(0)],Li.prototype,"frozenRows",void 0),t([he.Property(0)],Li.prototype,"frozenColumns",void 0),t([he.Property("A1")],Li.prototype,"paneTopLeftCell",void 0),t([he.Property("")],Li.prototype,"password",void 0),t([he.Property(null)],Li.prototype,"standardHeight",void 0),t([he.Property(!1)],Li.prototype,"isSheetCalculated",void 0);var Ti,Di=Li;function Li(){return null!==Ti&&Ti.apply(this,arguments)||this}function M(e,t){var r;t.startsWith("'")&&t.endsWith("'")&&(t=t.replace(/''/g,"'").replace(/^'|'$/g,""));for(var n=0;n<e.sheets.length;n++)if(e.sheets[n].name.toLowerCase()===t.toLowerCase()){r=n;break}return r}function Pi(e,t){for(var r,n=0;n<e.sheets.length;n++)if(e.sheets[n].id===t){r=n;break}return r}function Mi(e){var t=e.lastIndexOf("!");return(-1<t?e.substring(0,t):e).replace(/'/gi,"")}function Bi(e,t,r){for(var n=r.length,i=0;i<n;i++)if(r[i].sheet.toUpperCase()===t.toUpperCase())return r[i].index;return-1}function Hi(e,t,r,n){e.setSheetPropertyOnMute(r=void 0===r?{}:r,"selectedRange",n?r.selectedRange+" "+t:t)}function Ui(e){return e&&e.selectedRange||"A1"}function ge(e,t){return e.sheets[t]}function Vi(e){var t=[];e.sheets.forEach(function(e){t.push(e.name.toLowerCase())});for(var r=0;r<t.length;r++){if(!(-1<t.indexOf("sheet"+e.sheetNameCount)))return e.sheetNameCount++;e.sheetNameCount++}return e.sheetNameCount++}function zi(e){var t=0;return e.forEach(function(e){t=Math.max(e.id,t)}),t+1}function ji(n,e,i){e=e||n.sheets;e.forEach(function(e){var t,r;e.id=e.id||0,e.name=e.name||"",n.setSheetPropertyOnMute(e,"rowCount",e.rowCount||100),n.setSheetPropertyOnMute(e,"colCount",e.colCount||100),n.setSheetPropertyOnMute(e,"topLeftCell",e.topLeftCell||"A1"),n.setSheetPropertyOnMute(e,"activeCell",e.activeCell||"A1"),n.setSheetPropertyOnMute(e,"selectedRange",e.selectedRange||e.activeCell+":"+e.activeCell),n.setSheetPropertyOnMute(e,"usedRange",e.usedRange||{rowIndex:0,colIndex:0}),n.setSheetPropertyOnMute(e,"ranges",e.ranges||[]),n.setSheetPropertyOnMute(e,"rows",e.rows&&he.extend([],e.rows,null,!0)||[]),n.setSheetPropertyOnMute(e,"columns",e.columns||[]),n.setSheetPropertyOnMute(e,"showHeaders",!!he.isUndefined(e.showHeaders)||e.showHeaders),n.setSheetPropertyOnMute(e,"showGridLines",!!he.isUndefined(e.showGridLines)||e.showGridLines),n.setSheetPropertyOnMute(e,"state",e.state||"Visible"),e.maxHgts=e.maxHgts||[],e.isImportProtected=e.isProtected&&i,e.protectSettings=e.protectSettings||{selectCells:!1,formatCells:!1,formatRows:!1,formatColumns:!1,insertLink:!1},e.isProtected=e.isProtected||!1,e.paneTopLeftCell&&"A1"!==e.paneTopLeftCell||(e.frozenRows=e.frozenRows||0,e.frozenColumns=e.frozenColumns||0,t=W(e.topLeftCell),n.setSheetPropertyOnMute(e,"paneTopLeftCell",G(e.frozenRows?t[0]+e.frozenRows:t[0],e.frozenColumns?t[1]+e.frozenColumns:t[1]))),Ii(e.columns),t=e.rows,r=i,t.forEach(function(e){e&&e.cells&&Ii(e.cells,null,void 0,r)}),Ii(t,null,void 0,r)}),Ii(e,!0,n)}function _i(e,t){return ge(e,t=void 0===t?e.activeSheetIndex:t).name}function qi(r,n,e,t,i){var o=!!e,a=(e=e||[r.activeSheetIndex],_i(r)),s={action:"moveSheet",eventArgs:{position:n=function(e,t,r){for(var n=t;r?0<=n:n<e.length;r?n--:n++)if("Hidden"!==e[n].state&&"VeryHidden"!==e[n].state){t=n;break}return t}(r.sheets,n,r.activeSheetIndex>n),sheetIndexes:e,cancel:!1}};t&&r.trigger("actionBegin",s),s.eventArgs.cancel||(r.notify(In,{prevIndex:r.activeSheetIndex,currentIndex:n}),e.forEach(function(e,t){r.sheets.splice(n+t,0,r.sheets.splice(e+(e<n?-1*t:0),1)[0])}),r.setProperties({activeSheetIndex:i?M(r,a):n>e[0]?n-(e.length-1):n},!0),r.notify(en,{refresh:o}),t&&(delete s.eventArgs.cancel,r.trigger("actionComplete",s)))}function Wi(t,e,r,n){var i={action:"duplicateSheet",eventArgs:{sheetIndex:e=he.isUndefined(e)?t.activeSheetIndex:e,cancel:!1}};if(r&&t.trigger("actionBegin",i),!i.eventArgs.cancel){var o=ge(t,e),a=o.name,s=he.extend({},o.properties||o,{},!0),l=(s.id=zi(t.sheets),s.name),h=(/^\(\d+\)$/.test("("+l.split(" (")[1])&&(l=l.split(" (")[0]),[]);t.sheets.forEach(function(e){h.push(e.name)});for(var d=2;;d++){var p=" ("+d+")";if(31<(l+p).length&&(l=l.slice(0,31-p.length)),-1===h.indexOf(l+p)){s.name=l+p;break}}t.notify(fn,{sheetIndex:e,newSheetIndex:e+1}),t.notify(Nn,{isDuplicate:!0,curSheetIndex:e,newSheetIndex:e+1}),s.rows.forEach(function(e){e&&e.cells&&e.cells.forEach(function(e){e&&(e.image&&e.image.forEach(function(e){e.id=he.getUniqueID(t.element.id+"_overlay_picture_")}),e=e.chart)&&e.forEach(function(e){var t=e.range.lastIndexOf("!"),r=e.range.substring(0,t),n=s.name;r.startsWith("'")&&r.endsWith("'")&&(r=r.slice(1,-1),n="'"+n+"'"),r===a&&(e.range=n+e.range.substring(t),e.id=he.getUniqueID(e.id||"e_spreadsheet_chart"))})})}),t.createSheet(e+1,[s]),t.notify(ue,{action:"addSheet",sheetName:"Sheet"+s.id,visibleName:s.name,sheetId:s.id}),n||t.setProperties({activeSheetIndex:e+1},!0),t.notify(en,{refresh:!0,isDuplicate:!0}),r&&(delete i.eventArgs.cancel,t.trigger("actionComplete",i))}}Gi=function(e,t){return(Gi=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])}))(e,t)};var Gi,Yi,e=function(e,t){function r(){this.constructor=e}Gi(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},t=function(e,t,r,n){var i,o=arguments.length,a=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;0<=s;s--)(i=e[s])&&(a=(o<3?i(a):3<o?i(t,r,a):i(t,r))||a);return 3<o&&a&&Object.defineProperty(t,r,a),a},Xi=(Yi=he.ChildProperty,e(Ki,Yi),t([he.Property("")],Ki.prototype,"notes",void 0),t([he.Collection([],it)],Ki.prototype,"image",void 0),t([he.Collection([],tt)],Ki.prototype,"chart",void 0),t([he.Property("")],Ki.prototype,"value",void 0),t([he.Property("")],Ki.prototype,"formula",void 0),t([he.Property(0)],Ki.prototype,"index",void 0),t([he.Property("General")],Ki.prototype,"format",void 0),t([he.Complex({},z)],Ki.prototype,"style",void 0),t([he.Property("")],Ki.prototype,"hyperlink",void 0),t([he.Property(!1)],Ki.prototype,"wrap",void 0),t([he.Property(!0)],Ki.prototype,"isLocked",void 0),t([he.Property("")],Ki.prototype,"validation",void 0),t([he.Property(1)],Ki.prototype,"colSpan",void 0),t([he.Property(1)],Ki.prototype,"rowSpan",void 0),t([he.Property(!1)],Ki.prototype,"isReadOnly",void 0),Ki);function Ki(){return null!==Yi&&Yi.apply(this,arguments)||this}function me(e,t,r,n,i){var o=kh(r,e);if(!o||!o.cells){if(!n)return i?{}:null;o?r.rows[e].cells=[]:r.rows[e]={cells:[]}}return r.rows[e].cells[t]||(i?{}:null)}function $i(e,t,r,n,i){r.rows[e]?r.rows[e].cells||(r.rows[e].cells=[]):r.rows[e]={cells:[]},i&&r.rows[e].cells[t]?he.extend(r.rows[e].cells[t],n,null,!0):r.rows[e].cells[t]=n}function Zi(t,e){var r,n={fontFamily:"Calibri",verticalAlign:"bottom",textIndent:"0pt",backgroundColor:"#ffffff",color:"#000000",textAlign:"left",fontSize:"11pt",fontWeight:"normal",fontStyle:"normal",textDecoration:"none",border:"",borderLeft:"",borderTop:"",borderRight:"",borderBottom:""},i={};return Object.keys(e?n:t).forEach(function(e){(r=t[""+e])!==n[""+e]&&(i[""+e]=r)}),i}function Ji(e,t,r,n,i){if(void 0===t&&(t=!0),r.allowWrap){for(var e=r.getAddressInfo(e),o=e.indices,a=ge(r,e.sheetIndex),s=e.sheetIndex===r.activeSheetIndex,l=o[0];l<=o[2];l++)for(var h=o[1];h<=o[3];h++)!Xn(r,a,{cell:{wrap:t},rowIdx:l,colIdx:h,preventEvt:n})&&s&&r.notify(ir,{range:[l,h,l,h],wrap:t,sheet:a,initial:!0,isPublic:i});r.setProperties({sheets:r.sheets},!0)}}function Qi(e){var t;return t=-1<e.indexOf("[")&&(e=e.split("[")[1].split("]")[0],-1<eo().indexOf(e))?e:t}function eo(){return["Black","Blue","Cyan","Green","Magenta","Red","White","Yellow"]}function to(e,t,r,n){var i,o,a,s;return e.includes('"')&&((o=e.split(";")).forEach(function(e,t){for(var r=0;r<e.length;r++)if('"'===e[r]&&"\\"!==e[r-1]){for(a=r;a=e.indexOf('"',a+1),"\\"===(s=e[a-1])||"_"===s||"*"===s;);if(-1===a)break;e=e.substring(0,r)+e.substring(a+1),r--}o[t]=e}),e=o.join(";")),!e.includes("d")&&!e.includes("y")||e.includes("#")||Qi(e)||(r&&(r.type="date"),n&&e.includes(" ")&&2===e.split(" ").length?e=e.split(" ")[1]:t=!1,i=!0),t&&(e.includes("h")||e.includes("m")||e.includes("s"))&&!e.includes("#")&&!Qi(e)&&(r&&(r.type=r.type||"",r.type+="time"),i=!0),i}ro=he.ChildProperty,e(no,ro),t([he.Property(0)],no.prototype,"chunkSize",void 0),t([he.Property(3)],no.prototype,"retryCount",void 0),t([he.Property(500)],no.prototype,"retryAfterDelay",void 0);var ro,e=no;function no(){return null!==ro&&ro.apply(this,arguments)||this}oo.prototype.addEventListener=function(){this.parent.on(ht,this.updateSheetFromDataSourceHandler,this),this.parent.on(dt,this.dataSourceChangedHandler,this),this.parent.on(pt,this.dataChangedHandler,this),this.parent.on(ct,this.triggerDataChangeHandler,this)},oo.prototype.removeEventListener=function(){this.parent.isDestroyed||(this.parent.off(ht,this.updateSheetFromDataSourceHandler),this.parent.off(dt,this.dataSourceChangedHandler),this.parent.off(pt,this.dataChangedHandler),this.parent.off(ct,this.triggerDataChangeHandler))},oo.prototype.updateSheetFromDataSourceHandler=function(p){var c,u,f,g,t,m,v,y,C,b,r,x=this,S=[],w=[],n=new U.Deferred,I=(p.promise=n.promise,p.autoDetectFormat),E=I&&oi(this.parent);if(p.sheet&&p.sheet.ranges.length)for(var R,N=this,e=p.sheet.ranges.length-1;0<=e;e--)!function(i){var o,a=p.sheet.ranges[i],s=(r=de(a.startCell),p.loadFromStartCell&&(p.indexes=r),p.indexes[0]),l=p.indexes[2],e=(y=r[0],r=a.dataSource instanceof U