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