| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0cfbbde2"],{"00fd":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d06e");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getTrimmedIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},"010e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz-latn",{months:"Yanvar_Fevral_Mart_Aprel_May_Iyun_Iyul_Avgust_Sentabr_Oktabr_Noyabr_Dekabr".split("_"),monthsShort:"Yan_Fev_Mar_Apr_May_Iyun_Iyul_Avg_Sen_Okt_Noy_Dek".split("_"),weekdays:"Yakshanba_Dushanba_Seshanba_Chorshanba_Payshanba_Juma_Shanba".split("_"),weekdaysShort:"Yak_Dush_Sesh_Chor_Pay_Jum_Shan".split("_"),weekdaysMin:"Ya_Du_Se_Cho_Pa_Ju_Sha".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Bugun soat] LT [da]",nextDay:"[Ertaga] LT [da]",nextWeek:"dddd [kuni soat] LT [da]",lastDay:"[Kecha soat] LT [da]",lastWeek:"[O'tgan] dddd [kuni soat] LT [da]",sameElse:"L"},relativeTime:{future:"Yaqin %s ichida",past:"Bir necha %s oldin",s:"soniya",ss:"%d soniya",m:"bir daqiqa",mm:"%d daqiqa",h:"bir soat",hh:"%d soat",d:"bir kun",dd:"%d kun",M:"bir oy",MM:"%d oy",y:"bir yil",yy:"%d yil"},week:{dow:1,doy:7}});return t}))},"01b5":function(e,t,n){"use strict";var r=n("73fa"),i=n("8793"),s=n("7c2b");e.exports=function(e,t,n){var o,a;return s&&r(o=t.constructor)&&o!==n&&i(a=o.prototype)&&a!==n.prototype&&s(e,a),e}},"0204":function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype,s=i.apply,o=i.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?o.bind(s):function(){return o.apply(s,arguments)})},"0227":function(e,t,n){"use strict";var r=n("54adf"),i=n("73fa"),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e]):r[e]&&r[e][t]}},"022b":function(e,t,n){"use strict";e.exports=function(e){return null===e||void 0===e}},"0283":function(e,t,n){"use strict";n.r(t),n.d(t,"CONTEXT_MENU_ITEMS_NAMESPACE",(function(){return r})),n.d(t,"CONTEXTMENU_ITEMS_NO_ITEMS",(function(){return s})),n.d(t,"CONTEXTMENU_ITEMS_ROW_ABOVE",(function(){return o})),n.d(t,"CONTEXTMENU_ITEMS_ROW_BELOW",(function(){return a})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_LEFT",(function(){return l})),n.d(t,"CONTEXTMENU_ITEMS_INSERT_RIGHT",(function(){return u})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_ROW",(function(){return c})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COLUMN",(function(){return h})),n.d(t,"CONTEXTMENU_ITEMS_UNDO",(function(){return d})),n.d(t,"CONTEXTMENU_ITEMS_REDO",(function(){return m})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY",(function(){return f})),n.d(t,"CONTEXTMENU_ITEMS_CLEAR_COLUMN",(function(){return p})),n.d(t,"CONTEXTMENU_ITEMS_COPY",(function(){return g})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS",(function(){return y})),n.d(t,"CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS",(function(){return w})),n.d(t,"CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY",(function(){return b})),n.d(t,"CONTEXTMENU_ITEMS_CUT",(function(){return v})),n.d(t,"CONTEXTMENU_ITEMS_FREEZE_COLUMN",(function(){return _})),n.d(t,"CONTEXTMENU_ITEMS_UNFREEZE_COLUMN",(function(){return S})),n.d(t,"CONTEXTMENU_ITEMS_MERGE_CELLS",(function(){return E})),n.d(t,"CONTEXTMENU_ITEMS_UNMERGE_CELLS",(function(){return C})),n.d(t,"CONTEXTMENU_ITEMS_ADD_COMMENT",(function(){return M})),n.d(t,"CONTEXTMENU_ITEMS_EDIT_COMMENT",(function(){return T})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_COMMENT",(function(){return R})),n.d(t,"CONTEXTMENU_ITEMS_READ_ONLY_COMMENT",(function(){return O})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT",(function(){return N})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_LEFT",(function(){return A})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_CENTER",(function(){return L})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT",(function(){return I})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY",(function(){return k})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_TOP",(function(){return x})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE",(function(){return D})),n.d(t,"CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM",(function(){return H})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS",(function(){return P})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_TOP",(function(){return j})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_RIGHT",(function(){return F})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_BOTTOM",(function(){return Y})),n.d(t,"CONTEXTMENU_ITEMS_BORDERS_LEFT",(function(){return U})),n.d(t,"CONTEXTMENU_ITEMS_REMOVE_BORDERS",(function(){return V})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD",(function(){return B})),n.d(t,"CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD",(function(){return W})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_COLUMN",(function(){return z})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_COLUMN",(function(){return G})),n.d(t,"CONTEXTMENU_ITEMS_HIDE_ROW",(function(){return K})),n.d(t,"CONTEXTMENU_ITEMS_SHOW_ROW",(function(){return X})),n.d(t,"FILTERS_NAMESPACE",(function(){return $})),n.d(t,"FILTERS_CONDITIONS_NAMESPACE",(function(){return q})),n.d(t,"FILTERS_CONDITIONS_NONE",(function(){return J})),n.d(t,"FILTERS_CONDITIONS_EMPTY",(function(){return Q})),n.d(t,"FILTERS_CONDITIONS_NOT_EMPTY",(function(){return Z})),n.d(t,"FILTERS_CONDITIONS_EQUAL",(function(){return ee})),n.d(t,"FILTERS_CONDITIONS_NOT_EQUAL",(function(){return te})),n.d(t,"FILTERS_CONDITIONS_BEGINS_WITH",(function(){return ne})),n.d(t,"FILTERS_CONDITIONS_ENDS_WITH",(function(){return re})),n.d(t,"FILTERS_CONDITIONS_CONTAINS",(function(){return ie})),n.d(t,"FILTERS_CONDITIONS_NOT_CONTAIN",(function(){return se})),n.d(t,"FILTERS_CONDITIONS_BY_VALUE",(function(){return oe})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN",(function(){return ae})),n.d(t,"FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL",(function(){return le})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN",(function(){return ue})),n.d(t,"FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL",(function(){return ce})),n.d(t,"FILTERS_CONDITIONS_BETWEEN",(function(){return he})),n.d(t,"FILTERS_CONDITIONS_NOT_BETWEEN",(function(){return de})),n.d(t,"FILTERS_CONDITIONS_AFTER",(function(){return me})),n.d(t,"FILTERS_CONDITIONS_BEFORE",(function(){return fe})),n.d(t,"FILTERS_CONDITIONS_TODAY",(function(){return pe})),n.d(t,"FILTERS_CONDITIONS_TOMORROW",(function(){return ge})),n.d(t,"FILTERS_CONDITIONS_YESTERDAY",(function(){return ye})),n.d(t,"FILTERS_DIVS_FILTER_BY_CONDITION",(function(){return we})),n.d(t,"FILTERS_DIVS_FILTER_BY_VALUE",(function(){return be})),n.d(t,"FILTERS_LABELS_CONJUNCTION",(function(){return ve})),n.d(t,"FILTERS_LABELS_DISJUNCTION",(function(){return _e})),n.d(t,"FILTERS_VALUES_BLANK_CELLS",(function(){return Se})),n.d(t,"FILTERS_BUTTONS_SELECT_ALL",(function(){return Ee})),n.d(t,"FILTERS_BUTTONS_CLEAR",(function(){return Ce})),n.d(t,"FILTERS_BUTTONS_OK",(function(){return Me})),n.d(t,"FILTERS_BUTTONS_CANCEL",(function(){return Te})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SEARCH",(function(){return Re})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_VALUE",(function(){return Oe})),n.d(t,"FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE",(function(){return Ne})),n.d(t,"CHECKBOX_RENDERER_NAMESPACE",(function(){return Ae})),n.d(t,"CHECKBOX_CHECKED",(function(){return Le})),n.d(t,"CHECKBOX_UNCHECKED",(function(){return Ie}));const r="ContextMenu:items",i=r,s=i+".noItems",o=i+".insertRowAbove",a=i+".insertRowBelow",l=i+".insertColumnOnTheLeft",u=i+".insertColumnOnTheRight",c=i+".removeRow",h=i+".removeColumn",d=i+".undo",m=i+".redo",f=i+".readOnly",p=i+".clearColumn",g=i+".copy",y=i+".copyWithHeaders",w=i+".copyWithGroupHeaders",b=i+".copyHeadersOnly",v=i+".cut",_=i+".freezeColumn",S=i+".unfreezeColumn",E=i+".mergeCells",C=i+".unmergeCells",M=i+".addComment",T=i+".editComment",R=i+".removeComment",O=i+".readOnlyComment",N=i+".align",A=i+".align.left",L=i+".align.center",I=i+".align.right",k=i+".align.justify",x=i+".align.top",D=i+".align.middle",H=i+".align.bottom",P=i+".borders",j=i+".borders.top",F=i+".borders.right",Y=i+".borders.bottom",U=i+".borders.left",V=i+".borders.remove",B=i+".nestedHeaders.insertChildRow",W=i+".nestedHeaders.detachFromParent",z=i+".hideColumn",G=i+".showColumn",K=i+".hideRow",X=i+".showRow",$="Filters:",q=$+"conditions",J=q+".none",Q=q+".isEmpty",Z=q+".isNotEmpty",ee=q+".isEqualTo",te=q+".isNotEqualTo",ne=q+".beginsWith",re=q+".endsWith",ie=q+".contains",se=q+".doesNotContain",oe=q+".byValue",ae=q+".greaterThan",le=q+".greaterThanOrEqualTo",ue=q+".lessThan",ce=q+".lessThanOrEqualTo",he=q+".isBetween",de=q+".isNotBetween",me=q+".after",fe=q+".before",pe=q+".today",ge=q+".tomorrow",ye=q+".yesterday",we=$+"labels.filterByCondition",be=$+"labels.filterByValue",ve=$+"labels.conjunction",_e=$+"labels.disjunction",Se=$+"values.blankCells",Ee=$+"buttons.selectAll",Ce=$+"buttons.clear",Me=$+"buttons.ok",Te=$+"buttons.cancel",Re=$+"buttons.placeholder.search",Oe=$+"buttons.placeholder.value",Ne=$+"buttons.placeholder.secondValue",Ae="CheckboxRenderer:",Le=Ae+"checked",Ie=Ae+"unchecked"},"02fb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ml",{months:"ജനുവരി_ഫെബ്രുവരി_മാർച്ച്_ഏപ്രിൽ_മേയ്_ജൂൺ_ജൂലൈ_ഓഗസ്റ്റ്_സെപ്റ്റംബർ_ഒക്ടോബർ_നവംബർ_ഡിസംബർ".split("_"),monthsShort:"ജനു._ഫെബ്രു._മാർ._ഏപ്രി._മേയ്_ജൂൺ_ജൂലൈ._ഓഗ._സെപ്റ്റ._ഒക്ടോ._നവം._ഡിസം.".split("_"),monthsParseExact:!0,weekdays:"ഞായറാഴ്ച_തിങ്കളാഴ്ച_ചൊവ്വാഴ്ച_ബുധനാഴ്ച_വ്യാഴാഴ്ച_വെള്ളിയാഴ്ച_ശനിയാഴ്ച".split("_"),weekdaysShort:"ഞായർ_തിങ്കൾ_ചൊവ്വ_ബുധൻ_വ്യാഴം_വെള്ളി_ശനി".split("_"),weekdaysMin:"ഞാ_തി_ചൊ_ബു_വ്യാ_വെ_ശ".split("_"),longDateFormat:{LT:"A h:mm -നു",LTS:"A h:mm:ss -നു",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm -നു",LLLL:"dddd, D MMMM YYYY, A h:mm -നു"},calendar:{sameDay:"[ഇന്ന്] LT",nextDay:"[നാളെ] LT",nextWeek:"dddd, LT",lastDay:"[ഇന്നലെ] LT",lastWeek:"[കഴിഞ്ഞ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s കഴിഞ്ഞ്",past:"%s മുൻപ്",s:"അൽപ നിമിഷങ്ങൾ",ss:"%d സെക്കൻഡ്",m:"ഒരു മിനിറ്റ്",mm:"%d മിനിറ്റ്",h:"ഒരു മണിക്കൂർ",hh:"%d മണിക്കൂർ",d:"ഒരു ദിവസം",dd:"%d ദിവസം",M:"ഒരു മാസം",MM:"%d മാസം",y:"ഒരു വർഷം",yy:"%d വർഷം"},meridiemParse:/രാത്രി|രാവിലെ|ഉച്ച കഴിഞ്ഞ്|വൈകുന്നേരം|രാത്രി/i,meridiemHour:function(e,t){return 12===e&&(e=0),"രാത്രി"===t&&e>=4||"ഉച്ച കഴിഞ്ഞ്"===t||"വൈകുന്നേരം"===t?e+12:e},meridiem:function(e,t,n){return e<4?"രാത്രി":e<12?"രാവിലെ":e<17?"ഉച്ച കഴിഞ്ഞ്":e<20?"വൈകുന്നേരം":"രാത്രി"}});return t}))},"03529":function(e,t,n){"use strict";n.d(t,"a",(function(){return S}));n("7a89");var r=n("13e1"),i=n("87d6"),s=n("63d8"),o=n("5d7f"),a=n("ffec");function l(e,t,n){e.addEventListener(t,n,!1)}function u(e,t,n){e.removeEventListener(t,n,!1)}function c(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function h(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300},n=e.body,r=e.createTextNode(""),i=e.createElement("span");let s;function o(){r.textContent=s.value,i.style.position="absolute",i.style.fontSize=c(s).fontSize,i.style.fontFamily=c(s).fontFamily,i.style.whiteSpace="pre",n.appendChild(i);const e=i.clientWidth+2;n.removeChild(i);const o=s.style;o.height=t.minHeight+"px",t.minWidth>e?o.width=t.minWidth+"px":e>t.maxWidth?o.width=t.maxWidth+"px":o.width=e+"px";const a=s.scrollHeight?s.scrollHeight-1:0;t.minHeight>a?o.height=t.minHeight+"px":t.maxHeight<a?(o.height=t.maxHeight+"px",o.overflowY="visible"):o.height=a+"px"}function a(){e.defaultView.setTimeout(o,0)}function h(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=s.clientHeight;else{const n=parseInt(e.minHeight,10);isNaN(n)||(t.minHeight=n)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=s.clientHeight;else{const n=parseInt(e.maxHeight,10);isNaN(n)||(t.maxHeight=n)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=s.clientWidth;else{const n=parseInt(e.minWidth,10);isNaN(n)||(t.minWidth=n)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=s.clientWidth;else{const n=parseInt(e.maxWidth,10);isNaN(n)||(t.maxWidth=n)}i.firstChild||(i.className="autoResize",i.style.display="inline-block",i.appendChild(r))}function d(e,n){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s=e,h(n),"TEXTAREA"===s.nodeName&&(s.style.resize="none",s.style.height=t.minHeight+"px",s.style.minWidth=t.minWidth+"px",s.style.maxWidth=t.maxWidth+"px",s.style.overflowY="hidden"),r&&(l(s,"input",o),l(s,"keydown",a)),o()}return{init:d,resize:o,unObserve(){u(s,"input",o),u(s,"keydown",a)}}}var d=n("7b9c");function m(e,t){const n=Object(o["getCaretPosition"])(t),r=t.value.split("\n");let i=n,s=0;for(let o=0;o<r.length;o++){const t=r[o];0!==o&&(s+=r[o-1].length+1);const a=s+t.length;if("home"===e?i=s:"end"===e&&(i=a),n<=a)break}Object(o["setCaretPosition"])(t,i)}var f=n("8828");function p(e,t,n){return(t=g(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function g(e){var t=y(e,"string");return"symbol"==typeof t?t:t+""}function y(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const w="ht_editor_visible",b="ht_editor_hidden",v="textEditor",_="text";class S extends r["a"]{static get EDITOR_TYPE(){return _}constructor(e){super(e),p(this,"eventManager",new i["a"](this)),p(this,"autoResize",h(this.hot.rootDocument)),p(this,"TEXTAREA",void 0),p(this,"textareaStyle",void 0),p(this,"TEXTAREA_PARENT",void 0),p(this,"textareaParentStyle",void 0),p(this,"layerClass",void 0),this.eventManager=new i["a"](this),this.createElements(),this.bindEvents(),this.hot.addHookOnce("afterDestroy",()=>this.destroy())}getValue(){return this.TEXTAREA.value}setValue(e){this.TEXTAREA.value=e}open(){this.refreshDimensions(),this.showEditableElement(),this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this.autoResize.unObserve(),Object(o["isThisHotChild"])(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,n,i,s,o){const a=this.state;if(super.prepare(e,t,n,i,s,o),!o.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=o;e&&!this.isOpened()&&(this.TEXTAREA.value=""),a===r["b"].FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===r["b"].VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),Object(o["setCaretPosition"])(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),Object(o["setAttribute"])(this.TEXTAREA,[["data-hot-input",""],Object(f["L"])(-1)]),Object(o["addClass"])(this.TEXTAREA,"handsontableInput"),this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.textareaStyle.overflowY="visible",this.TEXTAREA_PARENT=e.createElement("DIV"),Object(o["addClass"])(this.TEXTAREA_PARENT,"handsontableInputHolder"),Object(o["hasClass"])(this.TEXTAREA_PARENT,this.layerClass)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,b),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){Object(s["isEdge"])()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",Object(o["removeClass"])(this.TEXTAREA_PARENT,this.layerClass),Object(o["addClass"])(this.TEXTAREA_PARENT,b)}showEditableElement(){this.textareaParentStyle.height="",this.textareaParentStyle.overflow="",this.textareaParentStyle.position="",this.textareaParentStyle[this.hot.isRtl()?"left":"right"]="auto",this.textareaParentStyle.opacity="1",this.textareaStyle.textIndent="";const e=this.TEXTAREA_PARENT.childNodes;let t=!1;Object(a["rangeEach"])(e.length-1,n=>{const r=e[n];if(Object(o["hasClass"])(r,"handsontableEditor"))return t=!0,!1}),Object(o["hasClass"])(this.TEXTAREA_PARENT,b)&&Object(o["removeClass"])(this.TEXTAREA_PARENT,b),t?(this.layerClass=w,Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),Object(o["addClass"])(this.TEXTAREA_PARENT,this.layerClass))}refreshValue(){const e=this.hot.toPhysicalRow(this.row),t=this.hot.getSourceDataAtCell(e,this.col);this.originalValue=t,this.setValue(t),this.refreshDimensions()}refreshDimensions(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.state!==r["b"].EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:n,width:i,maxWidth:s,height:a,maxHeight:l}=this.getEditedCellRect();this.textareaParentStyle.top=t+"px",this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=n+"px",this.showEditableElement();const u=Object(o["getComputedStyle"])(this.TD,this.hot.rootWindow);this.TEXTAREA.style.fontSize=u.fontSize,this.TEXTAREA.style.fontFamily=u.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor;const c=Object(o["getComputedStyle"])(this.TEXTAREA),h=parseInt(c.paddingLeft,10)+parseInt(c.paddingRight,10),d=parseInt(c.paddingTop,10)+parseInt(c.paddingBottom,10),m=i-h,f=a-d,p=s-h,g=l-d;this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(m,p),minHeight:Math.min(f,g),maxWidth:p,maxHeight:g},!0)}bindEvents(){Object(s["isIOS"])()&&this.eventManager.addEventListener(this.TEXTAREA,"focusout",()=>this.finishEditing(!1)),this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()}),this.addHook("afterRowResize",()=>{this.refreshDimensions(),this.state===r["b"].EDITING&&this.focus()})}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n={runOnlyIf:()=>Object(d["isDefined"])(this.hot.getSelected()),group:v},r=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};t.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(r(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(r(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(r(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[n]=t;m(n,this.TEXTAREA)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(v)}}},"03ec":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cv",{months:"кӑрлач_нарӑс_пуш_ака_май_ҫӗртме_утӑ_ҫурла_авӑн_юпа_чӳк_раштав".split("_"),monthsShort:"кӑр_нар_пуш_ака_май_ҫӗр_утӑ_ҫур_авн_юпа_чӳк_раш".split("_"),weekdays:"вырсарникун_тунтикун_ытларикун_юнкун_кӗҫнерникун_эрнекун_шӑматкун".split("_"),weekdaysShort:"выр_тун_ытл_юн_кӗҫ_эрн_шӑм".split("_"),weekdaysMin:"вр_тн_ыт_юн_кҫ_эр_шм".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ]",LLL:"YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm",LLLL:"dddd, YYYY [ҫулхи] MMMM [уйӑхӗн] D[-мӗшӗ], HH:mm"},calendar:{sameDay:"[Паян] LT [сехетре]",nextDay:"[Ыран] LT [сехетре]",lastDay:"[Ӗнер] LT [сехетре]",nextWeek:"[Ҫитес] dddd LT [сехетре]",lastWeek:"[Иртнӗ] dddd LT [сехетре]",sameElse:"L"},relativeTime:{future:function(e){var t=/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран";return e+t},past:"%s каялла",s:"пӗр-ик ҫеккунт",ss:"%d ҫеккунт",m:"пӗр минут",mm:"%d минут",h:"пӗр сехет",hh:"%d сехет",d:"пӗр кун",dd:"%d кун",M:"пӗр уйӑх",MM:"%d уйӑх",y:"пӗр ҫул",yy:"%d ҫул"},dayOfMonthOrdinalParse:/\d{1,2}-мӗш/,ordinal:"%d-мӗш",week:{dow:1,doy:7}});return t}))},"04c20":function(e,t,n){"use strict";var r=n("5438"),i=n("87ed").has,s=n("ff56"),o=n("0f98"),a=n("6f539"),l=n("bfa7"),u=n("142d");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<=n.size)return!1!==a(t,(function(e){if(n.includes(e))return!1}),!0);var c=n.getIterator();return!1!==l(c,(function(e){if(i(t,e))return u(c,"normal",!1)}))}},"0558":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return e%100===11||e%10!==1}function n(e,n,r,i){var s=e+" ";switch(r){case"s":return n||i?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?s+(n||i?"sekúndur":"sekúndum"):s+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?s+(n||i?"mínútur":"mínútum"):n?s+"mínúta":s+"mínútu";case"hh":return t(e)?s+(n||i?"klukkustundir":"klukkustundum"):s+"klukkustund";case"d":return n?"dagur":i?"dag":"degi";case"dd":return t(e)?n?s+"dagar":s+(i?"daga":"dögum"):n?s+"dagur":s+(i?"dag":"degi");case"M":return n?"mánuður":i?"mánuð":"mánuði";case"MM":return t(e)?n?s+"mánuðir":s+(i?"mánuði":"mánuðum"):n?s+"mánuður":s+(i?"mánuð":"mánuði");case"y":return n||i?"ár":"ári";case"yy":return t(e)?s+(n||i?"ár":"árum"):s+(n||i?"ár":"ári")}}var r=e.defineLocale("is",{months:"janúar_febrúar_mars_apríl_maí_júní_júlí_ágúst_september_október_nóvember_desember".split("_"),monthsShort:"jan_feb_mar_apr_maí_jún_júl_ágú_sep_okt_nóv_des".split("_"),weekdays:"sunnudagur_mánudagur_þriðjudagur_miðvikudagur_fimmtudagur_föstudagur_laugardagur".split("_"),weekdaysShort:"sun_mán_þri_mið_fim_fös_lau".split("_"),weekdaysMin:"Su_Má_Þr_Mi_Fi_Fö_La".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd, D. MMMM YYYY [kl.] H:mm"},calendar:{sameDay:"[í dag kl.] LT",nextDay:"[á morgun kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[í gær kl.] LT",lastWeek:"[síðasta] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"eftir %s",past:"fyrir %s síðan",s:n,ss:n,m:n,mm:n,h:"klukkustund",hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return r}))},"0716":function(e,t,n){"use strict";n("7a89");function r(e,t,n){i(e,t),t.set(e,n)}function i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function l(e,t){return e.get(c(e,t))}function u(e,t,n){return e.set(c(e,t),n),n}function c(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var h=new WeakMap;class d{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s(this,"row",null),s(this,"col",null),r(this,h,!1),u(h,this,n),"undefined"!==typeof e&&"undefined"!==typeof t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:n,countRowHeaders:r,countColHeaders:i}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col))&&(!(this.row<-i||this.col<-r)&&!(this.row>=t||this.col>=n))}isEqual(e){return e===this||this.row===e.row&&this.col===e.col}isHeader(){return!this.isCell()}isCell(){return this.row>=0&&this.col>=0}isRtl(){return l(h,this)}isSouthEastOf(e){return this.row>=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(l(h,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(l(h,this)?this.col<=e.col:this.col>=e.col)}normalize(){return this.row=null===this.row?this.row:Math.max(this.row,0),this.col=null===this.col?this.col:Math.max(this.col,0),this}assign(e){return Number.isInteger(null===e||void 0===e?void 0:e.row)&&(this.row=e.row),Number.isInteger(null===e||void 0===e?void 0:e.col)&&(this.col=e.col),e instanceof d&&u(h,this,e.isRtl()),this}clone(){return new d(this.row,this.col,l(h,this))}toObject(){return{row:this.row,col:this.col}}}t["a"]=d},"0721":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fo",{months:"januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),weekdays:"sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur".split("_"),weekdaysShort:"sun_mán_týs_mik_hós_frí_ley".split("_"),weekdaysMin:"su_má_tý_mi_hó_fr_le".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D. MMMM, YYYY HH:mm"},calendar:{sameDay:"[Í dag kl.] LT",nextDay:"[Í morgin kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[Í gjár kl.] LT",lastWeek:"[síðstu] dddd [kl] LT",sameElse:"L"},relativeTime:{future:"um %s",past:"%s síðani",s:"fá sekund",ss:"%d sekundir",m:"ein minuttur",mm:"%d minuttir",h:"ein tími",hh:"%d tímar",d:"ein dagur",dd:"%d dagar",M:"ein mánaður",MM:"%d mánaðir",y:"eitt ár",yy:"%d ár"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"0794":function(e,t,n){"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},"079e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ja",{eras:[{since:"2019-05-01",offset:1,name:"令和",narrow:"㋿",abbr:"R"},{since:"1989-01-08",until:"2019-04-30",offset:1,name:"平成",narrow:"㍻",abbr:"H"},{since:"1926-12-25",until:"1989-01-07",offset:1,name:"昭和",narrow:"㍼",abbr:"S"},{since:"1912-07-30",until:"1926-12-24",offset:1,name:"大正",narrow:"㍽",abbr:"T"},{since:"1873-01-01",until:"1912-07-29",offset:6,name:"明治",narrow:"㍾",abbr:"M"},{since:"0001-01-01",until:"1873-12-31",offset:1,name:"西暦",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"紀元前",narrow:"BC",abbr:"BC"}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return"元"===t[1]?1:parseInt(t[1]||e,10)},months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiemParse:/午前|午後/i,isPM:function(e){return"午後"===e},meridiem:function(e,t,n){return e<12?"午前":"午後"},calendar:{sameDay:"[今日] LT",nextDay:"[明日] LT",nextWeek:function(e){return e.week()!==this.week()?"[来週]dddd LT":"dddd LT"},lastDay:"[昨日] LT",lastWeek:function(e){return this.week()!==e.week()?"[先週]dddd LT":"dddd LT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case"y":return 1===e?"元年":e+"年";case"d":case"D":case"DDD":return e+"日";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"数秒",ss:"%d秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}});return t}))},"07ac":function(e,t,n){var r=n("23e7"),i=n("6f53").values;r({target:"Object",stat:!0},{values:function(e){return i(e)}})},"088f":function(e,t,n){"use strict";var r=n("8793"),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not an object")}},"09d4":function(e,t,n){"use strict";var r=n("5438"),i=n("87ed").has,s=n("ff56"),o=n("0f98"),a=n("bfa7"),l=n("142d");e.exports=function(e){var t=r(this),n=o(e);if(s(t)<n.size)return!1;var u=n.getIterator();return!1!==a(u,(function(e){if(!i(t,e))return l(u,"normal",!1)}))}},"0a3c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-do",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return s}))},"0a73":function(e,t,n){"use strict";var r=n("d128"),i=n("69ba"),s=Function.prototype,o=r&&Object.getOwnPropertyDescriptor,a=i(s,"name"),l=a&&"something"===function(){}.name,u=a&&(!r||r&&o(s,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:u}},"0a84":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-ma",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اثنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"0ad8":function(e,t,n){"use strict";var r,i=n("088f"),s=n("fdba"),o=n("e1c6"),a=n("861e"),l=n("f808"),u=n("2179"),c=n("ab25"),h=">",d="<",m="prototype",f="script",p=c("IE_PROTO"),g=function(){},y=function(e){return d+f+h+e+d+"/"+f+h},w=function(e){e.write(y("")),e.close();var t=e.parentWindow.Object;return e=null,t},b=function(){var e,t=u("iframe"),n="java"+f+":";return t.style.display="none",l.appendChild(t),t.src=String(n),e=t.contentWindow.document,e.open(),e.write(y("document.F=Object")),e.close(),e.F},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}v="undefined"!=typeof document?document.domain&&r?w(r):b():w(r);var e=o.length;while(e--)delete v[m][o[e]];return v()};a[p]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(g[m]=i(e),n=new g,g[m]=null,n[p]=e):n=v(),void 0===t?n:s.f(n,t)}},"0c0f":function(e,t,n){"use strict";var r=n("b343"),i=n("73fa"),s=/#|\.prototype\./,o=function(e,t){var n=l[a(e)];return n===c||n!==u&&(i(t)?r(t):!!t)},a=o.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=o.data={},u=o.NATIVE="N",c=o.POLYFILL="P";e.exports=o},"0c5c":function(e,t,n){"use strict";var r=n("5438"),i=n("87ed"),s=n("b52d"),o=n("ff56"),a=n("0f98"),l=n("6f539"),u=n("bfa7"),c=i.has,h=i.remove;e.exports=function(e){var t=r(this),n=a(e),i=s(t);return o(t)<=n.size?l(t,(function(e){n.includes(e)&&h(i,e)})):u(n.getIterator(),(function(e){c(i,e)&&h(i,e)})),i}},"0caa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["thoddea sekondamni","thodde sekond"],ss:[e+" sekondamni",e+" sekond"],m:["eka mintan","ek minut"],mm:[e+" mintamni",e+" mintam"],h:["eka voran","ek vor"],hh:[e+" voramni",e+" voram"],d:["eka disan","ek dis"],dd:[e+" disamni",e+" dis"],M:["eka mhoinean","ek mhoino"],MM:[e+" mhoineamni",e+" mhoine"],y:["eka vorsan","ek voros"],yy:[e+" vorsamni",e+" vorsam"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-latn",{months:{standalone:"Janer_Febrer_Mars_Abril_Mai_Jun_Julai_Agost_Setembr_Otubr_Novembr_Dezembr".split("_"),format:"Janerachea_Febrerachea_Marsachea_Abrilachea_Maiachea_Junachea_Julaiachea_Agostachea_Setembrachea_Otubrachea_Novembrachea_Dezembrachea".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"Jan._Feb._Mars_Abr._Mai_Jun_Jul._Ago._Set._Otu._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Aitar_Somar_Mongllar_Budhvar_Birestar_Sukrar_Son'var".split("_"),weekdaysShort:"Ait._Som._Mon._Bud._Bre._Suk._Son.".split("_"),weekdaysMin:"Ai_Sm_Mo_Bu_Br_Su_Sn".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [vazta]",LTS:"A h:mm:ss [vazta]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [vazta]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [vazta]",llll:"ddd, D MMM YYYY, A h:mm [vazta]"},calendar:{sameDay:"[Aiz] LT",nextDay:"[Faleam] LT",nextWeek:"[Fuddlo] dddd[,] LT",lastDay:"[Kal] LT",lastWeek:"[Fattlo] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s adim",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(er)/,ordinal:function(e,t){switch(t){case"D":return e+"er";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/rati|sokallim|donparam|sanje/,meridiemHour:function(e,t){return 12===e&&(e=0),"rati"===t?e<4?e:e+12:"sokallim"===t?e:"donparam"===t?e>12?e:e+12:"sanje"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"rati":e<12?"sokallim":e<16?"donparam":e<20?"sanje":"rati"}});return n}))},"0e49":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ch",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return t}))},"0e6b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-au",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:4}});return t}))},"0e81":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inci",5:"'inci",8:"'inci",70:"'inci",80:"'inci",2:"'nci",7:"'nci",20:"'nci",50:"'nci",3:"'üncü",4:"'üncü",100:"'üncü",6:"'ncı",9:"'uncu",10:"'uncu",30:"'uncu",60:"'ıncı",90:"'ıncı"},n=e.defineLocale("tr",{months:"Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık".split("_"),monthsShort:"Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara".split("_"),weekdays:"Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi".split("_"),weekdaysShort:"Paz_Pzt_Sal_Çar_Per_Cum_Cmt".split("_"),weekdaysMin:"Pz_Pt_Sa_Ça_Pe_Cu_Ct".split("_"),meridiem:function(e,t,n){return e<12?n?"öö":"ÖÖ":n?"ös":"ÖS"},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return"ös"===e||"ÖS"===e},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[yarın saat] LT",nextWeek:"[gelecek] dddd [saat] LT",lastDay:"[dün] LT",lastWeek:"[geçen] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s önce",s:"birkaç saniye",ss:"%d saniye",m:"bir dakika",mm:"%d dakika",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",w:"bir hafta",ww:"%d hafta",M:"bir ay",MM:"%d ay",y:"bir yıl",yy:"%d yıl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'ıncı";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"0e87":function(e,t,n){"use strict";var r=n("73fa"),i=n("a60d"),s=n("b384"),o=n("3df8");e.exports=function(e,t,n,a){a||(a={});var l=a.enumerable,u=void 0!==a.name?a.name:t;if(r(n)&&s(n,u,a),a.global)l?e[t]=n:o(t,n);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(c){}l?e[t]=n:i.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},"0eec":function(e,t,n){"use strict";var r=n("ac4f"),i=n("54adf"),s=n("d2e4").clear;r({global:!0,bind:!0,enumerable:!0,forced:i.clearImmediate!==s},{clearImmediate:s})},"0f14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("da",{months:"januar_februar_marts_april_maj_juni_juli_august_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"søn_man_tir_ons_tor_fre_lør".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd [d.] D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"på dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[i] dddd[s kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"få sekunder",ss:"%d sekunder",m:"et minut",mm:"%d minutter",h:"en time",hh:"%d timer",d:"en dag",dd:"%d dage",M:"en måned",MM:"%d måneder",y:"et år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"0f38":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tl-ph",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"0f98":function(e,t,n){"use strict";var r=n("2aac"),i=n("088f"),s=n("7b69"),o=n("9e75"),a=n("0794"),l="Invalid size",u=RangeError,c=TypeError,h=Math.max,d=function(e,t){this.set=e,this.size=h(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return a(i(s(this.keys,this.set)))},includes:function(e){return s(this.has,this.set,e)}},e.exports=function(e){i(e);var t=+e.size;if(t!==t)throw new c(l);var n=o(t);if(n<0)throw new u(l);return new d(e,n)}},"0ff2":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("eu",{months:"urtarrila_otsaila_martxoa_apirila_maiatza_ekaina_uztaila_abuztua_iraila_urria_azaroa_abendua".split("_"),monthsShort:"urt._ots._mar._api._mai._eka._uzt._abu._ira._urr._aza._abe.".split("_"),monthsParseExact:!0,weekdays:"igandea_astelehena_asteartea_asteazkena_osteguna_ostirala_larunbata".split("_"),weekdaysShort:"ig._al._ar._az._og._ol._lr.".split("_"),weekdaysMin:"ig_al_ar_az_og_ol_lr".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY[ko] MMMM[ren] D[a]",LLL:"YYYY[ko] MMMM[ren] D[a] HH:mm",LLLL:"dddd, YYYY[ko] MMMM[ren] D[a] HH:mm",l:"YYYY-M-D",ll:"YYYY[ko] MMM D[a]",lll:"YYYY[ko] MMM D[a] HH:mm",llll:"ddd, YYYY[ko] MMM D[a] HH:mm"},calendar:{sameDay:"[gaur] LT[etan]",nextDay:"[bihar] LT[etan]",nextWeek:"dddd LT[etan]",lastDay:"[atzo] LT[etan]",lastWeek:"[aurreko] dddd LT[etan]",sameElse:"L"},relativeTime:{future:"%s barru",past:"duela %s",s:"segundo batzuk",ss:"%d segundo",m:"minutu bat",mm:"%d minutu",h:"ordu bat",hh:"%d ordu",d:"egun bat",dd:"%d egun",M:"hilabete bat",MM:"%d hilabete",y:"urte bat",yy:"%d urte"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return t}))},1004:function(e,t,n){"use strict";n("7a89"),n("d06e"),n("4cd6");var r=n("81ea"),i=n("351d"),s=n("29b0"),o=n("bd5e"),a=n("67a87"),l=n("97b9");function u(e,t,n){return(t=c(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e){var t=h(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const d=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","afterGetCellMeta","afterGetColHeader","afterGetRowHeader","afterInit","afterLoadData","afterUpdateData","afterMomentumScroll","afterOnCellCornerMouseDown","afterOnCellCornerDblClick","afterOnCellMouseDown","afterOnCellMouseUp","afterOnCellContextMenu","afterOnCellMouseOver","afterOnCellMouseOut","afterRemoveCol","afterRemoveRow","beforeRenderer","afterRenderer","afterRowSequenceChange","beforeViewportScrollVertically","beforeViewportScrollHorizontally","beforeViewportScroll","afterScrollHorizontally","afterScrollVertically","afterScroll","afterSelection","afterSelectionByProp","afterSelectionEnd","afterSelectionEndByProp","afterSelectionFocusSet","beforeSelectColumns","afterSelectColumns","beforeSelectRows","afterSelectRows","afterSetCellMeta","afterRemoveCellMeta","afterSetDataAtCell","afterSetDataAtRowProp","afterSetSourceDataAtCell","afterUpdateSettings","afterValidate","beforeLanguageChange","afterLanguageChange","beforeAutofill","afterAutofill","beforeCellAlignment","beforeChange","beforeChangeRender","beforeDrawBorders","beforeGetCellMeta","beforeRemoveCellMeta","beforeInit","beforeInitWalkontable","beforeLoadData","beforeUpdateData","beforeKeyDown","beforeOnCellMouseDown","beforeOnCellMouseUp","beforeOnCellContextMenu","beforeOnCellMouseOver","beforeOnCellMouseOut","beforeRemoveCol","beforeRemoveRow","beforeViewRender","afterViewRender","beforeRender","afterRender","beforeRowWrap","beforeColumnWrap","beforeSetCellMeta","beforeSelectionFocusSet","beforeSetRangeStartOnly","beforeSetRangeStart","beforeSetRangeEnd","beforeSelectionHighlightSet","beforeTouchScroll","beforeValidate","beforeValueRender","construct","init","modifyColHeader","modifyColWidth","modifyFiltersMultiSelectValue","modifyFocusedElement","modifyRowHeader","modifyRowHeight","modifyRowHeightByOverlayName","modifyData","modifySourceData","modifyRowData","modifyGetCellCoords","modifyFocusOnTabNavigation","beforeHighlightingRowHeader","beforeHighlightingColumnHeader","persistentStateLoad","persistentStateReset","persistentStateSave","beforeColumnSort","afterColumnSort","modifyAutofillRange","modifyCopyableRange","beforeCut","afterCut","beforeCopy","afterCopy","beforePaste","afterPaste","beforeColumnFreeze","afterColumnFreeze","beforeColumnMove","afterColumnMove","beforeColumnUnfreeze","afterColumnUnfreeze","beforeRowMove","afterRowMove","beforeColumnResize","afterColumnResize","beforeRowResize","afterRowResize","afterGetColumnHeaderRenderers","afterGetRowHeaderRenderers","beforeStretchingColumnWidth","beforeFilter","afterFilter","afterFormulasValuesUpdate","afterNamedExpressionAdded","afterNamedExpressionRemoved","afterSheetAdded","afterSheetRenamed","afterSheetRemoved","modifyColumnHeaderHeight","modifyColumnHeaderValue","beforeUndo","beforeUndoStackChange","afterUndo","afterUndoStackChange","beforeRedo","beforeRedoStackChange","afterRedo","afterRedoStackChange","modifyRowHeaderWidth","modifyTransformFocus","modifyTransformStart","modifyTransformEnd","afterModifyTransformFocus","afterModifyTransformStart","afterModifyTransformEnd","afterViewportRowCalculatorOverride","afterViewportColumnCalculatorOverride","afterPluginsInitialized","beforeHideRows","afterHideRows","beforeUnhideRows","afterUnhideRows","beforeHideColumns","afterHideColumns","beforeUnhideColumns","afterUnhideColumns","beforeTrimRow","afterTrimRow","beforeUntrimRow","afterUntrimRow","beforeDropdownMenuShow","afterDropdownMenuShow","afterDropdownMenuHide","beforeAddChild","afterAddChild","beforeDetachChild","afterDetachChild","beforeBeginEditing","afterBeginEditing","beforeMergeCells","afterMergeCells","beforeUnmergeCells","afterUnmergeCells","afterListen","afterUnlisten","afterRefreshDimensions","beforeRefreshDimensions","beforeColumnCollapse","afterColumnCollapse","beforeColumnExpand","afterColumnExpand","modifyAutoColumnSizeSeed"],m=a["a"]`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
- Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
- learn about the migration path.`,f=new Map([["modifyRow","8.0.0"],["modifyCol","8.0.0"],["unmodifyRow","8.0.0"],["unmodifyCol","8.0.0"],["skipLengthCache","8.0.0"],["hiddenColumn","8.0.0"],["hiddenRow","8.0.0"]]),p=new Map([[]]),g=new WeakMap;class y{static getSingleton(){return b()}constructor(){u(this,"globalBucket",void 0),this.globalBucket=this.createEmptyBucket()}createEmptyBucket(){const e=Object.create(null);return Object(r["arrayEach"])(d,t=>{e[t]=[],this.initOrderMap(e,t)}),e}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=this.createEmptyBucket()),e.pluginHookBucket):this.globalBucket}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;if(Array.isArray(t))Object(r["arrayEach"])(t,t=>this.add(e,t,n));else{f.has(e)&&Object(o["b"])(Object(s["substitute"])(m,{hookName:e,removedInVersion:f.get(e)})),p.has(e)&&Object(o["b"])(p.get(e));const a=this.getBucket(n);if("undefined"===typeof a[e]&&(this.register(e),a[e]=[],this.initOrderMap(a,e)),t.skip=!1,-1===a[e].indexOf(t)){let n=!1;t.initialHook&&Object(r["arrayEach"])(a[e],(r,i)=>{if(r.initialHook)return a[e][i]=t,n=!0,!1}),n||a[e].push(t)}this.setCallbackOrderIndex(a,e,t,i),this.orderBucketByOrderIndex(a,e)}return this}once(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3?arguments[3]:void 0;Array.isArray(t)?Object(r["arrayEach"])(t,t=>this.once(e,t,n)):(t.runOnce=!0,this.add(e,t,n,i))}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;const r=this.getBucket(n);return"undefined"!==typeof r[e]&&r[e].indexOf(t)>=0&&(t.skip=!0,!0)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=this.getBucket(t);return!(void 0===n[e]||!n[e].length)}run(e,t,n,r,i,s,o,a){{const u=this.globalBucket[t],c=u?u.length:0;let h=0;if(c)while(h<c){if(!u[h]||u[h].skip){h+=1;continue}const c=Object(l["fastCall"])(u[h],e,n,r,i,s,o,a);void 0!==c&&(n=c),u[h]&&u[h].runOnce&&this.remove(t,u[h]),h+=1}}{const u=this.getBucket(e)[t],c=u?u.length:0;let h=0;if(c)while(h<c){if(!u[h]||u[h].skip){h+=1;continue}const c=Object(l["fastCall"])(u[h],e,n,r,i,s,o,a);void 0!==c&&(n=c),u[h]&&u[h].runOnce&&this.remove(t,u[h],e),h+=1}}return n}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;Object(i["objectEach"])(this.getBucket(e),(e,t,n)=>n[t].length=0)}register(e){this.isRegistered(e)||d.push(e)}deregister(e){this.isRegistered(e)&&d.splice(d.indexOf(e),1)}isDeprecated(e){return p.has(e)||f.has(e)}isRegistered(e){return d.indexOf(e)>=0}getRegistered(){return d}setCallbackOrderIndex(e,t,n,r){const i=Number.isInteger(r)?r:0,s=this.getCallbackOrderMap(e,t);s.set(i,[...s.get(i)||[],n])}orderBucketByOrderIndex(e,t){const n=this.getCallbackOrderMap(e,t);void 0===n||0===n.size||1===n.size&&n.has(0)||(e[t]=[...n].sort((e,t)=>e[0]-t[0]).flatMap(e=>{let[,t]=e;return t}))}initOrderMap(e,t){g.has(e)||g.set(e,[]),g.get(e)[t]=new Map}getCallbackOrderMap(e,t){return g.get(e)[t]}}const w=new y;function b(){return w}t["a"]=y},1096:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));n("7a89"),n("d06e");var r=n("ffec"),i=n("351d"),s=n("97b9"),o=n("7ae0");function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){var t=u(e,"string");return"symbol"==typeof t?t:t+""}function u(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class c{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;a(this,"indexedValues",[]),a(this,"initValueOrFn",void 0),this.initValueOrFn=e}getValues(){return this.indexedValues}getValueAtIndex(e){const t=this.indexedValues;if(e<t.length)return t[e]}setValues(e){this.indexedValues=e.slice(),this.runLocalHooks("change")}setValueAtIndex(e,t){return e<this.indexedValues.length&&(this.indexedValues[e]=t,this.runLocalHooks("change"),!0)}clear(){this.setDefaultValues()}getLength(){return this.getValues().length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.indexedValues.length=0,Object(s["isFunction"])(this.initValueOrFn)?Object(r["rangeEach"])(e-1,e=>this.indexedValues.push(this.initValueOrFn(e))):Object(r["rangeEach"])(e-1,()=>this.indexedValues.push(this.initValueOrFn)),this.runLocalHooks("change")}init(e){return this.setDefaultValues(e),this.runLocalHooks("init"),this}insert(){this.runLocalHooks("change")}remove(){this.runLocalHooks("change")}destroy(){this.clearLocalHooks(),this.indexedValues=null,this.initValueOrFn=null}}Object(i["mixin"])(c,o["a"])},"10e8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("th",{months:"มกราคม_กุมภาพันธ์_มีนาคม_เมษายน_พฤษภาคม_มิถุนายน_กรกฎาคม_สิงหาคม_กันยายน_ตุลาคม_พฤศจิกายน_ธันวาคม".split("_"),monthsShort:"ม.ค._ก.พ._มี.ค._เม.ย._พ.ค._มิ.ย._ก.ค._ส.ค._ก.ย._ต.ค._พ.ย._ธ.ค.".split("_"),monthsParseExact:!0,weekdays:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัสบดี_ศุกร์_เสาร์".split("_"),weekdaysShort:"อาทิตย์_จันทร์_อังคาร_พุธ_พฤหัส_ศุกร์_เสาร์".split("_"),weekdaysMin:"อา._จ._อ._พ._พฤ._ศ._ส.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY เวลา H:mm",LLLL:"วันddddที่ D MMMM YYYY เวลา H:mm"},meridiemParse:/ก่อนเที่ยง|หลังเที่ยง/,isPM:function(e){return"หลังเที่ยง"===e},meridiem:function(e,t,n){return e<12?"ก่อนเที่ยง":"หลังเที่ยง"},calendar:{sameDay:"[วันนี้ เวลา] LT",nextDay:"[พรุ่งนี้ เวลา] LT",nextWeek:"dddd[หน้า เวลา] LT",lastDay:"[เมื่อวานนี้ เวลา] LT",lastWeek:"[วัน]dddd[ที่แล้ว เวลา] LT",sameElse:"L"},relativeTime:{future:"อีก %s",past:"%sที่แล้ว",s:"ไม่กี่วินาที",ss:"%d วินาที",m:"1 นาที",mm:"%d นาที",h:"1 ชั่วโมง",hh:"%d ชั่วโมง",d:"1 วัน",dd:"%d วัน",w:"1 สัปดาห์",ww:"%d สัปดาห์",M:"1 เดือน",MM:"%d เดือน",y:"1 ปี",yy:"%d ปี"}});return t}))},"11b3":function(e,t,n){"use strict";var r=n("8793"),i=n("939b"),s=n("80dd"),o=s("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[o])?!!t:"RegExp"===i(e))}},"12e9":function(e,t,n){"use strict";var r=n("80dd"),i=r("toStringTag"),s={};s[i]="z",e.exports="[object z]"===String(s)},"13e1":function(e,t,n){"use strict";n.d(t,"b",(function(){return f})),n.d(t,"a",(function(){return p}));n("7a89");var r=n("7b9c"),i=n("351d"),s=(n("d06e"),n("81ea"));const o="hooksRefRegisterer",a={_hooksStorage:Object.create(null),addHook(e,t){return this._hooksStorage[e]||(this._hooksStorage[e]=[]),this.hot.addHook(e,t),this._hooksStorage[e].push(t),this},removeHooksByKey(e){Object(s["arrayEach"])(this._hooksStorage[e]||[],t=>{this.hot.removeHook(e,t)})},clearHooks(){Object(i["objectEach"])(this._hooksStorage,(e,t)=>this.removeHooksByKey(t)),this._hooksStorage={}}};Object(i["defineGetter"])(a,"MIXIN_NAME",o,{writable:!1,enumerable:!1});var l=a,u=n("5d7f");function c(e,t,n){return(t=h(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){var t=d(e,"string");return"symbol"==typeof t?t:t+""}function d(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const m="base",f=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class p{static get EDITOR_TYPE(){return m}constructor(e){c(this,"hot",void 0),c(this,"state",f.VIRGIN),c(this,"_opened",!1),c(this,"_fullEditMode",!1),c(this,"_closeCallback",null),c(this,"TD",null),c(this,"row",null),c(this,"col",null),c(this,"prop",null),c(this,"originalValue",null),c(this,"cellProperties",null),this.hot=e,this.init()}_fireCallbacks(e){this._closeCallback&&(this._closeCallback(e),this._closeCallback=null)}init(){}getValue(){throw Error("Editor getValue() method unimplemented")}setValue(){throw Error("Editor setValue() method unimplemented")}open(){throw Error("Editor open() method unimplemented")}close(){throw Error("Editor close() method unimplemented")}prepare(e,t,n,r,i,s){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=i,this.cellProperties=s,this.state=this.isOpened()?this.state:f.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let n,r,i,s;if(t){const e=this.hot.getSelectedLast();n=Math.max(Math.min(e[0],e[2]),0),r=Math.max(Math.min(e[1],e[3]),0),i=Math.max(e[0],e[2]),s=Math.max(e[1],e[3])}else[n,r,i,s]=[this.row,this.col,null,null];const o=this.hot.runHooks("modifyGetCellCoords",n,r);Array.isArray(o)&&([n,r]=o),this.hot.populateFromArray(n,r,e,i,s,"edit")}beginEditing(e,t){if(this.state!==f.VIRGIN)return;const n=this.hot,i=n.rowIndexMapper.getRenderableFromVisualIndex(this.row),s=n.columnIndexMapper.getRenderableFromVisualIndex(this.col);if(n.view.scrollViewport(n._createCellCoords(i,s)),this.state=f.EDITING,this.isInFullEditMode()){const t="string"===typeof e?e:Object(r["stringify"])(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),n.view.render(),n.runHooks("afterBeginEditing",this.row,this.col)}finishEditing(e,t,n){let r;if(n){const e=this._closeCallback;this._closeCallback=t=>{e&&e(t),n(t),this.hot.view.render()}}if(!this.isWaiting())if(this.state!==f.VIRGIN){if(this.state===f.EDITING){if(e)return this.cancelChanges(),void this.hot.view.render();const n=this.getValue();r=this.cellProperties.trimWhitespace?[["string"===typeof n?String.prototype.trim.call(n||""):n]]:[[n]],this.state=f.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",e=>{this.state=f.FINISHED,this.discardEditor(e)}):(this.state=f.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout(()=>{this._fireCallbacks(!0)})}cancelChanges(){this.state=f.FINISHED,this.discardEditor()}discardEditor(e){if(this.state===f.FINISHED)if(!1===e&&!0!==this.cellProperties.allowInvalid)this.hot.selectCell(this.row,this.col),this.focus(),this.state=f.EDITING,this._fireCallbacks(!1);else{this.close(),this._opened=!1,this._fullEditMode=!1,this.state=f.VIRGIN,this._fireCallbacks(!0);const e=this.hot.getShortcutManager();e.setActiveContextName("grid")}}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===f.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:n,wtViewport:r}=this.hot.view._wt,i=this.hot.rootWindow,s=Object(u["offset"])(t),o=Object(u["outerWidth"])(t),a=Object(u["offset"])(this.hot.rootElement),l=Object(u["outerWidth"])(this.hot.rootElement),c=n.topOverlay.holder,h=n.inlineStartOverlay.holder,d=c!==i?c.scrollTop:0,m=h!==i?h.scrollLeft:0,f=i.innerWidth-a.left-l,{wtTable:p}=null!==(e=n.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,g=p.name,y=["master","inline_start"].includes(g)?d:0,w=["master","top","bottom"].includes(g)?m:0,b=s.top===a.top?0:1;let v=s.top-a.top-b-y,_=0;_=this.hot.isRtl()?i.innerWidth-s.left-o-f-1+w:s.left-a.left-1-w,["top","top_inline_start_corner"].includes(g)&&(v+=n.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(g)&&(_+=Math.abs(n.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),E=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),C=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),M=this.hot.rowIndexMapper.getRenderableIndexesLength(),T=M-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&E<=0||E===T)&&(v+=1),C<=0&&(_+=1);const R=r.rowsRenderCalculator.startPosition,O=r.columnsRenderCalculator.startPosition,N=Math.abs(n.inlineStartOverlay.getScrollPosition()),A=n.topOverlay.getScrollPosition(),L=Object(u["getScrollbarWidth"])(this.hot.rootDocument);let I=t.offsetTop;if(["inline_start","master"].includes(g)&&(I+=R-A),["bottom","bottom_inline_start_corner"].includes(g)){const{wtViewport:e,wtTable:t}=n.bottomOverlay.clone;I+=e.getWorkspaceHeight()-t.getHeight()-L}let k=t.offsetLeft;this.hot.isRtl()?(k=k>=0?p.getWidth()-t.offsetLeft:Math.abs(k),k+=O-N-o):["top","master","bottom"].includes(g)&&(k+=O-N);const x=Object(u["getComputedStyle"])(this.TD,this.hot.rootWindow),D=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",H=parseInt(x[D],10)>0?0:1,P=parseInt(x.borderTopWidth,10)>0?0:1,j=Object(u["outerWidth"])(t)+H,F=Object(u["outerHeight"])(t)+P,Y=Object(u["hasVerticalScrollbar"])(c)?L:0,U=Object(u["hasHorizontalScrollbar"])(h)?L:0,V=this.hot.view.maximumVisibleElementWidth(k)-Y+H,B=Math.max(this.hot.view.maximumVisibleElementHeight(I)-U+P,23);return{top:v,start:_,height:F,maxHeight:B,width:j,maxWidth:V}}getEditedCellsLayerClass(){const e=this.checkEditorSection();switch(e){case"inline-start":return"ht_clone_left ht_clone_inline_start";case"bottom":return"ht_clone_bottom";case"bottom-inline-start-corner":return"ht_clone_bottom_left_corner ht_clone_bottom_inline_start_corner";case"top":return"ht_clone_top";case"top-inline-start-corner":return"ht_clone_top_left_corner ht_clone_top_inline_start_corner";default:return"ht_clone_master"}}getEditedCell(){return this.hot.getCell(this.row,this.col,!0)}checkEditorSection(){const e=this.hot.countRows();let t="";return this.row<this.hot.getSettings().fixedRowsTop?t=this.col<this.hot.getSettings().fixedColumnsStart?"top-inline-start-corner":"top":this.hot.getSettings().fixedRowsBottom&&this.row>=e-this.hot.getSettings().fixedRowsBottom?t=this.col<this.hot.getSettings().fixedColumnsStart?"bottom-inline-start-corner":"bottom":this.col<this.hot.getSettings().fixedColumnsStart&&(t="inline-start"),t}}Object(i["mixin"])(p,l)},"13e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["секунда","секунде","секунди"],m:["један минут","једног минута"],mm:["минут","минута","минута"],h:["један сат","једног сата"],hh:["сат","сата","сати"],d:["један дан","једног дана"],dd:["дан","дана","дана"],M:["један месец","једног месеца"],MM:["месец","месеца","месеци"],y:["једну годину","једне године"],yy:["годину","године","година"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"једна година":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"годину"===s?e+" година":e+" "+s)}},n=e.defineLocale("sr-cyrl",{months:"јануар_фебруар_март_април_мај_јун_јул_август_септембар_октобар_новембар_децембар".split("_"),monthsShort:"јан._феб._мар._апр._мај_јун_јул_авг._сеп._окт._нов._дец.".split("_"),monthsParseExact:!0,weekdays:"недеља_понедељак_уторак_среда_четвртак_петак_субота".split("_"),weekdaysShort:"нед._пон._уто._сре._чет._пет._суб.".split("_"),weekdaysMin:"не_по_ут_ср_че_пе_су".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[данас у] LT",nextDay:"[сутра у] LT",nextWeek:function(){switch(this.day()){case 0:return"[у] [недељу] [у] LT";case 3:return"[у] [среду] [у] LT";case 6:return"[у] [суботу] [у] LT";case 1:case 2:case 4:case 5:return"[у] dddd [у] LT"}},lastDay:"[јуче у] LT",lastWeek:function(){var e=["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"за %s",past:"пре %s",s:"неколико секунди",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"142d":function(e,t,n){"use strict";var r=n("7b69"),i=n("088f"),s=n("2471");e.exports=function(e,t,n){var o,a;i(e);try{if(o=s(e,"return"),!o){if("throw"===t)throw n;return n}o=r(o,e)}catch(l){a=!0,o=l}if("throw"===t)throw n;if(a)throw o;return i(o),n}},1587:function(e,t,n){"use strict";var r=n("ac4f"),i=n("7204"),s=n("2bab"),o=n("88c5"),a=!o("symmetricDifference")||!s("symmetricDifference");r({target:"Set",proto:!0,real:!0,forced:a},{symmetricDifference:i})},"167b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("oc-lnc",{months:{standalone:"genièr_febrièr_març_abril_mai_junh_julhet_agost_setembre_octòbre_novembre_decembre".split("_"),format:"de genièr_de febrièr_de març_d'abril_de mai_de junh_de julhet_d'agost_de setembre_d'octòbre_de novembre_de decembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._mai_junh_julh._ago._set._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"dimenge_diluns_dimars_dimècres_dijòus_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dm._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dm_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:"[uèi a] LT",nextDay:"[deman a] LT",nextWeek:"dddd [a] LT",lastDay:"[ièr a] LT",lastWeek:"dddd [passat a] LT",sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"unas segondas",ss:"%d segondas",m:"una minuta",mm:"%d minutas",h:"una ora",hh:"%d oras",d:"un jorn",dd:"%d jorns",M:"un mes",MM:"%d meses",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});return t}))},"169f":function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("7a89");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("validators");function u(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered validator found under "${e}" name`);return s(e)}function c(e,t){"string"!==typeof e&&(t=e,e=t.VALIDATOR_TYPE),i(e,t)}},"170e":function(e,t,n){"use strict";var r=n("0227"),i=n("69ba"),s=n("2d2d"),o=n("1e92"),a=n("7c2b"),l=n("1d07"),u=n("2c35"),c=n("01b5"),h=n("a45f"),d=n("9718"),m=n("2daa"),f=n("d128"),p=n("d62b");e.exports=function(e,t,n,g){var y="stackTraceLimit",w=g?2:1,b=e.split("."),v=b[b.length-1],_=r.apply(null,b);if(_){var S=_.prototype;if(!p&&i(S,"cause")&&delete S.cause,!n)return _;var E=r("Error"),C=t((function(e,t){var n=h(g?t:e,void 0),r=g?new _(e):new _;return void 0!==n&&s(r,"message",n),m(r,C,r.stack,2),this&&o(S,this)&&c(r,this,C),arguments.length>w&&d(r,arguments[w]),r}));if(C.prototype=S,"Error"!==v?a?a(C,E):l(C,E,{name:!0}):f&&y in _&&(u(C,_,y),u(C,_,"prepareStackTrace")),l(C,_),!p)try{S.name!==v&&s(S,"name",v),S.constructor=C}catch(M){}return C}}},"1b1a":function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("1096"),i=n("3d57"),s=n("a73f");class o extends r["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(s["b"])(this.indexedValues,t);this.indexedValues=Object(i["a"])(n,e,t),super.insert(e,t)}remove(e){const t=Object(i["b"])(this.indexedValues,e);this.indexedValues=Object(s["a"])(t,e),super.remove(e)}}},"1b45":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mt",{months:"Jannar_Frar_Marzu_April_Mejju_Ġunju_Lulju_Awwissu_Settembru_Ottubru_Novembru_Diċembru".split("_"),monthsShort:"Jan_Fra_Mar_Apr_Mej_Ġun_Lul_Aww_Set_Ott_Nov_Diċ".split("_"),weekdays:"Il-Ħadd_It-Tnejn_It-Tlieta_L-Erbgħa_Il-Ħamis_Il-Ġimgħa_Is-Sibt".split("_"),weekdaysShort:"Ħad_Tne_Tli_Erb_Ħam_Ġim_Sib".split("_"),weekdaysMin:"Ħa_Tn_Tl_Er_Ħa_Ġi_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Illum fil-]LT",nextDay:"[Għada fil-]LT",nextWeek:"dddd [fil-]LT",lastDay:"[Il-bieraħ fil-]LT",lastWeek:"dddd [li għadda] [fil-]LT",sameElse:"L"},relativeTime:{future:"f’ %s",past:"%s ilu",s:"ftit sekondi",ss:"%d sekondi",m:"minuta",mm:"%d minuti",h:"siegħa",hh:"%d siegħat",d:"ġurnata",dd:"%d ġranet",M:"xahar",MM:"%d xhur",y:"sena",yy:"%d sni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"1caf":function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},"1cfd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",0:"0"},n=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},r={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},i=function(e){return function(t,i,s,o){var a=n(t),l=r[e][n(t)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],o=e.defineLocale("ar-ly",{months:s,monthsShort:s,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:i("s"),ss:i("s"),m:i("m"),mm:i("m"),h:i("h"),hh:i("h"),d:i("d"),dd:i("d"),M:i("M"),MM:i("M"),y:i("y"),yy:i("y")},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return o}))},"1d07":function(e,t,n){"use strict";var r=n("69ba"),i=n("fb46"),s=n("485c"),o=n("a60d");e.exports=function(e,t,n){for(var a=i(t),l=o.f,u=s.f,c=0;c<a.length;c++){var h=a[c];r(e,h)||n&&r(n,h)||l(e,h,u(t,h))}}},"1e8c":function(e,t,n){"use strict";n.d(t,"a",(function(){return te}));var r=n("c4fa");const i={name:"editorCloseAndSave",callback(e){const t=e._getEditorManager();t.closeEditorAndSaveChanges()}};var s=n("13e1");const o={name:"editorCloseAndSaveByArrowKeys",callback(e,t,n){const r=e._getEditorManager(),i=r.getActiveEditor();i.isInFullEditMode()&&i.state===s["b"].EDITING||(r.closeEditorAndSaveChanges(),e.getSelected()&&(n.includes("arrowdown")?e.selection.transformStart(1,0):n.includes("arrowup")?e.selection.transformStart(-1,0):n.includes("arrowleft")?e.selection.transformStart(0,-1*e.getDirectionFactor()):n.includes("arrowright")&&e.selection.transformStart(0,e.getDirectionFactor())),t.preventDefault())}},a={name:"editorCloseAndSaveByEnter",callback(e,t){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(t)}},l={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},u={name:"editorFastOpen",callback(e,t){const{highlight:n}=e.getSelectedRangeLast();n.isHeader()||e._getEditorManager().openEditor(null,t,!0)}};var c=n("de3b");const h={name:"editorOpen",callback(e,t,n){const r=e._getEditorManager(),i=e.getSelectedRangeLast(),{highlight:s}=i;if(e.selection.isMultiple()&&!i.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const r=e.getSettings(),i="function"===typeof r.enterMoves?r.enterMoves(t):r.enterMoves;n.includes("shift")?e.selection.transformFocus(-i.row,-i.col):e.selection.transformFocus(i.row,i.col)}else s.isHeader()||(e.getSettings().enterBeginsEditing?r.cellProperties.readOnly?r.moveSelectionAfterEnter(t):r.openEditor(null,t,!0):r.moveSelectionAfterEnter(t),Object(c["stopImmediatePropagation"])(t))}};function d(){return[i,o,a,l,u,h]}const m={name:"extendCellsSelectionDown",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(1,0)}},f={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.min(t.row+e.countVisibleRows(),e.countRows()-1),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,-1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.min(n.row-i,e.countRows()-1);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},p={name:"extendCellsSelectionLeft",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,-1*e.getDirectionFactor())}},g={name:"extendCellsSelectionRight",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByColumnHeader())||e.selection.transformEnd(0,e.getDirectionFactor())}},y={name:"extendCellsSelectionToColumns",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByRowHeader()?e.selection.selectAll(!0,!0):e.selectColumns(n.col,r.col,t)}},w={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(e.countRows()-1,-1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},b={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=n.getNearestNotHiddenIndex(e.countCols()-1,-1),a=i.clone();a.col=r.col,t.setRangeStart(a,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,o))}}},v={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast();if(!e.selection.isSelectedByRowHeader()&&!e.selection.isSelectedByCorner()&&r.isCell()){const o=parseInt(e.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(o,1),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},_={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},S={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByColumnHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=i.clone();l.col=r.col,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(s.row,a))}}},E={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:i,to:s}=e.getSelectedRangeLast(),o=r.isHeader()&&e.selection.isSelectedByRowHeader();if(r.isCell()||o){const a=n.getNearestNotHiddenIndex(0,1),l=i.clone();l.row=r.row,t.setRangeStart(l,void 0,!1,r.clone()),o&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,s.col))}}},C={name:"extendCellsSelectionToRows",callback(e){const{highlight:t,from:n,to:r}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()?e.selection.selectAll(!0,!0):e.selectRows(n.row,r.row,t)}},M={name:"extendCellsSelectionUp",callback(e){const{highlight:t}=e.getSelectedRangeLast();e.selection.isSelectedByColumnHeader()||e.selection.isSelectedByCorner()||!(t.isCell()||t.isHeader()&&e.selection.isSelectedByRowHeader())||e.selection.transformEnd(-1,0)}},T={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{to:t}=e.getSelectedRangeLast(),n=Math.max(t.row-e.countVisibleRows(),0),r=e.rowIndexMapper.getNearestNotHiddenIndex(n,1);if(null!==r){const n=e._createCellCoords(r,t.col),i=t.row-e.view.getFirstFullyVisibleRow(),s=Math.max(n.row-i,0);e.selection.setRangeEnd(n),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}};function R(){return[m,f,p,g,y,w,b,v,_,S,E,C,M,T]}const O={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.transformStart(1,0)}},N={name:"moveCellSelectionDownByViewportHeight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+n;r===e.countRows()-1?i=1:r+i>e.countRows()&&(i=e.countRows()-r-1),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}},A={name:"moveCellSelectionInlineEnd",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(-i.row,-i.col):e.selection.transformStart(-i.row,-i.col)}},L={name:"moveCellSelectionInlineStart",callback(e,t){const n=e.getSettings(),r=e.getSelectedRangeLast(),i="function"===typeof n.tabMoves?n.tabMoves(t):n.tabMoves;e.selection.isMultiple()&&!r.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?e.selection.transformFocus(i.row,i.col):e.selection.transformStart(i.row,i.col)}},I={name:"moveCellSelectionLeft",callback(e){e.selection.transformStart(0,-1*e.getDirectionFactor())}},k={name:"moveCellSelectionRight",callback(e){e.selection.transformStart(0,e.getDirectionFactor())}},x={name:"moveCellSelectionToMostBottom",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===n&&(n=-1),e.selection.setRangeStart(e._createCellCoords(n,t))}},D={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsBottom,10),s=n.getNearestNotHiddenIndex(e.countRows()-i-1,-1),o=r.getNearestNotHiddenIndex(e.countCols()-1,-1);t.setRangeStart(e._createCellCoords(s,o))}},H={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e;t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,n.getNearestNotHiddenIndex(e.countCols()-1,-1)))}},P={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,r=parseInt(e.getSettings().fixedColumnsStart,10),i=e.getSelectedRangeLast().highlight.row,s=n.getNearestNotHiddenIndex(r,1);t.setRangeStart(e._createCellCoords(i,s))}},j={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,r=e.getSelectedRangeLast().highlight.row;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===i&&(i=e.isRtl()?-1:-e.countRowHeaders()),t.setRangeStart(e._createCellCoords(r,i))}},F={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{row:r}=e.getSelectedRangeLast().highlight;let i=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===i&&(i=e.isRtl()?-e.countRowHeaders():-1),t.setRangeStart(e._createCellCoords(r,i))}},Y={name:"moveCellSelectionToMostTop",callback(e){const{col:t}=e.getSelectedRangeLast().highlight;let n=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===n&&(n=-e.countColHeaders()),e.selection.setRangeStart(e._createCellCoords(n,t))}},U={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,i=parseInt(e.getSettings().fixedRowsTop,10),s=parseInt(e.getSettings().fixedColumnsStart,10),o=n.getNearestNotHiddenIndex(i,1),a=r.getNearestNotHiddenIndex(s,1);t.setRangeStart(e._createCellCoords(o,a))}},V={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.transformStart(-1,0)}},B={name:"moveCellSelectionUpByViewportHight",callback(e){const{navigableHeaders:t}=e.getSettings(),n=t?e.countColHeaders():0,{row:r}=e.getSelectedRangeLast().highlight;let i=-(e.countVisibleRows()+n);r===-n?i=-1:r+i<n&&(i=-(r+n)),e.selection.transformStart(i,0),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}};function W(){return[O,N,A,L,I,k,x,D,H,P,j,F,Y,U,V,B]}const z={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},G={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),n=e.view.getFirstFullyVisibleRow()-1,r=e.view.getFirstFullyVisibleColumn()-1,i=e.view.getLastFullyVisibleRow()+1,s=e.view.getLastFullyVisibleColumn()+1,o=e._createCellCoords(n,r),a=e._createCellCoords(i,s),l=e._createCellRange(o,o,a);if(!l.includes(t)&&(t.row>=0||t.col>=0)){const n={};if(t.col>=0){const r=Math.floor(e.countVisibleCols()/2);n.col=Math.max(t.col-r,0)}if(t.row>=0){const r=Math.floor(e.countVisibleRows()/2);n.row=Math.max(t.row-r,0)}e.scrollViewportTo({...n,verticalSnap:"top",horizontalSnap:"start"})}}},K={name:"selectAllCells",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!0})}},X={name:"selectAllCellsAndHeaders",callback(e){e.selection.selectAll(!0,!0,{disableHeadersHighlight:!1})}},$={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:n,col:r}=t[t.length-1].highlight.normalize(),i=e.getDataAtCell(n,r),s=new Map;for(let o=0;o<t.length;o++)t[o].forAll((t,o)=>{if(t>=0&&o>=0&&(t!==n||o!==r)){const{readOnly:n}=e.getCellMeta(t,o);n||s.set(`${t}x${o}`,[t,o,i])}});e.setDataAtCell(Array.from(s.values()))}},q=[...d(),...R(),...W(),z,G,K,X,$];function J(e){const t={};return q.forEach(n=>{let{name:r,callback:i}=n;t[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return i(e,...n)}}),t}function Q(e){const t=e.getShortcutManager().addContext("editor"),n=J(e),i={group:r["a"]};t.addShortcuts([{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Enter","Control/Meta"],["Enter","Control/Meta","Shift"]],captureCtrl:!0,callback:(e,t)=>n.editorCloseAndSaveByEnter(e,t)},{keys:[["Tab"],["Tab","Shift"],["PageDown"],["PageUp"]],forwardToContext:e.getShortcutManager().getContext("grid"),callback:(e,t)=>n.editorCloseAndSave(e,t)},{keys:[["ArrowDown"],["ArrowUp"],["ArrowLeft"],["ArrowRight"]],preventDefault:!1,callback:(e,t)=>n.editorCloseAndSaveByArrowKeys(e,t)},{keys:[["Escape"],["Escape","Control/Meta"]],callback:()=>n.editorCloseWithoutSaving()}],i)}var Z=n("7b9c");function ee(e){const t=e.getShortcutManager().addContext("grid"),n=J(e),i={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return Object(Z["isDefined"])(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:r["b"]};t.addShortcuts([{keys:[["F2"]],callback:e=>n.editorFastOpen(e)},{keys:[["Enter"],["Enter","Shift"]],callback:(e,t)=>n.editorOpen(e,t)},{keys:[["Backspace"],["Delete"]],callback:()=>n.emptySelectedCells()}],{group:r["a"],runOnlyIf:()=>Object(Z["isDefined"])(e.getSelected())}),t.addShortcuts([{keys:[["Control/Meta","A"]],callback:()=>n.selectAllCells(),runOnlyIf:()=>{var t;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())}},{keys:[["Control/Meta","A"]],callback:()=>{},runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader()},preventDefault:!0},{keys:[["Control/Meta","Shift","Space"]],callback:()=>n.selectAllCellsAndHeaders()},{keys:[["Control/Meta","Enter"]],callback:()=>n.populateSelectedCellsData(),runOnlyIf:()=>{var t,n;return!(null!==(t=e.getSelectedRangeLast())&&void 0!==t&&t.highlight.isHeader())&&(null===(n=e.getSelectedRangeLast())||void 0===n?void 0:n.getCellsCount())>1}},{keys:[["Control","Space"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToColumns()},{keys:[["Shift","Space"]],stopPropagation:!0,callback:()=>n.extendCellsSelectionToRows()},{keys:[["ArrowUp"]],callback:()=>n.moveCellSelectionUp()},{keys:[["ArrowUp","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTop()},{keys:[["ArrowUp","Shift"]],callback:()=>n.extendCellsSelectionUp()},{keys:[["ArrowUp","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostTop(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowDown"]],callback:()=>n.moveCellSelectionDown()},{keys:[["ArrowDown","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottom()},{keys:[["ArrowDown","Shift"]],callback:()=>n.extendCellsSelectionDown()},{keys:[["ArrowDown","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostBottom(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByColumnHeader())},{keys:[["ArrowLeft"]],callback:()=>n.moveCellSelectionLeft()},{keys:[["ArrowLeft","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostLeft()},{keys:[["ArrowLeft","Shift"]],callback:()=>n.extendCellsSelectionLeft()},{keys:[["ArrowLeft","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostLeft(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["ArrowRight"]],callback:()=>n.moveCellSelectionRight()},{keys:[["ArrowRight","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostRight()},{keys:[["ArrowRight","Shift"]],callback:()=>n.extendCellsSelectionRight()},{keys:[["ArrowRight","Shift","Control/Meta"]],captureCtrl:!0,callback:()=>n.extendCellsSelectionToMostRight(),runOnlyIf:()=>!(e.selection.isSelectedByCorner()||e.selection.isSelectedByRowHeader())},{keys:[["Home"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["Home","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineStart()},{keys:[["Home","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostTopInlineStart(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["End","Shift"]],callback:()=>n.extendCellsSelectionToMostInlineEnd()},{keys:[["End","Control/Meta"]],captureCtrl:!0,callback:()=>n.moveCellSelectionToMostBottomInlineEnd(),runOnlyIf:()=>e.view.isMainTableNotFullyCoveredByOverlays()},{keys:[["PageUp"]],callback:()=>n.moveCellSelectionUpByViewportHight()},{keys:[["PageUp","Shift"]],callback:()=>n.extendCellsSelectionUpByViewportHeight()},{keys:[["PageDown"]],callback:()=>n.moveCellSelectionDownByViewportHeight()},{keys:[["PageDown","Shift"]],callback:()=>n.extendCellsSelectionDownByViewportHeight()},{keys:[["Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineStart(e)},{keys:[["Shift","Tab"]],preventDefault:!1,callback:e=>n.moveCellSelectionInlineEnd(e)},{keys:[["Control/Meta","Backspace"]],callback:()=>n.scrollToFocusedCell()}],i)}function te(e){[ee,Q].forEach(t=>t(e))}},"1e92":function(e,t,n){"use strict";var r=n("fd18");e.exports=r({}.isPrototypeOf)},"1fc1":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:n?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"};return"m"===r?n?"хвіліна":"хвіліну":"h"===r?n?"гадзіна":"гадзіну":e+" "+t(i[r],+e)}var r=e.defineLocale("be",{months:{format:"студзеня_лютага_сакавіка_красавіка_траўня_чэрвеня_ліпеня_жніўня_верасня_кастрычніка_лістапада_снежня".split("_"),standalone:"студзень_люты_сакавік_красавік_травень_чэрвень_ліпень_жнівень_верасень_кастрычнік_лістапад_снежань".split("_")},monthsShort:"студ_лют_сак_крас_трав_чэрв_ліп_жнів_вер_каст_ліст_снеж".split("_"),weekdays:{format:"нядзелю_панядзелак_аўторак_сераду_чацвер_пятніцу_суботу".split("_"),standalone:"нядзеля_панядзелак_аўторак_серада_чацвер_пятніца_субота".split("_"),isFormat:/\[ ?[Ууў] ?(?:мінулую|наступную)? ?\] ?dddd/},weekdaysShort:"нд_пн_ат_ср_чц_пт_сб".split("_"),weekdaysMin:"нд_пн_ат_ср_чц_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., HH:mm",LLLL:"dddd, D MMMM YYYY г., HH:mm"},calendar:{sameDay:"[Сёння ў] LT",nextDay:"[Заўтра ў] LT",lastDay:"[Учора ў] LT",nextWeek:function(){return"[У] dddd [ў] LT"},lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return"[У мінулую] dddd [ў] LT";case 1:case 2:case 4:return"[У мінулы] dddd [ў] LT"}},sameElse:"L"},relativeTime:{future:"праз %s",past:"%s таму",s:"некалькі секунд",m:n,mm:n,h:n,hh:n,d:"дзень",dd:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночы|раніцы|дня|вечара/,isPM:function(e){return/^(дня|вечара)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночы":e<12?"раніцы":e<17?"дня":"вечара"},dayOfMonthOrdinalParse:/\d{1,2}-(і|ы|га)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e%10!==2&&e%10!==3||e%100===12||e%100===13?e+"-ы":e+"-і";case"D":return e+"-га";default:return e}},week:{dow:1,doy:7}});return r}))},"1fc8":function(e,t,n){"use strict";var r=n("5438"),i=n("87ed"),s=n("ff56"),o=n("0f98"),a=n("6f539"),l=n("bfa7"),u=i.Set,c=i.add,h=i.has;e.exports=function(e){var t=r(this),n=o(e),i=new u;return s(t)>n.size?l(n.getIterator(),(function(e){h(t,e)&&c(i,e)})):a(t,(function(e){n.includes(e)&&c(i,e)})),i}},"201b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ka",{months:"იანვარი_თებერვალი_მარტი_აპრილი_მაისი_ივნისი_ივლისი_აგვისტო_სექტემბერი_ოქტომბერი_ნოემბერი_დეკემბერი".split("_"),monthsShort:"იან_თებ_მარ_აპრ_მაი_ივნ_ივლ_აგვ_სექ_ოქტ_ნოე_დეკ".split("_"),weekdays:{standalone:"კვირა_ორშაბათი_სამშაბათი_ოთხშაბათი_ხუთშაბათი_პარასკევი_შაბათი".split("_"),format:"კვირას_ორშაბათს_სამშაბათს_ოთხშაბათს_ხუთშაბათს_პარასკევს_შაბათს".split("_"),isFormat:/(წინა|შემდეგ)/},weekdaysShort:"კვი_ორშ_სამ_ოთხ_ხუთ_პარ_შაბ".split("_"),weekdaysMin:"კვ_ორ_სა_ოთ_ხუ_პა_შა".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[დღეს] LT[-ზე]",nextDay:"[ხვალ] LT[-ზე]",lastDay:"[გუშინ] LT[-ზე]",nextWeek:"[შემდეგ] dddd LT[-ზე]",lastWeek:"[წინა] dddd LT-ზე",sameElse:"L"},relativeTime:{future:function(e){return e.replace(/(წამ|წუთ|საათ|წელ|დღ|თვ)(ი|ე)/,(function(e,t,n){return"ი"===n?t+"ში":t+n+"ში"}))},past:function(e){return/(წამი|წუთი|საათი|დღე|თვე)/.test(e)?e.replace(/(ი|ე)$/,"ის წინ"):/წელი/.test(e)?e.replace(/წელი$/,"წლის წინ"):e},s:"რამდენიმე წამი",ss:"%d წამი",m:"წუთი",mm:"%d წუთი",h:"საათი",hh:"%d საათი",d:"დღე",dd:"%d დღე",M:"თვე",MM:"%d თვე",y:"წელი",yy:"%d წელი"},dayOfMonthOrdinalParse:/0|1-ლი|მე-\d{1,2}|\d{1,2}-ე/,ordinal:function(e){return 0===e?e:1===e?e+"-ლი":e<20||e<=100&&e%20===0||e%100===0?"მე-"+e:e+"-ე"},week:{dow:1,doy:7}});return t}))},2179:function(e,t,n){"use strict";var r=n("54adf"),i=n("8793"),s=r.document,o=i(s)&&i(s.createElement);e.exports=function(e){return o?s.createElement(e):{}}},"220a":function(e,t,n){"use strict";n("7a89"),n("d06e");var r=n("5d7f"),i=n("81ea");function s(e,t,n){return(t=o(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e){var t=a(e,"string");return"symbol"==typeof t?t:t+""}function a(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class l{constructor(e){s(this,"hot",null),s(this,"container",null),s(this,"injected",!1),s(this,"rows",[]),s(this,"columns",[]),s(this,"samples",null),s(this,"settings",{useHeaders:!0}),this.hot=e}addRow(e,t){if(this.columns.length)throw new Error("Doesn't support multi-dimensional table");this.rows.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={row:e};this.rows.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol(e)),this.table.tr.appendChild(this.createRow(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(e){const t=this.hot.getColHeader(0);if(null!==t&&void 0!==t){const t={row:-1};this.rows.push(t),this.container=this.createContainer(this.hot.rootElement.className),this.samples=e,this.table=this.createTable(this.hot.table.className),this.table.colGroup.appendChild(this.createColGroupsCol()),this.appendColumnHeadersRow(),this.container.container.appendChild(this.table.fragment),t.table=this.table.table}}addColumn(e,t){if(this.rows.length)throw new Error("Doesn't support multi-dimensional table");this.columns.length||(this.container=this.createContainer(this.hot.rootElement.className));const n={col:e};this.columns.push(n),this.samples=t,this.table=this.createTable(this.hot.table.className),this.getSetting("useHeaders")&&null!==this.hot.getColHeader(e)&&this.hot.view.appendColHeader(e,this.table.th),this.table.tBody.appendChild(this.createCol(e)),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}getHeights(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.rows,t=>{const{height:n}=t.table.getBoundingClientRect();e(t.row,Math.ceil(n)-1)})}getWidths(e){this.injected||this.injectTable(),Object(i["arrayEach"])(this.columns,t=>{const{width:n}=t.table.getBoundingClientRect();e(t.col,Math.ceil(n))})}setSettings(e){this.settings=e}setSetting(e,t){this.settings||(this.settings={}),this.settings[e]=t}getSettings(){return this.settings}getSetting(e){return this.settings?this.settings[e]:null}createColGroupsCol(e){const t=this.hot.rootDocument.createDocumentFragment();return this.hot.hasRowHeaders()&&t.appendChild(this.createColElement(-1,-1)),this.samples.forEach(n=>{Object(i["arrayEach"])(n.strings,n=>{t.appendChild(this.createColElement(n.col,e))})}),t}createRow(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),r=t.createElement("th");return this.hot.hasRowHeaders()&&(this.hot.view.appendRowHeader(e,r),n.appendChild(r)),this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=this.hot.getCellMeta(e,i),o=this.hot.getCellRenderer(s),a=t.createElement("td");a.setAttribute("ghost-table",1),o(this.hot,a,e,i,this.hot.colToProp(i),r.value,s),n.appendChild(a)})}),n}appendColumnHeadersRow(){const{rootDocument:e}=this.hot,t=e.createDocumentFragment(),n=[];if(this.hot.hasRowHeaders()){const r=e.createElement("th");n.push([-1,r]),t.appendChild(r)}this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.col,s=e.createElement("th");n.push([i,s]),t.appendChild(s)})}),this.table.tHead.appendChild(t),Object(i["arrayEach"])(n,e=>{const[t,n]=e;this.hot.view.appendColHeader(t,n)})}createCol(e){const{rootDocument:t}=this.hot,n=t.createDocumentFragment();return this.samples.forEach(r=>{Object(i["arrayEach"])(r.strings,r=>{const i=r.row,s=this.hot.getCellMeta(i,e),o=this.hot.getCellRenderer(s),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),o(this.hot,a,i,e,this.hot.colToProp(e),r.value,s),l.appendChild(a),n.appendChild(l)})}),n}clean(){this.rows.length=0,this.rows[-1]=void 0,this.columns.length=0,this.samples&&this.samples.clear(),this.samples=null,this.removeTable()}injectTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.injected||((e||this.hot.rootElement).appendChild(this.container.fragment),this.injected=!0)}removeTable(){this.injected&&this.container.container.parentNode&&(this.container.container.parentNode.removeChild(this.container.container),this.container=null,this.injected=!1)}createColElement(e,t){const n=this.hot.rootDocument.createElement("col");let r=0;t>=0&&e>=0&&(r=this.hot.getCellMeta(t,e).colspan);let i=this.hot.getColWidth(e);if(r>1)for(let s=e+1;s<e+r;s++)i+=this.hot.getColWidth(s);return n.style.width=i+"px",n}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("table"),s=t.createElement("thead"),o=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&i.appendChild(a),this.isHorizontal()&&(l.appendChild(u),s.appendChild(l),i.style.tableLayout="auto",i.style.width="auto"),i.appendChild(s),this.isVertical()&&o.appendChild(l),i.appendChild(o),Object(r["addClass"])(i,e),n.appendChild(i),{fragment:n,table:i,tHead:s,tBody:o,colGroup:a,tr:l,th:u}}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),i=t.createElement("div"),s="htGhostTable htAutoSize "+e.trim();return Object(r["addClass"])(i,s),n.appendChild(i),{fragment:n,container:i}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}}t["a"]=l},"22f8":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ko",{months:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),monthsShort:"1월_2월_3월_4월_5월_6월_7월_8월_9월_10월_11월_12월".split("_"),weekdays:"일요일_월요일_화요일_수요일_목요일_금요일_토요일".split("_"),weekdaysShort:"일_월_화_수_목_금_토".split("_"),weekdaysMin:"일_월_화_수_목_금_토".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY년 MMMM D일",LLL:"YYYY년 MMMM D일 A h:mm",LLLL:"YYYY년 MMMM D일 dddd A h:mm",l:"YYYY.MM.DD.",ll:"YYYY년 MMMM D일",lll:"YYYY년 MMMM D일 A h:mm",llll:"YYYY년 MMMM D일 dddd A h:mm"},calendar:{sameDay:"오늘 LT",nextDay:"내일 LT",nextWeek:"dddd LT",lastDay:"어제 LT",lastWeek:"지난주 dddd LT",sameElse:"L"},relativeTime:{future:"%s 후",past:"%s 전",s:"몇 초",ss:"%d초",m:"1분",mm:"%d분",h:"한 시간",hh:"%d시간",d:"하루",dd:"%d일",M:"한 달",MM:"%d달",y:"일 년",yy:"%d년"},dayOfMonthOrdinalParse:/\d{1,2}(일|월|주)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"일";case"M":return e+"월";case"w":case"W":return e+"주";default:return e}},meridiemParse:/오전|오후/,isPM:function(e){return"오후"===e},meridiem:function(e,t,n){return e<12?"오전":"오후"}});return t}))},2349:function(e,t,n){"use strict";var r=n("d128"),i=n("bdfe"),s=TypeError,o=Object.getOwnPropertyDescriptor,a=r&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}();e.exports=a?function(e,t){if(i(e)&&!o(e,"length").writable)throw new s("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},2408:function(e,t,n){"use strict";var r=n("e156"),i=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return i(e)}},2421:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=["کانونی دووەم","شوبات","ئازار","نیسان","ئایار","حوزەیران","تەمموز","ئاب","ئەیلوول","تشرینی یەكەم","تشرینی دووەم","كانونی یەکەم"],i=e.defineLocale("ku",{months:r,monthsShort:r,weekdays:"یهكشهممه_دووشهممه_سێشهممه_چوارشهممه_پێنجشهممه_ههینی_شهممه".split("_"),weekdaysShort:"یهكشهم_دووشهم_سێشهم_چوارشهم_پێنجشهم_ههینی_شهممه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ه_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ئێواره|بهیانی/,isPM:function(e){return/ئێواره/.test(e)},meridiem:function(e,t,n){return e<12?"بهیانی":"ئێواره"},calendar:{sameDay:"[ئهمرۆ كاتژمێر] LT",nextDay:"[بهیانی كاتژمێر] LT",nextWeek:"dddd [كاتژمێر] LT",lastDay:"[دوێنێ كاتژمێر] LT",lastWeek:"dddd [كاتژمێر] LT",sameElse:"L"},relativeTime:{future:"له %s",past:"%s",s:"چهند چركهیهك",ss:"چركه %d",m:"یهك خولهك",mm:"%d خولهك",h:"یهك كاتژمێر",hh:"%d كاتژمێر",d:"یهك ڕۆژ",dd:"%d ڕۆژ",M:"یهك مانگ",MM:"%d مانگ",y:"یهك ساڵ",yy:"%d ساڵ"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return i}))},2471:function(e,t,n){"use strict";var r=n("2aac"),i=n("022b");e.exports=function(e,t){var n=e[t];return i(n)?void 0:r(n)}},"24b5":function(e,t,n){"use strict";n.d(t,"b",(function(){return _})),n.d(t,"a",(function(){return S})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return C}));n("7a89");var r=n("29b0"),i=n("ffec"),s=n("97b9");const o="asc",a="desc",l=new Map([[o,[-1,1]],[a,[1,-1]]]),u=e=>`The priority '${e}' is already declared in a map.`,c=e=>`The priority '${e}' is not a number.`;function h(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Map;function r(r,s){if(!Object(i["isNumeric"])(r))throw new Error(t(r));if(n.has(r))throw new Error(e(r));n.set(r,s)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:o;const[t,r]=l.get(e)||l.get(o);return[...n].sort((e,n)=>e[0]<n[0]?t:r).map(e=>e[1])}return e=Object(s["isFunction"])(e)?e:u,t=Object(s["isFunction"])(t)?t:c,{addItem:r,getItems:a}}var d=n("6906");n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7");const m=e=>`'${e}' value is already declared in a unique set.`;function f(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;function n(n){if(t.has(n))throw new Error(e(n));t.add(n)}function r(){return[...t]}function i(){t.clear()}return e=Object(s["isFunction"])(e)?e:m,{addItem:n,clear:i,getItems:r}}const p=e=>`There is already registered "${e}" plugin.`,g=e=>`There is already registered plugin on priority "${e}".`,y=e=>`The priority "${e}" is not a number.`,w=h({errorPriorityExists:g,errorPriorityNaN:y}),b=f({errorItemExists:p}),v=Object(d["a"])({errorIdExists:p});function _(){return[...w.getItems(),...b.getItems()]}function S(e){const t=Object(r["toUpperCaseFirst"])(e);return v.getItem(t)}function E(e){return!!S(e)}function C(e,t,n){[e,t,n]=T(e,t,n),void 0===S(e)&&M(e,t,n)}function M(e,t,n){const i=Object(r["toUpperCaseFirst"])(e);if(v.hasItem(i))throw new Error(p(i));void 0===n?b.addItem(i):w.addItem(n,i),v.addItem(i,t)}function T(e,t,n){return"function"===typeof e&&(t=e,e=t.PLUGIN_KEY,n=t.PLUGIN_PRIORITY),[e,t,n]}},"24b9e":function(e,t,n){"use strict";var r=n("f41c");r("flat")},"24d5":function(e,t,n){"use strict";var r=n("84d8"),i=n("4c54");e.exports=function(e){var t=r(e,"string");return i(t)?t:t+""}},2554:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){switch(n){case"m":return t?"jedna minuta":r?"jednu minutu":"jedne minute"}}function n(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return"jedan sat";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var r=e.defineLocale("bs",{months:"januar_februar_mart_april_maj_juni_juli_august_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._aug._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:case 3:return"[prošlu] dddd [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:n,m:t,mm:n,h:n,hh:n,d:"dan",dd:n,M:"mjesec",MM:n,y:"godinu",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return r}))},2582:function(e,t,n){"use strict";var r=n("ac4f"),i=n("930d"),s=n("88c5"),o=!s("isSubsetOf",(function(e){return e}));r({target:"Set",proto:!0,real:!0,forced:o},{isSubsetOf:i})},"26f9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundė_sekundžių_sekundes",m:"minutė_minutės_minutę",mm:"minutės_minučių_minutes",h:"valanda_valandos_valandą",hh:"valandos_valandų_valandas",d:"diena_dienos_dieną",dd:"dienos_dienų_dienas",M:"mėnuo_mėnesio_mėnesį",MM:"mėnesiai_mėnesių_mėnesius",y:"metai_metų_metus",yy:"metai_metų_metus"};function n(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"}function r(e,t,n,r){return t?s(n)[0]:r?s(n)[1]:s(n)[2]}function i(e){return e%10===0||e>10&&e<20}function s(e){return t[e].split("_")}function o(e,t,n,o){var a=e+" ";return 1===e?a+r(e,t,n[0],o):t?a+(i(e)?s(n)[1]:s(n)[0]):o?a+s(n)[1]:a+(i(e)?s(n)[1]:s(n)[2])}var a=e.defineLocale("lt",{months:{format:"sausio_vasario_kovo_balandžio_gegužės_birželio_liepos_rugpjūčio_rugsėjo_spalio_lapkričio_gruodžio".split("_"),standalone:"sausis_vasaris_kovas_balandis_gegužė_birželis_liepa_rugpjūtis_rugsėjis_spalis_lapkritis_gruodis".split("_"),isFormat:/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?|MMMM?(\[[^\[\]]*\]|\s)+D[oD]?/},monthsShort:"sau_vas_kov_bal_geg_bir_lie_rgp_rgs_spa_lap_grd".split("_"),weekdays:{format:"sekmadienį_pirmadienį_antradienį_trečiadienį_ketvirtadienį_penktadienį_šeštadienį".split("_"),standalone:"sekmadienis_pirmadienis_antradienis_trečiadienis_ketvirtadienis_penktadienis_šeštadienis".split("_"),isFormat:/dddd HH:mm/},weekdaysShort:"Sek_Pir_Ant_Tre_Ket_Pen_Šeš".split("_"),weekdaysMin:"S_P_A_T_K_Pn_Š".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY [m.] MMMM D [d.]",LLL:"YYYY [m.] MMMM D [d.], HH:mm [val.]",LLLL:"YYYY [m.] MMMM D [d.], dddd, HH:mm [val.]",l:"YYYY-MM-DD",ll:"YYYY [m.] MMMM D [d.]",lll:"YYYY [m.] MMMM D [d.], HH:mm [val.]",llll:"YYYY [m.] MMMM D [d.], ddd, HH:mm [val.]"},calendar:{sameDay:"[Šiandien] LT",nextDay:"[Rytoj] LT",nextWeek:"dddd LT",lastDay:"[Vakar] LT",lastWeek:"[Praėjusį] dddd LT",sameElse:"L"},relativeTime:{future:"po %s",past:"prieš %s",s:n,ss:o,m:r,mm:o,h:r,hh:o,d:r,dd:o,M:r,MM:o,y:r,yy:o},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}});return a}))},"27dc":function(e,t,n){"use strict";var r=n("9394"),i=n("6b27"),s=n("7dcf4"),o=function(e){return function(t,n,o){var a=r(t),l=s(a);if(0===l)return!e&&-1;var u,c=i(o,l);if(e&&n!==n){while(l>c)if(u=a[c++],u!==u)return!0}else for(;l>c;c++)if((e||c in a)&&a[c]===n)return e||c||0;return!e&&-1}};e.exports={includes:o(!0),indexOf:o(!1)}},2921:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("vi",{months:"tháng 1_tháng 2_tháng 3_tháng 4_tháng 5_tháng 6_tháng 7_tháng 8_tháng 9_tháng 10_tháng 11_tháng 12".split("_"),monthsShort:"Thg 01_Thg 02_Thg 03_Thg 04_Thg 05_Thg 06_Thg 07_Thg 08_Thg 09_Thg 10_Thg 11_Thg 12".split("_"),monthsParseExact:!0,weekdays:"chủ nhật_thứ hai_thứ ba_thứ tư_thứ năm_thứ sáu_thứ bảy".split("_"),weekdaysShort:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysMin:"CN_T2_T3_T4_T5_T6_T7".split("_"),weekdaysParseExact:!0,meridiemParse:/sa|ch/i,isPM:function(e){return/^ch$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"sa":"SA":n?"ch":"CH"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [năm] YYYY",LLL:"D MMMM [năm] YYYY HH:mm",LLLL:"dddd, D MMMM [năm] YYYY HH:mm",l:"DD/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[Hôm nay lúc] LT",nextDay:"[Ngày mai lúc] LT",nextWeek:"dddd [tuần tới lúc] LT",lastDay:"[Hôm qua lúc] LT",lastWeek:"dddd [tuần trước lúc] LT",sameElse:"L"},relativeTime:{future:"%s tới",past:"%s trước",s:"vài giây",ss:"%d giây",m:"một phút",mm:"%d phút",h:"một giờ",hh:"%d giờ",d:"một ngày",dd:"%d ngày",w:"một tuần",ww:"%d tuần",M:"một tháng",MM:"%d tháng",y:"một năm",yy:"%d năm"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},"293c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekund","sekunda","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],dd:["dan","dana","dana"],MM:["mjesec","mjeseca","mjeseci"],yy:["godina","godine","godina"]},correctGrammaticalCase:function(e,t){return 1===e?t[0]:e>=2&&e<=4?t[1]:t[2]},translate:function(e,n,r){var i=t.words[r];return 1===r.length?n?i[0]:i[1]:e+" "+t.correctGrammaticalCase(e,i)}},n=e.defineLocale("me",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sjutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedjelje] [u] LT","[prošlog] [ponedjeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srijede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:"dan",dd:t.translate,M:"mjesec",MM:t.translate,y:"godinu",yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"29b0":function(e,t,n){"use strict";n.r(t),n.d(t,"toUpperCaseFirst",(function(){return o})),n.d(t,"equalsIgnoreCase",(function(){return a})),n.d(t,"randomString",(function(){return l})),n.d(t,"isPercentValue",(function(){return u})),n.d(t,"substitute",(function(){return c})),n.d(t,"stripTags",(function(){return h})),n.d(t,"sanitize",(function(){return d}));n("d06e");var r=n("c0c4"),i=n.n(r),s=n("7b9c");function o(e){return e[0].toUpperCase()+e.substr(1)}function a(){const e=[];for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];let i=n.length;while(i){i-=1;const t=Object(s["stringify"])(n[i]).toLowerCase();-1===e.indexOf(t)&&e.push(t)}return 1===e.length}function l(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function u(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(""+e).replace(/(?:\\)?\[([^[\]]+)]/g,(e,n)=>"\\"===e.charAt(0)?e.substr(1,e.length-1):void 0===t[n]?"":t[n])}function h(e){return d(""+e,{ALLOWED_TAGS:[]})}function d(e,t){return i.a.sanitize(e,t)}},"2aac":function(e,t,n){"use strict";var r=n("73fa"),i=n("71ca"),s=TypeError;e.exports=function(e){if(r(e))return e;throw new s(i(e)+" is not a function")}},"2b75":function(e,t,n){"use strict";var r=n("d128"),i=n("b343");e.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},"2bab":function(e,t,n){"use strict";e.exports=function(e){try{var t=new Set,n={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}},r=t[e](n);return 1===r.size&&4===r.values().next().value}catch(i){return!1}}},"2bfb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("af",{months:"Januarie_Februarie_Maart_April_Mei_Junie_Julie_Augustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mrt_Apr_Mei_Jun_Jul_Aug_Sep_Okt_Nov_Des".split("_"),weekdays:"Sondag_Maandag_Dinsdag_Woensdag_Donderdag_Vrydag_Saterdag".split("_"),weekdaysShort:"Son_Maa_Din_Woe_Don_Vry_Sat".split("_"),weekdaysMin:"So_Ma_Di_Wo_Do_Vr_Sa".split("_"),meridiemParse:/vm|nm/i,isPM:function(e){return/^nm$/i.test(e)},meridiem:function(e,t,n){return e<12?n?"vm":"VM":n?"nm":"NM"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Vandag om] LT",nextDay:"[Môre om] LT",nextWeek:"dddd [om] LT",lastDay:"[Gister om] LT",lastWeek:"[Laas] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oor %s",past:"%s gelede",s:"'n paar sekondes",ss:"%d sekondes",m:"'n minuut",mm:"%d minute",h:"'n uur",hh:"%d ure",d:"'n dag",dd:"%d dae",M:"'n maand",MM:"%d maande",y:"'n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return t}))},"2c35":function(e,t,n){"use strict";var r=n("a60d").f;e.exports=function(e,t,n){n in e||r(e,n,{configurable:!0,get:function(){return t[n]},set:function(e){t[n]=e}})}},"2cb8":function(e,t,n){"use strict";var r=n("7b69"),i=n("69ba"),s=n("1e92"),o=n("554e"),a=n("97dc"),l=RegExp.prototype;e.exports=o.correct?function(e){return e.flags}:function(e){return o.correct||!s(l,e)||i(e,"flags")?e.flags:r(a,e)}},"2d2d":function(e,t,n){"use strict";var r=n("d128"),i=n("a60d"),s=n("1caf");e.exports=r?function(e,t,n){return i.f(e,t,s(1,n))}:function(e,t,n){return e[t]=n,e}},"2daa":function(e,t,n){"use strict";var r=n("2d2d"),i=n("78e9"),s=n("cf36"),o=Error.captureStackTrace;e.exports=function(e,t,n,a){s&&(o?o(e,t):r(e,"stack",i(n,a)))}},"2e8c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("uz",{months:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_"),monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"Якшанба_Душанба_Сешанба_Чоршанба_Пайшанба_Жума_Шанба".split("_"),weekdaysShort:"Якш_Душ_Сеш_Чор_Пай_Жум_Шан".split("_"),weekdaysMin:"Як_Ду_Се_Чо_Па_Жу_Ша".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"D MMMM YYYY, dddd HH:mm"},calendar:{sameDay:"[Бугун соат] LT [да]",nextDay:"[Эртага] LT [да]",nextWeek:"dddd [куни соат] LT [да]",lastDay:"[Кеча соат] LT [да]",lastWeek:"[Утган] dddd [куни соат] LT [да]",sameElse:"L"},relativeTime:{future:"Якин %s ичида",past:"Бир неча %s олдин",s:"фурсат",ss:"%d фурсат",m:"бир дакика",mm:"%d дакика",h:"бир соат",hh:"%d соат",d:"бир кун",dd:"%d кун",M:"бир ой",MM:"%d ой",y:"бир йил",yy:"%d йил"},week:{dow:1,doy:7}});return t}))},"351d":function(e,t,n){"use strict";n.r(t),n.d(t,"duckSchema",(function(){return i})),n.d(t,"inherit",(function(){return s})),n.d(t,"extend",(function(){return o})),n.d(t,"deepExtend",(function(){return a})),n.d(t,"deepClone",(function(){return l})),n.d(t,"clone",(function(){return u})),n.d(t,"mixin",(function(){return c})),n.d(t,"isObjectEqual",(function(){return h})),n.d(t,"isObject",(function(){return d})),n.d(t,"defineGetter",(function(){return m})),n.d(t,"objectEach",(function(){return f})),n.d(t,"getProperty",(function(){return p})),n.d(t,"setProperty",(function(){return g})),n.d(t,"deepObjectSize",(function(){return y})),n.d(t,"createObjectPropListener",(function(){return w})),n.d(t,"hasOwnProperty",(function(){return b}));n("7a89"),n("d06e"),n("5b82");var r=n("81ea");function i(e){let t;return Array.isArray(e)?t=e.length?new Array(e.length).fill(null):[]:(t={},f(e,(e,n)=>{"__children"!==n&&(e&&"object"===typeof e&&!Array.isArray(e)?t[n]=i(e):Array.isArray(e)?e.length&&"object"===typeof e[0]&&!Array.isArray(e[0])?t[n]=[i(e[0])]:t[n]=[]:t[n]=null)})),t}function s(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function o(e,t,n){const r=Array.isArray(n);return f(t,(t,i)=>{(!1===r||n.includes(i))&&(e[i]=t)}),e}function a(e,t){f(t,(n,r)=>{t[r]&&"object"===typeof t[r]?(e[r]||(Array.isArray(t[r])?e[r]=[]:"[object Date]"===Object.prototype.toString.call(t[r])?e[r]=t[r]:e[r]={}),a(e[r],t[r])):e[r]=t[r]})}function l(e){return"object"===typeof e?JSON.parse(JSON.stringify(e)):e}function u(e){const t={};return f(e,(e,n)=>{t[n]=e}),t}function c(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return Object(r["arrayEach"])(n,t=>{e.MIXINS.push(t.MIXIN_NAME),f(t,(t,n)=>{if(void 0!==e.prototype[n])throw new Error(`Mixin conflict. Property '${n}' already exist and cannot be overwritten.`);if("function"===typeof t)e.prototype[n]=t;else{const r=function(e,t){const n="_"+e,r=e=>{let t=e;return(Array.isArray(t)||d(t))&&(t=l(t)),t};return function(){return void 0===this[n]&&(this[n]=r(t)),this[n]}},i=function(e){const t="_"+e;return function(e){this[t]=e}};Object.defineProperty(e.prototype,n,{get:r(n,t),set:i(n),configurable:!0})}})}),e}function h(e,t){return JSON.stringify(e)===JSON.stringify(t)}function d(e){return"[object Object]"===Object.prototype.toString.call(e)}function m(e,t,n,r){r.value=n,r.writable=!1!==r.writable,r.enumerable=!1!==r.enumerable,r.configurable=!1!==r.configurable,Object.defineProperty(e,t,r)}function f(e,t){for(const n in e)if((!e.hasOwnProperty||e.hasOwnProperty&&Object.prototype.hasOwnProperty.call(e,n))&&!1===t(e[n],n,e))break;return e}function p(e,t){const n=t.split(".");let r=e;return f(n,e=>{if(r=r[e],void 0===r)return r=void 0,!1}),r}function g(e,t,n){const r=t.split(".");let i=e;r.forEach((e,t)=>{t!==r.length-1?(b(i,e)||(i[e]={}),i=i[e]):i[e]=n})}function y(e){if(!d(e))return 0;const t=function(e){let n=0;return d(e)?f(e,(e,r)=>{"__children"!==r&&(n+=t(e))}):n+=1,n};return t(e)}function w(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"value";const n="_"+t,r={_touched:!1,[n]:e,isTouched(){return this._touched}};return Object.defineProperty(r,t,{get(){return this[n]},set(e){this._touched=!0,this[n]=e},enumerable:!0,configurable:!0}),r}function b(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},3886:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ca",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"YYYY-MM-DD",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"38b3":function(e,t,n){"use strict";var r=n("ac4f"),i=n("0c5c"),s=n("b343"),o=n("88c5"),a=!o("difference",(function(e){return 0===e.size})),l=a||s((function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return 3!==t.difference(e).size}));r({target:"Set",proto:!0,real:!0,forced:l},{difference:i})},"39a6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-gb",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"39bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};function r(e,t,n,r){var i="";if(t)switch(n){case"s":i="काही सेकंद";break;case"ss":i="%d सेकंद";break;case"m":i="एक मिनिट";break;case"mm":i="%d मिनिटे";break;case"h":i="एक तास";break;case"hh":i="%d तास";break;case"d":i="एक दिवस";break;case"dd":i="%d दिवस";break;case"M":i="एक महिना";break;case"MM":i="%d महिने";break;case"y":i="एक वर्ष";break;case"yy":i="%d वर्षे";break}else switch(n){case"s":i="काही सेकंदां";break;case"ss":i="%d सेकंदां";break;case"m":i="एका मिनिटा";break;case"mm":i="%d मिनिटां";break;case"h":i="एका तासा";break;case"hh":i="%d तासां";break;case"d":i="एका दिवसा";break;case"dd":i="%d दिवसां";break;case"M":i="एका महिन्या";break;case"MM":i="%d महिन्यां";break;case"y":i="एका वर्षा";break;case"yy":i="%d वर्षां";break}return i.replace(/%d/i,e)}var i=e.defineLocale("mr",{months:"जानेवारी_फेब्रुवारी_मार्च_एप्रिल_मे_जून_जुलै_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),monthsShort:"जाने._फेब्रु._मार्च._एप्रि._मे._जून._जुलै._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"रविवार_सोमवार_मंगळवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगळ_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm वाजता",LTS:"A h:mm:ss वाजता",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm वाजता",LLLL:"dddd, D MMMM YYYY, A h:mm वाजता"},calendar:{sameDay:"[आज] LT",nextDay:"[उद्या] LT",nextWeek:"dddd, LT",lastDay:"[काल] LT",lastWeek:"[मागील] dddd, LT",sameElse:"L"},relativeTime:{future:"%sमध्ये",past:"%sपूर्वी",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/पहाटे|सकाळी|दुपारी|सायंकाळी|रात्री/,meridiemHour:function(e,t){return 12===e&&(e=0),"पहाटे"===t||"सकाळी"===t?e:"दुपारी"===t||"सायंकाळी"===t||"रात्री"===t?e>=12?e:e+12:void 0},meridiem:function(e,t,n){return e>=0&&e<6?"पहाटे":e<12?"सकाळी":e<17?"दुपारी":e<20?"सायंकाळी":"रात्री"},week:{dow:0,doy:6}});return i}))},"3a39":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=e.defineLocale("ne",{months:"जनवरी_फेब्रुवरी_मार्च_अप्रिल_मई_जुन_जुलाई_अगष्ट_सेप्टेम्बर_अक्टोबर_नोभेम्बर_डिसेम्बर".split("_"),monthsShort:"जन._फेब्रु._मार्च_अप्रि._मई_जुन_जुलाई._अग._सेप्ट._अक्टो._नोभे._डिसे.".split("_"),monthsParseExact:!0,weekdays:"आइतबार_सोमबार_मङ्गलबार_बुधबार_बिहिबार_शुक्रबार_शनिबार".split("_"),weekdaysShort:"आइत._सोम._मङ्गल._बुध._बिहि._शुक्र._शनि.".split("_"),weekdaysMin:"आ._सो._मं._बु._बि._शु._श.".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"Aको h:mm बजे",LTS:"Aको h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, Aको h:mm बजे",LLLL:"dddd, D MMMM YYYY, Aको h:mm बजे"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/राति|बिहान|दिउँसो|साँझ/,meridiemHour:function(e,t){return 12===e&&(e=0),"राति"===t?e<4?e:e+12:"बिहान"===t?e:"दिउँसो"===t?e>=10?e:e+12:"साँझ"===t?e+12:void 0},meridiem:function(e,t,n){return e<3?"राति":e<12?"बिहान":e<16?"दिउँसो":e<20?"साँझ":"राति"},calendar:{sameDay:"[आज] LT",nextDay:"[भोलि] LT",nextWeek:"[आउँदो] dddd[,] LT",lastDay:"[हिजो] LT",lastWeek:"[गएको] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%sमा",past:"%s अगाडि",s:"केही क्षण",ss:"%d सेकेण्ड",m:"एक मिनेट",mm:"%d मिनेट",h:"एक घण्टा",hh:"%d घण्टा",d:"एक दिन",dd:"%d दिन",M:"एक महिना",MM:"%d महिना",y:"एक बर्ष",yy:"%d बर्ष"},week:{dow:0,doy:6}});return r}))},"3a6c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-mo",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"D/M/YYYY",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s內",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"3b1b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"},n=e.defineLocale("tg",{months:{format:"январи_феврали_марти_апрели_майи_июни_июли_августи_сентябри_октябри_ноябри_декабри".split("_"),standalone:"январ_феврал_март_апрел_май_июн_июл_август_сентябр_октябр_ноябр_декабр".split("_")},monthsShort:"янв_фев_мар_апр_май_июн_июл_авг_сен_окт_ноя_дек".split("_"),weekdays:"якшанбе_душанбе_сешанбе_чоршанбе_панҷшанбе_ҷумъа_шанбе".split("_"),weekdaysShort:"яшб_дшб_сшб_чшб_пшб_ҷум_шнб".split("_"),weekdaysMin:"яш_дш_сш_чш_пш_ҷм_шб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Имрӯз соати] LT",nextDay:"[Фардо соати] LT",lastDay:"[Дирӯз соати] LT",nextWeek:"dddd[и] [ҳафтаи оянда соати] LT",lastWeek:"dddd[и] [ҳафтаи гузашта соати] LT",sameElse:"L"},relativeTime:{future:"баъди %s",past:"%s пеш",s:"якчанд сония",m:"як дақиқа",mm:"%d дақиқа",h:"як соат",hh:"%d соат",d:"як рӯз",dd:"%d рӯз",M:"як моҳ",MM:"%d моҳ",y:"як сол",yy:"%d сол"},meridiemParse:/шаб|субҳ|рӯз|бегоҳ/,meridiemHour:function(e,t){return 12===e&&(e=0),"шаб"===t?e<4?e:e+12:"субҳ"===t?e:"рӯз"===t?e>=11?e:e+12:"бегоҳ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"шаб":e<11?"субҳ":e<16?"рӯз":e<19?"бегоҳ":"шаб"},dayOfMonthOrdinalParse:/\d{1,2}-(ум|юм)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"3bc4":function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));const r=/^(\r\n|\n\r|\r|\n)/,i=/^[^\t\r\n]+/,s=/^\t/;function o(e){const t=[[""]];if(0===e.length)return t;let n,o=0,a=0;while(e.length>0){if(n===e.length)break;if(n=e.length,e.match(s))e=e.replace(s,""),o+=1,t[a][o]="";else if(e.match(r))e=e.replace(r,""),o=0,a+=1,t[a]=[""];else{let n="";if(e.startsWith('"')){let t=0,r=!0;while(r){const i=e.slice(0,1);'"'===i&&(t+=1),n+=i,e=e.slice(1),(0===e.length||e.match(/^[\t\r\n]/)&&t%2===0)&&(r=!1)}n=n.replace(/^"/,"").replace(/"$/,"").replace(/["]*/g,e=>new Array(Math.floor(e.length/2)).fill('"').join(""))}else{const t=e.match(i);n=t?t[0]:"",e=e.slice(n.length)}t[a][o]=n}}return t}function a(e){let t,n,r,i,s,o="";for(t=0,n=e.length;t<n;t+=1){for(i=e[t].length,r=0;r<i;r+=1)r>0&&(o+="\t"),s=e[t][r],"string"===typeof s?s.indexOf("\n")>-1?o+=`"${s.replace(/"/g,'""')}"`:o+=s:o+=null===s||void 0===s?"":s;t!==n-1&&(o+="\n")}return o}},"3c0d":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={standalone:"leden_únor_březen_duben_květen_červen_červenec_srpen_září_říjen_listopad_prosinec".split("_"),format:"ledna_února_března_dubna_května_června_července_srpna_září_října_listopadu_prosince".split("_"),isFormat:/DD?[o.]?(\[[^\[\]]*\]|\s)+MMMM/},n="led_úno_bře_dub_kvě_čvn_čvc_srp_zář_říj_lis_pro".split("_"),r=[/^led/i,/^úno/i,/^bře/i,/^dub/i,/^kvě/i,/^(čvn|červen$|června)/i,/^(čvc|červenec|července)/i,/^srp/i,/^zář/i,/^říj/i,/^lis/i,/^pro/i],i=/^(leden|únor|březen|duben|květen|červenec|července|červen|června|srpen|září|říjen|listopad|prosinec|led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i;function s(e){return e>1&&e<5&&1!==~~(e/10)}function o(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?i+(s(e)?"sekundy":"sekund"):i+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?i+(s(e)?"minuty":"minut"):i+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?i+(s(e)?"hodiny":"hodin"):i+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?i+(s(e)?"dny":"dní"):i+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?i+(s(e)?"měsíce":"měsíců"):i+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?i+(s(e)?"roky":"let"):i+"lety"}}var a=e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(leden|ledna|února|únor|březen|března|duben|dubna|květen|května|červenec|července|červen|června|srpen|srpna|září|říjen|října|listopadu|listopad|prosinec|prosince)/i,monthsShortStrictRegex:/^(led|úno|bře|dub|kvě|čvn|čvc|srp|zář|říj|lis|pro)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"neděle_pondělí_úterý_středa_čtvrtek_pátek_sobota".split("_"),weekdaysShort:"ne_po_út_st_čt_pá_so".split("_"),weekdaysMin:"ne_po_út_st_čt_pá_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm",l:"D. M. YYYY"},calendar:{sameDay:"[dnes v] LT",nextDay:"[zítra v] LT",nextWeek:function(){switch(this.day()){case 0:return"[v neděli v] LT";case 1:case 2:return"[v] dddd [v] LT";case 3:return"[ve středu v] LT";case 4:return"[ve čtvrtek v] LT";case 5:return"[v pátek v] LT";case 6:return"[v sobotu v] LT"}},lastDay:"[včera v] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulou neděli v] LT";case 1:case 2:return"[minulé] dddd [v] LT";case 3:return"[minulou středu v] LT";case 4:case 5:return"[minulý] dddd [v] LT";case 6:return"[minulou sobotu v] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"před %s",s:o,ss:o,m:o,mm:o,h:o,hh:o,d:o,dd:o,M:o,MM:o,y:o,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return a}))},"3d57":function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t,n){return[...e.slice(0,t),...n,...e.slice(t)]}function s(e,t){return Object(r["arrayFilter"])(e,e=>!1===t.includes(e))}},"3d76":function(e,t,n){"use strict";n.d(t,"d",(function(){return c})),n.d(t,"b",(function(){return u})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return a}));n("7a89");var r=n("9acd");const{register:i,getItem:s,hasItem:o,getNames:a,getValues:l}=Object(r["a"])("renderers");function u(e){if("function"===typeof e)return e;if(!o(e))throw Error(`No registered renderer found under "${e}" name`);return s(e)}function c(e,t){"string"!==typeof e&&(t=e,e=t.RENDERER_TYPE),i(e,t)}},"3de5":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"},r=e.defineLocale("ta",{months:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),monthsShort:"ஜனவரி_பிப்ரவரி_மார்ச்_ஏப்ரல்_மே_ஜூன்_ஜூலை_ஆகஸ்ட்_செப்டெம்பர்_அக்டோபர்_நவம்பர்_டிசம்பர்".split("_"),weekdays:"ஞாயிற்றுக்கிழமை_திங்கட்கிழமை_செவ்வாய்கிழமை_புதன்கிழமை_வியாழக்கிழமை_வெள்ளிக்கிழமை_சனிக்கிழமை".split("_"),weekdaysShort:"ஞாயிறு_திங்கள்_செவ்வாய்_புதன்_வியாழன்_வெள்ளி_சனி".split("_"),weekdaysMin:"ஞா_தி_செ_பு_வி_வெ_ச".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, HH:mm",LLLL:"dddd, D MMMM YYYY, HH:mm"},calendar:{sameDay:"[இன்று] LT",nextDay:"[நாளை] LT",nextWeek:"dddd, LT",lastDay:"[நேற்று] LT",lastWeek:"[கடந்த வாரம்] dddd, LT",sameElse:"L"},relativeTime:{future:"%s இல்",past:"%s முன்",s:"ஒரு சில விநாடிகள்",ss:"%d விநாடிகள்",m:"ஒரு நிமிடம்",mm:"%d நிமிடங்கள்",h:"ஒரு மணி நேரம்",hh:"%d மணி நேரம்",d:"ஒரு நாள்",dd:"%d நாட்கள்",M:"ஒரு மாதம்",MM:"%d மாதங்கள்",y:"ஒரு வருடம்",yy:"%d ஆண்டுகள்"},dayOfMonthOrdinalParse:/\d{1,2}வது/,ordinal:function(e){return e+"வது"},preparse:function(e){return e.replace(/[௧௨௩௪௫௬௭௮௯௦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/யாமம்|வைகறை|காலை|நண்பகல்|எற்பாடு|மாலை/,meridiem:function(e,t,n){return e<2?" யாமம்":e<6?" வைகறை":e<10?" காலை":e<14?" நண்பகல்":e<18?" எற்பாடு":e<22?" மாலை":" யாமம்"},meridiemHour:function(e,t){return 12===e&&(e=0),"யாமம்"===t?e<2?e:e+12:"வைகறை"===t||"காலை"===t||"நண்பகல்"===t&&e>=10?e:e+12},week:{dow:0,doy:6}});return r}))},"3df8":function(e,t,n){"use strict";var r=n("54adf"),i=Object.defineProperty;e.exports=function(e,t){try{i(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},"3e92":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"},r=e.defineLocale("kn",{months:"ಜನವರಿ_ಫೆಬ್ರವರಿ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂಬರ್_ಅಕ್ಟೋಬರ್_ನವೆಂಬರ್_ಡಿಸೆಂಬರ್".split("_"),monthsShort:"ಜನ_ಫೆಬ್ರ_ಮಾರ್ಚ್_ಏಪ್ರಿಲ್_ಮೇ_ಜೂನ್_ಜುಲೈ_ಆಗಸ್ಟ್_ಸೆಪ್ಟೆಂ_ಅಕ್ಟೋ_ನವೆಂ_ಡಿಸೆಂ".split("_"),monthsParseExact:!0,weekdays:"ಭಾನುವಾರ_ಸೋಮವಾರ_ಮಂಗಳವಾರ_ಬುಧವಾರ_ಗುರುವಾರ_ಶುಕ್ರವಾರ_ಶನಿವಾರ".split("_"),weekdaysShort:"ಭಾನು_ಸೋಮ_ಮಂಗಳ_ಬುಧ_ಗುರು_ಶುಕ್ರ_ಶನಿ".split("_"),weekdaysMin:"ಭಾ_ಸೋ_ಮಂ_ಬು_ಗು_ಶು_ಶ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[ಇಂದು] LT",nextDay:"[ನಾಳೆ] LT",nextWeek:"dddd, LT",lastDay:"[ನಿನ್ನೆ] LT",lastWeek:"[ಕೊನೆಯ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ನಂತರ",past:"%s ಹಿಂದೆ",s:"ಕೆಲವು ಕ್ಷಣಗಳು",ss:"%d ಸೆಕೆಂಡುಗಳು",m:"ಒಂದು ನಿಮಿಷ",mm:"%d ನಿಮಿಷ",h:"ಒಂದು ಗಂಟೆ",hh:"%d ಗಂಟೆ",d:"ಒಂದು ದಿನ",dd:"%d ದಿನ",M:"ಒಂದು ತಿಂಗಳು",MM:"%d ತಿಂಗಳು",y:"ಒಂದು ವರ್ಷ",yy:"%d ವರ್ಷ"},preparse:function(e){return e.replace(/[೧೨೩೪೫೬೭೮೯೦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ರಾತ್ರಿ|ಬೆಳಿಗ್ಗೆ|ಮಧ್ಯಾಹ್ನ|ಸಂಜೆ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ರಾತ್ರಿ"===t?e<4?e:e+12:"ಬೆಳಿಗ್ಗೆ"===t?e:"ಮಧ್ಯಾಹ್ನ"===t?e>=10?e:e+12:"ಸಂಜೆ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ರಾತ್ರಿ":e<10?"ಬೆಳಿಗ್ಗೆ":e<17?"ಮಧ್ಯಾಹ್ನ":e<20?"ಸಂಜೆ":"ರಾತ್ರಿ"},dayOfMonthOrdinalParse:/\d{1,2}(ನೇ)/,ordinal:function(e){return e+"ನೇ"},week:{dow:0,doy:6}});return r}))},"3eb5":function(e,t,n){"use strict";function r(e){const t=new Date(e);return isNaN(new Date(e+"T00:00").getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}n.r(t),n.d(t,"getNormalizedDate",(function(){return r}))},"423e":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-kw",{months:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_ماي_يونيو_يوليوز_غشت_شتنبر_أكتوبر_نونبر_دجنبر".split("_"),weekdays:"الأحد_الإتنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"احد_اتنين_ثلاثاء_اربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:0,doy:12}});return t}))},"440c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eng Minutt","enger Minutt"],h:["eng Stonn","enger Stonn"],d:["een Dag","engem Dag"],M:["ee Mount","engem Mount"],y:["ee Joer","engem Joer"]};return t?i[n][0]:i[n][1]}function n(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"a "+e:"an "+e}function r(e){var t=e.substr(0,e.indexOf(" "));return i(t)?"viru "+e:"virun "+e}function i(e){if(e=parseInt(e,10),isNaN(e))return!1;if(e<0)return!0;if(e<10)return 4<=e&&e<=7;if(e<100){var t=e%10,n=e/10;return i(0===t?n:t)}if(e<1e4){while(e>=10)e/=10;return i(e)}return e/=1e3,i(e)}var s=e.defineLocale("lb",{months:"Januar_Februar_Mäerz_Abrëll_Mee_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Febr._Mrz._Abr._Mee_Jun._Jul._Aug._Sept._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonndeg_Méindeg_Dënschdeg_Mëttwoch_Donneschdeg_Freideg_Samschdeg".split("_"),weekdaysShort:"So._Mé._Dë._Më._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mé_Dë_Më_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm [Auer]",LTS:"H:mm:ss [Auer]",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm [Auer]",LLLL:"dddd, D. MMMM YYYY H:mm [Auer]"},calendar:{sameDay:"[Haut um] LT",sameElse:"L",nextDay:"[Muer um] LT",nextWeek:"dddd [um] LT",lastDay:"[Gëschter um] LT",lastWeek:function(){switch(this.day()){case 2:case 4:return"[Leschten] dddd [um] LT";default:return"[Leschte] dddd [um] LT"}}},relativeTime:{future:n,past:r,s:"e puer Sekonnen",ss:"%d Sekonnen",m:t,mm:"%d Minutten",h:t,hh:"%d Stonnen",d:t,dd:"%d Deeg",M:t,MM:"%d Méint",y:t,yy:"%d Joer"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"480c":function(e,t,n){"use strict";n.r(t),n.d(t,"spreadsheetColumnLabel",(function(){return o})),n.d(t,"spreadsheetColumnIndex",(function(){return a})),n.d(t,"createSpreadsheetData",(function(){return l})),n.d(t,"createSpreadsheetObjectData",(function(){return u})),n.d(t,"createEmptySpreadsheetData",(function(){return c})),n.d(t,"dataRowToChangesArray",(function(){return h})),n.d(t,"countFirstRowKeys",(function(){return d})),n.d(t,"isArrayOfArrays",(function(){return m})),n.d(t,"isArrayOfObjects",(function(){return f}));n("d06e");var r=n("351d");const i="ABCDEFGHIJKLMNOPQRSTUVWXYZ",s=i.length;function o(e){let t,n=e+1,r="";while(n>0)t=(n-1)%s,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/s,10);return r}function a(e){let t=0;if(e)for(let n=0,r=e.length-1;n<e.length;n+=1,r-=1)t+=s**r*(i.indexOf(e[n])+1);return t-=1,t}function l(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e=[];for(i=0;i<t;i++)e.push(o(i)+(r+1));n.push(e)}return n}function u(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:100,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4;const n=[];let r,i;for(r=0;r<e;r++){const e={};for(i=0;i<t;i++)e["prop"+i]=o(i)+(r+1);n.push(e)}return n}function c(e,t){const n=[];let r;for(let i=0;i<e;i++){r=[];for(let e=0;e<t;e++)r.push("");n.push(r)}return n}function h(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;const r=[];return Array.isArray(e)&&Array.isArray(e[0])||(n=[e]),n.forEach((e,n)=>{Array.isArray(e)?e.forEach((e,i)=>{r.push([n+t,i,e])}):Object.keys(e).forEach(i=>{r.push([n+t,i,e[i]])})}),r}function d(e){let t=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&Object(r["isObject"])(e[0])&&(t=Object(r["deepObjectSize"])(e[0]))),t}function m(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>Array.isArray(e)))}function f(e){return!!(Array.isArray(e)&&e.length&&e.every(e=>"object"===typeof e&&!Array.isArray(e)&&null!==e))}},"485c":function(e,t,n){"use strict";var r=n("d128"),i=n("7b69"),s=n("ba51"),o=n("1caf"),a=n("9394"),l=n("24d5"),u=n("69ba"),c=n("d435"),h=Object.getOwnPropertyDescriptor;t.f=r?h:function(e,t){if(e=a(e),t=l(t),c)try{return h(e,t)}catch(n){}if(u(e,t))return o(!i(s.f,e,t),e[t])}},"485c5":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"-inci",5:"-inci",8:"-inci",70:"-inci",80:"-inci",2:"-nci",7:"-nci",20:"-nci",50:"-nci",3:"-üncü",4:"-üncü",100:"-üncü",6:"-ncı",9:"-uncu",10:"-uncu",30:"-uncu",60:"-ıncı",90:"-ıncı"},n=e.defineLocale("az",{months:"yanvar_fevral_mart_aprel_may_iyun_iyul_avqust_sentyabr_oktyabr_noyabr_dekabr".split("_"),monthsShort:"yan_fev_mar_apr_may_iyn_iyl_avq_sen_okt_noy_dek".split("_"),weekdays:"Bazar_Bazar ertəsi_Çərşənbə axşamı_Çərşənbə_Cümə axşamı_Cümə_Şənbə".split("_"),weekdaysShort:"Baz_BzE_ÇAx_Çər_CAx_Cüm_Şən".split("_"),weekdaysMin:"Bz_BE_ÇA_Çə_CA_Cü_Şə".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün saat] LT",nextDay:"[sabah saat] LT",nextWeek:"[gələn həftə] dddd [saat] LT",lastDay:"[dünən] LT",lastWeek:"[keçən həftə] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s sonra",past:"%s əvvəl",s:"bir neçə saniyə",ss:"%d saniyə",m:"bir dəqiqə",mm:"%d dəqiqə",h:"bir saat",hh:"%d saat",d:"bir gün",dd:"%d gün",M:"bir ay",MM:"%d ay",y:"bir il",yy:"%d il"},meridiemParse:/gecə|səhər|gündüz|axşam/,isPM:function(e){return/^(gündüz|axşam)$/.test(e)},meridiem:function(e,t,n){return e<4?"gecə":e<12?"səhər":e<17?"gündüz":"axşam"},dayOfMonthOrdinalParse:/\d{1,2}-(ıncı|inci|nci|üncü|ncı|uncu)/,ordinal:function(e){if(0===e)return e+"-ıncı";var n=e%10,r=e%100-n,i=e>=100?100:null;return e+(t[n]||t[r]||t[i])},week:{dow:1,doy:7}});return n}))},"48ab":function(e,t,n){"use strict";var r=n("b343");e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},"491c":function(e,t,n){"use strict";n.d(t,"e",(function(){return f})),n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return d})),n.d(t,"d",(function(){return l})),n.d(t,"c",(function(){return u}));n("7a89");var r=n("1004"),i=n("9acd");const s=new WeakMap,{register:o,getItem:a,hasItem:l,getNames:u,getValues:c}=Object(i["a"])("editors");function h(e){const t={},n=e;this.getConstructor=function(){return e},this.getInstance=function(e){return e.guid in t||(t[e.guid]=new n(e)),t[e.guid]},r["a"].getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function d(e,t){let n;if("function"===typeof e)s.get(e)||f(null,e),n=s.get(e);else{if("string"!==typeof e)throw Error('Only strings and functions can be passed as "editor" parameter');n=a(e)}if(!n)throw Error(`No editor registered under name "${e}"`);return n.getInstance(t)}function m(e){if("function"===typeof e)return e;if(!l(e))throw Error(`No registered editor found under "${e}" name`);return a(e).getConstructor()}function f(e,t){e&&"string"!==typeof e&&(t=e,e=t.EDITOR_TYPE);const n=new h(t);"string"===typeof e&&o(e,n),s.set(t,n)}},"49ab":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-hk",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1200?"上午":1200===r?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:"[下]ddddLT",lastDay:"[昨天]LT",lastWeek:"[上]ddddLT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"4aa5":function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},"4ba9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r=e+" ";switch(n){case"ss":return r+=1===e?"sekunda":2===e||3===e||4===e?"sekunde":"sekundi",r;case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+=1===e?"minuta":2===e||3===e||4===e?"minute":"minuta",r;case"h":return t?"jedan sat":"jednog sata";case"hh":return r+=1===e?"sat":2===e||3===e||4===e?"sata":"sati",r;case"dd":return r+=1===e?"dan":"dana",r;case"MM":return r+=1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci",r;case"yy":return r+=1===e?"godina":2===e||3===e||4===e?"godine":"godina",r}}var n=e.defineLocale("hr",{months:{format:"siječnja_veljače_ožujka_travnja_svibnja_lipnja_srpnja_kolovoza_rujna_listopada_studenoga_prosinca".split("_"),standalone:"siječanj_veljača_ožujak_travanj_svibanj_lipanj_srpanj_kolovoz_rujan_listopad_studeni_prosinac".split("_")},monthsShort:"sij._velj._ožu._tra._svi._lip._srp._kol._ruj._lis._stu._pro.".split("_"),monthsParseExact:!0,weekdays:"nedjelja_ponedjeljak_utorak_srijeda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sri._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM YYYY",LLL:"Do MMMM YYYY H:mm",LLLL:"dddd, Do MMMM YYYY H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedjelju] [u] LT";case 3:return"[u] [srijedu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[jučer u] LT",lastWeek:function(){switch(this.day()){case 0:return"[prošlu] [nedjelju] [u] LT";case 3:return"[prošlu] [srijedu] [u] LT";case 6:return"[prošle] [subote] [u] LT";case 1:case 2:case 4:case 5:return"[prošli] dddd [u] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"prije %s",s:"par sekundi",ss:t,m:t,mm:t,h:t,hh:t,d:"dan",dd:t,M:"mjesec",MM:t,y:"godinu",yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"4c54":function(e,t,n){"use strict";var r=n("0227"),i=n("73fa"),s=n("1e92"),o=n("9c76"),a=Object;e.exports=o?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return i(t)&&s(t.prototype,a(e))}},"4c98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=e.defineLocale("ar-ps",{months:"كانون الثاني_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_تشري الأوّل_تشرين الثاني_كانون الأوّل".split("_"),monthsShort:"ك٢_شباط_آذار_نيسان_أيّار_حزيران_تمّوز_آب_أيلول_ت١_ت٢_ك١".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).split("").reverse().join("").replace(/[١٢](?![\u062a\u0643])/g,(function(e){return n[e]})).split("").reverse().join("").replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return r}))},"4cd6":function(e,t,n){"use strict";var r=n("f41c");r("flatMap")},"4ec9":function(e,t,n){"use strict";var r=n("6d61"),i=n("6566");e.exports=r("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),i)},5038:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("id",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_November_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Agt_Sep_Okt_Nov_Des".split("_"),weekdays:"Minggu_Senin_Selasa_Rabu_Kamis_Jumat_Sabtu".split("_"),weekdaysShort:"Min_Sen_Sel_Rab_Kam_Jum_Sab".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|siang|sore|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"siang"===t?e>=11?e:e+12:"sore"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"siang":e<19?"sore":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Besok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kemarin pukul] LT",lastWeek:"dddd [lalu pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lalu",s:"beberapa detik",ss:"%d detik",m:"semenit",mm:"%d menit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:0,doy:6}});return t}))},"5120b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],n=["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],r=["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],i=["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],s=["Do","Lu","Má","Cé","Dé","A","Sa"],o=e.defineLocale("ga",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Inniu ag] LT",nextDay:"[Amárach ag] LT",nextWeek:"dddd [ag] LT",lastDay:"[Inné ag] LT",lastWeek:"dddd [seo caite] [ag] LT",sameElse:"L"},relativeTime:{future:"i %s",past:"%s ó shin",s:"cúpla soicind",ss:"%d soicind",m:"nóiméad",mm:"%d nóiméad",h:"uair an chloig",hh:"%d uair an chloig",d:"lá",dd:"%d lá",M:"mí",MM:"%d míonna",y:"bliain",yy:"%d bliain"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},52941:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"],r=e.defineLocale("ur",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[آج بوقت] LT",nextDay:"[کل بوقت] LT",nextWeek:"dddd [بوقت] LT",lastDay:"[گذشتہ روز بوقت] LT",lastWeek:"[گذشتہ] dddd [بوقت] LT",sameElse:"L"},relativeTime:{future:"%s بعد",past:"%s قبل",s:"چند سیکنڈ",ss:"%d سیکنڈ",m:"ایک منٹ",mm:"%d منٹ",h:"ایک گھنٹہ",hh:"%d گھنٹے",d:"ایک دن",dd:"%d دن",M:"ایک ماہ",MM:"%d ماہ",y:"ایک سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return r}))},"52bd":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ss",{months:"Bhimbidvwane_Indlovana_Indlov'lenkhulu_Mabasa_Inkhwekhweti_Inhlaba_Kholwane_Ingci_Inyoni_Imphala_Lweti_Ingongoni".split("_"),monthsShort:"Bhi_Ina_Inu_Mab_Ink_Inh_Kho_Igc_Iny_Imp_Lwe_Igo".split("_"),weekdays:"Lisontfo_Umsombuluko_Lesibili_Lesitsatfu_Lesine_Lesihlanu_Umgcibelo".split("_"),weekdaysShort:"Lis_Umb_Lsb_Les_Lsi_Lsh_Umg".split("_"),weekdaysMin:"Li_Us_Lb_Lt_Ls_Lh_Ug".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Namuhla nga] LT",nextDay:"[Kusasa nga] LT",nextWeek:"dddd [nga] LT",lastDay:"[Itolo nga] LT",lastWeek:"dddd [leliphelile] [nga] LT",sameElse:"L"},relativeTime:{future:"nga %s",past:"wenteka nga %s",s:"emizuzwana lomcane",ss:"%d mzuzwana",m:"umzuzu",mm:"%d emizuzu",h:"lihora",hh:"%d emahora",d:"lilanga",dd:"%d emalanga",M:"inyanga",MM:"%d tinyanga",y:"umnyaka",yy:"%d iminyaka"},meridiemParse:/ekuseni|emini|entsambama|ebusuku/,meridiem:function(e,t,n){return e<11?"ekuseni":e<15?"emini":e<19?"entsambama":"ebusuku"},meridiemHour:function(e,t){return 12===e&&(e=0),"ekuseni"===t?e:"emini"===t?e>=11?e:e+12:"entsambama"===t||"ebusuku"===t?0===e?0:e+12:void 0},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:"%d",week:{dow:1,doy:4}});return t}))},5438:function(e,t,n){"use strict";var r=n("87ed").has;e.exports=function(e){return r(e),e}},"54adf":function(e,t,n){"use strict";(function(t){var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()}).call(this,n("c8ba"))},"54d7":function(e,t,n){"use strict";var r=n("d62b"),i=n("54adf"),s=n("3df8"),o="__core-js_shared__",a=e.exports=i[o]||s(o,{});(a.versions||(a.versions=[])).push({version:"3.47.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru), 2025 CoreJS Company (core-js.io)",license:"https://github.com/zloirock/core-js/blob/v3.47.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"554e":function(e,t,n){"use strict";var r=n("54adf"),i=n("b343"),s=r.RegExp,o=!i((function(){var e=!0;try{s(".","d")}catch(u){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",i=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},o={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(o.hasIndices="d"),o)i(a,o[a]);var l=Object.getOwnPropertyDescriptor(s.prototype,"flags").get.call(t);return l!==r||n!==r}));e.exports={correct:o}},"55c9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-us",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"MM/DD/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY h:mm A",LLLL:"dddd, D [de] MMMM [de] YYYY h:mm A"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:6}});return s}))},5714:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("7a89");function r(e,t,n){return(t=i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){var t=s(e,"string");return"symbol"==typeof t?t:t+""}function s(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class o{constructor(e){r(this,"calculationTypes",[]),r(this,"calculationResults",new Map),this.calculationTypes=e}_initialize(e){this.calculationTypes.forEach(t=>{let[n,r]=t;this.calculationResults.set(n,r),r.initialize(e)})}_process(e,t){this.calculationTypes.forEach(n=>{let[,r]=n;return r.process(e,t)})}_finalize(e){this.calculationTypes.forEach(t=>{let[,n]=t;return n.finalize(e)})}getResultsFor(e){return this.calculationResults.get(e)}}},"576c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tet",{months:"Janeiru_Fevereiru_Marsu_Abril_Maiu_Juñu_Jullu_Agustu_Setembru_Outubru_Novembru_Dezembru".split("_"),monthsShort:"Jan_Fev_Mar_Abr_Mai_Jun_Jul_Ago_Set_Out_Nov_Dez".split("_"),weekdays:"Domingu_Segunda_Tersa_Kuarta_Kinta_Sesta_Sabadu".split("_"),weekdaysShort:"Dom_Seg_Ters_Kua_Kint_Sest_Sab".split("_"),weekdaysMin:"Do_Seg_Te_Ku_Ki_Ses_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Ohin iha] LT",nextDay:"[Aban iha] LT",nextWeek:"dddd [iha] LT",lastDay:"[Horiseik iha] LT",lastWeek:"dddd [semana kotuk] [iha] LT",sameElse:"L"},relativeTime:{future:"iha %s",past:"%s liuba",s:"segundu balun",ss:"segundu %d",m:"minutu ida",mm:"minutu %d",h:"oras ida",hh:"oras %d",d:"loron ida",dd:"loron %d",M:"fulan ida",MM:"fulan %d",y:"tinan ida",yy:"tinan %d"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"592a":function(e,t,n){"use strict";var r=n("fd18"),i=0,s=Math.random(),o=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+o(++i+s,36)}},"598a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"],r=e.defineLocale("dv",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:"އާދި_ހޯމަ_އަން_ބުދަ_ބުރާ_ހުކު_ހޮނި".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/މކ|މފ/,isPM:function(e){return"މފ"===e},meridiem:function(e,t,n){return e<12?"މކ":"މފ"},calendar:{sameDay:"[މިއަދު] LT",nextDay:"[މާދަމާ] LT",nextWeek:"dddd LT",lastDay:"[އިއްޔެ] LT",lastWeek:"[ފާއިތުވި] dddd LT",sameElse:"L"},relativeTime:{future:"ތެރޭގައި %s",past:"ކުރިން %s",s:"ސިކުންތުކޮޅެއް",ss:"d% ސިކުންތު",m:"މިނިޓެއް",mm:"މިނިޓު %d",h:"ގަޑިއިރެއް",hh:"ގަޑިއިރު %d",d:"ދުވަހެއް",dd:"ދުވަސް %d",M:"މަހެއް",MM:"މަސް %d",y:"އަހަރެއް",yy:"އަހަރު %d"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:7,doy:12}});return r}))},"59a2":function(e,t,n){"use strict";var r=n("ac4f"),i=n("54adf"),s=n("d2e4").set,o=n("f6cb"),a=i.setImmediate?o(s,!1):s;r({global:!0,bind:!0,enumerable:!0,forced:i.setImmediate!==a},{setImmediate:a})},"5aff":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"'inji",5:"'inji",8:"'inji",70:"'inji",80:"'inji",2:"'nji",7:"'nji",20:"'nji",50:"'nji",3:"'ünji",4:"'ünji",100:"'ünji",6:"'njy",9:"'unjy",10:"'unjy",30:"'unjy",60:"'ynjy",90:"'ynjy"},n=e.defineLocale("tk",{months:"Ýanwar_Fewral_Mart_Aprel_Maý_Iýun_Iýul_Awgust_Sentýabr_Oktýabr_Noýabr_Dekabr".split("_"),monthsShort:"Ýan_Few_Mar_Apr_Maý_Iýn_Iýl_Awg_Sen_Okt_Noý_Dek".split("_"),weekdays:"Ýekşenbe_Duşenbe_Sişenbe_Çarşenbe_Penşenbe_Anna_Şenbe".split("_"),weekdaysShort:"Ýek_Duş_Siş_Çar_Pen_Ann_Şen".split("_"),weekdaysMin:"Ýk_Dş_Sş_Çr_Pn_An_Şn".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[bugün sagat] LT",nextDay:"[ertir sagat] LT",nextWeek:"[indiki] dddd [sagat] LT",lastDay:"[düýn] LT",lastWeek:"[geçen] dddd [sagat] LT",sameElse:"L"},relativeTime:{future:"%s soň",past:"%s öň",s:"birnäçe sekunt",m:"bir minut",mm:"%d minut",h:"bir sagat",hh:"%d sagat",d:"bir gün",dd:"%d gün",M:"bir aý",MM:"%d aý",y:"bir ýyl",yy:"%d ýyl"},ordinal:function(e,n){switch(n){case"d":case"D":case"Do":case"DD":return e;default:if(0===e)return e+"'unjy";var r=e%10,i=e%100-r,s=e>=100?100:null;return e+(t[r]||t[i]||t[s])}},week:{dow:1,doy:7}});return n}))},"5b14":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="vasárnap hétfőn kedden szerdán csütörtökön pénteken szombaton".split(" ");function n(e,t,n,r){var i=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return i+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return i+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return i+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return i+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return i+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return i+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}var i=e.defineLocale("hu",{months:"január_február_március_április_május_június_július_augusztus_szeptember_október_november_december".split("_"),monthsShort:"jan._feb._márc._ápr._máj._jún._júl._aug._szept._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"vasárnap_hétfő_kedd_szerda_csütörtök_péntek_szombat".split("_"),weekdaysShort:"vas_hét_kedd_sze_csüt_pén_szo".split("_"),weekdaysMin:"v_h_k_sze_cs_p_szo".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"YYYY.MM.DD.",LL:"YYYY. MMMM D.",LLL:"YYYY. MMMM D. H:mm",LLLL:"YYYY. MMMM D., dddd H:mm"},meridiemParse:/de|du/i,isPM:function(e){return"u"===e.charAt(1).toLowerCase()},meridiem:function(e,t,n){return e<12?!0===n?"de":"DE":!0===n?"du":"DU"},calendar:{sameDay:"[ma] LT[-kor]",nextDay:"[holnap] LT[-kor]",nextWeek:function(){return r.call(this,!0)},lastDay:"[tegnap] LT[-kor]",lastWeek:function(){return r.call(this,!1)},sameElse:"L"},relativeTime:{future:"%s múlva",past:"%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return i}))},"5b82":function(e,t,n){"use strict";var r=n("ac4f"),i=n("0227"),s=n("0204"),o=n("7b69"),a=n("fd18"),l=n("b343"),u=n("bdfe"),c=n("73fa"),h=n("9aa6"),d=n("4c54"),m=n("939b"),f=n("2408"),p=n("9674"),g=n("98f6"),y=n("592a"),w=n("7b7f"),b=n("d0617"),v=String,_=i("JSON","stringify"),S=a(/./.exec),E=a("".charAt),C=a("".charCodeAt),M=a("".replace),T=a("".slice),R=a([].push),O=a(1.1.toString),N=/[\uD800-\uDFFF]/g,A=/^[\uD800-\uDBFF]$/,L=/^[\uDC00-\uDFFF]$/,I=y(),k=I.length,x=!w||l((function(){var e=i("Symbol")("stringify detection");return"[null]"!==_([e])||"{}"!==_({a:e})||"{}"!==_(Object(e))})),D=l((function(){return'"\\udf06\\ud834"'!==_("\udf06\ud834")||'"\\udead"'!==_("\udead")})),H=x?function(e,t){var n=p(arguments),r=j(t);if(c(r)||void 0!==e&&!d(e))return n[1]=function(e,t){if(c(r)&&(t=o(r,this,v(e),t)),!d(t))return t},s(_,null,n)}:_,P=function(e,t,n){var r=E(n,t-1),i=E(n,t+1);return S(A,e)&&!S(L,i)||S(L,e)&&!S(A,r)?"\\u"+O(C(e,0),16):e},j=function(e){if(c(e))return e;if(u(e)){for(var t=e.length,n=[],r=0;r<t;r++){var i=e[r];"string"==typeof i?R(n,i):"number"!=typeof i&&"Number"!==m(i)&&"String"!==m(i)||R(n,f(i))}var s=n.length,o=!0;return function(e,t){if(o)return o=!1,t;if(u(this))return t;for(var r=0;r<s;r++)if(n[r]===e)return t}}};_&&r({target:"JSON",stat:!0,arity:3,forced:x||D||!b},{stringify:function(e,t,n){var r=j(t),i=[],s=H(e,(function(e,t){var n=c(r)?o(r,this,v(e),t):t;return!b&&h(n)?I+(R(i,n.rawJSON)-1):n}),n);if("string"!=typeof s)return s;if(D&&(s=M(s,N,P)),b)return s;for(var a="",l=s.length,u=0;u<l;u++){var d=E(s,u);if('"'===d){var m=g(s,++u).end-1,f=T(s,u,m);a+=T(f,0,k)===I?i[T(f,k)]:'"'+f+'"',u=m}else a+=d}return a}})},"5c3a":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-cn",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"下午"===t||"晚上"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天]LT",nextDay:"[明天]LT",nextWeek:function(e){return e.week()!==this.week()?"[下]dddLT":"[本]dddLT"},lastDay:"[昨天]LT",lastWeek:function(e){return this.week()!==e.week()?"[上]dddLT":"[本]dddLT"},sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|周)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"周";default:return e}},relativeTime:{future:"%s后",past:"%s前",s:"几秒",ss:"%d 秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",w:"1 周",ww:"%d 周",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},week:{dow:1,doy:4}});return t}))},"5cbb":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("te",{months:"జనవరి_ఫిబ్రవరి_మార్చి_ఏప్రిల్_మే_జూన్_జులై_ఆగస్టు_సెప్టెంబర్_అక్టోబర్_నవంబర్_డిసెంబర్".split("_"),monthsShort:"జన._ఫిబ్ర._మార్చి_ఏప్రి._మే_జూన్_జులై_ఆగ._సెప్._అక్టో._నవ._డిసె.".split("_"),monthsParseExact:!0,weekdays:"ఆదివారం_సోమవారం_మంగళవారం_బుధవారం_గురువారం_శుక్రవారం_శనివారం".split("_"),weekdaysShort:"ఆది_సోమ_మంగళ_బుధ_గురు_శుక్ర_శని".split("_"),weekdaysMin:"ఆ_సో_మం_బు_గు_శు_శ".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[నేడు] LT",nextDay:"[రేపు] LT",nextWeek:"dddd, LT",lastDay:"[నిన్న] LT",lastWeek:"[గత] dddd, LT",sameElse:"L"},relativeTime:{future:"%s లో",past:"%s క్రితం",s:"కొన్ని క్షణాలు",ss:"%d సెకన్లు",m:"ఒక నిమిషం",mm:"%d నిమిషాలు",h:"ఒక గంట",hh:"%d గంటలు",d:"ఒక రోజు",dd:"%d రోజులు",M:"ఒక నెల",MM:"%d నెలలు",y:"ఒక సంవత్సరం",yy:"%d సంవత్సరాలు"},dayOfMonthOrdinalParse:/\d{1,2}వ/,ordinal:"%dవ",meridiemParse:/రాత్రి|ఉదయం|మధ్యాహ్నం|సాయంత్రం/,meridiemHour:function(e,t){return 12===e&&(e=0),"రాత్రి"===t?e<4?e:e+12:"ఉదయం"===t?e:"మధ్యాహ్నం"===t?e>=10?e:e+12:"సాయంత్రం"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"రాత్రి":e<10?"ఉదయం":e<17?"మధ్యాహ్నం":e<20?"సాయంత్రం":"రాత్రి"},week:{dow:0,doy:6}});return t}))},"5d7f":function(e,t,n){"use strict";n.r(t),n.d(t,"getParent",(function(){return s})),n.d(t,"isThisHotChild",(function(){return o})),n.d(t,"getFrameElement",(function(){return a})),n.d(t,"getParentWindow",(function(){return l})),n.d(t,"hasAccessToParentWindow",(function(){return u})),n.d(t,"closest",(function(){return c})),n.d(t,"closestDown",(function(){return h})),n.d(t,"isChildOf",(function(){return d})),n.d(t,"index",(function(){return m})),n.d(t,"overlayContainsElement",(function(){return f})),n.d(t,"hasClass",(function(){return y})),n.d(t,"addClass",(function(){return w})),n.d(t,"removeClass",(function(){return b})),n.d(t,"setAttribute",(function(){return v})),n.d(t,"removeAttribute",(function(){return _})),n.d(t,"removeTextNodes",(function(){return S})),n.d(t,"empty",(function(){return E})),n.d(t,"HTML_CHARACTERS",(function(){return C})),n.d(t,"fastInnerHTML",(function(){return M})),n.d(t,"fastInnerText",(function(){return T})),n.d(t,"isVisible",(function(){return R})),n.d(t,"offset",(function(){return O})),n.d(t,"getWindowScrollTop",(function(){return N})),n.d(t,"getWindowScrollLeft",(function(){return A})),n.d(t,"getScrollTop",(function(){return L})),n.d(t,"getScrollLeft",(function(){return I})),n.d(t,"getScrollableElement",(function(){return k})),n.d(t,"getMaximumScrollTop",(function(){return x})),n.d(t,"getMaximumScrollLeft",(function(){return D})),n.d(t,"getTrimmingContainer",(function(){return H})),n.d(t,"getStyle",(function(){return P})),n.d(t,"matchesCSSRules",(function(){return j})),n.d(t,"getComputedStyle",(function(){return F})),n.d(t,"outerWidth",(function(){return Y})),n.d(t,"outerHeight",(function(){return U})),n.d(t,"innerHeight",(function(){return V})),n.d(t,"innerWidth",(function(){return B})),n.d(t,"addEvent",(function(){return W})),n.d(t,"removeEvent",(function(){return z})),n.d(t,"getCaretPosition",(function(){return G})),n.d(t,"getSelectionEndPosition",(function(){return K})),n.d(t,"getSelectionText",(function(){return X})),n.d(t,"clearTextSelection",(function(){return $})),n.d(t,"setCaretPosition",(function(){return q})),n.d(t,"getScrollbarWidth",(function(){return Z})),n.d(t,"hasVerticalScrollbar",(function(){return ee})),n.d(t,"hasHorizontalScrollbar",(function(){return te})),n.d(t,"setOverlayPosition",(function(){return ne})),n.d(t,"getCssTransform",(function(){return re})),n.d(t,"resetCssTransform",(function(){return ie})),n.d(t,"isInput",(function(){return se})),n.d(t,"isOutsideInput",(function(){return oe})),n.d(t,"selectElementIfAllowed",(function(){return ae})),n.d(t,"isDetached",(function(){return le})),n.d(t,"observeVisibilityChangeOnce",(function(){return ue})),n.d(t,"makeElementContentEditableAndSelectItsContent",(function(){return ce})),n.d(t,"removeContentEditableFromElementAndDeselect",(function(){return he})),n.d(t,"runWithSelectedContendEditableElement",(function(){return de}));n("7a89"),n("d06e");var r=n("29b0"),i=n("8828");function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,i=e;while(null!==i){if(n===t){r=i;break}i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i=i.host:(n+=1,i=i.parentNode)}return r}function o(e,t){const n=e.closest(".handsontable");return!!n&&(n.parentNode===t||n===t)}function a(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}function l(e){return a(e)&&e.parent}function u(e){return!!Object.getPrototypeOf(e.parent)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;const{ELEMENT_NODE:r,DOCUMENT_FRAGMENT_NODE:i}=Node;let s=e;while(null!==s&&void 0!==s&&s!==n){const{nodeType:e,nodeName:n}=s;if(e===r&&(t.includes(n)||t.includes(s)))return s;const{host:o}=s;s=o&&e===i?o:s.parentNode}return null}function h(e,t,n){const r=[];let i=e;while(i){if(i=c(i,t,n),!i||n&&!n.contains(i))break;r.push(i),i=i.host&&i.nodeType===Node.DOCUMENT_FRAGMENT_NODE?i.host:i.parentNode}const s=r.length;return s?r[s-1]:null}function d(e,t){let n=e.parentNode,r=[];"string"===typeof t?r=e.defaultView?Array.prototype.slice.call(e.querySelectorAll(t),0):Array.prototype.slice.call(e.ownerDocument.querySelectorAll(t),0):r.push(t);while(null!==n){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function m(e){let t=0,n=e;if(n.previousSibling)while(n=n.previousSibling)t+=1;return t}function f(e,t,n){const r=n.parentElement.querySelector(".ht_clone_"+e);return r?r.contains(t):null}function p(e){return e&&e.length?e.filter(e=>!!e):[]}function g(e,t){if(!e||!e.length)return t?{regexFree:[],regexes:[]}:[];const n=[],r=[];return r.push(...e.filter(e=>{const r=e instanceof RegExp;return r&&t&&n.push(e),!r})),t?{regexFree:r,regexes:n}:r}function y(e,t){return void 0!==e.classList&&"string"===typeof t&&""!==t&&e.classList.contains(t)}function w(e,t){"string"===typeof t&&(t=t.split(" ")),t=p(t),t.length>0&&e.classList.add(...t)}function b(e,t){"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:n,regexes:r}=g(t,!0);n=p(n),n.length>0&&e.classList.remove(...n),r.forEach(t=>{e.classList.forEach(n=>{t.test(n)&&e.classList.remove(n)})})}function v(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;Array.isArray(t)||(t=[[t,n]]),t.forEach(t=>{Array.isArray(t)&&""!==t[0]&&e.setAttribute(...t)})}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];"string"===typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);const{regexFree:n,regexes:r}=g(t,!0);n.forEach(t=>{""!==t&&e.removeAttribute(t)}),r.forEach(t=>{e.getAttributeNames().forEach(n=>{t.test(n)&&e.removeAttribute(n)})})}function S(e){if(3===e.nodeType)e.parentNode.removeChild(e);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(e.nodeName)>-1){const t=e.childNodes;for(let e=t.length-1;e>=0;e--)S(t[e])}}function E(e){let t;while(t=e.lastChild)e.removeChild(t)}const C=/(<(.*)>|&(.*);)/;function M(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];C.test(t)?e.innerHTML=n?Object(r["sanitize"])(t):t:T(e,t)}function T(e,t){const n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=t:(E(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function R(e){const t=e.ownerDocument.documentElement;let n=e;while(n!==t){if(null===n)return!1;if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(n.host){if(n.host.impl)return R(n.host.impl);if(n.host)return R(n.host);throw new Error("Lost in Web Components world")}return!1}if("none"===F(n).display)return!1;n=n.parentNode}return!0}function O(e){const t=e.ownerDocument,n=t.defaultView,r=t.documentElement;let i,s,o,a=e;i=a.offsetLeft,s=a.offsetTop,o=a;while(a=a.offsetParent){if(a===t.body)break;if(!("offsetLeft"in a))break;i+=a.offsetLeft,s+=a.offsetTop,o=a}return o&&"fixed"===o.style.position&&(i+=n.pageXOffset||r.scrollLeft,s+=n.pageYOffset||r.scrollTop),{left:i,top:s}}function N(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollY}function A(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.scrollX}function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?N(t):e.scrollTop}function I(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?A(t):e.scrollLeft}function k(e){let t=e.ownerDocument,n=t?t.defaultView:void 0;t||(t=e.document?e.document:e,n=t.defaultView);const r=["auto","scroll"];let i=e.parentNode;while(i&&i.style&&t.body!==i){let{overflow:e,overflowX:t,overflowY:s}=i.style;if([e,t,s].includes("scroll"))return i;if(({overflow:e,overflowX:t,overflowY:s}=n.getComputedStyle(i)),r.includes(e)||r.includes(t)||r.includes(s))return i;if(i.clientHeight<=i.scrollHeight+1&&(r.includes(s)||r.includes(e)))return i;if(i.clientWidth<=i.scrollWidth+1&&(r.includes(t)||r.includes(e)))return i;i=i.parentNode}return n}function x(e){return e.scrollHeight-e.clientHeight}function D(e){return e.scrollWidth-e.clientWidth}function H(e){const t=e.ownerDocument,n=t.defaultView;let r=e.parentNode;while(r&&r.style&&t.body!==r){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;const e=F(r,n),t=["scroll","hidden","auto"],i=e.getPropertyValue("overflow"),s=e.getPropertyValue("overflow-y"),o=e.getPropertyValue("overflow-x");if(t.includes(i)||t.includes(s)||t.includes(o))return r;r=r.parentNode}return n}function P(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;if(!e)return;if(e===n)return"width"===t?n.innerWidth+"px":"height"===t?n.innerHeight+"px":void 0;const r=e.style[t];if(""!==r&&void 0!==r)return r;const i=F(e,n);return""!==i[t]&&void 0!==i[t]?i[t]:void 0}function j(e,t){const{selectorText:n}=t;let r=!1;return t.type===CSSRule.STYLE_RULE&&n&&(e.msMatchesSelector?r=e.msMatchesSelector(n):e.matches&&(r=e.matches(n))),r}function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e.currentStyle||t.getComputedStyle(e)}function Y(e){return e.offsetWidth}function U(e){return e.offsetHeight}function V(e){return e.clientHeight||e.innerHeight}function B(e){return e.clientWidth||e.innerWidth}function W(e,t,n){e.addEventListener(t,n,!1)}function z(e,t,n){e.removeEventListener(t,n,!1)}function G(e){return e.selectionStart?e.selectionStart:0}function K(e){return e.selectionEnd?e.selectionEnd:0}function X(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;const t=e.document;let n="";return e.getSelection?n=e.getSelection().toString():t.selection&&"Control"!==t.selection.type&&(n=t.selection.createRange().text),n}function $(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;e.getSelection&&(e.getSelection().empty?e.getSelection().empty():e.getSelection().removeAllRanges&&e.getSelection().removeAllRanges())}function q(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(r){const i=e.parentNode,s=i.style.display;i.style.display="block",e.setSelectionRange(t,n),i.style.display=s}}}let J;function Q(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;const t=e.createElement("div");t.style.height="200px",t.style.width="100%";const n=e.createElement("div");n.style.boxSizing="content-box",n.style.height="150px",n.style.left="0px",n.style.overflow="hidden",n.style.position="absolute",n.style.top="0px",n.style.width="200px",n.style.visibility="hidden",n.appendChild(t),(e.body||e.documentElement).appendChild(n);const r=t.offsetWidth;n.style.overflow="scroll";let i=t.offsetWidth;return r===i&&(i=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-i}function Z(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===J&&(J=Q(e)),J}function ee(e){return e.offsetWidth!==e.clientWidth}function te(e){return e.offsetHeight!==e.clientHeight}function ne(e,t,n){e.style.transform=`translate3d(${t},${n},0)`}function re(e){let t;return e.style.transform&&""!==(t=e.style.transform)?["transform",t]:-1}function ie(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function se(e){const t=["INPUT","SELECT","TEXTAREA"];return e&&(t.indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function oe(e){return se(e)&&!1===e.hasAttribute("data-hot-input")}function ae(e){const t=e.ownerDocument.activeElement;oe(t)||e.select()}function le(e){return!e.parentNode}function ue(e,t){const n=new IntersectionObserver((n,r)=>{n.forEach(n=>{n.isIntersecting&&null!==e.offsetParent&&(t(),r.unobserve(e))})},{root:e.ownerDocument.body});n.observe(e)}function ce(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=e.ownerDocument,s=r.createRange(),o=r.defaultView.getSelection();v(e,"contenteditable",!0),n&&v(e,...Object(i["n"])()),t&&w(e,"invisibleSelection"),s.selectNodeContents(e),o.removeAllRanges(),o.addRange(s)}function he(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.ownerDocument.defaultView.getSelection();e.hasAttribute("aria-hidden")&&e.removeAttribute("aria-hidden"),n.removeAllRanges(),t&&b(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function de(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ce(e,n),t(),he(e,n)}},"5fbd3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"söndag_måndag_tisdag_onsdag_torsdag_fredag_lördag".split("_"),weekdaysShort:"sön_mån_tis_ons_tor_fre_lör".split("_"),weekdaysMin:"sö_må_ti_on_to_fr_lö".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [kl.] HH:mm",LLLL:"dddd D MMMM YYYY [kl.] HH:mm",lll:"D MMM YYYY HH:mm",llll:"ddd D MMM YYYY HH:mm"},calendar:{sameDay:"[Idag] LT",nextDay:"[Imorgon] LT",lastDay:"[Igår] LT",nextWeek:"[På] dddd LT",lastWeek:"[I] dddd[s] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"för %s sedan",s:"några sekunder",ss:"%d sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en månad",MM:"%d månader",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}(\:e|\:a)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?":e":1===t||2===t?":a":":e";return e+n},week:{dow:1,doy:4}});return t}))},6038:function(e,t,n){"use strict";var r=TypeError;e.exports=function(e,t){if(e<t)throw new r("Not enough arguments");return e}},6117:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ug-cn",{months:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),monthsShort:"يانۋار_فېۋرال_مارت_ئاپرېل_ماي_ئىيۇن_ئىيۇل_ئاۋغۇست_سېنتەبىر_ئۆكتەبىر_نويابىر_دېكابىر".split("_"),weekdays:"يەكشەنبە_دۈشەنبە_سەيشەنبە_چارشەنبە_پەيشەنبە_جۈمە_شەنبە".split("_"),weekdaysShort:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),weekdaysMin:"يە_دۈ_سە_چا_پە_جۈ_شە".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY-يىلىM-ئاينىڭD-كۈنى",LLL:"YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm",LLLL:"dddd، YYYY-يىلىM-ئاينىڭD-كۈنى، HH:mm"},meridiemParse:/يېرىم كېچە|سەھەر|چۈشتىن بۇرۇن|چۈش|چۈشتىن كېيىن|كەچ/,meridiemHour:function(e,t){return 12===e&&(e=0),"يېرىم كېچە"===t||"سەھەر"===t||"چۈشتىن بۇرۇن"===t?e:"چۈشتىن كېيىن"===t||"كەچ"===t?e+12:e>=11?e:e+12},meridiem:function(e,t,n){var r=100*e+t;return r<600?"يېرىم كېچە":r<900?"سەھەر":r<1130?"چۈشتىن بۇرۇن":r<1230?"چۈش":r<1800?"چۈشتىن كېيىن":"كەچ"},calendar:{sameDay:"[بۈگۈن سائەت] LT",nextDay:"[ئەتە سائەت] LT",nextWeek:"[كېلەركى] dddd [سائەت] LT",lastDay:"[تۆنۈگۈن] LT",lastWeek:"[ئالدىنقى] dddd [سائەت] LT",sameElse:"L"},relativeTime:{future:"%s كېيىن",past:"%s بۇرۇن",s:"نەچچە سېكونت",ss:"%d سېكونت",m:"بىر مىنۇت",mm:"%d مىنۇت",h:"بىر سائەت",hh:"%d سائەت",d:"بىر كۈن",dd:"%d كۈن",M:"بىر ئاي",MM:"%d ئاي",y:"بىر يىل",yy:"%d يىل"},dayOfMonthOrdinalParse:/\d{1,2}(-كۈنى|-ئاي|-ھەپتە)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"-كۈنى";case"w":case"W":return e+"-ھەپتە";default:return e}},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:7}});return t}))},"624b":function(e,t,n){"use strict";var r=n("fd18"),i=n("2aac");e.exports=function(e,t,n){try{return r(i(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(s){}}},6269:function(e,t,n){"use strict";var r=n("54adf"),i=n("c9a1"),s=n("939b"),o=function(e){return i.slice(0,e.length)===e};e.exports=function(){return o("Bun/")?"BUN":o("Cloudflare-Workers")?"CLOUDFLARE":o("Deno/")?"DENO":o("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"}()},"63d8":function(e,t,n){"use strict";n.r(t),n.d(t,"setBrowserMeta",(function(){return l})),n.d(t,"setPlatformMeta",(function(){return u})),n.d(t,"isChrome",(function(){return c})),n.d(t,"isChromeWebKit",(function(){return h})),n.d(t,"isFirefox",(function(){return d})),n.d(t,"isFirefoxWebKit",(function(){return m})),n.d(t,"isSafari",(function(){return f})),n.d(t,"isEdge",(function(){return p})),n.d(t,"isEdgeWebKit",(function(){return g})),n.d(t,"isMobileBrowser",(function(){return y})),n.d(t,"isIOS",(function(){return w})),n.d(t,"isIpadOS",(function(){return b})),n.d(t,"isWindowsOS",(function(){return v})),n.d(t,"isMacOS",(function(){return _})),n.d(t,"isLinuxOS",(function(){return S}));var r=n("351d"),i=n("7dd09");const s=e=>{const t={value:!1,test:(n,r)=>{t.value=e(n,r)}};return t},o={chrome:s((e,t)=>/Chrome/.test(e)&&/Google/.test(t)),chromeWebKit:s(e=>/CriOS/.test(e)),edge:s(e=>/Edge/.test(e)),edgeWebKit:s(e=>/EdgiOS/.test(e)),firefox:s(e=>/Firefox/.test(e)),firefoxWebKit:s(e=>/FxiOS/.test(e)),mobile:s(e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e)),safari:s((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t))},a={mac:s(e=>/^Mac/.test(e)),win:s(e=>/^Win/.test(e)),linux:s(e=>/^Linux/.test(e)),ios:s(e=>/iPhone|iPad|iPod/i.test(e))};function l(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(o,n=>{let{test:r}=n;r(e,t)})}function u(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(r["objectEach"])(a,t=>{let{test:n}=t;n(e)})}function c(){return o.chrome.value}function h(){return o.chromeWebKit.value}function d(){return o.firefox.value}function m(){return o.firefoxWebKit.value}function f(){return o.safari.value}function p(){return o.edge.value}function g(){return o.edgeWebKit.value}function y(){return o.mobile.value}function w(){return a.ios.value}function b(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value}function v(){return a.win.value}function _(){return a.mac.value}function S(){return a.linux.value}Object(i["isCSR"])()&&(l(),u())},6403:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms-my",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},"652d":function(e,t,n){"use strict";var r=n("fd18"),i=n("69ba"),s=n("9394"),o=n("27dc").indexOf,a=n("861e"),l=r([].push);e.exports=function(e,t){var n,r=s(e),u=0,c=[];for(n in r)!i(a,n)&&i(r,n)&&l(c,n);while(t.length>u)i(r,n=t[u++])&&(~o(c,n)||l(c,n));return c}},"65db":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("eo",{months:"januaro_februaro_marto_aprilo_majo_junio_julio_aŭgusto_septembro_oktobro_novembro_decembro".split("_"),monthsShort:"jan_feb_mart_apr_maj_jun_jul_aŭg_sept_okt_nov_dec".split("_"),weekdays:"dimanĉo_lundo_mardo_merkredo_ĵaŭdo_vendredo_sabato".split("_"),weekdaysShort:"dim_lun_mard_merk_ĵaŭ_ven_sab".split("_"),weekdaysMin:"di_lu_ma_me_ĵa_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"[la] D[-an de] MMMM, YYYY",LLL:"[la] D[-an de] MMMM, YYYY HH:mm",LLLL:"dddd[n], [la] D[-an de] MMMM, YYYY HH:mm",llll:"ddd, [la] D[-an de] MMM, YYYY HH:mm"},meridiemParse:/[ap]\.t\.m/i,isPM:function(e){return"p"===e.charAt(0).toLowerCase()},meridiem:function(e,t,n){return e>11?n?"p.t.m.":"P.T.M.":n?"a.t.m.":"A.T.M."},calendar:{sameDay:"[Hodiaŭ je] LT",nextDay:"[Morgaŭ je] LT",nextWeek:"dddd[n je] LT",lastDay:"[Hieraŭ je] LT",lastWeek:"[pasintan] dddd[n je] LT",sameElse:"L"},relativeTime:{future:"post %s",past:"antaŭ %s",s:"kelkaj sekundoj",ss:"%d sekundoj",m:"unu minuto",mm:"%d minutoj",h:"unu horo",hh:"%d horoj",d:"unu tago",dd:"%d tagoj",M:"unu monato",MM:"%d monatoj",y:"unu jaro",yy:"%d jaroj"},dayOfMonthOrdinalParse:/\d{1,2}a/,ordinal:"%da",week:{dow:1,doy:7}});return t}))},"66e1":function(e,t,n){"use strict";var r=n("ac4f"),i=n("04c20"),s=n("88c5"),o=!s("isDisjointFrom",(function(e){return!e}));r({target:"Set",proto:!0,real:!0,forced:o},{isDisjointFrom:i})},6784:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"],r=e.defineLocale("sd",{months:t,monthsShort:t,weekdays:n,weekdaysShort:n,weekdaysMin:n,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd، D MMMM YYYY HH:mm"},meridiemParse:/صبح|شام/,isPM:function(e){return"شام"===e},meridiem:function(e,t,n){return e<12?"صبح":"شام"},calendar:{sameDay:"[اڄ] LT",nextDay:"[سڀاڻي] LT",nextWeek:"dddd [اڳين هفتي تي] LT",lastDay:"[ڪالهه] LT",lastWeek:"[گزريل هفتي] dddd [تي] LT",sameElse:"L"},relativeTime:{future:"%s پوء",past:"%s اڳ",s:"چند سيڪنڊ",ss:"%d سيڪنڊ",m:"هڪ منٽ",mm:"%d منٽ",h:"هڪ ڪلاڪ",hh:"%d ڪلاڪ",d:"هڪ ڏينهن",dd:"%d ڏينهن",M:"هڪ مهينو",MM:"%d مهينا",y:"هڪ سال",yy:"%d سال"},preparse:function(e){return e.replace(/،/g,",")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:1,doy:4}});return r}))},"67a87":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n("81ea");function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];const s=Object(r["arrayReduce"])(e,(e,t,r)=>{const i=t.replace(/\r?\n\s*/g,""),s=n[r]?n[r]:"";return e+i+s},"");return s.trim()}},6887:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r={mm:"munutenn",MM:"miz",dd:"devezh"};return e+" "+i(r[n],e)}function n(e){switch(r(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}function r(e){return e>9?r(e%10):e}function i(e,t){return 2===t?s(e):e}function s(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}var o=[/^gen/i,/^c[ʼ\']hwe/i,/^meu/i,/^ebr/i,/^mae/i,/^(mez|eve)/i,/^gou/i,/^eos/i,/^gwe/i,/^her/i,/^du/i,/^ker/i],a=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu|gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,l=/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,u=/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,c=[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],h=[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],d=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i],m=e.defineLocale("br",{months:"Genver_Cʼhwevrer_Meurzh_Ebrel_Mae_Mezheven_Gouere_Eost_Gwengolo_Here_Du_Kerzu".split("_"),monthsShort:"Gen_Cʼhwe_Meu_Ebr_Mae_Eve_Gou_Eos_Gwe_Her_Du_Ker".split("_"),weekdays:"Sul_Lun_Meurzh_Mercʼher_Yaou_Gwener_Sadorn".split("_"),weekdaysShort:"Sul_Lun_Meu_Mer_Yao_Gwe_Sad".split("_"),weekdaysMin:"Su_Lu_Me_Mer_Ya_Gw_Sa".split("_"),weekdaysParse:d,fullWeekdaysParse:c,shortWeekdaysParse:h,minWeekdaysParse:d,monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:l,monthsShortStrictRegex:u,monthsParse:o,longMonthsParse:o,shortMonthsParse:o,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [a viz] MMMM YYYY",LLL:"D [a viz] MMMM YYYY HH:mm",LLLL:"dddd, D [a viz] MMMM YYYY HH:mm"},calendar:{sameDay:"[Hiziv da] LT",nextDay:"[Warcʼhoazh da] LT",nextWeek:"dddd [da] LT",lastDay:"[Decʼh da] LT",lastWeek:"dddd [paset da] LT",sameElse:"L"},relativeTime:{future:"a-benn %s",past:"%s ʼzo",s:"un nebeud segondennoù",ss:"%d eilenn",m:"ur vunutenn",mm:t,h:"un eur",hh:"%d eur",d:"un devezh",dd:t,M:"ur miz",MM:t,y:"ur bloaz",yy:n},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){var t=1===e?"añ":"vet";return e+t},week:{dow:1,doy:4},meridiemParse:/a.m.|g.m./,isPM:function(e){return"g.m."===e},meridiem:function(e,t,n){return e<12?"a.m.":"g.m."}});return m}))},"688b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mi",{months:"Kohi-tāte_Hui-tanguru_Poutū-te-rangi_Paenga-whāwhā_Haratua_Pipiri_Hōngoingoi_Here-turi-kōkā_Mahuru_Whiringa-ā-nuku_Whiringa-ā-rangi_Hakihea".split("_"),monthsShort:"Kohi_Hui_Pou_Pae_Hara_Pipi_Hōngoi_Here_Mahu_Whi-nu_Whi-ra_Haki".split("_"),monthsRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,3}/i,monthsShortStrictRegex:/(?:['a-z\u0101\u014D\u016B]+\-?){1,2}/i,weekdays:"Rātapu_Mane_Tūrei_Wenerei_Tāite_Paraire_Hātarei".split("_"),weekdaysShort:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),weekdaysMin:"Ta_Ma_Tū_We_Tāi_Pa_Hā".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [i] HH:mm",LLLL:"dddd, D MMMM YYYY [i] HH:mm"},calendar:{sameDay:"[i teie mahana, i] LT",nextDay:"[apopo i] LT",nextWeek:"dddd [i] LT",lastDay:"[inanahi i] LT",lastWeek:"dddd [whakamutunga i] LT",sameElse:"L"},relativeTime:{future:"i roto i %s",past:"%s i mua",s:"te hēkona ruarua",ss:"%d hēkona",m:"he meneti",mm:"%d meneti",h:"te haora",hh:"%d haora",d:"he ra",dd:"%d ra",M:"he marama",MM:"%d marama",y:"he tau",yy:"%d tau"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},6906:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("7a89");var r=n("97b9");const i=e=>`The id '${e}' is already declared in a map.`;function s(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function n(n,r){if(c(n))throw new Error(e(n));t.set(n,r)}function s(e){return t.delete(e)}function o(){t.clear()}function a(e){const[t]=u().find(t=>{let[n,r]=t;return e===r&&n})||[null];return t}function l(e){return t.get(e)}function u(){return[...t]}function c(e){return t.has(e)}return e=Object(r["isFunction"])(e)?e:i,{addItem:n,clear:o,getId:a,getItem:l,getItems:u,hasItem:c,removeItem:s}}},6909:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("mk",{months:"јануари_февруари_март_април_мај_јуни_јули_август_септември_октомври_ноември_декември".split("_"),monthsShort:"јан_фев_мар_апр_мај_јун_јул_авг_сеп_окт_ное_дек".split("_"),weekdays:"недела_понеделник_вторник_среда_четврток_петок_сабота".split("_"),weekdaysShort:"нед_пон_вто_сре_чет_пет_саб".split("_"),weekdaysMin:"нe_пo_вт_ср_че_пе_сa".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Денес во] LT",nextDay:"[Утре во] LT",nextWeek:"[Во] dddd [во] LT",lastDay:"[Вчера во] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Изминатата] dddd [во] LT";case 1:case 2:case 4:case 5:return"[Изминатиот] dddd [во] LT"}},sameElse:"L"},relativeTime:{future:"за %s",past:"пред %s",s:"неколку секунди",ss:"%d секунди",m:"една минута",mm:"%d минути",h:"еден час",hh:"%d часа",d:"еден ден",dd:"%d дена",M:"еден месец",MM:"%d месеци",y:"една година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"69ba":function(e,t,n){"use strict";var r=n("fd18"),i=n("fc2d"),s=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(i(e),t)}},"6b27":function(e,t,n){"use strict";var r=n("9e75"),i=Math.max,s=Math.min;e.exports=function(e,t){var n=r(e);return n<0?i(n+t,0):s(n,t)}},"6ce3":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nb",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"søndag_mandag_tirsdag_onsdag_torsdag_fredag_lørdag".split("_"),weekdaysShort:"sø._ma._ti._on._to._fr._lø.".split("_"),weekdaysMin:"sø_ma_ti_on_to_fr_lø".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] HH:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[i dag kl.] LT",nextDay:"[i morgen kl.] LT",nextWeek:"dddd [kl.] LT",lastDay:"[i går kl.] LT",lastWeek:"[forrige] dddd [kl.] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s siden",s:"noen sekunder",ss:"%d sekunder",m:"ett minutt",mm:"%d minutter",h:"én time",hh:"%d timer",d:"én dag",dd:"%d dager",w:"én uke",ww:"%d uker",M:"én måned",MM:"%d måneder",y:"ett år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},"6d79":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"},n=e.defineLocale("kk",{months:"қаңтар_ақпан_наурыз_сәуір_мамыр_маусым_шілде_тамыз_қыркүйек_қазан_қараша_желтоқсан".split("_"),monthsShort:"қаң_ақп_нау_сәу_мам_мау_шіл_там_қыр_қаз_қар_жел".split("_"),weekdays:"жексенбі_дүйсенбі_сейсенбі_сәрсенбі_бейсенбі_жұма_сенбі".split("_"),weekdaysShort:"жек_дүй_сей_сәр_бей_жұм_сен".split("_"),weekdaysMin:"жк_дй_сй_ср_бй_жм_сн".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгін сағат] LT",nextDay:"[Ертең сағат] LT",nextWeek:"dddd [сағат] LT",lastDay:"[Кеше сағат] LT",lastWeek:"[Өткен аптаның] dddd [сағат] LT",sameElse:"L"},relativeTime:{future:"%s ішінде",past:"%s бұрын",s:"бірнеше секунд",ss:"%d секунд",m:"бір минут",mm:"%d минут",h:"бір сағат",hh:"%d сағат",d:"бір күн",dd:"%d күн",M:"бір ай",MM:"%d ай",y:"бір жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(ші|шы)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},"6d83":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ar-tn",{months:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"جانفي_فيفري_مارس_أفريل_ماي_جوان_جويلية_أوت_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},week:{dow:1,doy:4}});return t}))},"6e98":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:function(){return"[Oggi a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextDay:function(){return"[Domani a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},nextWeek:function(){return"dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastDay:function(){return"[Ieri a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"},lastWeek:function(){switch(this.day()){case 0:return"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT";default:return"[Lo scorso] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT"}},sameElse:"L"},relativeTime:{future:"tra %s",past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",w:"una settimana",ww:"%d settimane",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f12":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("it-ch",{months:"gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre".split("_"),monthsShort:"gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic".split("_"),weekdays:"domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato".split("_"),weekdaysShort:"dom_lun_mar_mer_gio_ven_sab".split("_"),weekdaysMin:"do_lu_ma_me_gi_ve_sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Oggi alle] LT",nextDay:"[Domani alle] LT",nextWeek:"dddd [alle] LT",lastDay:"[Ieri alle] LT",lastWeek:function(){switch(this.day()){case 0:return"[la scorsa] dddd [alle] LT";default:return"[lo scorso] dddd [alle] LT"}},sameElse:"L"},relativeTime:{future:function(e){return(/^[0-9].+$/.test(e)?"tra":"in")+" "+e},past:"%s fa",s:"alcuni secondi",ss:"%d secondi",m:"un minuto",mm:"%d minuti",h:"un'ora",hh:"%d ore",d:"un giorno",dd:"%d giorni",M:"un mese",MM:"%d mesi",y:"un anno",yy:"%d anni"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"6f50":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-nz",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},"6f53":function(e,t,n){var r=n("83ab"),i=n("df75"),s=n("fc6a"),o=n("d1e7").f,a=function(e){return function(t){var n,a=s(t),l=i(a),u=l.length,c=0,h=[];while(u>c)n=l[c++],r&&!o.call(a,n)||h.push(e?[n,a[n]]:a[n]);return h}};e.exports={entries:a(!0),values:a(!1)}},"6f539":function(e,t,n){"use strict";var r=n("fd18"),i=n("bfa7"),s=n("87ed"),o=s.Set,a=s.proto,l=r(a.forEach),u=r(a.keys),c=u(new o).next;e.exports=function(e,t,n){return n?i({iterator:u(e),next:c},t):l(e,t)}},7064:function(e,t,n){"use strict";var r=n("5438"),i=n("87ed").add,s=n("b52d"),o=n("0f98"),a=n("bfa7");e.exports=function(e){var t=r(this),n=o(e).getIterator(),l=s(t);return a(n,(function(e){i(l,e)})),l}},"70f9":function(e,t,n){"use strict";var r=n("ac4f"),i=n("7b69"),s=n("fd18"),o=n("bf78"),a=n("73fa"),l=n("8793"),u=n("11b3"),c=n("2408"),h=n("2471"),d=n("2cb8"),m=n("aa44"),f=n("80dd"),p=n("d62b"),g=f("replace"),y=TypeError,w=s("".indexOf),b=s("".replace),v=s("".slice),_=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,s,f,S,E,C,M,T,R,O=o(this),N=0,A="";if(l(e)){if(n=u(e),n&&(r=c(o(d(e))),!~w(r,"g")))throw new y("`.replaceAll` does not allow non-global regexes");if(s=h(e,g),s)return i(s,e,O,t);if(p&&n)return b(c(O),e,t)}f=c(O),S=c(e),E=a(t),E||(t=c(t)),C=S.length,M=_(1,C),T=w(f,S);while(-1!==T)R=E?c(t(S,T,f)):m(S,f,T,[],void 0,t),A+=v(f,N,T)+R,N=T+C,T=T+M>f.length?-1:w(f,S,T+M);return N<f.length&&(A+=v(f,N)),A}})},7118:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mai_jun._jul._aug._sep._okt._nov._des.".split("_"),n="jan_feb_mrt_apr_mai_jun_jul_aug_sep_okt_nov_des".split("_"),r=e.defineLocale("fy",{months:"jannewaris_febrewaris_maart_april_maaie_juny_july_augustus_septimber_oktober_novimber_desimber".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsParseExact:!0,weekdays:"snein_moandei_tiisdei_woansdei_tongersdei_freed_sneon".split("_"),weekdaysShort:"si._mo._ti._wo._to._fr._so.".split("_"),weekdaysMin:"Si_Mo_Ti_Wo_To_Fr_So".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[hjoed om] LT",nextDay:"[moarn om] LT",nextWeek:"dddd [om] LT",lastDay:"[juster om] LT",lastWeek:"[ôfrûne] dddd [om] LT",sameElse:"L"},relativeTime:{future:"oer %s",past:"%s lyn",s:"in pear sekonden",ss:"%d sekonden",m:"ien minút",mm:"%d minuten",h:"ien oere",hh:"%d oeren",d:"ien dei",dd:"%d dagen",M:"ien moanne",MM:"%d moannen",y:"ien jier",yy:"%d jierren"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return r}))},"71ca":function(e,t,n){"use strict";var r=String;e.exports=function(e){try{return r(e)}catch(t){return"Object"}}},7204:function(e,t,n){"use strict";var r=n("5438"),i=n("87ed"),s=n("b52d"),o=n("0f98"),a=n("bfa7"),l=i.add,u=i.has,c=i.remove;e.exports=function(e){var t=r(this),n=o(e).getIterator(),i=s(t);return a(n,(function(e){u(t,e)?c(i,e):l(i,e)})),i}},7333:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-il",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}});return t}))},"73d9":function(e,t,n){"use strict";var r=n("b2c9"),i=String,s=TypeError;e.exports=function(e){if(r(e))return e;throw new s("Can't set "+i(e)+" as a prototype")}},"73fa":function(e,t,n){"use strict";var r="object"==typeof document&&document.all;e.exports="undefined"==typeof r&&void 0!==r?function(e){return"function"==typeof e||e===r}:function(e){return"function"==typeof e}},"74dc":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sw",{months:"Januari_Februari_Machi_Aprili_Mei_Juni_Julai_Agosti_Septemba_Oktoba_Novemba_Desemba".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ago_Sep_Okt_Nov_Des".split("_"),weekdays:"Jumapili_Jumatatu_Jumanne_Jumatano_Alhamisi_Ijumaa_Jumamosi".split("_"),weekdaysShort:"Jpl_Jtat_Jnne_Jtan_Alh_Ijm_Jmos".split("_"),weekdaysMin:"J2_J3_J4_J5_Al_Ij_J1".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"hh:mm A",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[leo saa] LT",nextDay:"[kesho saa] LT",nextWeek:"[wiki ijayo] dddd [saat] LT",lastDay:"[jana] LT",lastWeek:"[wiki iliyopita] dddd [saat] LT",sameElse:"L"},relativeTime:{future:"%s baadaye",past:"tokea %s",s:"hivi punde",ss:"sekunde %d",m:"dakika moja",mm:"dakika %d",h:"saa limoja",hh:"masaa %d",d:"siku moja",dd:"siku %d",M:"mwezi mmoja",MM:"miezi %d",y:"mwaka mmoja",yy:"miaka %d"},week:{dow:1,doy:7}});return t}))},7558:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["çend sanîye","çend sanîyeyan"],ss:[e+" sanîye",e+" sanîyeyan"],m:["deqîqeyek","deqîqeyekê"],mm:[e+" deqîqe",e+" deqîqeyan"],h:["saetek","saetekê"],hh:[e+" saet",e+" saetan"],d:["rojek","rojekê"],dd:[e+" roj",e+" rojan"],w:["hefteyek","hefteyekê"],ww:[e+" hefte",e+" hefteyan"],M:["mehek","mehekê"],MM:[e+" meh",e+" mehan"],y:["salek","salekê"],yy:[e+" sal",e+" salan"]};return t?i[n][0]:i[n][1]}function n(e){e=""+e;var t=e.substring(e.length-1),n=e.length>1?e.substring(e.length-2):"";return 12==n||13==n||"2"!=t&&"3"!=t&&"50"!=n&&"70"!=t&&"80"!=t?"ê":"yê"}var r=e.defineLocale("ku-kmr",{months:"Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar".split("_"),monthsShort:"Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber".split("_"),monthsParseExact:!0,weekdays:"Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî".split("_"),weekdaysShort:"Yek_Du_Sê_Çar_Pên_În_Şem".split("_"),weekdaysMin:"Ye_Du_Sê_Ça_Pê_În_Şe".split("_"),meridiem:function(e,t,n){return e<12?n?"bn":"BN":n?"pn":"PN"},meridiemParse:/bn|BN|pn|PN/,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"Do MMMM[a] YYYY[an]",LLL:"Do MMMM[a] YYYY[an] HH:mm",LLLL:"dddd, Do MMMM[a] YYYY[an] HH:mm",ll:"Do MMM[.] YYYY[an]",lll:"Do MMM[.] YYYY[an] HH:mm",llll:"ddd[.], Do MMM[.] YYYY[an] HH:mm"},calendar:{sameDay:"[Îro di saet] LT [de]",nextDay:"[Sibê di saet] LT [de]",nextWeek:"dddd [di saet] LT [de]",lastDay:"[Duh di saet] LT [de]",lastWeek:"dddd[a borî di saet] LT [de]",sameElse:"L"},relativeTime:{future:"di %s de",past:"berî %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,w:t,ww:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(?:yê|ê|\.)/,ordinal:function(e,t){var r=t.toLowerCase();return r.includes("w")||r.includes("m")?e+".":e+n(e)},week:{dow:1,doy:4}});return r}))},"76ab":function(e,t,n){"use strict";n.d(t,"d",(function(){return m})),n.d(t,"a",(function(){return d})),n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return c}));n("7a89");var r=n("9acd"),i=n("491c"),s=n("3d76"),o=n("169f");const{register:a,getItem:l,hasItem:u,getNames:c,getValues:h}=Object(r["a"])("cellTypes");function d(e){if(!u(e))throw Error(`You declared cell type "${e}" as a string that is not mapped to a known object.\n Cell type must be an object or a string mapped to an object registered by\n "Handsontable.cellTypes.registerCellType" method`);return l(e)}function m(e,t){"string"!==typeof e&&(t=e,e=t.CELL_TYPE);const{editor:n,renderer:r,validator:l}=t;n&&Object(i["e"])(e,n),r&&Object(s["d"])(e,r),l&&Object(o["d"])(e,l),a(e,t)}},"77aa":function(e,t,n){"use strict";function r(e){return e&&0===e.length}function i(e){return void 0===e||null===e?[]:Object.keys(e)}function s(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}function o(e,t){for(var n=[],r=i(e),s=0;s<r.length;s++){var o=r[s];n.push(t.call(null,e[o],o))}return n}function a(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}function l(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(l(r)):t.push(r)}return t}function u(e){return r(e)?void 0:e[0]}function c(e){var t=e&&e.length;return t?e[t-1]:void 0}function h(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!I(e))throw Error("non exhaustive match");var r=i(e);for(n=0;n<r.length;n++){var s=r[n],o=e[s];t.call(null,o,s)}}}function d(e){return"string"===typeof e}function m(e){return void 0===e}function f(e){return e instanceof Function}function p(e,t){return void 0===t&&(t=1),e.slice(t,e.length)}function g(e,t){return void 0===t&&(t=1),e.slice(0,e.length-t)}function y(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function w(e,t){return y(e,(function(e){return!t(e)}))}function b(e,t){for(var n=Object.keys(e),r={},i=0;i<n.length;i++){var s=n[i],o=e[s];t(o)&&(r[s]=o)}return r}function v(e,t){return!!I(e)&&e.hasOwnProperty(t)}function _(e,t){return void 0!==C(e,(function(e){return e===t}))}function S(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}function E(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function C(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}function M(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}function T(e,t,n){for(var r=Array.isArray(e),o=r?e:s(e),a=r?[]:i(e),l=n,u=0;u<o.length;u++)l=t.call(null,l,o[u],r?u:a[u]);return l}function R(e){return w(e,(function(e){return null===e||void 0===e}))}function O(e,t){void 0===t&&(t=function(e){return e});var n=[];return T(e,(function(e,r){var i=t(r);return _(n,i)?e:(n.push(i),e.concat(r))}),[])}function N(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=[null],i=r.concat(t);return Function.bind.apply(e,i)}function A(e){return Array.isArray(e)}function L(e){return e instanceof RegExp}function I(e){return e instanceof Object}function k(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function x(e,t){return w(e,(function(e){return _(t,e)}))}function D(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function H(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}function P(e,t){var n=S(e);return n.sort((function(e,n){return t(e)-t(n)})),n}function j(e,t){if(e.length!==t.length)throw Error("can't zipObject with different number of keys and values!");for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}function F(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++)for(var s=t[r],o=i(s),a=0;a<o.length;a++){var l=o[a];e[l]=s[l]}return e}function Y(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var s=t[r];if(!m(s))for(var o=i(s),a=0;a<o.length;a++){var l=o[a];v(e,l)||(e[l]=s[l])}}return e}function U(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Y.apply(null,[{}].concat(e))}function V(e,t){var n={};return h(e,(function(e){var r=t(e),i=n[r];i?i.push(e):n[r]=[e]})),n}function B(e,t){for(var n=E(e),r=i(t),s=0;s<r.length;s++){var o=r[s],a=t[o];n[o]=a}return n}function W(){}function z(e){return e}function G(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}function K(e){console&&console.error&&console.error("Error: "+e)}function X(e){console&&console.warn&&console.warn("Warning: "+e)}function $(){return"function"===typeof Map}function q(e,t){t.forEach((function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach((function(r){if("constructor"!==r){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}}))}))}function J(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function Q(e){return e[e.length-1]}function Z(e){var t=(new Date).getTime(),n=e(),r=(new Date).getTime(),i=r-t;return{time:i,value:n}}n.d(t,"A",(function(){return r})),n.d(t,"G",(function(){return i})),n.d(t,"U",(function(){return s})),n.d(t,"J",(function(){return o})),n.d(t,"I",(function(){return a})),n.d(t,"t",(function(){return l})),n.d(t,"s",(function(){return u})),n.d(t,"H",(function(){return c})),n.d(t,"u",(function(){return h})),n.d(t,"E",(function(){return d})),n.d(t,"F",(function(){return m})),n.d(t,"B",(function(){return f})),n.d(t,"m",(function(){return p})),n.d(t,"n",(function(){return g})),n.d(t,"p",(function(){return y})),n.d(t,"P",(function(){return w})),n.d(t,"N",(function(){return b})),n.d(t,"w",(function(){return v})),n.d(t,"j",(function(){return _})),n.d(t,"g",(function(){return S})),n.d(t,"h",(function(){return E})),n.d(t,"q",(function(){return C})),n.d(t,"r",(function(){return M})),n.d(t,"O",(function(){return T})),n.d(t,"i",(function(){return R})),n.d(t,"T",(function(){return O})),n.d(t,"y",(function(){return A})),n.d(t,"D",(function(){return L})),n.d(t,"C",(function(){return I})),n.d(t,"o",(function(){return k})),n.d(t,"l",(function(){return x})),n.d(t,"Q",(function(){return D})),n.d(t,"x",(function(){return H})),n.d(t,"f",(function(){return F})),n.d(t,"k",(function(){return U})),n.d(t,"v",(function(){return V})),n.d(t,"K",(function(){return B})),n.d(t,"b",(function(){return W})),n.d(t,"a",(function(){return z})),n.d(t,"L",(function(){return G})),n.d(t,"c",(function(){return K})),n.d(t,"d",(function(){return X})),n.d(t,"z",(function(){return $})),n.d(t,"e",(function(){return q})),n.d(t,"S",(function(){return J})),n.d(t,"M",(function(){return Q})),n.d(t,"R",(function(){return Z}))},"78e9":function(e,t,n){"use strict";var r=n("fd18"),i=Error,s=r("".replace),o=function(e){return String(new i(e).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(o);e.exports=function(e,t){if(l&&"string"==typeof e&&!i.prepareStackTrace)while(t--)e=s(e,a,"");return e}},"7a89":function(e,t,n){"use strict";var r=n("ac4f"),i=n("54adf"),s=n("0204"),o=n("170e"),a="WebAssembly",l=i[a],u=7!==new Error("e",{cause:7}).cause,c=function(e,t){var n={};n[e]=o(e,t,u),r({global:!0,constructor:!0,arity:1,forced:u},n)},h=function(e,t){if(l&&l[e]){var n={};n[e]=o(a+"."+e,t,u),r({target:a,stat:!0,constructor:!0,arity:1,forced:u},n)}};c("Error",(function(e){return function(t){return s(e,this,arguments)}})),c("EvalError",(function(e){return function(t){return s(e,this,arguments)}})),c("RangeError",(function(e){return function(t){return s(e,this,arguments)}})),c("ReferenceError",(function(e){return function(t){return s(e,this,arguments)}})),c("SyntaxError",(function(e){return function(t){return s(e,this,arguments)}})),c("TypeError",(function(e){return function(t){return s(e,this,arguments)}})),c("URIError",(function(e){return function(t){return s(e,this,arguments)}})),h("CompileError",(function(e){return function(t){return s(e,this,arguments)}})),h("LinkError",(function(e){return function(t){return s(e,this,arguments)}})),h("RuntimeError",(function(e){return function(t){return s(e,this,arguments)}}))},"7ae0":function(e,t,n){"use strict";n("d06e");var r=n("351d"),i=n("97b9");const s="localHooks",o={_localHooks:Object.create(null),addLocalHook(e,t){return this._localHooks[e]||(this._localHooks[e]=[]),this._localHooks[e].push(t),this},runLocalHooks(e,t,n,r,s,o,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let u=0;u<l;u++)Object(i["fastCall"])(this._localHooks[e][u],this,t,n,r,s,o,a)}},clearLocalHooks(){return this._localHooks={},this}};Object(r["defineGetter"])(o,"MIXIN_NAME",s,{writable:!1,enumerable:!1}),t["a"]=o},"7b69":function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype.call;e.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},"7b7f":function(e,t,n){"use strict";var r=n("b622c"),i=n("b343"),s=n("54adf"),o=s.String;e.exports=!!Object.getOwnPropertySymbols&&!i((function(){var e=Symbol("symbol detection");return!o(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},"7b9c":function(e,t,n){"use strict";n.r(t),n.d(t,"stringify",(function(){return o})),n.d(t,"isDefined",(function(){return a})),n.d(t,"isUndefined",(function(){return l})),n.d(t,"isEmpty",(function(){return u})),n.d(t,"isRegExp",(function(){return c})),n.d(t,"_injectProductInfo",(function(){return S}));var r=n("c1df"),i=n.n(r),s=n("67a87");function o(e){let t;switch(typeof e){case"string":case"number":t=""+e;break;case"object":t=null===e?"":e.toString();break;case"undefined":t="";break;default:t=e.toString();break}return t}function a(e){return"undefined"!==typeof e}function l(e){return"undefined"===typeof e}function u(e){return null===e||""===e||l(e)}function c(e){return"[object RegExp]"===Object.prototype.toString.call(e)}const h="length",d=e=>parseInt(e,16),m=e=>parseInt(e,10),f=(e,t,n)=>e["substr"](t,n),p=e=>e["codePointAt"](0)-65,g=e=>(""+e).replace(/\-/g,""),y=e=>d(f(g(e),d("12"),p("F")))/(d(f(g(e),p("B"),~~![][h]))||9),w=()=>"undefined"!==typeof location&&/^([a-z0-9\-]+\.)?\x68\x61\x6E\x64\x73\x6F\x6E\x74\x61\x62\x6C\x65\x2E\x63\x6F\x6D$/i.test(location.host);let b=!1;const v={invalid:()=>s["a"]`
- The license key for Handsontable is invalid.\x20
- If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return s["a"]`
- The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
- version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
- to ${t}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>s["a"]`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
- us at support@handsontable.com.`,non_commercial:()=>""},_={invalid:()=>s["a"]`
- The license key for Handsontable is invalid.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
- install it properly or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return s["a"]`
- The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
- version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
- license key or downgrade to a version released prior to ${t}. If you need any\x20
- help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>s["a"]`
- The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
- Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
- passing the key: 'non-commercial-and-evaluation'.\x20
- <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
- the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function S(e,t){const n=!u(e),r="string"===typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),s="14.6.2";let o,a="invalid",l="invalid";e=g(e||"");const c=E(e);if(n||r||c)if(c){const t=i()("10/02/2025","DD/MM/YYYY"),n=Math.floor(t.toDate().getTime()/864e5),r=y(e);o=i()(864e5*(r+1),"x").format("MMMM DD, YYYY"),n>r?(a="expired",l="expired"):(a="valid",l="valid")}else r?(a="non_commercial",l="valid"):(a="invalid",l="invalid");else a="missing",l="missing";if(w()&&(a="valid",l="valid"),!b&&"valid"!==a){const e=v[a]({keyValidityDate:o,hotVersion:s});e&&console["non_commercial"===a?"info":"warn"](v[a]({keyValidityDate:o,hotVersion:s})),b=!0}if("valid"!==l&&t.parentNode){const e=_[l]({keyValidityDate:o,hotVersion:s});if(e){const e=document.createElement("div");e.className="hot-display-license-info",e.innerHTML=_[l]({keyValidityDate:o,hotVersion:s}),t.parentNode.insertBefore(e,t.nextSibling)}}}function E(e){let t=[][h],n=t;if(e[h]!==p("Z"))return!1;for(let r="",i="B<H4P+".split(""),s=p(i.shift());s;s=p(i.shift()||"A"))--s<""[h]?n|=(m(""+m(d(r)+(d(f(e,Math.abs(s),2))+[]).padStart(2,"0")))%97||2)>>1:r=f(e,s,s?1===i[h]?9:8:6);return n===t}},"7be6":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="január_február_marec_apríl_máj_jún_júl_august_september_október_november_december".split("_"),n="jan_feb_mar_apr_máj_jún_júl_aug_sep_okt_nov_dec".split("_");function r(e){return e>1&&e<5}function i(e,t,n,i){var s=e+" ";switch(n){case"s":return t||i?"pár sekúnd":"pár sekundami";case"ss":return t||i?s+(r(e)?"sekundy":"sekúnd"):s+"sekundami";case"m":return t?"minúta":i?"minútu":"minútou";case"mm":return t||i?s+(r(e)?"minúty":"minút"):s+"minútami";case"h":return t?"hodina":i?"hodinu":"hodinou";case"hh":return t||i?s+(r(e)?"hodiny":"hodín"):s+"hodinami";case"d":return t||i?"deň":"dňom";case"dd":return t||i?s+(r(e)?"dni":"dní"):s+"dňami";case"M":return t||i?"mesiac":"mesiacom";case"MM":return t||i?s+(r(e)?"mesiace":"mesiacov"):s+"mesiacmi";case"y":return t||i?"rok":"rokom";case"yy":return t||i?s+(r(e)?"roky":"rokov"):s+"rokmi"}}var s=e.defineLocale("sk",{months:t,monthsShort:n,weekdays:"nedeľa_pondelok_utorok_streda_štvrtok_piatok_sobota".split("_"),weekdaysShort:"ne_po_ut_st_št_pi_so".split("_"),weekdaysMin:"ne_po_ut_st_št_pi_so".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd D. MMMM YYYY H:mm"},calendar:{sameDay:"[dnes o] LT",nextDay:"[zajtra o] LT",nextWeek:function(){switch(this.day()){case 0:return"[v nedeľu o] LT";case 1:case 2:return"[v] dddd [o] LT";case 3:return"[v stredu o] LT";case 4:return"[vo štvrtok o] LT";case 5:return"[v piatok o] LT";case 6:return"[v sobotu o] LT"}},lastDay:"[včera o] LT",lastWeek:function(){switch(this.day()){case 0:return"[minulú nedeľu o] LT";case 1:case 2:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 4:case 5:return"[minulý] dddd [o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %s",s:i,ss:i,m:i,mm:i,h:i,hh:i,d:i,dd:i,M:i,MM:i,y:i,yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"7c2b":function(e,t,n){"use strict";var r=n("624b"),i=n("8793"),s=n("bf78"),o=n("73d9");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{e=r(Object.prototype,"__proto__","set"),e(n,[]),t=n instanceof Array}catch(a){}return function(n,r){return s(n),o(r),i(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},"7d61":function(e,t,n){"use strict";var r=n("9046"),i=n("2aac"),s=n("48ab"),o=r(r.bind);e.exports=function(e,t){return i(e),void 0===t?e:s?o(e,t):function(){return e.apply(t,arguments)}}},"7dcf4":function(e,t,n){"use strict";var r=n("c5ae");e.exports=function(e){return r(e.length)}},"7dd09":function(e,t,n){"use strict";function r(e){return window.requestAnimationFrame(e)}function i(e){window.cancelAnimationFrame(e)}function s(){return"ontouchstart"in window}function o(){return"undefined"!==typeof window}let a;function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return a||(a="object"===typeof Intl?new Intl.Collator(e,t).compare:"function"===typeof String.prototype.localeCompare?(e,t)=>(""+e).localeCompare(t):(e,t)=>e===t?0:e>t?-1:1,a)}n.r(t),n.d(t,"requestAnimationFrame",(function(){return r})),n.d(t,"cancelAnimationFrame",(function(){return i})),n.d(t,"isTouchSupported",(function(){return s})),n.d(t,"isCSR",(function(){return o})),n.d(t,"getComparisonFunction",(function(){return l}))},"7f33":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("yo",{months:"Sẹ́rẹ́_Èrèlè_Ẹrẹ̀nà_Ìgbé_Èbibi_Òkùdu_Agẹmo_Ògún_Owewe_Ọ̀wàrà_Bélú_Ọ̀pẹ̀̀".split("_"),monthsShort:"Sẹ́r_Èrl_Ẹrn_Ìgb_Èbi_Òkù_Agẹ_Ògú_Owe_Ọ̀wà_Bél_Ọ̀pẹ̀̀".split("_"),weekdays:"Àìkú_Ajé_Ìsẹ́gun_Ọjọ́rú_Ọjọ́bọ_Ẹtì_Àbámẹ́ta".split("_"),weekdaysShort:"Àìk_Ajé_Ìsẹ́_Ọjr_Ọjb_Ẹtì_Àbá".split("_"),weekdaysMin:"Àì_Aj_Ìs_Ọr_Ọb_Ẹt_Àb".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Ònì ni] LT",nextDay:"[Ọ̀la ni] LT",nextWeek:"dddd [Ọsẹ̀ tón'bọ] [ni] LT",lastDay:"[Àna ni] LT",lastWeek:"dddd [Ọsẹ̀ tólọ́] [ni] LT",sameElse:"L"},relativeTime:{future:"ní %s",past:"%s kọjá",s:"ìsẹjú aayá die",ss:"aayá %d",m:"ìsẹjú kan",mm:"ìsẹjú %d",h:"wákati kan",hh:"wákati %d",d:"ọjọ́ kan",dd:"ọjọ́ %d",M:"osù kan",MM:"osù %d",y:"ọdún kan",yy:"ọdún %d"},dayOfMonthOrdinalParse:/ọjọ́\s\d{1,2}/,ordinal:"ọjọ́ %d",week:{dow:1,doy:4}});return t}))},8033:function(e,t,n){},"80dd":function(e,t,n){"use strict";var r=n("54adf"),i=n("de26"),s=n("69ba"),o=n("592a"),a=n("7b7f"),l=n("9c76"),u=r.Symbol,c=i("wks"),h=l?u["for"]||u:u&&u.withoutSetter||o;e.exports=function(e){return s(c,e)||(c[e]=a&&s(u,e)?u[e]:h("Symbol."+e)),c[e]}},8155:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return i+=1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund",i;case"m":return t?"ena minuta":"eno minuto";case"mm":return i+=1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami",i;case"h":return t?"ena ura":"eno uro";case"hh":return i+=1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami",i;case"d":return t||r?"en dan":"enim dnem";case"dd":return i+=1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi",i;case"M":return t||r?"en mesec":"enim mesecem";case"MM":return i+=1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci",i;case"y":return t||r?"eno leto":"enim letom";case"yy":return i+=1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti",i}}var n=e.defineLocale("sl",{months:"januar_februar_marec_april_maj_junij_julij_avgust_september_oktober_november_december".split("_"),monthsShort:"jan._feb._mar._apr._maj._jun._jul._avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljek_torek_sreda_četrtek_petek_sobota".split("_"),weekdaysShort:"ned._pon._tor._sre._čet._pet._sob.".split("_"),weekdaysMin:"ne_po_to_sr_če_pe_so".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD. MM. YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[danes ob] LT",nextDay:"[jutri ob] LT",nextWeek:function(){switch(this.day()){case 0:return"[v] [nedeljo] [ob] LT";case 3:return"[v] [sredo] [ob] LT";case 6:return"[v] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[v] dddd [ob] LT"}},lastDay:"[včeraj ob] LT",lastWeek:function(){switch(this.day()){case 0:return"[prejšnjo] [nedeljo] [ob] LT";case 3:return"[prejšnjo] [sredo] [ob] LT";case 6:return"[prejšnjo] [soboto] [ob] LT";case 1:case 2:case 4:case 5:return"[prejšnji] dddd [ob] LT"}},sameElse:"L"},relativeTime:{future:"čez %s",past:"pred %s",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},"81b7":function(e,t,n){"use strict";var r=n("fd18"),i=n("b343"),s=n("939b"),o=Object,a=r("".split);e.exports=i((function(){return!o("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?a(e,""):o(e)}:o},"81e9":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="nolla yksi kaksi kolme neljä viisi kuusi seitsemän kahdeksan yhdeksän".split(" "),n=["nolla","yhden","kahden","kolmen","neljän","viiden","kuuden",t[7],t[8],t[9]];function r(e,t,n,r){var s="";switch(n){case"s":return r?"muutaman sekunnin":"muutama sekunti";case"ss":s=r?"sekunnin":"sekuntia";break;case"m":return r?"minuutin":"minuutti";case"mm":s=r?"minuutin":"minuuttia";break;case"h":return r?"tunnin":"tunti";case"hh":s=r?"tunnin":"tuntia";break;case"d":return r?"päivän":"päivä";case"dd":s=r?"päivän":"päivää";break;case"M":return r?"kuukauden":"kuukausi";case"MM":s=r?"kuukauden":"kuukautta";break;case"y":return r?"vuoden":"vuosi";case"yy":s=r?"vuoden":"vuotta";break}return s=i(e,r)+" "+s,s}function i(e,r){return e<10?r?n[e]:t[e]:e}var s=e.defineLocale("fi",{months:"tammikuu_helmikuu_maaliskuu_huhtikuu_toukokuu_kesäkuu_heinäkuu_elokuu_syyskuu_lokakuu_marraskuu_joulukuu".split("_"),monthsShort:"tammi_helmi_maalis_huhti_touko_kesä_heinä_elo_syys_loka_marras_joulu".split("_"),weekdays:"sunnuntai_maanantai_tiistai_keskiviikko_torstai_perjantai_lauantai".split("_"),weekdaysShort:"su_ma_ti_ke_to_pe_la".split("_"),weekdaysMin:"su_ma_ti_ke_to_pe_la".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"Do MMMM[ta] YYYY",LLL:"Do MMMM[ta] YYYY, [klo] HH.mm",LLLL:"dddd, Do MMMM[ta] YYYY, [klo] HH.mm",l:"D.M.YYYY",ll:"Do MMM YYYY",lll:"Do MMM YYYY, [klo] HH.mm",llll:"ddd, Do MMM YYYY, [klo] HH.mm"},calendar:{sameDay:"[tänään] [klo] LT",nextDay:"[huomenna] [klo] LT",nextWeek:"dddd [klo] LT",lastDay:"[eilen] [klo] LT",lastWeek:"[viime] dddd[na] [klo] LT",sameElse:"L"},relativeTime:{future:"%s päästä",past:"%s sitten",s:r,ss:r,m:r,mm:r,h:r,hh:r,d:r,dd:r,M:r,MM:r,y:r,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return s}))},"81ea":function(e,t,n){"use strict";n.r(t),n.d(t,"to2dArray",(function(){return r})),n.d(t,"extendArray",(function(){return i})),n.d(t,"pivot",(function(){return s})),n.d(t,"arrayReduce",(function(){return o})),n.d(t,"arrayFilter",(function(){return a})),n.d(t,"arrayMap",(function(){return l})),n.d(t,"arrayEach",(function(){return u})),n.d(t,"arraySum",(function(){return c})),n.d(t,"arrayMax",(function(){return h})),n.d(t,"arrayMin",(function(){return d})),n.d(t,"arrayAvg",(function(){return m})),n.d(t,"arrayFlatten",(function(){return f})),n.d(t,"arrayUnique",(function(){return p})),n.d(t,"getDifferenceOfArrays",(function(){return g})),n.d(t,"getIntersectionOfArrays",(function(){return y})),n.d(t,"getUnionOfArrays",(function(){return w})),n.d(t,"stringToArray",(function(){return b}));n("d06e"),n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7");function r(e){const t=e.length;let n=0;while(n<t)e[n]=[e[n]],n+=1}function i(e,t){const n=t.length;let r=0;while(r<n)e.push(t[r]),r+=1}function s(e){const t=[];if(!e||0===e.length||!e[0]||0===e[0].length)return t;const n=e.length,r=e[0].length;for(let i=0;i<n;i++)for(let n=0;n<r;n++)t[n]||(t[n]=[]),t[n][i]=e[i][n];return t}function o(e,t,n,r){let i=-1,s=e,o=n;Array.isArray(e)||(s=Array.from(e));const a=s.length;r&&a&&(i+=1,o=s[i]),i+=1;while(i<a)o=t(o,s[i],i,s),i+=1;return o}function a(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];t(e,n,r)&&(o+=1,s[o]=e),n+=1}return s}function l(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length,s=[];let o=-1;while(n<i){const e=r[n];o+=1,s[o]=t(e,n,r),n+=1}return s}function u(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const i=r.length;while(n<i){if(!1===t(r[n],n,r))break;n+=1}return e}function c(e){return o(e,(e,t)=>e+t,0)}function h(e){return o(e,(e,t)=>e>t?e:t,Array.isArray(e)?e[0]:void 0)}function d(e){return o(e,(e,t)=>e<t?e:t,Array.isArray(e)?e[0]:void 0)}function m(e){return e.length?c(e)/e.length:0}function f(e){return o(e,(e,t)=>e.concat(Array.isArray(t)?f(t):t),[])}function p(e){const t=[];return u(e,e=>{-1===t.indexOf(e)&&t.push(e)}),t}function g(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return u(i,e=>{s=s.filter(t=>!e.includes(t))}),s}function y(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t];let s=r;return u(i,e=>{s=s.filter(t=>e.includes(t))}),s}function w(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...i]=[...t],s=new Set(r);return u(i,e=>{u(e,e=>{s.has(e)||s.add(e)})}),Array.from(s)}function b(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}},8230:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=e.defineLocale("ar-sa",{months:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),monthsShort:"يناير_فبراير_مارس_أبريل_مايو_يونيو_يوليو_أغسطس_سبتمبر_أكتوبر_نوفمبر_ديسمبر".split("_"),weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم على الساعة] LT",nextDay:"[غدا على الساعة] LT",nextWeek:"dddd [على الساعة] LT",lastDay:"[أمس على الساعة] LT",lastWeek:"dddd [على الساعة] LT",sameElse:"L"},relativeTime:{future:"في %s",past:"منذ %s",s:"ثوان",ss:"%d ثانية",m:"دقيقة",mm:"%d دقائق",h:"ساعة",hh:"%d ساعات",d:"يوم",dd:"%d أيام",M:"شهر",MM:"%d أشهر",y:"سنة",yy:"%d سنوات"},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:0,doy:6}});return r}))},"84aa":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bg",{months:"януари_февруари_март_април_май_юни_юли_август_септември_октомври_ноември_декември".split("_"),monthsShort:"яну_фев_мар_апр_май_юни_юли_авг_сеп_окт_ное_дек".split("_"),weekdays:"неделя_понеделник_вторник_сряда_четвъртък_петък_събота".split("_"),weekdaysShort:"нед_пон_вто_сря_чет_пет_съб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[Днес в] LT",nextDay:"[Утре в] LT",nextWeek:"dddd [в] LT",lastDay:"[Вчера в] LT",lastWeek:function(){switch(this.day()){case 0:case 3:case 6:return"[Миналата] dddd [в] LT";case 1:case 2:case 4:case 5:return"[Миналия] dddd [в] LT"}},sameElse:"L"},relativeTime:{future:"след %s",past:"преди %s",s:"няколко секунди",ss:"%d секунди",m:"минута",mm:"%d минути",h:"час",hh:"%d часа",d:"ден",dd:"%d дена",w:"седмица",ww:"%d седмици",M:"месец",MM:"%d месеца",y:"година",yy:"%d години"},dayOfMonthOrdinalParse:/\d{1,2}-(ев|ен|ти|ви|ри|ми)/,ordinal:function(e){var t=e%10,n=e%100;return 0===e?e+"-ев":0===n?e+"-ен":n>10&&n<20?e+"-ти":1===t?e+"-ви":2===t?e+"-ри":7===t||8===t?e+"-ми":e+"-ти"},week:{dow:1,doy:7}});return t}))},"84d8":function(e,t,n){"use strict";var r=n("7b69"),i=n("8793"),s=n("4c54"),o=n("2471"),a=n("86d6"),l=n("80dd"),u=TypeError,c=l("toPrimitive");e.exports=function(e,t){if(!i(e)||s(e))return e;var n,l=o(e,c);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!i(n)||s(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},"861dd":function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("7a89"),n("d06e");var r=n("5714");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const a=50;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportWidth:n,scrollOffset:r,totalColumns:s,columnWidthFn:o,overrideFn:a,inlineStartOffset:l}=e;super(t),i(this,"viewportWidth",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalColumns",0),i(this,"columnWidthFn",null),i(this,"columnWidth",0),i(this,"overrideFn",null),i(this,"inlineStartOffset",0),i(this,"totalCalculatedWidth",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportWidth=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalColumns=s,this.columnWidthFn=o,this.overrideFn=a,this.inlineStartOffset=l,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalColumns;e++)if(this.columnWidth=this.getColumnWidth(e),this._process(e,this),this.startPositions.push(this.totalCalculatedWidth),this.totalCalculatedWidth+=this.columnWidth,this.totalCalculatedWidth>=this.zeroBasedScrollOffset+this.viewportWidth){this.needReverse=!1;break}this._finalize(this)}getColumnWidth(e){const t=this.columnWidthFn(e);return isNaN(t)?a:t}}},"861e":function(e,t,n){"use strict";e.exports={}},8689:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"},r=e.defineLocale("my",{months:"ဇန်နဝါရီ_ဖေဖော်ဝါရီ_မတ်_ဧပြီ_မေ_ဇွန်_ဇူလိုင်_သြဂုတ်_စက်တင်ဘာ_အောက်တိုဘာ_နိုဝင်ဘာ_ဒီဇင်ဘာ".split("_"),monthsShort:"ဇန်_ဖေ_မတ်_ပြီ_မေ_ဇွန်_လိုင်_သြ_စက်_အောက်_နို_ဒီ".split("_"),weekdays:"တနင်္ဂနွေ_တနင်္လာ_အင်္ဂါ_ဗုဒ္ဓဟူး_ကြာသပတေး_သောကြာ_စနေ".split("_"),weekdaysShort:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),weekdaysMin:"နွေ_လာ_ဂါ_ဟူး_ကြာ_သော_နေ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ယနေ.] LT [မှာ]",nextDay:"[မနက်ဖြန်] LT [မှာ]",nextWeek:"dddd LT [မှာ]",lastDay:"[မနေ.က] LT [မှာ]",lastWeek:"[ပြီးခဲ့သော] dddd LT [မှာ]",sameElse:"L"},relativeTime:{future:"လာမည့် %s မှာ",past:"လွန်ခဲ့သော %s က",s:"စက္ကန်.အနည်းငယ်",ss:"%d စက္ကန့်",m:"တစ်မိနစ်",mm:"%d မိနစ်",h:"တစ်နာရီ",hh:"%d နာရီ",d:"တစ်ရက်",dd:"%d ရက်",M:"တစ်လ",MM:"%d လ",y:"တစ်နှစ်",yy:"%d နှစ်"},preparse:function(e){return e.replace(/[၁၂၃၄၅၆၇၈၉၀]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return r}))},"86d6":function(e,t,n){"use strict";var r=n("7b69"),i=n("73fa"),s=n("8793"),o=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&i(n=e.toString)&&!s(a=r(n,e)))return a;if(i(n=e.valueOf)&&!s(a=r(n,e)))return a;if("string"!==t&&i(n=e.toString)&&!s(a=r(n,e)))return a;throw new o("Can't convert object to primitive value")}},"8722d":function(e,t,n){var r;!function(t){e.exports=t()}((function(){return function e(t,n,i){function s(a,l){if(!n[a]){if(!t[a]){var u="function"==typeof r&&r;if(!l&&u)return r(a,!0);if(o)return o(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var h=n[a]={exports:{}};t[a][0].call(h.exports,(function(e){return s(t[a][1][e]||e)}),h,h.exports,e,t,n,i)}return n[a].exports}for(var o="function"==typeof r&&r,a=0;a<i.length;a++)s(i[a]);return s}({1:[function(e,t,n){!function(e){"use strict";var n,r=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,i=Math.ceil,s=Math.floor,o="[BigNumber Error] ",a=o+"Number primitive has more than 15 significant digits: ",l=1e14,u=14,c=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],d=1e7,m=1e9;function f(e){var t=0|e;return 0<e||e===t?t:t-1}function p(e){for(var t,n,r=1,i=e.length,s=e[0]+"";r<i;){for(t=e[r++]+"",n=u-t.length;n--;t="0"+t);s+=t}for(i=s.length;48===s.charCodeAt(--i););return s.slice(0,i+1||1)}function g(e,t){var n,r,i=e.c,s=t.c,o=e.s,a=t.s,l=e.e,u=t.e;if(!o||!a)return null;if(n=i&&!i[0],r=s&&!s[0],n||r)return n?r?0:-a:o;if(o!=a)return o;if(n=o<0,r=l==u,!i||!s)return r?0:!i^n?1:-1;if(!r)return u<l^n?1:-1;for(a=(l=i.length)<(u=s.length)?l:u,o=0;o<a;o++)if(i[o]!=s[o])return i[o]>s[o]^n?1:-1;return l==u?0:u<l^n?1:-1}function y(e,t,n,r){if(e<t||n<e||e!==(e<0?i(e):s(e)))throw Error(o+(r||"Argument")+("number"==typeof e?e<t||n<e?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function w(e){var t=e.c.length-1;return f(e.e/u)==t&&e.c[t]%2!=0}function b(e,t){return(1<e.length?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,n){var r,i;if(t<0){for(i=n+".";++t;i+=n);e=i+e}else if(++t>(r=e.length)){for(i=n,t-=r;--t;i+=n);e+=i}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}(n=function e(t){var n,_,S,E,C,M,T,R,O,N,A=B.prototype={constructor:B,toString:null,valueOf:null},L=new B(1),I=20,k=4,x=-7,D=21,H=-1e7,P=1e7,j=!1,F=1,Y=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},V="0123456789abcdefghijklmnopqrstuvwxyz";function B(e,t){var n,i,o,l,h,d,m,f,p=this;if(!(p instanceof B))return new B(e,t);if(null==t){if(e instanceof B)return p.s=e.s,p.e=e.e,void(p.c=(e=e.c)?e.slice():e);if((d="number"==typeof e)&&0*e==0){if(p.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,h=e;10<=h;h/=10,l++);return p.e=l,void(p.c=[e])}f=String(e)}else{if(f=String(e),!r.test(f))return S(p,f,d);p.s=45==f.charCodeAt(0)?(f=f.slice(1),-1):1}-1<(l=f.indexOf("."))&&(f=f.replace(".","")),0<(h=f.search(/e/i))?(l<0&&(l=h),l+=+f.slice(h+1),f=f.substring(0,h)):l<0&&(l=f.length)}else{if(y(t,2,V.length,"Base"),f=String(e),10==t)return K(p=new B(e instanceof B?e:f),I+p.e+1,k);if(d="number"==typeof e){if(0*e!=0)return S(p,f,d,t);if(p.s=1/e<0?(f=f.slice(1),-1):1,B.DEBUG&&15<f.replace(/^0\.0*|\./,"").length)throw Error(a+e);d=!1}else p.s=45===f.charCodeAt(0)?(f=f.slice(1),-1):1;for(n=V.slice(0,t),l=h=0,m=f.length;h<m;h++)if(n.indexOf(i=f.charAt(h))<0){if("."==i){if(l<h){l=m;continue}}else if(!o&&(f==f.toUpperCase()&&(f=f.toLowerCase())||f==f.toLowerCase()&&(f=f.toUpperCase()))){o=!0,h=-1,l=0;continue}return S(p,String(e),d,t)}-1<(l=(f=_(f,t,10,p.s)).indexOf("."))?f=f.replace(".",""):l=f.length}for(h=0;48===f.charCodeAt(h);h++);for(m=f.length;48===f.charCodeAt(--m););if(f=f.slice(h,++m)){if(m-=h,d&&B.DEBUG&&15<m&&(c<e||e!==s(e)))throw Error(a+p.s*e);if(P<(l=l-h-1))p.c=p.e=null;else if(l<H)p.c=[p.e=0];else{if(p.e=l,p.c=[],h=(l+1)%u,l<0&&(h+=u),h<m){for(h&&p.c.push(+f.slice(0,h)),m-=u;h<m;)p.c.push(+f.slice(h,h+=u));f=f.slice(h),h=u-f.length}else h-=m;for(;h--;f+="0");p.c.push(+f)}}else p.c=[p.e=0]}function W(e,t,n,r){var i,s,o,a,l;if(null==n?n=k:y(n,0,8),!e.c)return e.toString();if(i=e.c[0],o=e.e,null==t)l=p(e.c),l=1==r||2==r&&(o<=x||D<=o)?b(l,o):v(l,o,"0");else if(s=(e=K(new B(e),t,n)).e,a=(l=p(e.c)).length,1==r||2==r&&(t<=s||s<=x)){for(;a<t;l+="0",a++);l=b(l,s)}else if(t-=o,l=v(l,s,"0"),a<s+1){if(0<--t)for(l+=".";t--;l+="0");}else if(0<(t+=s-a))for(s+1==a&&(l+=".");t--;l+="0");return e.s<0&&i?"-"+l:l}function z(e,t){for(var n,r=1,i=new B(e[0]);r<e.length;r++){if(!(n=new B(e[r])).s){i=n;break}t.call(i,n)&&(i=n)}return i}function G(e,t,n){for(var r=1,i=t.length;!t[--i];t.pop());for(i=t[0];10<=i;i/=10,r++);return(n=r+n*u-1)>P?e.c=e.e=null:e.c=n<H?[e.e=0]:(e.e=n,t),e}function K(e,t,n,r){var o,a,c,d,m,f,p,g=e.c,y=h;if(g){e:{for(o=1,d=g[0];10<=d;d/=10,o++);if((a=t-o)<0)a+=u,c=t,p=(m=g[f=0])/y[o-c-1]%10|0;else if((f=i((a+1)/u))>=g.length){if(!r)break e;for(;g.length<=f;g.push(0));m=p=0,c=(a%=u)-u+(o=1)}else{for(m=d=g[f],o=1;10<=d;d/=10,o++);p=(c=(a%=u)-u+o)<0?0:m/y[o-c-1]%10|0}if(r=r||t<0||null!=g[f+1]||(c<0?m:m%y[o-c-1]),r=n<4?(p||r)&&(0==n||n==(e.s<0?3:2)):5<p||5==p&&(4==n||r||6==n&&(0<a?0<c?m/y[o-c]:0:g[f-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,r?(t-=e.e+1,g[0]=y[(u-t%u)%u],e.e=-t||0):g[0]=e.e=0,e;if(0==a?(g.length=f,d=1,f--):(g.length=f+1,d=y[u-a],g[f]=0<c?s(m/y[o-c]%y[c])*d:0),r)for(;;){if(0==f){for(a=1,c=g[0];10<=c;c/=10,a++);for(c=g[0]+=d,d=1;10<=c;c/=10,d++);a!=d&&(e.e++,g[0]==l&&(g[0]=1));break}if(g[f]+=d,g[f]!=l)break;g[f--]=0,d=1}for(a=g.length;0===g[--a];g.pop());}e.e>P?e.c=e.e=null:e.e<H&&(e.c=[e.e=0])}return e}function X(e){var t,n=e.e;return null===n?e.toString():(t=p(e.c),t=n<=x||D<=n?b(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return B.clone=e,B.ROUND_UP=0,B.ROUND_DOWN=1,B.ROUND_CEIL=2,B.ROUND_FLOOR=3,B.ROUND_HALF_UP=4,B.ROUND_HALF_DOWN=5,B.ROUND_HALF_EVEN=6,B.ROUND_HALF_CEIL=7,B.ROUND_HALF_FLOOR=8,B.EUCLID=9,B.config=B.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(o+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(y(n=e[t],0,m,t),I=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(y(n=e[t],0,8,t),k=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(y(n[0],-m,0,t),y(n[1],0,m,t),x=n[0],D=n[1]):(y(n,-m,m,t),x=-(D=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)y(n[0],-m,-1,t),y(n[1],1,m,t),H=n[0],P=n[1];else{if(y(n,-m,m,t),!n)throw Error(o+t+" cannot be zero: "+n);H=-(P=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(o+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw j=!n,Error(o+"crypto unavailable");j=n}else j=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(y(n=e[t],0,9,t),F=n),e.hasOwnProperty(t="POW_PRECISION")&&(y(n=e[t],0,m,t),Y=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(o+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.$|[+-.\s]|(.).*\1/.test(n))throw Error(o+t+" invalid: "+n);V=n}}return{DECIMAL_PLACES:I,ROUNDING_MODE:k,EXPONENTIAL_AT:[x,D],RANGE:[H,P],CRYPTO:j,MODULO_MODE:F,POW_PRECISION:Y,FORMAT:U,ALPHABET:V}},B.isBigNumber=function(e){return e instanceof B||e&&!0===e._isBigNumber||!1},B.maximum=B.max=function(){return z(arguments,A.lt)},B.minimum=B.min=function(){return z(arguments,A.gt)},B.random=(E=9007199254740992,C=Math.random()*E&2097151?function(){return s(Math.random()*E)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,l,c=0,d=[],f=new B(L);if(null==e?e=I:y(e,0,m),a=i(e/u),j)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));c<a;)9e15<=(l=131072*t[c]+(t[c+1]>>>11))?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(d.push(l%1e14),c+=2);c=a/2}else{if(!crypto.randomBytes)throw j=!1,Error(o+"crypto unavailable");for(t=crypto.randomBytes(a*=7);c<a;)9e15<=(l=281474976710656*(31&t[c])+1099511627776*t[c+1]+4294967296*t[c+2]+16777216*t[c+3]+(t[c+4]<<16)+(t[c+5]<<8)+t[c+6])?crypto.randomBytes(7).copy(t,c):(d.push(l%1e14),c+=7);c=a/7}if(!j)for(;c<a;)(l=C())<9e15&&(d[c++]=l%1e14);for(a=d[--c],e%=u,a&&e&&(l=h[u-e],d[c]=s(a/l)*l);0===d[c];d.pop(),c--);if(c<0)d=[r=0];else{for(r=-1;0===d[0];d.splice(0,1),r-=u);for(c=1,l=d[0];10<=l;l/=10,c++);c<u&&(r-=u-c)}return f.e=r,f.c=d,f}),B.sum=function(){for(var e=1,t=arguments,n=new B(t[0]);e<t.length;)n=n.plus(t[e++]);return n},_=function(){var e="0123456789";function t(e,t,n,r){for(var i,s,o=[0],a=0,l=e.length;a<l;){for(s=o.length;s--;o[s]*=t);for(o[0]+=r.indexOf(e.charAt(a++)),i=0;i<o.length;i++)o[i]>n-1&&(null==o[i+1]&&(o[i+1]=0),o[i+1]+=o[i]/n|0,o[i]%=n)}return o.reverse()}return function(r,i,s,o,a){var l,u,c,h,d,m,f,g,y=r.indexOf("."),w=I,b=k;for(0<=y&&(h=Y,Y=0,r=r.replace(".",""),m=(g=new B(i)).pow(r.length-y),Y=h,g.c=t(v(p(m.c),m.e,"0"),10,s,e),g.e=g.c.length),c=h=(f=t(r,i,s,a?(l=V,e):(l=e,V))).length;0==f[--h];f.pop());if(!f[0])return l.charAt(0);if(y<0?--c:(m.c=f,m.e=c,m.s=o,f=(m=n(m,g,w,b,s)).c,d=m.r,c=m.e),y=f[u=c+w+1],h=s/2,d=d||u<0||null!=f[u+1],d=b<4?(null!=y||d)&&(0==b||b==(m.s<0?3:2)):h<y||y==h&&(4==b||d||6==b&&1&f[u-1]||b==(m.s<0?8:7)),u<1||!f[0])r=d?v(l.charAt(1),-w,l.charAt(0)):l.charAt(0);else{if(f.length=u,d)for(--s;++f[--u]>s;)f[u]=0,u||(++c,f=[1].concat(f));for(h=f.length;!f[--h];);for(y=0,r="";y<=h;r+=l.charAt(f[y++]));r=v(r,c,l.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,i,s,o,a=0,l=e.length,u=t%d,c=t/d|0;for(e=e.slice();l--;)a=((i=u*(s=e[l]%d)+(r=c*s+(o=e[l]/d|0)*u)%d*d+a)/n|0)+(r/d|0)+c*o,e[l]=i%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var i,s;if(n!=r)s=r<n?1:-1;else for(i=s=0;i<n;i++)if(e[i]!=t[i]){s=e[i]>t[i]?1:-1;break}return s}function n(e,t,n,r){for(var i=0;n--;)e[n]-=i,i=e[n]<t[n]?1:0,e[n]=i*r+e[n]-t[n];for(;!e[0]&&1<e.length;e.splice(0,1));}return function(r,i,o,a,c){var h,d,m,p,g,y,w,b,v,_,S,E,C,M,T,R,O,N=r.s==i.s?1:-1,A=r.c,L=i.c;if(!(A&&A[0]&&L&&L[0]))return new B(r.s&&i.s&&(A?!L||A[0]!=L[0]:L)?A&&0==A[0]||!L?0*N:N/0:NaN);for(v=(b=new B(N)).c=[],N=o+(d=r.e-i.e)+1,c||(c=l,d=f(r.e/u)-f(i.e/u),N=N/u|0),m=0;L[m]==(A[m]||0);m++);if(L[m]>(A[m]||0)&&d--,N<0)v.push(1),p=!0;else{for(M=A.length,R=L.length,N+=2,1<(g=s(c/(L[m=0]+1)))&&(L=e(L,g,c),A=e(A,g,c),R=L.length,M=A.length),C=R,S=(_=A.slice(0,R)).length;S<R;_[S++]=0);O=L.slice(),O=[0].concat(O),T=L[0],L[1]>=c/2&&T++;do{if(g=0,(h=t(L,_,R,S))<0){if(E=_[0],R!=S&&(E=E*c+(_[1]||0)),1<(g=s(E/T)))for(c<=g&&(g=c-1),w=(y=e(L,g,c)).length,S=_.length;1==t(y,_,w,S);)g--,n(y,R<w?O:L,w,c),w=y.length,h=1;else 0==g&&(h=g=1),w=(y=L.slice()).length;if(w<S&&(y=[0].concat(y)),n(_,y,S,c),S=_.length,-1==h)for(;t(L,_,R,S)<1;)g++,n(_,R<S?O:L,S,c),S=_.length}else 0===h&&(g++,_=[0]);v[m++]=g,_[0]?_[S++]=A[C]||0:(_=[A[C]],S=1)}while((C++<M||null!=_[0])&&N--);p=null!=_[0],v[0]||v.splice(0,1)}if(c==l){for(m=1,N=v[0];10<=N;N/=10,m++);K(b,o+(b.e=m+d*u-1)+1,a,p)}else b.e=d,b.r=+p;return b}}(),M=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,R=/^\.([^.]+)$/,O=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var i,s=n?t:t.replace(N,"");if(O.test(s))e.s=isNaN(s)?null:s<0?-1:1,e.c=e.e=null;else{if(!n&&(s=s.replace(M,(function(e,t,n){return i="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=i?e:t})),r&&(i=r,s=s.replace(T,"$1").replace(R,"0.$1")),t!=s))return new B(s,i);if(B.DEBUG)throw Error(o+"Not a"+(r?" base "+r:"")+" number: "+t);e.c=e.e=e.s=null}},A.absoluteValue=A.abs=function(){var e=new B(this);return e.s<0&&(e.s=1),e},A.comparedTo=function(e,t){return g(this,new B(e,t))},A.decimalPlaces=A.dp=function(e,t){var n,r,i;if(null!=e)return y(e,0,m),null==t?t=k:y(t,0,8),K(new B(this),e+this.e+1,t);if(!(n=this.c))return null;if(r=((i=n.length-1)-f(this.e/u))*u,i=n[i])for(;i%10==0;i/=10,r--);return r<0&&(r=0),r},A.dividedBy=A.div=function(e,t){return n(this,new B(e,t),I,k)},A.dividedToIntegerBy=A.idiv=function(e,t){return n(this,new B(e,t),0,1)},A.exponentiatedBy=A.pow=function(e,t){var n,r,a,l,c,h,d,m,f=this;if((e=new B(e)).c&&!e.isInteger())throw Error(o+"Exponent not an integer: "+X(e));if(null!=t&&(t=new B(t)),c=14<e.e,!f.c||!f.c[0]||1==f.c[0]&&!f.e&&1==f.c.length||!e.c||!e.c[0])return m=new B(Math.pow(+X(f),c?2-w(e):+X(e))),t?m.mod(t):m;if(h=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new B(NaN);(r=!h&&f.isInteger()&&t.isInteger())&&(f=f.mod(t))}else{if(9<e.e&&(0<f.e||f.e<-1||(0==f.e?1<f.c[0]||c&&24e7<=f.c[1]:f.c[0]<8e13||c&&f.c[0]<=9999975e7)))return l=f.s<0&&w(e)?-0:0,-1<f.e&&(l=1/l),new B(h?1/l:l);Y&&(l=i(Y/u+2))}for(d=c?(n=new B(.5),h&&(e.s=1),w(e)):(a=Math.abs(+X(e)))%2,m=new B(L);;){if(d){if(!(m=m.times(f)).c)break;l?m.c.length>l&&(m.c.length=l):r&&(m=m.mod(t))}if(a){if(0===(a=s(a/2)))break;d=a%2}else if(K(e=e.times(n),e.e+1,1),14<e.e)d=w(e);else{if(0==(a=+X(e)))break;d=a%2}f=f.times(f),l?f.c&&f.c.length>l&&(f.c.length=l):r&&(f=f.mod(t))}return r?m:(h&&(m=L.div(m)),t?m.mod(t):l?K(m,Y,k,void 0):m)},A.integerValue=function(e){var t=new B(this);return null==e?e=k:y(e,0,8),K(t,t.e+1,e)},A.isEqualTo=A.eq=function(e,t){return 0===g(this,new B(e,t))},A.isFinite=function(){return!!this.c},A.isGreaterThan=A.gt=function(e,t){return 0<g(this,new B(e,t))},A.isGreaterThanOrEqualTo=A.gte=function(e,t){return 1===(t=g(this,new B(e,t)))||0===t},A.isInteger=function(){return!!this.c&&f(this.e/u)>this.c.length-2},A.isLessThan=A.lt=function(e,t){return g(this,new B(e,t))<0},A.isLessThanOrEqualTo=A.lte=function(e,t){return-1===(t=g(this,new B(e,t)))||0===t},A.isNaN=function(){return!this.s},A.isNegative=function(){return this.s<0},A.isPositive=function(){return 0<this.s},A.isZero=function(){return!!this.c&&0==this.c[0]},A.minus=function(e,t){var n,r,i,s,o=this,a=o.s;if(t=(e=new B(e,t)).s,!a||!t)return new B(NaN);if(a!=t)return e.s=-t,o.plus(e);var c=o.e/u,h=e.e/u,d=o.c,m=e.c;if(!c||!h){if(!d||!m)return d?(e.s=-t,e):new B(m?o:NaN);if(!d[0]||!m[0])return m[0]?(e.s=-t,e):new B(d[0]?o:3==k?-0:0)}if(c=f(c),h=f(h),d=d.slice(),a=c-h){for((i=(s=a<0)?(a=-a,d):(h=c,m)).reverse(),t=a;t--;i.push(0));i.reverse()}else for(r=(s=(a=d.length)<(t=m.length))?a:t,a=t=0;t<r;t++)if(d[t]!=m[t]){s=d[t]<m[t];break}if(s&&(i=d,d=m,m=i,e.s=-e.s),0<(t=(r=m.length)-(n=d.length)))for(;t--;d[n++]=0);for(t=l-1;a<r;){if(d[--r]<m[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=l}d[r]-=m[r]}for(;0==d[0];d.splice(0,1),--h);return d[0]?G(e,d,h):(e.s=3==k?-1:1,e.c=[e.e=0],e)},A.modulo=A.mod=function(e,t){var r,i,s=this;return e=new B(e,t),!s.c||!e.s||e.c&&!e.c[0]?new B(NaN):!e.c||s.c&&!s.c[0]?new B(s):(9==F?(i=e.s,e.s=1,r=n(s,e,0,3),e.s=i,r.s*=i):r=n(s,e,0,F),(e=s.minus(r.times(e))).c[0]||1!=F||(e.s=s.s),e)},A.multipliedBy=A.times=function(e,t){var n,r,i,s,o,a,c,h,m,p,g,y,w,b,v,_=this,S=_.c,E=(e=new B(e,t)).c;if(!(S&&E&&S[0]&&E[0]))return!_.s||!e.s||S&&!S[0]&&!E||E&&!E[0]&&!S?e.c=e.e=e.s=null:(e.s*=_.s,S&&E?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=f(_.e/u)+f(e.e/u),e.s*=_.s,(c=S.length)<(p=E.length)&&(w=S,S=E,E=w,i=c,c=p,p=i),i=c+p,w=[];i--;w.push(0));for(b=l,v=d,i=p;0<=--i;){for(n=0,g=E[i]%v,y=E[i]/v|0,s=i+(o=c);i<s;)n=((h=g*(h=S[--o]%v)+(a=y*h+(m=S[o]/v|0)*g)%v*v+w[s]+n)/b|0)+(a/v|0)+y*m,w[s--]=h%b;w[s]=n}return n?++r:w.splice(0,1),G(e,w,r)},A.negated=function(){var e=new B(this);return e.s=-e.s||null,e},A.plus=function(e,t){var n,r=this,i=r.s;if(t=(e=new B(e,t)).s,!i||!t)return new B(NaN);if(i!=t)return e.s=-t,r.minus(e);var s=r.e/u,o=e.e/u,a=r.c,c=e.c;if(!s||!o){if(!a||!c)return new B(i/0);if(!a[0]||!c[0])return c[0]?e:new B(a[0]?r:0*i)}if(s=f(s),o=f(o),a=a.slice(),i=s-o){for((n=0<i?(o=s,c):(i=-i,a)).reverse();i--;n.push(0));n.reverse()}for((i=a.length)-(t=c.length)<0&&(n=c,c=a,a=n,t=i),i=0;t;)i=(a[--t]=a[t]+c[t]+i)/l|0,a[t]=l===a[t]?0:a[t]%l;return i&&(a=[i].concat(a),++o),G(e,a,o)},A.precision=A.sd=function(e,t){var n,r,i;if(null!=e&&e!==!!e)return y(e,1,m),null==t?t=k:y(t,0,8),K(new B(this),e,t);if(!(n=this.c))return null;if(r=(i=n.length-1)*u+1,i=n[i]){for(;i%10==0;i/=10,r--);for(i=n[0];10<=i;i/=10,r++);}return e&&this.e+1>r&&(r=this.e+1),r},A.shiftedBy=function(e){return y(e,-c,c),this.times("1e"+e)},A.squareRoot=A.sqrt=function(){var e,t,r,i,s,o=this,a=o.c,l=o.s,u=o.e,c=I+4,h=new B("0.5");if(1!==l||!a||!a[0])return new B(!l||l<0&&(!a||a[0])?NaN:a?o:1/0);if((r=0==(l=Math.sqrt(+X(o)))||l==1/0?(((t=p(a)).length+u)%2==0&&(t+="0"),l=Math.sqrt(+t),u=f((u+1)/2)-(u<0||u%2),new B(t=l==1/0?"1e"+u:(t=l.toExponential()).slice(0,t.indexOf("e")+1)+u)):new B(l+"")).c[0])for((l=(u=r.e)+c)<3&&(l=0);;)if(s=r,r=h.times(s.plus(n(o,s,c,1))),p(s.c).slice(0,l)===(t=p(r.c)).slice(0,l)){if(r.e<u&&--l,"9999"!=(t=t.slice(l-3,l+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(K(r,r.e+I+2,1),e=!r.times(r).eq(o));break}if(!i&&(K(s,s.e+I+2,0),s.times(s).eq(o))){r=s;break}c+=4,l+=4,i=1}return K(r,r.e+I+1,k,e)},A.toExponential=function(e,t){return null!=e&&(y(e,0,m),e++),W(this,e,t,1)},A.toFixed=function(e,t){return null!=e&&(y(e,0,m),e=e+this.e+1),W(this,e,t)},A.toFormat=function(e,t,n){var r;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=U;else if("object"!=typeof n)throw Error(o+"Argument not an object: "+n);if(r=this.toFixed(e,t),this.c){var i,s=r.split("."),a=+n.groupSize,l=+n.secondaryGroupSize,u=n.groupSeparator||"",c=s[0],h=s[1],d=this.s<0,m=d?c.slice(1):c,f=m.length;if(l&&(i=a,a=l,f-=l=i),0<a&&0<f){for(i=f%a||a,c=m.substr(0,i);i<f;i+=a)c+=u+m.substr(i,a);0<l&&(c+=u+m.slice(i)),d&&(c="-"+c)}r=h?c+(n.decimalSeparator||"")+((l=+n.fractionGroupSize)?h.replace(new RegExp("\\d{"+l+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):h):c}return(n.prefix||"")+r+(n.suffix||"")},A.toFraction=function(e){var t,r,i,s,a,l,c,d,m,f,g,y,w=this,b=w.c;if(null!=e&&(!(c=new B(e)).isInteger()&&(c.c||1!==c.s)||c.lt(L)))throw Error(o+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+X(c));if(!b)return new B(w);for(t=new B(L),m=r=new B(L),i=d=new B(L),y=p(b),a=t.e=y.length-w.e-1,t.c[0]=h[(l=a%u)<0?u+l:l],e=!e||0<c.comparedTo(t)?0<a?t:m:c,l=P,P=1/0,c=new B(y),d.c[0]=0;f=n(c,t,0,1),1!=(s=r.plus(f.times(i))).comparedTo(e);)r=i,i=s,m=d.plus(f.times(s=m)),d=s,t=c.minus(f.times(s=t)),c=s;return s=n(e.minus(r),i,0,1),d=d.plus(s.times(m)),r=r.plus(s.times(i)),d.s=m.s=w.s,g=n(m,i,a*=2,k).minus(w).abs().comparedTo(n(d,r,a,k).minus(w).abs())<1?[m,i]:[d,r],P=l,g},A.toNumber=function(){return+X(this)},A.toPrecision=function(e,t){return null!=e&&y(e,1,m),W(this,e,t,2)},A.toString=function(e){var t,n=this,r=n.s,i=n.e;return null===i?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(t=null==e?i<=x||D<=i?b(p(n.c),i):v(p(n.c),i,"0"):10===e?v(p((n=K(new B(n),I+i+1,k)).c),n.e,"0"):(y(e,2,V.length,"Base"),_(v(p(n.c),i,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},A.valueOf=A.toJSON=function(){return X(this)},A._isBigNumber=!0,"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator&&(A[Symbol.toStringTag]="BigNumber",A[Symbol.for("nodejs.util.inspect.custom")]=A.valueOf),null!=t&&B.set(t),B}()).default=n.BigNumber=n,void 0!==t&&t.exports?t.exports=n:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=n)}(this)},{}],2:[function(e,t,n){"use strict";t.exports={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){var t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0},formats:{fourDigits:{totalLength:4,spaceSeparated:!0},fullWithTwoDecimals:{output:"currency",thousandSeparated:!0,mantissa:2},fullWithTwoDecimalsNoCurrency:{thousandSeparated:!0,mantissa:2},fullWithNoDecimals:{output:"currency",thousandSeparated:!0,mantissa:0}}}},{}],3:[function(e,t,n){"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,i=!1,s=void 0;try{for(var o,a=e[Symbol.iterator]();!(r=(o=a.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,s=e}finally{try{r||null==a.return||a.return()}finally{if(i)throw s}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var i=e("./globalState"),s=e("./validating"),o=e("./parsing"),a=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],l={general:{scale:1024,suffixes:a,marker:"bd"},binary:{scale:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],marker:"b"},decimal:{scale:1e3,suffixes:a,marker:"d"}},u={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1};function c(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if("string"==typeof t&&(t=o.parseFormat(t)),!s.validateFormat(t))return"ERROR: invalid format";var r=t.prefix||"",a=t.postfix||"",c=function(e,t,n){switch(t.output){case"currency":return t=p(t,i.currentCurrencyDefaultFormat()),function(e,t,n){var r=n.currentCurrency(),i=Object.assign({},u,t),s=void 0,o="",a=!!i.totalLength||!!i.forceAverage||i.average,l=t.currencyPosition||r.position,c=t.currencySymbol||r.symbol;i.spaceSeparated&&(o=" "),"infix"===l&&(s=o+c+o);var h=f({instance:e,providedFormat:t,state:n,decimalSeparator:s});return"prefix"===l&&(h=e._value<0&&"sign"===i.negative?"-".concat(o).concat(c).concat(h.slice(1)):c+o+h),l&&"postfix"!==l||(h=h+(o=a?"":o)+c),h}(e,t,i);case"percent":return t=p(t,i.currentPercentageDefaultFormat()),function(e,t,n,r){var i=t.prefixSymbol,s=f({instance:r(100*e._value),providedFormat:t,state:n}),o=Object.assign({},u,t);return i?"%".concat(o.spaceSeparated?" ":"").concat(s):"".concat(s).concat(o.spaceSeparated?" ":"","%")}(e,t,i,n);case"byte":return t=p(t,i.currentByteDefaultFormat()),v=e,S=i,E=n,C=(_=t).base||"binary",M=l[C],T=h(v._value,M.suffixes,M.scale),R=T.value,O=T.suffix,N=f({instance:E(R),providedFormat:_,state:S,defaults:S.currentByteDefaultFormat()}),A=S.currentAbbreviations(),"".concat(N).concat(A.spaced?" ":"").concat(O);case"time":return t=p(t,i.currentTimeDefaultFormat()),g=e,y=Math.floor(g._value/60/60),w=Math.floor((g._value-60*y*60)/60),b=Math.round(g._value-60*y*60-60*w),"".concat(y,":").concat(w<10?"0":"").concat(w,":").concat(b<10?"0":"").concat(b);case"ordinal":return t=p(t,i.currentOrdinalDefaultFormat()),r=e,s=t,a=(o=i).currentOrdinal(),c=Object.assign({},u,s),d=f({instance:r,providedFormat:s,state:o}),m=a(r._value),"".concat(d).concat(c.spaceSeparated?" ":"").concat(m);case"number":default:return f({instance:e,providedFormat:t,numbro:n})}var r,s,o,a,c,d,m,g,y,w,b,v,_,S,E,C,M,T,R,O,N,A}(e,t,n);return(c=r+c)+a}function h(e,t,n){var r=t[0],i=Math.abs(e);if(n<=i){for(var s=1;s<t.length;++s){var o=Math.pow(n,s),a=Math.pow(n,s+1);if(o<=i&&i<a){r=t[s],e/=o;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function d(e){for(var t="",n=0;n<e;n++)t+="0";return t}function m(e,t){return-1!==e.toString().indexOf("e")?function(e,t){var n=e.toString(),i=r(n.split("e"),2),s=i[0],o=i[1],a=r(s.split("."),2),l=a[0],u=a[1],c=void 0===u?"":u;if(0<+o)n=l+c+d(o-c.length);else{var h=".";h=+l<0?"-0".concat(h):"0".concat(h);var m=(d(-o-1)+Math.abs(l)+c).substr(0,t);m.length<t&&(m+=d(t-m.length)),n=h+m}return 0<+o&&0<t&&(n+=".".concat(d(t))),n}(e,t):(Math.round(+"".concat(e,"e+").concat(t))/Math.pow(10,t)).toFixed(t)}function f(e){var t=e.instance,n=e.providedFormat,s=e.state,o=void 0===s?i:s,a=e.decimalSeparator,l=e.defaults,c=void 0===l?o.currentDefaults():l,h=t._value;if(0===h&&o.hasZeroFormat())return o.getZeroFormat();if(!isFinite(h))return h.toString();var d,f,p,g,y,w,b,v,_=Object.assign({},u,c,n),S=_.totalLength,E=S?0:_.characteristic,C=_.optionalCharacteristic,M=_.forceAverage,T=!!S||!!M||_.average,R=S?-1:T&&void 0===n.mantissa?0:_.mantissa,O=!S&&(void 0===n.optionalMantissa?-1===R:_.optionalMantissa),N=_.trimMantissa,A=_.thousandSeparated,L=_.spaceSeparated,I=_.negative,k=_.forceSign,x=_.exponential,D="";if(T){var H=function(e){var t=e.value,n=e.forceAverage,r=e.abbreviations,i=e.spaceSeparated,s=void 0!==i&&i,o=e.totalLength,a=void 0===o?0:o,l="",u=Math.abs(t),c=-1;if(u>=Math.pow(10,12)&&!n||"trillion"===n?(l=r.trillion,t/=Math.pow(10,12)):u<Math.pow(10,12)&&u>=Math.pow(10,9)&&!n||"billion"===n?(l=r.billion,t/=Math.pow(10,9)):u<Math.pow(10,9)&&u>=Math.pow(10,6)&&!n||"million"===n?(l=r.million,t/=Math.pow(10,6)):(u<Math.pow(10,6)&&u>=Math.pow(10,3)&&!n||"thousand"===n)&&(l=r.thousand,t/=Math.pow(10,3)),l&&(l=(s?" ":"")+l),a){var h=t.toString().split(".")[0];c=Math.max(a-h.length,0)}return{value:t,abbreviation:l,mantissaPrecision:c}}({value:h,forceAverage:M,abbreviations:o.currentAbbreviations(),spaceSeparated:L,totalLength:S});h=H.value,D+=H.abbreviation,S&&(R=H.mantissaPrecision)}if(x){var P=(f=(d={value:h,characteristicPrecision:E}).value,p=d.characteristicPrecision,g=void 0===p?0:p,y=r(f.toExponential().split("e"),2),w=y[0],b=y[1],v=+w,g&&1<g&&(v*=Math.pow(10,g-1),b=0<=(b=+b-(g-1))?"+".concat(b):b),{value:v,abbreviation:"e".concat(b)});h=P.value,D=P.abbreviation+D}var j,F,Y,U=function(e,t,n,i,s){if(-1===i)return e;var o=m(t,i),a=r(o.toString().split("."),2),l=a[0],u=a[1],c=void 0===u?"":u;if(c.match(/^0+$/)&&(n||s))return l;var h=c.match(/0+$/);return s&&h?"".concat(l,".").concat(c.toString().slice(0,h.index)):o.toString()}(h.toString(),h,O,R,N);return U=function(e,t,n,r,i){var s=r.currentDelimiters(),o=s.thousands;i=i||s.decimal;var a=s.thousandsSize||3,l=e.toString(),u=l.split(".")[0],c=l.split(".")[1];return n&&(t<0&&(u=u.slice(1)),function(e,t){for(var n=[],r=0,i=e;0<i;i--)r===t&&(n.unshift(i),r=0),r++;return n}(u.length,a).forEach((function(e,t){u=u.slice(0,e+t)+o+u.slice(e+t)})),t<0&&(u="-".concat(u))),c?u+i+c:u}(U=function(e,t,n,i){var s=e,o=r(s.toString().split("."),2),a=o[0],l=o[1];if(a.match(/^-?0$/)&&n)return l?"".concat(a.replace("0",""),".").concat(l):a.replace("0","");if(a.length<i)for(var u=i-a.length,c=0;c<u;c++)s="0".concat(s);return s.toString()}(U,0,C,E),h,A,o,a),(T||x)&&(U+=D),(k||h<0)&&(j=U,Y=I,U=0===(F=h)?j:0==+j?j.replace("-",""):0<F?"+".concat(j):"sign"===Y?j:"(".concat(j.replace("-",""),")")),U}function p(e,t){if(!e)return t;var n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}t.exports=function(e){return{format:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return c.apply(void 0,n.concat([e]))},getByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.general;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getBinaryByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.binary;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},getDecimalByteUnit:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(e){var t=l.decimal;return h(e._value,t.suffixes,t.scale).suffix}.apply(void 0,n.concat([e]))},formatOrDefault:p}}},{"./globalState":4,"./parsing":8,"./validating":10}],4:[function(e,t,n){"use strict";var r=e("./en-US"),i=e("./validating"),s=e("./parsing"),o={},a=void 0,l={},u=null,c={};function h(e){a=e}function d(){return l[a]}o.languages=function(){return Object.assign({},l)},o.currentLanguage=function(){return a},o.currentCurrency=function(){return d().currency},o.currentAbbreviations=function(){return d().abbreviations},o.currentDelimiters=function(){return d().delimiters},o.currentOrdinal=function(){return d().ordinal},o.currentDefaults=function(){return Object.assign({},d().defaults,c)},o.currentOrdinalDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().ordinalFormat)},o.currentByteDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().byteFormat)},o.currentPercentageDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().percentageFormat)},o.currentCurrencyDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().currencyFormat)},o.currentTimeDefaultFormat=function(){return Object.assign({},o.currentDefaults(),d().timeFormat)},o.setDefaults=function(e){e=s.parseFormat(e),i.validateFormat(e)&&(c=e)},o.getZeroFormat=function(){return u},o.setZeroFormat=function(e){return u="string"==typeof e?e:null},o.hasZeroFormat=function(){return null!==u},o.languageData=function(e){if(e){if(l[e])return l[e];throw new Error('Unknown tag "'.concat(e,'"'))}return d()},o.registerLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]&&arguments[1];if(!i.validateLanguage(e))throw new Error("Invalid language data");l[e.languageTag]=e,t&&h(e.languageTag)},o.setLanguage=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:r.languageTag;if(!l[e]){var n=e.split("-")[0],i=Object.keys(l).find((function(e){return e.split("-")[0]===n}));return l[i]?void h(i):void h(t)}h(e)},o.registerLanguage(r),a=r.languageTag,t.exports=o},{"./en-US":2,"./parsing":8,"./validating":10}],5:[function(e,t,n){"use strict";t.exports=function(t){return{loadLanguagesInNode:function(n){return r=t,void n.forEach((function(t){var n=void 0;try{n=e("../languages/".concat(t))}catch(n){console.error('Unable to load "'.concat(t,'". No matching language file found.'))}n&&r.registerLanguage(n)}));var r}}}},{}],6:[function(e,t,n){"use strict";var r=e("bignumber.js");function i(e,t,n){var i=new r(e._value),s=t;return n.isNumbro(t)&&(s=t._value),s=new r(s),e._value=i.minus(s).toNumber(),e}t.exports=function(e){return{add:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.plus(l).toNumber(),i;var i,s,o,a,l},subtract:function(t,n){return i(t,n,e)},multiply:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.times(l).toNumber(),i;var i,s,o,a,l},divide:function(t,n){return s=n,o=e,a=new r((i=t)._value),l=s,o.isNumbro(s)&&(l=s._value),l=new r(l),i._value=a.dividedBy(l).toNumber(),i;var i,s,o,a,l},set:function(t,n){return r=t,s=i=n,e.isNumbro(i)&&(s=i._value),r._value=s,r;var r,i,s},difference:function(t,n){return r=n,i(o=(s=e)(t._value),r,s),Math.abs(o._value);var r,s,o}}}},{"bignumber.js":1}],7:[function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var i=e("./globalState"),s=e("./validating"),o=e("./loading")(m),a=e("./unformatting"),l=e("./formatting")(m),u=e("./manipulating")(m),c=e("./parsing"),h=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._value=t}var t,n,s;return t=e,(n=[{key:"clone",value:function(){return m(this._value)}},{key:"format",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return l.format(this,e)}},{key:"formatCurrency",value:function(e){return"string"==typeof e&&(e=c.parseFormat(e)),(e=l.formatOrDefault(e,i.currentCurrencyDefaultFormat())).output="currency",l.format(this,e)}},{key:"formatTime",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return e.output="time",l.format(this,e)}},{key:"binaryByteUnits",value:function(){return l.getBinaryByteUnit(this)}},{key:"decimalByteUnits",value:function(){return l.getDecimalByteUnit(this)}},{key:"byteUnits",value:function(){return l.getByteUnit(this)}},{key:"difference",value:function(e){return u.difference(this,e)}},{key:"add",value:function(e){return u.add(this,e)}},{key:"subtract",value:function(e){return u.subtract(this,e)}},{key:"multiply",value:function(e){return u.multiply(this,e)}},{key:"divide",value:function(e){return u.divide(this,e)}},{key:"set",value:function(e){return u.set(this,d(e))}},{key:"value",value:function(){return this._value}},{key:"valueOf",value:function(){return this._value}}])&&r(t.prototype,n),s&&r(t,s),e}();function d(e){var t=e;return m.isNumbro(e)?t=e._value:"string"==typeof e?t=m.unformat(e):isNaN(e)&&(t=NaN),t}function m(e){return new h(d(e))}m.version="2.1.2",m.isNumbro=function(e){return e instanceof h},m.language=i.currentLanguage,m.registerLanguage=i.registerLanguage,m.setLanguage=i.setLanguage,m.languages=i.languages,m.languageData=i.languageData,m.zeroFormat=i.setZeroFormat,m.defaultFormat=i.currentDefaults,m.setDefaults=i.setDefaults,m.defaultCurrencyFormat=i.currentCurrencyDefaultFormat,m.validate=s.validate,m.loadLanguagesInNode=o.loadLanguagesInNode,m.unformat=a.unformat,t.exports=m},{"./formatting":3,"./globalState":4,"./loading":5,"./manipulating":6,"./parsing":8,"./unformatting":9,"./validating":10}],8:[function(e,t,n){"use strict";t.exports={parseFormat:function(e){var t,n,r,i,s,o,a,l,u,c,h,d,m,f,p,g,y,w,b,v,_=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return"string"!=typeof e?e:(n=_,e=(r=(t=e).match(/^{([^}]*)}/))?(n.prefix=r[1],t.slice(r[0].length)):t,s=_,function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",t.base="general"):-1!==e.indexOf("b")?(t.output="byte",t.base="binary"):-1!==e.indexOf("d")?(t.output="byte",t.base="decimal"):-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time";t.output="percent"}else t.output="currency"}(e=(o=(i=e).match(/{([^}]*)}$/))?(s.postfix=o[1],i.slice(0,-o[0].length)):i,_),a=_,(l=e.match(/[1-9]+[0-9]*/))&&(a.totalLength=+l[0]),u=_,(c=e.split(".")[0].match(/0+/))&&(u.characteristic=c[0].length),function(e,t){if(-1!==e.indexOf(".")){var n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,_),h=_,-1!==e.indexOf("a")&&(h.average=!0),m=_,-1!==(d=e).indexOf("K")?m.forceAverage="thousand":-1!==d.indexOf("M")?m.forceAverage="million":-1!==d.indexOf("B")?m.forceAverage="billion":-1!==d.indexOf("T")&&(m.forceAverage="trillion"),function(e,t){var n=e.split(".")[1];if(n){var r=n.match(/0+/);r&&(t.mantissa=r[0].length)}}(e,_),p=_,(f=e).match(/\[\.]/)?p.optionalMantissa=!0:f.match(/\./)&&(p.optionalMantissa=!1),g=_,-1!==e.indexOf(",")&&(g.thousandSeparated=!0),y=_,-1!==e.indexOf(" ")&&(y.spaceSeparated=!0),b=_,(w=e).match(/^\+?\([^)]*\)$/)&&(b.negative="parenthesis"),w.match(/^\+?-/)&&(b.negative="sign"),v=_,e.match(/^\+/)&&(v.forceSign=!0),_)}}},{}],9:[function(e,t,n){"use strict";var r=[{key:"ZiB",factor:Math.pow(1024,7)},{key:"ZB",factor:Math.pow(1e3,7)},{key:"YiB",factor:Math.pow(1024,8)},{key:"YB",factor:Math.pow(1e3,8)},{key:"TiB",factor:Math.pow(1024,4)},{key:"TB",factor:Math.pow(1e3,4)},{key:"PiB",factor:Math.pow(1024,5)},{key:"PB",factor:Math.pow(1e3,5)},{key:"MiB",factor:Math.pow(1024,2)},{key:"MB",factor:Math.pow(1e3,2)},{key:"KiB",factor:Math.pow(1024,1)},{key:"KB",factor:Math.pow(1e3,1)},{key:"GiB",factor:Math.pow(1024,3)},{key:"GB",factor:Math.pow(1e3,3)},{key:"EiB",factor:Math.pow(1024,6)},{key:"EB",factor:Math.pow(1e3,6)},{key:"B",factor:1}];function i(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function s(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",s=3<arguments.length?arguments[3]:void 0,o=4<arguments.length?arguments[4]:void 0,a=5<arguments.length?arguments[5]:void 0,l=6<arguments.length?arguments[6]:void 0;if(""!==e)return e===o?0:function e(t,n){var s=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",o=3<arguments.length?arguments[3]:void 0,a=4<arguments.length?arguments[4]:void 0,l=5<arguments.length?arguments[5]:void 0,u=6<arguments.length?arguments[6]:void 0;if(!isNaN(+t))return+t;var c="",h=t.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(h!==t)return-1*e(h,n,s,o,a,l,u);for(var d=0;d<r.length;d++){var m=r[d];if((c=t.replace(m.key,""))!==t)return e(c,n,s,o,a,l,u)*m.factor}if((c=t.replace("%",""))!==t)return e(c,n,s,o,a,l,u)/100;var f=parseFloat(t);if(!isNaN(f)){var p=o(f);if(p&&"."!==p&&(c=t.replace(new RegExp("".concat(i(p),"$")),""))!==t)return e(c,n,s,o,a,l,u);var g={};Object.keys(l).forEach((function(e){g[l[e]]=e}));for(var y=Object.keys(g).sort().reverse(),w=y.length,b=0;b<w;b++){var v=y[b],_=g[v];if((c=t.replace(v,""))!==t){var S=void 0;switch(_){case"thousand":S=Math.pow(10,3);break;case"million":S=Math.pow(10,6);break;case"billion":S=Math.pow(10,9);break;case"trillion":S=Math.pow(10,12)}return e(c,n,s,o,a,l,u)*S}}}}(function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:"",r=e.replace(n,"");return(r=r.replace(new RegExp("([0-9])".concat(i(t.thousands),"([0-9])"),"g"),"$1$2")).replace(t.decimal,".")}(e,t,n),t,n,s,o,a,l)}t.exports={unformat:function(t,n){var r,i,o,a=e("./globalState"),l=a.currentDelimiters(),u=a.currentCurrency().symbol,c=a.currentOrdinal(),h=a.getZeroFormat(),d=a.currentAbbreviations(),m=void 0;if("string"==typeof t)m=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;var n=e.split(":");if(3!==n.length)return!1;var r=+n[0],i=+n[1],s=+n[2];return!isNaN(r)&&!isNaN(i)&&!isNaN(s)}(t,l)?(r=t.split(":"),i=+r[0],o=+r[1],+r[2]+60*o+3600*i):s(t,l,u,c,h,d,n);else{if("number"!=typeof t)return;m=t}if(void 0!==m)return m}}},{"./globalState":4}],10:[function(e,t,n){"use strict";function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s=e("./unformatting"),o=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,a={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:function(e,t){return"byte"===t.output},message:"`base` must be provided only when the output is `byte`",mandatory:function(e){return"byte"===e.output}},characteristic:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:function(e){return 0<=e},message:"value must be positive"},{restriction:function(e,t){return!t.exponential},message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:function(e){return 0<=e},message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",abbreviations:{type:"object",children:{thousand:"string",million:"string",billion:"string",trillion:"string"}},negative:{type:"string",validValues:["sign","parenthesis"]},forceSign:"boolean",exponential:{type:"boolean"},prefixSymbol:{type:"boolean",restriction:function(e,t){return"percent"===t.output},message:"`prefixSymbol` can be provided only when the output is `percent`"}},l={languageTag:{type:"string",mandatory:!0,restriction:function(e){return e.match(o)},message:"the language tag must follow the BCP 47 specification (see https://tools.ieft.org/html/bcp47)"},delimiters:{type:"object",children:{thousands:"string",decimal:"string",thousandsSize:"number"},mandatory:!0},abbreviations:{type:"object",children:{thousand:{type:"string",mandatory:!0},million:{type:"string",mandatory:!0},billion:{type:"string",mandatory:!0},trillion:{type:"string",mandatory:!0}},mandatory:!0},spaceSeparated:"boolean",ordinal:{type:"function",mandatory:!0},currency:{type:"object",children:{symbol:"string",position:"string",code:"string"},mandatory:!0},defaults:"format",ordinalFormat:"format",byteFormat:"format",percentageFormat:"format",currencyFormat:"format",timeDefaults:"format",formats:{type:"object",children:{fourDigits:{type:"format",mandatory:!0},fullWithTwoDecimals:{type:"format",mandatory:!0},fullWithTwoDecimalsNoCurrency:{type:"format",mandatory:!0},fullWithNoDecimals:{type:"format",mandatory:!0}}}};function u(e){return!!s.unformat(e)}function c(e,t,n){var s=3<arguments.length&&void 0!==arguments[3]&&arguments[3],o=Object.keys(e).map((function(r){if(!t[r])return console.error("".concat(n," Invalid key: ").concat(r)),!1;var s=e[r],o=t[r];if("string"==typeof o&&(o={type:o}),"format"===o.type){if(!c(s,a,"[Validate ".concat(r,"]"),!0))return!1}else if(i(s)!==o.type)return console.error("".concat(n," ").concat(r,' type mismatched: "').concat(o.type,'" expected, "').concat(i(s),'" provided')),!1;if(o.restrictions&&o.restrictions.length)for(var l=o.restrictions.length,u=0;u<l;u++){var h=o.restrictions[u],d=h.restriction,m=h.message;if(!d(s,e))return console.error("".concat(n," ").concat(r," invalid value: ").concat(m)),!1}return o.restriction&&!o.restriction(s,e)?(console.error("".concat(n," ").concat(r," invalid value: ").concat(o.message)),!1):o.validValues&&-1===o.validValues.indexOf(s)?(console.error("".concat(n," ").concat(r," invalid value: must be among ").concat(JSON.stringify(o.validValues),', "').concat(s,'" provided')),!1):!(o.children&&!c(s,o.children,"[Validate ".concat(r,"]")))}));return s||o.push.apply(o,r(Object.keys(t).map((function(r){var i=t[r];if("string"==typeof i&&(i={type:i}),i.mandatory){var s=i.mandatory;if("function"==typeof s&&(s=s(e)),s&&void 0===e[r])return console.error("".concat(n,' Missing mandatory key "').concat(r,'"')),!1}return!0})))),o.reduce((function(e,t){return e&&t}),!0)}function h(e){return c(e,a,"[Validate format]")}t.exports={validate:function(e,t){var n=u(e),r=h(t);return n&&r},validateFormat:h,validateInput:u,validateLanguage:function(e){return c(e,l,"[Validate language]")}}},{"./unformatting":9}]},{},[7])(7)}))},8793:function(e,t,n){"use strict";var r=n("73fa");e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},"87d6":function(e,t,n){"use strict";n.d(t,"b",(function(){return c}));n("7a89"),n("d06e");var r=n("de3b");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let a=0;class l{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;i(this,"context",void 0),this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function i(e){n.call(this,u(e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:i,options:r,eventManager:this}),e.addEventListener(t,i,r),a+=1,()=>{this.removeEventListener(e,t,n)}}removeEventListener(e,t,n){let r,i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=this.context.eventListeners.length;while(s)if(s-=1,r=this.context.eventListeners[s],r.event===t&&r.element===e){if(n&&n!==r.callback)continue;if(i&&r.eventManager!==this)continue;this.context.eventListeners.splice(s,1),r.element.removeEventListener(r.event,r.callbackProxy,r.options),a-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;while(t){t-=1;const n=this.context.eventListeners[t];e&&n.eventManager!==this||(this.context.eventListeners.splice(t,1),n.element.removeEventListener(n.event,n.callbackProxy,n.options),a-=1)}}clear(){this.clearEvents()}destroy(){this.clearEvents(),this.context=null}destroyWithOwnEventsOnly(){this.clearEvents(!0),this.context=null}fireEvent(e,t){let n=e.document,r=e;n||(n=e.ownerDocument?e.ownerDocument:e,r=n.defaultView);const i={bubbles:!0,cancelable:"mousemove"!==t,view:r,detail:0,screenX:0,screenY:0,clientX:1,clientY:1,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:void 0};let s;n.createEvent?(s=n.createEvent("MouseEvents"),s.initMouseEvent(t,i.bubbles,i.cancelable,i.view,i.detail,i.screenX,i.screenY,i.clientX,i.clientY,i.ctrlKey,i.altKey,i.shiftKey,i.metaKey,i.button,i.relatedTarget||n.body.parentNode)):s=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(s):e.fireEvent("on"+t,s)}}function u(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),Object(r["stopImmediatePropagation"])(this)},e}function c(){return a}t["a"]=l},"87ed":function(e,t,n){"use strict";var r=n("fd18"),i=Set.prototype;e.exports={Set:Set,add:r(i.add),has:r(i.has),remove:r(i["delete"]),proto:i}},8828:function(e,t,n){"use strict";n.d(t,"L",(function(){return r})),n.d(t,"N",(function(){return i})),n.d(t,"y",(function(){return s})),n.d(t,"l",(function(){return o})),n.d(t,"E",(function(){return a})),n.d(t,"D",(function(){return l})),n.d(t,"g",(function(){return u})),n.d(t,"B",(function(){return c})),n.d(t,"s",(function(){return h})),n.d(t,"t",(function(){return d})),n.d(t,"u",(function(){return m})),n.d(t,"h",(function(){return f})),n.d(t,"q",(function(){return p})),n.d(t,"w",(function(){return g})),n.d(t,"c",(function(){return y})),n.d(t,"G",(function(){return w})),n.d(t,"H",(function(){return b})),n.d(t,"M",(function(){return v})),n.d(t,"p",(function(){return _})),n.d(t,"n",(function(){return S})),n.d(t,"j",(function(){return E})),n.d(t,"v",(function(){return C})),n.d(t,"m",(function(){return M})),n.d(t,"C",(function(){return T})),n.d(t,"e",(function(){return R})),n.d(t,"F",(function(){return O})),n.d(t,"f",(function(){return N})),n.d(t,"k",(function(){return A})),n.d(t,"K",(function(){return L})),n.d(t,"z",(function(){return I})),n.d(t,"o",(function(){return k})),n.d(t,"d",(function(){return x})),n.d(t,"I",(function(){return D})),n.d(t,"b",(function(){return H})),n.d(t,"i",(function(){return P})),n.d(t,"a",(function(){return j})),n.d(t,"r",(function(){return F})),n.d(t,"A",(function(){return Y})),n.d(t,"J",(function(){return U})),n.d(t,"x",(function(){return V}));const r=e=>["tabindex",e],i=()=>["role","treegrid"],s=()=>["role","presentation"],o=()=>["role","gridcell"],a=()=>["role","rowheader"],l=()=>["role","rowgroup"],u=()=>["role","columnheader"],c=()=>["role","row"],h=()=>["role","menu"],d=()=>["role","menuitem"],m=()=>["role","menuitemcheckbox"],f=()=>["role","combobox"],p=()=>["role","listbox"],g=()=>["role","option"],y=()=>["role","checkbox"],w=()=>["scope","col"],b=()=>["scope","row"],v=()=>["type","text"],_=e=>["aria-label",e],S=()=>["aria-hidden","true"],E=()=>["aria-disabled","true"],C=()=>["aria-multiselectable","true"],M=e=>["aria-haspopup",e],T=e=>["aria-rowcount",e],R=e=>["aria-colcount",e],O=e=>["aria-rowindex",e],N=e=>["aria-colindex",e],A=e=>["aria-expanded",e],L=e=>["aria-sort",e],I=()=>["aria-readonly","true"],k=()=>["aria-invalid","true"],x=e=>["aria-checked",e],D=()=>["aria-selected","true"],H=()=>["aria-autocomplete","list"],P=e=>["aria-controls",e],j=e=>["aria-activedescendant",e],F=e=>["aria-live",e],Y=e=>["aria-relevant",e],U=e=>["aria-setsize",e],V=e=>["aria-posinset",e]},8840:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("gl",{months:"xaneiro_febreiro_marzo_abril_maio_xuño_xullo_agosto_setembro_outubro_novembro_decembro".split("_"),monthsShort:"xan._feb._mar._abr._mai._xuñ._xul._ago._set._out._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"domingo_luns_martes_mércores_xoves_venres_sábado".split("_"),weekdaysShort:"dom._lun._mar._mér._xov._ven._sáb.".split("_"),weekdaysMin:"do_lu_ma_mé_xo_ve_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoxe "+(1!==this.hours()?"ás":"á")+"] LT"},nextDay:function(){return"[mañá "+(1!==this.hours()?"ás":"á")+"] LT"},nextWeek:function(){return"dddd ["+(1!==this.hours()?"ás":"a")+"] LT"},lastDay:function(){return"[onte "+(1!==this.hours()?"á":"a")+"] LT"},lastWeek:function(){return"[o] dddd [pasado "+(1!==this.hours()?"ás":"a")+"] LT"},sameElse:"L"},relativeTime:{future:function(e){return 0===e.indexOf("un")?"n"+e:"en "+e},past:"hai %s",s:"uns segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"unha hora",hh:"%d horas",d:"un día",dd:"%d días",M:"un mes",MM:"%d meses",y:"un ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},"88c5":function(e,t,n){"use strict";var r=n("0227"),i=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},s=function(e){return{size:e,has:function(){return!0},keys:function(){throw new Error("e")}}};e.exports=function(e,t){var n=r("Set");try{(new n)[e](i(0));try{return(new n)[e](i(-1)),!1}catch(a){if(!t)return!0;try{return(new n)[e](s(-1/0)),!1}catch(l){var o=new n([1,2]);return t(o[e](s(1/0)))}}}catch(l){return!1}}},"890f":function(e,t,n){var r,i,s;(function(n,o){i=[],r=o,s="function"===typeof r?r.apply(t,i):r,void 0===s||(e.exports=s)})("undefined"!==typeof self&&self,(function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar("/");var t=this.disjunction();this.consumeChar("/");var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};while(this.isRegExpFlag())switch(this.popChar()){case"g":a(n,"global");break;case"i":a(n,"ignoreCase");break;case"m":a(n,"multiLine");break;case"u":a(n,"unicode");break;case"y":a(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:t}},e.prototype.disjunction=function(){var e=[];e.push(this.alternative());while("|"===this.peekChar())this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){var e=[];while(this.isTerm())e.push(this.term());return{type:"Alternative",value:e}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){switch(this.popChar()){case"^":return{type:"StartAnchor"};case"$":return{type:"EndAnchor"};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary"};case"B":return{type:"NonWordBoundary"}}throw Error("Invalid Assertion Escape");case"(":var e;switch(this.consumeChar("?"),this.popChar()){case"=":e="Lookahead";break;case"!":e="NegativeLookahead";break}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}u()},e.prototype.quantifier=function(e){var t;switch(this.popChar()){case"*":t={atLeast:0,atMost:1/0};break;case"+":t={atLeast:1,atMost:1/0};break;case"?":t={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":var r;this.isDigit()?(r=this.integerIncludingZero(),t={atLeast:n,atMost:r}):t={atLeast:n,atMost:1/0},this.consumeChar("}");break}if(!0===e&&void 0===t)return;l(t);break}if(!0!==e||void 0!==t)return l(t),"?"===this.peekChar(0)?(this.consumeChar("?"),t.greedy=!1):t.greedy=!0,t.type="Quantifier",t},e.prototype.atom=function(){var e;switch(this.peekChar()){case".":e=this.dotAll();break;case"\\":e=this.atomEscape();break;case"[":e=this.characterClass();break;case"(":e=this.group();break}return void 0===e&&this.isPatternCharacter()&&(e=this.patternCharacter()),l(e),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[s("\n"),s("\r"),s("\u2028"),s("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){var e=this.positiveInteger();return{type:"GroupBackReference",value:e}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=c;break;case"D":e=c,t=!0;break;case"s":e=d;break;case"S":e=d,t=!0;break;case"w":e=h;break;case"W":e=h,t=!0;break}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=s("\f");break;case"n":e=s("\n");break;case"r":e=s("\r");break;case"t":e=s("\t");break;case"v":e=s("\v");break}return l(e),{type:"Character",value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var e=this.popChar();if(!1===/[a-zA-Z]/.test(e))throw Error("Invalid ");var t=e.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:t}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:s("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){var e=this.popChar();return{type:"Character",value:s(e)}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var e=this.popChar();return{type:"Character",value:s(e)}}},e.prototype.characterClass=function(){var e=[],t=!1;this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);while(this.isClassAtom()){var n=this.classAtom(),r="Character"===n.type;if(r&&this.isRangeDash()){this.consumeChar("-");var i=this.classAtom(),a="Character"===i.type;if(a){if(i.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:i.value})}else o(n.value,e),e.push(s("-")),o(i.value,e)}else o(n.value,e)}return this.consumeChar("]"),{type:"Set",complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case"\n":case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:s("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var e=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),e=!1;break;default:this.groupIdx++;break}var t=this.disjunction();this.consumeChar(")");var n={type:"Group",capturing:e,value:t};return e&&(n.idx=this.groupIdx),n},e.prototype.positiveInteger=function(){var e=this.popChar();if(!1===i.test(e))throw Error("Expecting a positive integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.integerIncludingZero=function(){var e=this.popChar();if(!1===r.test(e))throw Error("Expecting an integer");while(r.test(this.peekChar(0)))e+=this.popChar();return parseInt(e,10)},e.prototype.patternCharacter=function(){var e=this.popChar();switch(e){case"\n":case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:s(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return"-"===this.peekChar()&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(void 0===e&&(e=0),this.peekChar(e)){case"]":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return"?"===this.peekChar(1)&&("="===this.peekChar(2)||"!"===this.peekChar(2));default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return void 0!==this.quantifier(!0)}catch(t){return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case"\n":case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var t="",r=0;r<e;r++){var i=this.popChar();if(!1===n.test(i))throw Error("Expecting a HexDecimal digits");t+=i}var s=parseInt(t,16);return{type:"Character",value:s}},e.prototype.peekChar=function(e){return void 0===e&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(e){if(void 0!==e&&this.input[this.idx]!==e)throw Error("Expected: '"+e+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++};var t,n=/[0-9a-fA-F]/,r=/[0-9]/,i=/[1-9]/;function s(e){return e.charCodeAt(0)}function o(e,t){void 0!==e.length?e.forEach((function(e){t.push(e)})):t.push(e)}function a(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function l(e){if(void 0===e)throw Error("Internal Error - Should never get here!")}function u(){throw Error("Internal Error - Should never get here!")}var c=[];for(t=s("0");t<=s("9");t++)c.push(t);var h=[s("_")].concat(c);for(t=s("a");t<=s("z");t++)h.push(t);for(t=s("A");t<=s("Z");t++)h.push(t);var d=[s(" "),s("\f"),s("\n"),s("\r"),s("\t"),s("\v"),s("\t"),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s(" "),s("\u2028"),s("\u2029"),s(" "),s(" "),s(" "),s("\ufeff")];function m(){}return m.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(void 0!==n.type?this.visit(n):Array.isArray(n)&&n.forEach((function(e){this.visit(e)}),this))}},m.prototype.visit=function(e){switch(e.type){case"Pattern":this.visitPattern(e);break;case"Flags":this.visitFlags(e);break;case"Disjunction":this.visitDisjunction(e);break;case"Alternative":this.visitAlternative(e);break;case"StartAnchor":this.visitStartAnchor(e);break;case"EndAnchor":this.visitEndAnchor(e);break;case"WordBoundary":this.visitWordBoundary(e);break;case"NonWordBoundary":this.visitNonWordBoundary(e);break;case"Lookahead":this.visitLookahead(e);break;case"NegativeLookahead":this.visitNegativeLookahead(e);break;case"Character":this.visitCharacter(e);break;case"Set":this.visitSet(e);break;case"Group":this.visitGroup(e);break;case"GroupBackReference":this.visitGroupBackReference(e);break;case"Quantifier":this.visitQuantifier(e);break}this.visitChildren(e)},m.prototype.visitPattern=function(e){},m.prototype.visitFlags=function(e){},m.prototype.visitDisjunction=function(e){},m.prototype.visitAlternative=function(e){},m.prototype.visitStartAnchor=function(e){},m.prototype.visitEndAnchor=function(e){},m.prototype.visitWordBoundary=function(e){},m.prototype.visitNonWordBoundary=function(e){},m.prototype.visitLookahead=function(e){},m.prototype.visitNegativeLookahead=function(e){},m.prototype.visitCharacter=function(e){},m.prototype.visitSet=function(e){},m.prototype.visitGroup=function(e){},m.prototype.visitGroupBackReference=function(e){},m.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:m,VERSION:"0.4.0"}}))},"898b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4},invalidDate:"Fecha inválida"});return s}))},"8c7e":function(e,t,n){"use strict";n.d(t,"a",(function(){return DO}));n("7a89"),n("d06e");var r=n("03529"),i=n("5d7f"),s=n("de3b"),o=n("351d"),a=n("c4fa");const l="handsontableEditor",u="handsontable";class c extends r["a"]{static get EDITOR_TYPE(){return u}open(){super.open(),this.htEditor&&this.htEditor.destroy(),"none"===this.htContainer.style.display&&(this.htContainer.style.display=""),this.htEditor=new this.hot.constructor(this.htContainer,this.htOptions),this.htEditor.init(),this.htEditor.rootElement.style.display="",this.cellProperties.strict?this.htEditor.selectCell(0,0):this.htEditor.deselectCell(),Object(i["setCaretPosition"])(this.TEXTAREA,0,this.TEXTAREA.value.length),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s);const a=this,l={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,autoColumnSize:!1,autoRowSize:!1,readOnly:!0,fillHandle:!1,autoWrapCol:!1,autoWrapRow:!1,ariaTags:!1,afterOnCellMouseDown(e,t){const n=this.getSourceData(t.row,t.col);void 0!==n&&a.setValue(n),a.hot.destroyEditor()},preventWheel:!0,layoutDirection:this.hot.isRtl()?"rtl":"ltr"};this.cellProperties.handsontable&&Object(o["extend"])(l,s.handsontable),this.htOptions=l}beginEditing(e,t){const n=this.hot.getSettings().onBeginEditing;n&&!1===n()||super.beginEditing(e,t)}createElements(){super.createElements();const e=this.hot.rootDocument.createElement("DIV");e.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(e),this.htContainer=e,this.assignHooks()}finishEditing(e,t,n){if(this.htEditor&&this.htEditor.isListening()&&this.hot.listen(),this.htEditor&&this.htEditor.getSelectedLast()){const e=this.htEditor.getValue();void 0!==e&&this.setValue(e)}super.finishEditing(e,t,n)}assignHooks(){this.hot.addHook("afterDestroy",()=>{this.htEditor&&this.htEditor.destroy()})}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");super.registerShortcuts();const n={group:l,relativeToGroup:a["a"],position:"before"},r=(e,t)=>{const n=this.htEditor;if(void 0!==e&&(e<0||n.flipped&&e>n.countRows()-1?n.deselectCell():n.selectCell(e,0),n.getData().length))return t.preventDefault(),Object(s["stopImmediatePropagation"])(t),this.hot.listen(),this.TEXTAREA.focus(),!1};t.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let n,i;return!t.getSelectedLast()&&t.flipped?n=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(i=t.getSelectedLast()[0],n=Math.max(0,i-1)):(i=t.getSelectedLast()[0],n=i-1)),r(n,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let n,i;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)n=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;i=t.getSelectedLast()[0],n=Math.min(e,i+1)}}else n=0;return r(n,e)},preventDefault:!1}],n)}unregisterShortcuts(){super.unregisterShortcuts();const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(l)}}var h=n("81ea"),d=n("7b9c"),m=n("29b0"),f=n("f938"),p=n("63d8"),g=n("dd49"),y=n("8828");function w(e,t,n){b(e,t),t.set(e,n)}function b(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function v(e,t,n){return(t=_(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e){var t=S(e,"string");return"symbol"==typeof t?t:t+""}function S(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function E(e,t){return e.get(C(e,t))}function C(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const M="autocomplete";var T=new WeakMap;class R extends c{constructor(){super(...arguments),v(this,"query",null),v(this,"strippedChoices",[]),v(this,"rawChoices",[]),w(this,T,this.hot.guid.slice(0,9)),v(this,"sortByRelevance",(function(e,t,n){const r=[],i=[],s=e.length;let o,a,l,u,c=t.length;if(0===s){for(l=0;l<c;l++)i.push(l);return i}for(l=0;l<c;l++){if(a=Object(m["stripTags"])(Object(d["stringify"])(t[l])),n)u=a.indexOf(e);else{const t=this.cellProperties.locale;u=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==u&&(o=a.length-u-s,r.push({baseIndex:l,index:u,charsLeft:o,value:a}))}for(r.sort((e,t)=>{if(-1===t.index)return-1;if(-1===e.index)return 1;if(e.index<t.index)return-1;if(t.index<e.index)return 1;if(e.index===t.index){if(e.charsLeft<t.charsLeft)return-1;if(e.charsLeft>t.charsLeft)return 1}return 0}),l=0,c=r.length;l<c;l++)i.push(r[l].baseIndex);return i}))}static get EDITOR_TYPE(){return M}getValue(){const e=this.rawChoices.find(e=>{const t=this.stripValueIfNeeded(e);return t===this.TEXTAREA.value});return Object(d["isDefined"])(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),Object(i["addClass"])(this.htContainer,"autocompleteEditor"),Object(i["addClass"])(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["M"])(),Object(y["h"])(),Object(y["m"])("listbox"),Object(y["b"])()])}prepare(e,t,n,r,s,o){super.prepare(e,t,n,r,s,o),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["k"])("false"),Object(y["i"])(`${E(T,this)}-listbox-${e}-${t}`)])}open(){super.open();const e=void 0===this.cellProperties.trimDropdown||this.cellProperties.trimDropdown,t=this.hot.getSettings().ariaTags,n=Array.isArray(this.cellProperties.source)?this.cellProperties.source:null,r=null===n||void 0===n?void 0:n.length,{row:s,col:o}=this;this.showEditableElement(),this.focus();let a=Object(i["getScrollbarWidth"])();0===a&&Object(p["isMacOS"])()&&(a+=15),this.addHook("beforeKeyDown",e=>this.onBeforeKeyDown(e)),this.htEditor.updateSettings({colWidths:e?[Object(i["outerWidth"])(this.TEXTAREA)-2]:void 0,width:e?Object(i["outerWidth"])(this.TEXTAREA)+a:void 0,autoColumnSize:!0,renderer:(e,s,o,a,l,u,c)=>{Object(g["a"])(e,s,o,a,l,u,c);const{filteringCaseSensitive:h,allowHtml:m,locale:f}=this.cellProperties,p=this.query;let w,b,v=Object(d["stringify"])(u);v&&!m&&(w=!0===h?v.indexOf(p):v.toLocaleLowerCase(f).indexOf(p.toLocaleLowerCase(f)),-1!==w&&(b=v.substr(w,p.length),v=v.replace(b,`<strong>${b}</strong>`))),t&&Object(i["setAttribute"])(s,[Object(y["w"])(),...n?[Object(y["J"])(r)]:[],...n?[Object(y["x"])(n.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${o}-${a}`]]),s.innerHTML=v},afterSelectionEnd:(e,n)=>{if(t){const t=this.htEditor.getCell(e,n,!0);Object(i["setAttribute"])(t,[Object(y["I"])()]),Object(i["setAttribute"])(this.TEXTAREA,...Object(y["a"])(t.id))}}}),t&&(Object(i["setAttribute"])(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...Object(y["y"])()),Object(i["setAttribute"])(this.htEditor.rootElement,[Object(y["q"])(),Object(y["r"])("polite"),Object(y["A"])("text"),["id",`${E(T,this)}-listbox-${s}-${o}`]]),Object(i["setAttribute"])(this.TEXTAREA,...Object(y["k"])("true"))),this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)})}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.TEXTAREA,[Object(y["k"])("false")])}discardEditor(e){super.discardEditor(e),this.hot.view.render()}queryChoices(e){const t=this.cellProperties.source;this.query=e,"function"===typeof t?t.call(this.cellProperties,e,e=>{this.rawChoices=e,this.updateChoicesList(this.stripValuesIfNeeded(e))}):Array.isArray(t)?(this.rawChoices=t,this.updateChoicesList(this.stripValuesIfNeeded(t))):this.updateChoicesList([])}updateChoicesList(e){const t=Object(i["getCaretPosition"])(this.TEXTAREA),n=Object(i["getSelectionEndPosition"])(this.TEXTAREA),r=this.cellProperties.sortByRelevance,s=this.cellProperties.filter;let o=null,a=null,l=e;r&&(o=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(o)?o.length:0;if(!1===s)u&&(a=o[0]);else{const e=[];for(let t=0,n=l.length;t<n;t++){if(r&&u<=t)break;u?e.push(l[o[t]]):e.push(l[t])}a=0,l=e}this.strippedChoices=l,0===l.length?this.htEditor.rootElement.style.display="none":this.htEditor.rootElement.style.display="",this.htEditor.loadData(Object(h["pivot"])([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),Object(i["setCaretPosition"])(this.TEXTAREA,t,t===n?void 0:n)}flipDropdownIfNeeded(){const e=Object(i["getTrimmingContainer"])(this.hot.view._wt.wtTable.TABLE),t=e===this.hot.rootWindow,n=this.cellProperties.preventOverflow;if(t||!t&&(n||"horizontal"===n))return!1;const r=Object(i["offset"])(this.TEXTAREA),s=Object(i["outerHeight"])(this.TEXTAREA),o=this.getDropdownHeight(),a=e.scrollTop,l=Object(i["outerHeight"])(this.hot.view._wt.wtTable.THEAD),u=Object(i["offset"])(e),c=r.top-u.top-l+a,h=e.scrollHeight-c-l-s,d=o>h&&c>h;return d?this.flipDropdown(o):this.unflipDropdown(),this.limitDropdownIfNeeded(d?c:h,o),d}limitDropdownIfNeeded(e,t){if(t>e){let n=0,r=0,i=0,s=null;do{i=this.htEditor.getRowHeight(r)||this.htEditor.view._wt.getSetting("defaultRowHeight"),n+=i,r+=1}while(n<e);s=n-i,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-s+"px"),this.setDropdownHeight(n-i)}}flipDropdown(e){const t=this.htEditor.rootElement.style;t.position="absolute",t.top=-e+"px",this.htEditor.flipped=!0}unflipDropdown(){const e=this.htEditor.rootElement.style;e.position="absolute",e.top="",this.htEditor.flipped=void 0}updateDropdownDimensions(){const e=this.htEditor.getColWidth(0)+Object(i["getScrollbarWidth"])(this.hot.rootDocument)+2,t=this.cellProperties.trimDropdown;this.htEditor.updateSettings({height:this.getDropdownHeight(),width:t?void 0:e}),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e})}highlightBestMatchingChoice(e){"number"===typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getDropdownHeight(){const e=this.htEditor.getRowHeight(0)||23,t=this.cellProperties.visibleRows;return this.strippedChoices.length>=t?t*e:this.strippedChoices.length*e+8}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,n=Object(h["arrayMap"])(e,e=>Object(d["stringify"])(e)),r=Object(h["arrayMap"])(n,e=>t?e:Object(m["stripTags"])(e));return r}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),n={row:t?t.from.row:-1};let r=!1;return e===f["KEY_CODES"].ARROW_DOWN&&n.row>0&&n.row<this.htEditor.countRows()-1&&(r=!0),e===f["KEY_CODES"].ARROW_UP&&n.row>-1&&(r=!0),r}onBeforeKeyDown(e){if(Object(f["isPrintableChar"])(e.keyCode)||e.keyCode===f["KEY_CODES"].BACKSPACE||e.keyCode===f["KEY_CODES"].DELETE||e.keyCode===f["KEY_CODES"].INSERT){let t=10;if(e.keyCode===f["KEY_CODES"].C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout(()=>{this.queryChoices(this.TEXTAREA.value)},t)}}}var O=n("13e1");const N="checkbox";class A extends O["a"]{static get EDITOR_TYPE(){return N}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');Object(i["hasClass"])(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var L=n("c1df"),I=n.n(L);
- /*!
- * Pikaday
- *
- * Copyright © 2014 David Bushell | BSD & MIT license | https://github.com/Pikaday/Pikaday
- */
- const k=()=>window,x=()=>window.document,D=(e,t)=>window.setTimeout(e,t),H=function(e,t,n,r){e.addEventListener(t,n,!!r)},P=function(e,t,n,r){e.removeEventListener(t,n,!!r)},j=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},F=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},Y=function(e,t){F(e,t)||(e.className=""===e.className?t:e.className+" "+t)},U=function(e,t){e.className=j((" "+e.className+" ").replace(" "+t+" "," "))},V=function(e){return/Array/.test(Object.prototype.toString.call(e))},B=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},W=function(e){let t=e.getDay();return 0===t||6===t},z=function(e){return e%4===0&&e%100!==0||e%400===0},G=function(e,t){return[31,z(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},K=function(e){B(e)&&e.setHours(0,0,0,0)},X=function(e,t){return e.getTime()===t.getTime()},$=function(e,t,n){let r,i;for(r in t)i=void 0!==e[r],i&&"object"===typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?B(t[r])?n&&(e[r]=new Date(t[r].getTime())):V(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=$({},t[r],n):!n&&i||(e[r]=t[r]);return e},q=function(e,t,n){let r=x().createEvent("HTMLEvents");r.initEvent(t,!0,!1),r=$(r,n),e.dispatchEvent(r)},J=function(e){return e.month<0&&(e.year-=Math.ceil(Math.abs(e.month)/12),e.month+=12),e.month>11&&(e.year+=Math.floor(Math.abs(e.month)/12),e.month-=12),e},Q={field:null,bound:void 0,ariaLabel:"Use the arrow keys to pick a date",position:"bottom left",reposition:!0,format:"YYYY-MM-DD",toString:null,parse:null,defaultDate:null,setDefaultDate:!1,firstDay:0,firstWeekOfYearMinDays:4,formatStrict:!1,minDate:null,maxDate:null,yearRange:10,showWeekNumber:!1,pickWholeWeek:!1,minYear:0,maxYear:9999,minMonth:void 0,maxMonth:void 0,startRange:null,endRange:null,isRTL:!1,yearSuffix:"",showMonthAfterYear:!1,showDaysInNextAndPreviousMonths:!1,enableSelectionDaysInNextAndPreviousMonths:!1,numberOfMonths:1,mainCalendar:"left",container:void 0,blurFieldOnSelect:!0,i18n:{previousMonth:"Previous Month",nextMonth:"Next Month",months:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},theme:null,events:[],onSelect:null,onOpen:null,onClose:null,onDraw:null,keyboardInput:!0},Z=function(e,t,n){t+=e.firstDay;while(t>=7)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},ee=function(e){let t=[],n="false";if(e.isEmpty){if(!e.showDaysInNextAndPreviousMonths)return'<td class="is-empty"></td>';t.push("is-outside-current-month"),e.enableSelectionDaysInNextAndPreviousMonths||t.push("is-selection-disabled")}return e.isDisabled&&t.push("is-disabled"),e.isToday&&t.push("is-today"),e.isSelected&&(t.push("is-selected"),n="true"),e.hasEvent&&t.push("has-event"),e.isInRange&&t.push("is-inrange"),e.isStartRange&&t.push("is-startrange"),e.isEndRange&&t.push("is-endrange"),'<td data-day="'+e.day+'" class="'+t.join(" ")+'" aria-selected="'+n+'"><button class="pika-button pika-day" type="button" data-pika-year="'+e.year+'" data-pika-month="'+e.month+'" data-pika-day="'+e.day+'">'+e.day+"</button></td>"},te=function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),r=e.getDay(),i=t,s=i-1,o=7,a=function(e){return(e+o-1)%o};e.setDate(n+s-a(r));let l=new Date(e.getFullYear(),0,i),u=864e5,c=(e.getTime()-l.getTime())/u,h=1+Math.round((c-s+a(l.getDay()))/o);return h},ne=function(e,t,n,r,i){let s=new Date(r,n,t),o=e.hasMoment?e.moment(s).isoWeek():te(s,i);return'<td class="pika-week">'+o+"</td>"},re=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},ie=function(e){return"<tbody>"+e.join("")+"</tbody>"},se=function(e){let t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+Z(e,t)+'">'+Z(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"},oe=function(e,t,n,r,i,s){let o,a,l,u,c,h=e._o,d=n===h.minYear,m=n===h.maxYear,f='<div id="'+s+'" class="pika-title" role="heading" aria-live="polite">',p=!0,g=!0;for(l=[],o=0;o<12;o++)l.push('<option value="'+(n===i?o-t:12+o-t)+'"'+(o===r?' selected="selected"':"")+(d&&o<h.minMonth||m&&o>h.maxMonth?' disabled="disabled"':"")+">"+h.i18n.months[o]+"</option>");for(u='<div class="pika-label">'+h.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",V(h.yearRange)?(o=h.yearRange[0],a=h.yearRange[1]+1):(o=n-h.yearRange,a=1+n+h.yearRange),l=[];o<a&&o<=h.maxYear;o++)o>=h.minYear&&l.push('<option value="'+o+'"'+(o===n?' selected="selected"':"")+">"+o+"</option>");return c='<div class="pika-label">'+n+h.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",h.showMonthAfterYear?f+=c+u:f+=u+c,d&&(0===r||h.minMonth>=r)&&(p=!1),m&&(11===r||h.maxMonth<=r)&&(g=!1),0===t&&(f+='<button class="pika-prev'+(p?"":" is-disabled")+'" type="button">'+h.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(f+='<button class="pika-next'+(g?"":" is-disabled")+'" type="button">'+h.i18n.nextMonth+"</button>"),f+"</div>"},ae=function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+se(e)+ie(t)+"</table>"};function le(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;e=e||k().event;let r=e.target||e.srcElement;if(r)if(F(r,"is-disabled")||(!F(r,"pika-button")||F(r,"is-empty")||F(r.parentNode,"is-disabled")?F(r,"pika-prev")?t.prevMonth():F(r,"pika-next")&&t.nextMonth():(t.setDate(new Date(r.getAttribute("data-pika-year"),r.getAttribute("data-pika-month"),r.getAttribute("data-pika-day"))),n.bound&&D((function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()}),100))),F(r,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}},t._onChange=function(e){e=e||k().event;let n=e.target||e.srcElement;n&&(F(n,"pika-select-month")?t.gotoMonth(n.value):F(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||k().event,t.isVisible())switch(e.keyCode){case 13:case 27:n.field&&n.field.blur();break;case 37:t.adjustDate("subtract",1);break;case 38:t.adjustDate("subtract",7);break;case 39:t.adjustDate("add",1);break;case 40:t.adjustDate("add",7);break;case 8:case 46:t.setDate(null);break}},t._parseFieldValue=function(){if(n.parse)return n.parse(n.field.value,n.format);if(this.hasMoment){let e=this.moment(n.field.value,n.format,n.formatStrict);return e&&e.isValid()?e.toDate():null}return new Date(Date.parse(n.field.value))},t._onInputChange=function(e){let n;e.firedBy!==t&&(n=t._parseFieldValue(),B(n)&&t.setDate(n),t._v||t.show())},t._onInputFocus=function(){t.show()},t._onInputClick=function(){t.show()},t._onInputBlur=function(){let e=x().activeElement;do{if(F(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=D((function(){t.hide()}),50)),t._c=!1},t._onClick=function(e){e=e||k().event;let r=e.target||e.srcElement,i=r;if(r){!hasEventListeners&&F(r,"pika-select")&&(r.onchange||(r.setAttribute("onchange","return;"),H(r,"change",t._onChange)));do{if(F(i,"pika-single")||i===n.trigger)return}while(i=i.parentNode);t._v&&r!==n.trigger&&i!==n.trigger&&t.hide()}},t.el=x().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),H(t.el,"mousedown",t._onMouseDown,!0),H(t.el,"touchend",t._onMouseDown,!0),H(t.el,"change",t._onChange),n.keyboardInput&&H(x(),"keydown",t._onKeyChange),n.field&&(n.container?n.container.appendChild(t.el):n.bound?x().body.appendChild(t.el):n.field.parentNode.insertBefore(t.el,n.field.nextSibling),H(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let r=n.defaultDate;B(r)?n.setDefaultDate?t.setDate(r,!0):t.gotoDate(r):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",H(n.trigger,"click",t._onInputClick),H(n.trigger,"focus",t._onInputFocus),H(n.trigger,"blur",t._onInputBlur)):this.show()}function ue(e,t,n){return(t=ce(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ce(e){var t=he(e,"string");return"symbol"==typeof t?t:t+""}function he(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}le.prototype={config:function(e){this._o||(this._o=$({},Q,!0));let t=$(this._o,e,!0);t.isRTL=!!t.isRTL,t.field=t.field&&t.field.nodeName?t.field:null,t.theme="string"===typeof t.theme&&t.theme?t.theme:null,t.bound=!!(void 0!==t.bound?t.field&&t.bound:t.field),t.trigger=t.trigger&&t.trigger.nodeName?t.trigger:t.field,t.disableWeekends=!!t.disableWeekends,t.disableDayFn="function"===typeof t.disableDayFn?t.disableDayFn:null;let n=parseInt(t.numberOfMonths,10)||1;if(t.numberOfMonths=n>4?4:n,B(t.minDate)||(t.minDate=!1),B(t.maxDate)||(t.maxDate=!1),t.minDate&&t.maxDate&&t.maxDate<t.minDate&&(t.maxDate=t.minDate=!1),t.minDate&&this.setMinDate(t.minDate),t.maxDate&&this.setMaxDate(t.maxDate),V(t.yearRange)){let e=(new Date).getFullYear()-10;t.yearRange[0]=parseInt(t.yearRange[0],10)||e,t.yearRange[1]=parseInt(t.yearRange[1],10)||e}else t.yearRange=Math.abs(parseInt(t.yearRange,10))||Q.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,B(this._d)?this._o.toString?this._o.toString(this._d,e):this.hasMoment?this.moment(this._d).format(e):this._d.toDateString():""},getMoment:function(){return this.hasMoment?this.moment(this._d):null},setMoment:function(e,t){this.hasMoment&&this.moment.isMoment(e)&&this.setDate(e.toDate(),t)},useMoment:function(e){this.hasMoment=!0,this.moment=e},getDate:function(){return B(this._d)?new Date(this._d.getTime()):null},setDate:function(e,t){if(!e)return this._d=null,this._o.field&&(this._o.field.value="",q(this._o.field,"change",{firedBy:this})),this.draw();if("string"===typeof e&&(e=new Date(Date.parse(e))),!B(e))return;let n=this._o.minDate,r=this._o.maxDate;B(n)&&e<n?e=n:B(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),K(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),q(this._o.field,"change",{firedBy:this})),t||"function"!==typeof this._o.onSelect||this._o.onSelect.call(this,this.getDate())},clear:function(){this.setDate(null)},gotoDate:function(e){let t=!0;if(B(e)){if(this.calendars){let n=new Date(this.calendars[0].year,this.calendars[0].month,1),r=new Date(this.calendars[this.calendars.length-1].year,this.calendars[this.calendars.length-1].month,1),i=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=i<n.getTime()||r.getTime()<i}t&&(this.calendars=[{month:e.getMonth(),year:e.getFullYear()}],"right"===this._o.mainCalendar&&(this.calendars[0].month+=1-this._o.numberOfMonths)),this.adjustCalendars()}},adjustDate:function(e,t){let n,r=this.getDate()||new Date,i=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+i):"subtract"===e&&(n=new Date(r.valueOf()-i)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=J(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=J({month:this.calendars[0].month+e,year:this.calendars[0].year});this.draw()},gotoToday:function(){this.gotoDate(new Date)},gotoMonth:function(e){isNaN(e)||(this.calendars[0].month=parseInt(e,10),this.adjustCalendars())},nextMonth:function(){this.calendars[0].month++,this.adjustCalendars()},prevMonth:function(){this.calendars[0].month--,this.adjustCalendars()},gotoYear:function(e){isNaN(e)||(this.calendars[0].year=parseInt(e,10),this.adjustCalendars())},setMinDate:function(e){e instanceof Date?(K(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=Q.minDate,this._o.minYear=Q.minYear,this._o.minMonth=Q.minMonth,this._o.startRange=Q.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(K(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=Q.maxDate,this._o.maxYear=Q.maxYear,this._o.maxMonth=Q.maxMonth,this._o.endRange=Q.endRange),this.draw()},setStartRange:function(e){this._o.startRange=e},setEndRange:function(e){this._o.endRange=e},draw:function(e){if(!this._v&&!e)return;let t,n=this._o,r=n.minYear,i=n.maxYear,s=n.minMonth,o=n.maxMonth,a="";this._y<=r&&(this._y=r,!isNaN(s)&&this._m<s&&(this._m=s)),this._y>=i&&(this._y=i,!isNaN(o)&&this._m>o&&(this._m=o));for(let l=0;l<n.numberOfMonths;l++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+oe(this,l,this.calendars[l].year,this.calendars[l].month,this.calendars[0].year,t)+this.render(this.calendars[l].year,this.calendars[l].month,t)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&D((function(){n.trigger.focus()}),1),"function"===typeof this._o.onDraw&&this._o.onDraw(this),n.bound&&n.field.setAttribute("aria-label",n.ariaLabel)},adjustPosition:function(){let e,t,n,r,i,s,o,a,l,u,c;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,r=k().innerWidth||x().documentElement.clientWidth,i=k().innerHeight||x().documentElement.clientHeight,s=x().body.scrollTop||x().documentElement.scrollTop,u=!0,c=!0,l=e.getBoundingClientRect(),o=l.left+k().pageXOffset,a=l.bottom+k().pageYOffset,(this._o.reposition&&o+t>r||this._o.position.indexOf("right")>-1&&o-t+e.offsetWidth>0)&&(o=o-t+e.offsetWidth,u=!1),(this._o.reposition&&a+n>i+s||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,c=!1),o<0&&(o=0),a<0&&(a=0),this.el.style.left=o+"px",this.el.style.top=a+"px",Y(this.el,u?"left-aligned":"right-aligned"),Y(this.el,c?"bottom-aligned":"top-aligned"),U(this.el,u?"right-aligned":"left-aligned"),U(this.el,c?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let r=this._o,i=new Date,s=G(e,t),o=new Date(e,t,1).getDay(),a=[],l=[];K(i),r.firstDay>0&&(o-=r.firstDay,o<0&&(o+=7));let u=0===t?11:t-1,c=11===t?0:t+1,h=0===t?e-1:e,d=11===t?e+1:e,m=G(h,u),f=s+o,p=f;while(p>7)p-=7;f+=7-p;let g=!1;for(let y=0,w=0;y<f;y++){let n=new Date(e,t,y-o+1),f=!!B(this._d)&&X(n,this._d),p=X(n,i),b=-1!==r.events.indexOf(n.toDateString()),v=y<o||y>=s+o,_=y-o+1,S=t,E=e,C=r.startRange&&X(r.startRange,n),M=r.endRange&&X(r.endRange,n),T=r.startRange&&r.endRange&&r.startRange<n&&n<r.endRange,R=r.minDate&&n<r.minDate||r.maxDate&&n>r.maxDate||r.disableWeekends&&W(n)||r.disableDayFn&&r.disableDayFn(n);v&&(y<o?(_=m+_,S=u,E=h):(_-=s,S=c,E=d));let O={day:_,month:S,year:E,hasEvent:b,isSelected:f,isToday:p,isDisabled:R,isEmpty:v,isStartRange:C,isEndRange:M,isInRange:T,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&f&&(g=!0),l.push(ee(O)),7===++w&&(r.showWeekNumber&&l.unshift(ne(this,y-o,t,e,r.firstWeekOfYearMinDays)),a.push(re(l,r.isRTL,r.pickWholeWeek,g)),l=[],w=0,g=!1)}return ae(r,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),U(this.el,"is-hidden"),this._o.bound&&(H(x(),"click",this._onClick),this.adjustPosition()),"function"===typeof this._o.onOpen&&this._o.onOpen.call(this))},hide:function(){let e=this._v;!1!==e&&(this._o.bound&&P(x(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),Y(this.el,"is-hidden"),this._v=!1,void 0!==e&&"function"===typeof this._o.onClose&&this._o.onClose.call(this))},destroy:function(){let e=this._o;this.hide(),P(this.el,"mousedown",this._onMouseDown,!0),P(this.el,"touchend",this._onMouseDown,!0),P(this.el,"change",this._onChange),e.keyboardInput&&P(x(),"keydown",this._onKeyChange),e.field&&(P(e.field,"change",this._onInputChange),e.bound&&(P(e.trigger,"click",this._onInputClick),P(e.trigger,"focus",this._onInputFocus),P(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};const de="date",me="dateEditor";class fe extends r["a"]{constructor(){super(...arguments),ue(this,"defaultDateFormat","DD/MM/YYYY"),ue(this,"parentDestroyed",!1),ue(this,"$datePicker",null)}static get EDITOR_TYPE(){return de}init(){if("function"!==typeof I.a)throw new Error("You need to include moment.js to your project.");if("function"!==typeof le)throw new Error("You need to include Pikaday to your project.");super.init(),this.hot.addHook("afterDestroy",()=>{this.parentDestroyed=!0,this.destroyElements()})}createElements(){super.createElements(),this.datePicker=this.hot.rootDocument.createElement("DIV"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=9999,this.datePicker.setAttribute("dir",this.hot.isRtl()?"rtl":"ltr"),Object(i["addClass"])(this.datePicker,"htDatepickerHolder"),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",e=>{Object(i["hasClass"])(e.target,"pika-day")&&this.hideDatepicker(),e.stopPropagation()})}destroyElements(){const e=this.datePicker.parentNode;this.$datePicker&&this.$datePicker.destroy(),e&&e.removeChild(this.datePicker)}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager(),n=t.getContext("editor");this.showDatepicker(e),super.open(),n.addShortcuts([{keys:[["ArrowLeft"]],callback:()=>{this.$datePicker.adjustDate("subtract",1)}},{keys:[["ArrowRight"]],callback:()=>{this.$datePicker.adjustDate("add",1)}},{keys:[["ArrowUp"]],callback:()=>{this.$datePicker.adjustDate("subtract",7)}},{keys:[["ArrowDown"]],callback:()=>{this.$datePicker.adjustDate("add",7)}}],{group:me})}close(){var e;this._opened=!1,null!==(e=this.$datePicker)&&void 0!==e&&e.destroy&&this.$datePicker.destroy(),this.hot._registerTimeout(()=>{const e=this.hot._getEditorManager();e.closeEditor(),this.hot.view.render(),e.prepareEditor()});const t=this.hot.getShortcutManager(),n=t.getContext("editor");n.removeShortcutsByGroup(me),super.close()}finishEditing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];super.finishEditing(e,t)}showDatepicker(e){const t=this.cellProperties.dateFormat||this.defaultDateFormat,n=this.hot.view.isMouseDown(),r=!!e&&Object(f["isFunctionKey"])(e.keyCode);let i;this.datePicker.style.display="block",this.$datePicker=new le(this.getDatePickerConfig()),"function"===typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(I.a),this.$datePicker._onInputFocus=function(){},this.originalValue?(i=this.originalValue,I()(i,t,!0).isValid()&&this.$datePicker.setMoment(I()(i,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),r||n||this.setValue("")):this.cellProperties.defaultDate?(i=this.cellProperties.defaultDate,I()(i,t,!0).isValid()&&this.$datePicker.setMoment(I()(i,t),!0),r||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){const e=this.TEXTAREA,t={};this.cellProperties&&this.cellProperties.datePickerConfig&&Object(o["deepExtend"])(t,this.cellProperties.datePickerConfig);const n=t.onSelect,r=t.onClose;return t.field=e,t.trigger=e,t.container=this.datePicker,t.bound=!1,t.keyboardInput=!1,t.format=t.format||this.defaultDateFormat,t.reposition=t.reposition||!1,t.isRTL=!1,t.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=I()(t).format(this.cellProperties.dateFormat||this.defaultDateFormat)),this.setValue(t),n&&n()},t.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),r&&r()},t}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==O["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:r}=this.hot,{wtOverlays:s}=this.hot.view._wt,{wtTable:o}=null!==(t=s.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,a=n.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleRow()),l=n.getVisualFromRenderableIndex(o.getLastPartiallyVisibleRow()),u=r.getVisualFromRenderableIndex(o.getFirstPartiallyVisibleColumn()),c=r.getVisualFromRenderableIndex(o.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=u&&this.col<=c){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=this.hot.rootWindow.pageYOffset+e.top+Object(i["outerHeight"])(this.TD)+"px";let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-Object(i["outerWidth"])(this.datePicker):t+=e.left,this.datePickerStyle.left=t+"px"}else this.hideDatepicker()}}var pe=n("1004");const ge="dropdown";class ye extends R{static get EDITOR_TYPE(){return ge}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.cellProperties.filter=!1,this.cellProperties.strict=!0}}pe["a"].getSingleton().add("beforeValidate",(function(e,t,n){const r=this.propToCol(n);if(Number.isInteger(r)){const e=this.getCellMeta(t,r);e.editor===ye&&void 0===e.strict&&(e.filter=!1,e.strict=!0)}}));const we="numeric";class be extends r["a"]{static get EDITOR_TYPE(){return we}}const ve="password";class _e extends r["a"]{static get EDITOR_TYPE(){return ve}createElements(){super.createElements(),this.TEXTAREA=this.hot.rootDocument.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.setAttribute("data-hot-input",""),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,Object(i["empty"])(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const Se="ht_editor_visible",Ee="selectEditor",Ce="select";class Me extends O["a"]{static get EDITOR_TYPE(){return Ce}init(){this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.select.style.display="none",Object(i["addClass"])(this.select,"htSelectEditor"),this.hot.rootElement.appendChild(this.select),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.select.style.display="";const e=this.hot.getShortcutManager();e.setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.select.style.display="none",Object(i["hasClass"])(this.select,Se)&&Object(i["removeClass"])(this.select,Se),this.unregisterShortcuts(),this.clearHooks()}focus(){this.select.focus()}registerHooks(){this.addHook("afterScrollHorizontally",()=>this.refreshDimensions()),this.addHook("afterScrollVertically",()=>this.refreshDimensions()),this.addHook("afterColumnResize",()=>this.refreshDimensions()),this.addHook("afterRowResize",()=>this.refreshDimensions())}prepare(e,t,n,r,s,a){super.prepare(e,t,n,r,s,a);const l=this.cellProperties.selectOptions;let u;u="function"===typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),Object(i["empty"])(this.select),Object(o["objectEach"])(u,(e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,Object(i["fastInnerHTML"])(n,e),this.select.appendChild(n)})}prepareOptions(e){let t={};if(Array.isArray(e))for(let n=0,r=e.length;n<r;n++)t[e[n]]=e[n];else"object"===typeof e&&(t=e);return t}refreshValue(){const e=this.hot.getSourceDataAtCell(this.row,this.prop);this.originalValue=e,this.setValue(e),this.refreshDimensions()}refreshDimensions(){if(this.state!==O["b"].EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:n,height:r}=this.getEditedCellRect(),s=this.select.style;s.height=r+"px",s.width=n+"px",s.top=e+"px",s[this.hot.isRtl()?"right":"left"]=t+"px",s.margin="0px",Object(i["addClass"])(this.select,Se)}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor"),n={group:Ee};this.isInFullEditMode()&&t.addShortcuts([{keys:[["ArrowUp"]],callback:()=>{const e=this.select.selectedIndex-1;e>=0&&(this.select[e].selected=!0)}},{keys:[["ArrowDown"]],callback:()=>{const e=this.select.selectedIndex+1;e<=this.select.length-1&&(this.select[e].selected=!0)}}],n)}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("editor");t.removeShortcutsByGroup(Ee)}}const Te="time";class Re extends r["a"]{static get EDITOR_TYPE(){return Te}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.TEXTAREA.dir="ltr"}}var Oe=n("491c");function Ne(){Object(Oe["e"])(O["a"]),Object(Oe["e"])(R),Object(Oe["e"])(A),Object(Oe["e"])(fe),Object(Oe["e"])(ye),Object(Oe["e"])(c),Object(Oe["e"])(be),Object(Oe["e"])(_e),Object(Oe["e"])(Me),Object(Oe["e"])(r["a"]),Object(Oe["e"])(Re)}var Ae=n("a357c");const Le="html";function Ie(e,t,n,r,s,o,a){Ae["a"].apply(this,[e,t,n,r,s,o,a]),Object(i["fastInnerHTML"])(t,null===o||void 0===o?"":o,!1)}Ie.RENDERER_TYPE=Le;var ke=n("87d6");const xe="autocomplete";function De(e,t,n,r,s,o,a){const{rootDocument:l}=e,u=a.allowHtml?Ie:g["a"],c=l.createElement("DIV"),h=e.getSettings().ariaTags;if(c.className="htAutocompleteArrow",h&&c.setAttribute(...Object(y["n"])()),c.appendChild(l.createTextNode(String.fromCharCode(9660))),u.apply(this,[e,t,n,r,s,o,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(c,t.firstChild),Object(i["addClass"])(t,"htAutocomplete"),!e.acArrowListener){const s=new ke["a"](e);e.acArrowListener=function(s){Object(i["hasClass"])(s.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,r),t)},s.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",()=>{s.destroy()})}}De.RENDERER_TYPE=xe;const He="dropdown";function Pe(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}Pe.RENDERER_TYPE=He;var je=n("0283");const Fe=new WeakMap,Ye=new WeakMap,Ue="htBadValue",Ve="data-row",Be="data-col",We="checkboxRenderer",ze="checkbox";function Ge(e,t,n,r,s,o,l){const{rootDocument:u}=e,c=e.getSettings().ariaTags;Ae["a"].apply(this,[e,t,n,r,s,o,l]),Ke(e);let h=Xe(u);const m=l.label;let f=!1;if("undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1),Object(i["empty"])(t),o===l.checkedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.checkedTemplate).toLocaleLowerCase(l.locale)?h.checked=!0:o===l.uncheckedTemplate||Object(d["stringify"])(o).toLocaleLowerCase(l.locale)===Object(d["stringify"])(l.uncheckedTemplate).toLocaleLowerCase(l.locale)?h.checked=!1:Object(d["isEmpty"])(o)?Object(i["addClass"])(h,"noValue"):(h.style.display="none",Object(i["addClass"])(h,Ue),f=!0),Object(i["setAttribute"])(h,[[Ve,n],[Be,r]]),c&&Object(i["setAttribute"])(h,[Object(y["p"])(h.checked?e.getTranslatedPhrase(je["CHECKBOX_CHECKED"]):e.getTranslatedPhrase(je["CHECKBOX_UNCHECKED"])),Object(y["d"])(h.checked),Object(y["c"])()]),!f&&m){let i="";if(m.value)i="function"===typeof m.value?m.value.call(this,n,r,s,o):m.value;else if(m.property){const t=e.getDataAtRowProp(n,m.property);i=null!==t?t:""}const a=$e(u,i,!0!==m.separated);"before"===m.position?m.separated?(t.appendChild(a),t.appendChild(h)):(a.appendChild(h),h=a):m.position&&"after"!==m.position||(m.separated?(t.appendChild(h),t.appendChild(a)):(a.insertBefore(h,a.firstChild),h=a))}function p(){const t=e.getShortcutManager(),n=t.getContext("grid"),r={group:We,relativeToGroup:a["a"],position:"before"};n.addShortcuts([{keys:[["space"]],callback:()=>(g(),!w()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(g(),!w()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null===t||void 0===t?void 0:t.isSingle())&&t.highlight.isCell()}},{keys:[["delete"],["backspace"]],callback:()=>(g(!0),!w()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],r)}function g(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),r=[],i=new Map;let s=[],o=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:u}=n[a].getTopStartCorner(),{row:c,col:h}=n[a].getBottomEndCorner();for(let n=l;n<=c;n+=1)for(let a=u;a<=h;a+=1){const l=e.getCellMeta(n,a),u={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(i.has(r.length)?i.set(r.length,[...i.get(r.length),[n,a,null]]):i.set(r.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;"undefined"===typeof l.checkedTemplate&&(l.checkedTemplate=!0),"undefined"===typeof l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const c=e.getDataAtCell(n,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(c)?s.push([n,a,l.uncheckedTemplate,u]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(c)&&s.push([n,a,l.checkedTemplate,u]):s.push([n,a,l.uncheckedTemplate,u]),o+=1}r.push(o),o=0}s=s.every(e=>{let[,,t]=e;return t===s[0][2]})?s.map(e=>{let[t,n,r]=e;return[t,n,r]}):s.map(e=>{let[t,n,,r]=e;return[t,n,r.checkedTemplate]}),s.length>0&&r.forEach((t,n)=>{let r=s.splice(0,t);i.size&&i.has(n)&&(r=[...r,...i.get(n)]),e.setDataAtCell(r)})}}function w(){const t=e.getSelectedRange();if(t){for(let n=0;n<t.length;n++){const r=t[n].getTopStartCorner(),i=t[n].getBottomEndCorner();for(let t=r.row;t<=i.row;t++)for(let n=r.col;n<=i.col;n++){const r=e.getCellMeta(t,n),i=e.getCell(t,n);if(null===i||void 0===i)return!0;{const e=i.querySelectorAll("input[type=checkbox]");if(e.length>0&&!r.readOnly)return!0}}}return!1}}(!m||m&&!m.separated)&&t.appendChild(h),f&&t.appendChild(u.createTextNode("#bad-value#")),Fe.has(e)||(Fe.set(e,!0),p())}function Ke(e){let t=Ye.get(e);if(!t){const{rootElement:n}=e;t=new ke["a"](e),t.addEventListener(n,"click",t=>Je(t,e)),t.addEventListener(n,"mouseup",t=>qe(t,e)),t.addEventListener(n,"change",t=>Qe(t,e)),Ye.set(e,t)}return t}function Xe(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}function $e(e,t,n){const r=e.createElement("label");return r.className="htCheckboxRendererLabel "+(n?"fullWidth":""),r.appendChild(e.createTextNode(t)),r.cloneNode(!0)}function qe(e,t){const{target:n}=e;Ze(n)&&n.hasAttribute(Ve)&&n.hasAttribute(Be)&&setTimeout(t.listen,10)}function Je(e,t){const{target:n}=e;if(!Ze(n))return;if(!n.hasAttribute(Ve)||!n.hasAttribute(Be))return;const r=parseInt(n.getAttribute(Ve),10),i=parseInt(n.getAttribute(Be),10),s=t.getCellMeta(r,i);s.readOnly&&e.preventDefault()}function Qe(e,t){const{target:n}=e;if(!Ze(n))return;if(!n.hasAttribute(Ve)||!n.hasAttribute(Be))return;const r=parseInt(n.getAttribute(Ve),10),i=parseInt(n.getAttribute(Be),10),s=t.getCellMeta(r,i);if(!s.readOnly){let n=null;n=e.target.checked?void 0===s.uncheckedTemplate||s.checkedTemplate:void 0!==s.uncheckedTemplate&&s.uncheckedTemplate,t.setDataAtCell(r,i,n)}}function Ze(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}pe["a"].getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:r,type:i,row:s,column:o,prop:a}=t;if(i===ze){if(r){const{value:t,property:i}=r;let l=n;if(t)l="function"===typeof t?t(s,o,a,n):t;else if(i){const e=this.getDataAtRowProp(s,i);l=null!==e?e:n}e=l}return e}})),Ge.RENDERER_TYPE=ze;const et="handsontable";function tt(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}tt.RENDERER_TYPE=et;var nt=n("8722d"),rt=n.n(nt),it=n("ffec");const st="numeric";function ot(e,t){if(Object(it["isNumeric"])(e)){const n=t.numericFormat,r=n&&n.culture||"-",i=n&&n.pattern;if("undefined"!==typeof r&&!rt.a.languages()[r]){const e=r.replace("-",""),t=rt.a.allLanguages?rt.a.allLanguages[r]:rt.a[e];t&&rt.a.registerLanguage(t)}rt.a.setLanguage(r),e=rt()(e).format(i||"0")}return e}function at(e,t,n,r,i,s,o){let a=s;if(Object(it["isNumeric"])(a)){const e=o.className||"",n=e.length?e.split(" "):[];a=ot(a,o),n.indexOf("htLeft")<0&&n.indexOf("htCenter")<0&&n.indexOf("htRight")<0&&n.indexOf("htJustify")<0&&n.push("htRight"),n.indexOf("htNumeric")<0&&n.push("htNumeric"),o.className=n.join(" "),t.dir="ltr"}Object(g["a"])(e,t,n,r,i,a,o)}at.RENDERER_TYPE=st;const lt="password";function ut(e,t,n,r,s,o,a){g["a"].apply(this,[e,t,n,r,s,o,a]);const l=a.hashLength||t.innerHTML.length,u=a.hashSymbol||"*";let c="";Object(it["rangeEach"])(l-1,()=>{c+=u}),Object(i["fastInnerHTML"])(t,c)}ut.RENDERER_TYPE=lt;const ct="select";function ht(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o])}ht.RENDERER_TYPE=ct;const dt="time";function mt(e,t,n,r,i,s,o){g["a"].apply(this,[e,t,n,r,i,s,o]),t.dir="ltr"}mt.RENDERER_TYPE=dt;var ft=n("3d76");function pt(){Object(ft["d"])(De),Object(ft["d"])(Ae["a"]),Object(ft["d"])(Ge),Object(ft["d"])(Pe),Object(ft["d"])(tt),Object(ft["d"])(Ie),Object(ft["d"])(at),Object(ft["d"])(ut),Object(ft["d"])(ht),Object(ft["d"])(g["a"]),Object(ft["d"])(mt)}const gt="autocomplete";function yt(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"===typeof this.source?this.source(n,wt(n,t)):wt(n,t)(this.source):t(!0)}function wt(e,t){const n=e;return function(e){let r=!1;for(let t=0,i=e.length;t<i;t++)if(n===e[t]){r=!0;break}t(r)}}yt.VALIDATOR_TYPE=gt;var bt=n("3eb5");const vt="date";function _t(e,t){const n=Object(Oe["b"])(de,this.instance);let r=e,i=!0;null!==r&&void 0!==r||(r="");let s=I()(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),o=I()(new Date(r)).isValid()||s;if(this.allowEmpty&&""===r&&(o=!0,s=!0),o||(i=!1),!o&&s&&(i=!0),o&&!s)if(!0===this.correctFormat){const e=St(r,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),i=!0}else i=!1;t(i)}function St(e,t){const n=I()(Object(bt["getNormalizedDate"])(e)),r=I()(e,t),i=e.search(/[A-z]/g)>-1;let s;return s=n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||i?n:r,s.format(t)}_t.VALIDATOR_TYPE=vt;const Et="dropdown";function Ct(e,t){yt.apply(this,[e,t])}Ct.VALIDATOR_TYPE=Et;const Mt="numeric";function Tt(e,t){let n=e;null!==n&&void 0!==n||(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&Object(it["isNumeric"])(e))}Tt.VALIDATOR_TYPE=Mt;const Rt=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"],Ot="time";function Nt(e,t){const n=this.timeFormat||"h:mm:ss a";let r=!0,i=e;null===i&&(i=""),i=/^\d{3,}$/.test(i)?parseInt(i,10):i;const s=/^\d{1,2}$/.test(i);s&&(i+=":00");const o=I()(i,Rt,!0).isValid()?I()(i):I()(i,n);let a=o.isValid(),l=I()(i,n,!0).isValid()&&!s;if(this.allowEmpty&&""===i&&(a=!0,l=!0),a||(r=!1),!a&&l&&(r=!0),a&&!l)if(!0===this.correctFormat){const e=o.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),r=!0}else r=!1;t(r)}Nt.VALIDATOR_TYPE=Ot;var At=n("169f");function Lt(){Object(At["d"])(yt),Object(At["d"])(Ct),Object(At["d"])(_t),Object(At["d"])(Tt),Object(At["d"])(Nt)}const It="autocomplete",kt={CELL_TYPE:It,editor:R,renderer:De,validator:yt},xt="checkbox",Dt={CELL_TYPE:xt,editor:A,renderer:Ge},Ht="date";function Pt(e,t,n,r,i,s,o){De.apply(this,[e,t,n,r,i,s,o])}Pt.RENDERER_TYPE=Ht;const jt="date",Ft={CELL_TYPE:jt,editor:fe,renderer:Pt,validator:_t},Yt="dropdown",Ut={CELL_TYPE:Yt,editor:ye,renderer:Pe,validator:Ct},Vt="handsontable",Bt={CELL_TYPE:Vt,editor:c,renderer:tt},Wt="numeric",zt={CELL_TYPE:Wt,editor:be,renderer:at,validator:Tt,dataType:"number"},Gt="password",Kt={CELL_TYPE:Gt,editor:_e,renderer:ut,copyable:!1},Xt="select",$t={CELL_TYPE:Xt,editor:Me,renderer:ht};var qt=n("ef07");const Jt="time",Qt={CELL_TYPE:Jt,editor:Re,renderer:mt,validator:Nt};var Zt=n("76ab");function en(){Object(Zt["d"])(kt),Object(Zt["d"])(Dt),Object(Zt["d"])(Ft),Object(Zt["d"])(Ut),Object(Zt["d"])(Bt),Object(Zt["d"])(zt),Object(Zt["d"])(Kt),Object(Zt["d"])($t),Object(Zt["d"])(qt["a"]),Object(Zt["d"])(Qt)}var tn=n("d3c5"),nn=n("7dd09"),rn=n("220a");function sn(e,t,n){return(t=on(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function on(e){var t=an(e,"string");return"symbol"==typeof t?t:t+""}function an(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ln{static get SAMPLE_COUNT(){return 3}constructor(e){sn(this,"samples",null),sn(this,"dataFactory",null),sn(this,"customSampleCount",null),sn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:ln.SAMPLE_COUNT}setSampleCount(e){this.customSampleCount=e}setAllowDuplicates(e){this.allowDuplicates=e}generateRowSamples(e,t){return this.generateSamples("row",t,e)}generateColumnSamples(e,t){return this.generateSamples("col",t,e)}generateSamples(e,t,n){const r=new Map,{from:i,to:s}="number"===typeof n?{from:n,to:n}:n;return Object(it["rangeEach"])(i,s,n=>{const i=this.generateSample(e,t,n);r.set(n,i)}),r}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const r=new Map,i="row"===e?"col":"row",s=[];return Object(it["rangeEach"])(t.from,t.to,t=>{const a="row"===e?this.dataFactory(n,t):this.dataFactory(t,n);if(!1===a)return;const{value:l,bundleSeed:u}=a,c="string"===typeof u&&u.length>0;let h;h=c?u:Object(o["isObject"])(l)?""+Object.keys(l).length:Array.isArray(l)?""+l.length:""+Object(d["stringify"])(l).length,r.has(h)||r.set(h,{needed:this.getSampleCount(),strings:[]});const m=r.get(h);if(m.needed){const e=s.indexOf(l)>-1;(!e||this.allowDuplicates||c)&&(m.strings.push({value:l,[i]:t}),s.push(l),m.needed-=1)}}),r}}var un=ln,cn=n("861dd"),hn=n("9f10");function dn(e,t){fn(e,t),t.add(e)}function mn(e,t,n){fn(e,t),t.set(e,n)}function fn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function pn(e,t,n){return(t=gn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gn(e){var t=yn(e,"string");return"symbol"==typeof t?t:t+""}function yn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function wn(e,t){return e.get(vn(e,t))}function bn(e,t,n){return e.set(vn(e,t),n),n}function vn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("modifyAutoColumnSizeSeed");const _n="autoColumnSize",Sn=10,En="autoColumnSize";var Cn=new WeakMap,Mn=new WeakMap,Tn=new WeakSet;class Rn extends tn["a"]{static get PLUGIN_KEY(){return _n}static get PLUGIN_PRIORITY(){return Sn}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){super(e),dn(this,Tn),pn(this,"ghostTable",new rn["a"](this.hot)),pn(this,"samplesGenerator",new un((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;const i=this.hot.getCellMeta(e,t);let s="";i.spanned||(s=this.hot.getDataAtCell(e,t));let o="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(o=this.hot.runHooks("modifyAutoColumnSizeSeed",o,i,s)),{value:s,bundleSeed:o}})),pn(this,"inProgress",!1),pn(this,"measuredColumns",0),pn(this,"columnWidthsMap",new hn["a"]),mn(this,Cn,[]),mn(this,Mn,[]),this.hot.columnIndexMapper.registerMap(En,this.columnWidthsMap),this.addHook("beforeColumnResize",(e,t,n)=>vn(Tn,this,In).call(this,e,t,n))}isEnabled(){return!1!==this.hot.getSettings()[_n]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[_n];t&&null!==t.useHeaders&&void 0!==t.useHeaders&&this.ghostTable.setSetting("useHeaders",t.useHeaders),this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vn(Tn,e,An).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vn(Tn,e,Ln).call(e,...n)})),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return vn(Tn,e,xn).call(e,...n)})),this.addHook("beforeRender",()=>vn(Tn,this,Nn).call(this)),this.addHook("modifyColWidth",(e,t)=>this.getColumnWidth(t,e)),this.addHook("init",()=>vn(Tn,this,kn).call(this)),super.enablePlugin()}updatePlugin(){bn(Mn,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",(e,t,n)=>vn(Tn,this,In).call(this,e,t,n))}calculateVisibleColumnsWidth(){if(!this.hot.countRows())return;const e=this.getFirstVisibleColumn(),t=this.getLastVisibleColumn();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateColumnsWidth({from:e,to:t},void 0,n)}calculateColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countRows()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;Object(it["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalColumn(e);if(null===t&&(t=e),n||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t)){const t=this.samplesGenerator.generateColumnSamples(e,i);t.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),this.ghostTable.columns.length&&(this.hot.batchExecution(()=>{this.ghostTable.getWidths((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)})},!0),this.measuredColumns=r.to+1,this.ghostTable.clean())}calculateAllColumnsWidth(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countCols()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(nn["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+Rn.CALCULATION_STEP,r)},e,t),n=n+Rn.CALCULATION_STEP+1,n<r?i=Object(nn["requestAnimationFrame"])(s):(Object(nn["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateColumnsWidth({from:0,to:o},e,t),n=o+1),n<r?s():this.inProgress=!1}setSamplingOptions(){const e=this.hot.getSettings()[_n],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[_n];let t=Rn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(it["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getColumnWidth(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=t;return void 0===r&&(r=this.columnWidthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e)),n&&"number"===typeof r&&(r=Math.max(r,cn["a"]))),r}getFirstVisibleColumn(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){const e=this.hot.getColHeader(),t=e.reduce((e,t,n)=>{const r=wn(Cn,this).length;return(r-1<n||wn(Cn,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),r-1<n?wn(Cn,this).push(t):wn(Cn,this)[n]=t,e},[]);return t}clearCache(e){Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.columnWidthsMap.setValueAtIndex(e,null)})},!0):this.columnWidthsMap.clear()}isNeedRecalculate(){return!!this.columnWidthsMap.getValues().slice(0,this.measuredColumns).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function On(e){const t={from:0,to:this.hot.countRows()-1};e.forEach(e=>{const n=this.hot.toPhysicalColumn(e);if(null!==n&&!this.hot._getColWidthFromSettings(n)){const n=this.samplesGenerator.generateColumnSamples(e,t);n.forEach((e,t)=>this.ghostTable.addColumn(t,e))}}),this.ghostTable.columns.length&&(this.hot.batchExecution(()=>{this.ghostTable.getWidths((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)})},!0),this.ghostTable.clean())}function Nn(){this.calculateVisibleColumnsWidth(),this.inProgress||(vn(Tn,this,On).call(this,wn(Mn,this)),bn(Mn,this,[]))}function An(e,t){t||this.recalculateAllColumnsWidth()}function Ln(e){const t=e.reduce((e,t)=>{let[,n]=t;const r=this.hot.propToCol(n);return Number.isInteger(r)&&-1===e.indexOf(r)&&e.push(r),e},[]);wn(Mn,this).push(...t)}function In(e,t,n){let r=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),r=this.getColumnWidth(t,void 0,!1)),r}function kn(){bn(Cn,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth()}function xn(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.col;if(Number.isInteger(r)){const t=this.hot.toVisualColumn(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);wn(Mn,this).push(...t)}const Dn={horizontal:"horizontal",vertical:"vertical"};function Hn(e,t,n){let r,i,s;return t[0]===e[0]&&t[1]<e[1]?(s="left",r=n(t[0],t[1]),i=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(s="right",r=n(t[0],e[3]+1),i=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(s="up",r=n(t[0],t[1]),i=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(s="down",r=n(e[2]+1,t[1]),i=n(t[2],t[3])),r&&r.normalize(),i&&i.normalize(),{directionOfDrag:s,startOfDragCoords:r,endOfDragCoords:i}}function Pn(e){const t={};return!0===e?(t.directions=Object.keys(Dn),t.autoInsertRow=!0):Object(o["isObject"])(e)?(Object(d["isDefined"])(e.autoInsertRow)?e.direction===Dn.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,Object(d["isDefined"])(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(Dn)):"string"===typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}function jn(e,t){Fn(e,t),t.add(e)}function Fn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yn(e,t,n){return(t=Un(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Un(e){var t=Vn(e,"string");return"symbol"==typeof t?t:t+""}function Vn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Bn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("modifyAutofillRange"),pe["a"].getSingleton().register("beforeAutofill"),pe["a"].getSingleton().register("afterAutofill");const Wn="autofill",zn=20,Gn=["fillHandle"],Kn="insert_row_below",Xn=200;var $n=new WeakSet;class qn extends tn["a"]{constructor(){super(...arguments),jn(this,$n),Yn(this,"addingStarted",!1),Yn(this,"mouseDownOnCellCorner",!1),Yn(this,"mouseDragOutside",!1),Yn(this,"handleDraggedCells",0),Yn(this,"directions",[]),Yn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return Wn}static get PLUGIN_PRIORITY(){return zn}static get SETTING_KEYS(){return[Wn,...Gn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",e=>Bn($n,this,Qn).call(this,e)),this.addHook("afterOnCellCornerDblClick",e=>Bn($n,this,Jn).call(this,e)),this.addHook("beforeOnCellMouseOver",(e,t)=>Bn($n,this,Zn).call(this,t)),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.clearMappedSettings(),super.disablePlugin()}getSelectionData(){const e=this.hot.getSelectedRangeLast(),{row:t,col:n}=e.getTopStartCorner(),{row:r,col:i}=e.getBottomEndCorner(),s=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:r,endCol:i}]),o=[],a=[],l=[];return Object(h["arrayEach"])(s,e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===o.indexOf(t)&&o.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)}),Object(h["arrayEach"])(o,e=>{const t=[];Object(h["arrayEach"])(a,n=>{t.push(this.hot.getCopyableData(e,n))}),l.push(t)}),l}fillIn(){if(this.hot.selection.highlight.getFill().isEmpty())return!1;const[e,t,n,r]=this.hot.selection.highlight.getFill().getVisualCorners(),i=this.hot.getSelectedRangeLast(),s=i.getTopStartCorner(),o=i.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[s.row,s.col,o.row,o.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(s.row,e),Math.min(s.col,t),Math.max(o.row,n),Math.max(o.col,r)],a),{directionOfDrag:u,startOfDragCoords:c,endOfDragCoords:h}=Hn(a,l,(e,t)=>this.hot._createCellCoords(e,t));if(c&&c.row>-1&&c.col>-1){const e=this.getSelectionData(),t=i.clone(),n=this.hot._createCellRange(c,c,h),r=this.hot.runHooks("beforeAutofill",e,t,n,u);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let s=r;const o=r;if(["up","left"].indexOf(u)>-1&&(1!==o.length||0!==o[0].length))if(s=[],"up"===u){const e=h.row-c.row+1,t=e%o.length;for(let n=0;n<e;n++)s.push(o[(n+(o.length-t))%o.length])}else{const e=h.col-c.col+1,t=e%o[0].length;for(let n=0;n<o.length;n++){s.push([]);for(let r=0;r<e;r++)s[n].push(o[n][(r+(o[n].length-t))%o[n].length])}}this.hot.populateFromArray(c.row,c.col,s,h.row,h.col,this.pluginName+".fill",null),this.setSelection(l),this.hot.runHooks("afterAutofill",s,t,n,u),this.hot.render()}else this.hot.view.render();return!0}reduceSelectionAreaIfNeeded(e){return e.row<0&&(e.row=0),e.col<0&&(e.col=0),e}getCoordsOfDragAndDropBorders(e){const t=this.hot.getSelectedRangeLast(),n=t.getBottomEndCorner();let r=e;if(this.directions.includes(Dn.vertical)&&this.directions.includes(Dn.horizontal)){const i=t.getTopStartCorner();(n.col<=e.col||i.col>=e.col)&&(r=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||i.row>e.row)&&(r=this.hot._createCellCoords(e.row,n.col))}else if(this.directions.includes(Dn.vertical))r=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(Dn.horizontal))return;r=this.hot._createCellCoords(n.row,e.col)}return this.reduceSelectionAreaIfNeeded(r)}showBorder(e){const t=this.getCoordsOfDragAndDropBorders(e);t&&this.redrawBorders(t)}addRow(){this.hot._registerTimeout(()=>{this.hot.alter(Kn,void 0,1,this.pluginName+".fill"),this.addingStarted=!1},Xn)}addNewRowIfNeeded(){if(!this.hot.selection.highlight.getFill().isEmpty()&&!1===this.addingStarted&&this.autoInsertRow){const e=this.hot.getSelectedLast(),t=this.hot.selection.highlight.getFill().getVisualCorners(),n=this.hot.countRows();e[2]<n-1&&t[2]===n-1&&(this.addingStarted=!0,this.addRow())}}getIndexOfLastAdjacentFilledInRow(e){const t=this.hot.getData(),n=this.hot.countRows();let r;for(let i=e[2]+1;i<n;i++){for(let r=e[1];r<=e[3];r++){const e=t[i][r];if(!Object(d["isEmpty"])(e))return-1}const n=t[i][e[1]-1],s=t[i][e[3]+1];Object(d["isEmpty"])(n)&&Object(d["isEmpty"])(s)||(r=i)}return r}addSelectionFromStartAreaToSpecificRowIndex(e,t){this.hot.selection.highlight.getFill().clear().add(this.hot._createCellCoords(e[0],e[1])).add(this.hot._createCellCoords(t,e[3])).commit()}setSelection(e){this.hot.selectCell(...Object(h["arrayMap"])(e,e=>Math.max(e,0)),!1,!1)}selectAdjacent(){const e=this.hot.getSelectedLast(),t=this.getIndexOfLastAdjacentFilledInRow(e);return-1!==t&&void 0!==t&&(this.addSelectionFromStartAreaToSpecificRowIndex(e,t),!0)}resetSelectionOfDraggedArea(){this.handleDraggedCells=0,this.hot.selection.highlight.getFill().clear()}redrawBorders(e){this.hot.selection.highlight.getFill().clear().add(this.hot.getSelectedRangeLast().from).add(this.hot.getSelectedRangeLast().to).add(e).commit(),this.hot.view.render()}getIfMouseWasDraggedOutside(e){const{documentElement:t}=this.hot.rootDocument,n=Object(i["offset"])(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+Object(i["outerHeight"])(this.hot.table),r=Object(i["offset"])(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+Object(i["outerWidth"])(this.hot.table);return e.clientY>n&&e.clientX<=r}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",()=>Bn($n,this,er).call(this)),this.eventManager.addEventListener(e,"mousemove",e=>Bn($n,this,tr).call(this,e))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=Pn(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function Jn(){const e=this.selectAdjacent();e&&this.fillIn()}function Qn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function Zn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function er(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function tr(e){const t=this.getIfMouseWasDraggedOutside(e);!1===this.addingStarted&&this.handleDraggedCells>0&&t?(this.mouseDragOutside=!0,this.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&this.autoInsertRow&&this.addRow()}function nr(e,t){ir(e,t),t.add(e)}function rr(e,t,n){ir(e,t),t.set(e,n)}function ir(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function sr(e,t,n){return(t=or(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function or(e){var t=ar(e,"string");return"symbol"==typeof t?t:t+""}function ar(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function lr(e,t,n){return e.set(cr(e,t),n),n}function ur(e,t){return e.get(cr(e,t))}function cr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const hr="autoRowSize",dr=40,mr="autoRowSize";var fr=new WeakMap,pr=new WeakSet;class gr extends tn["a"]{static get PLUGIN_KEY(){return hr}static get PLUGIN_PRIORITY(){return dr}static get SETTING_KEYS(){return!0}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){super(e),nr(this,pr),sr(this,"headerHeight",null),sr(this,"ghostTable",new rn["a"](this.hot)),sr(this,"samplesGenerator",new un((e,t)=>{const n=this.hot.toPhysicalRow(e),r=this.hot.toPhysicalColumn(t);if(this.hot.rowIndexMapper.isHidden(n)||this.hot.columnIndexMapper.isHidden(r))return!1;if(e>=0&&t>=0){const n=this.hot.getCellMeta(e,t);if(n.hidden)return!1}let i;return e>=0?i=this.hot.getDataAtCell(e,t):-1===e&&(i=this.hot.getColHeader(t)),{value:i}})),sr(this,"inProgress",!1),sr(this,"measuredRows",0),sr(this,"rowHeightsMap",new hn["a"]),rr(this,fr,[]),this.hot.rowIndexMapper.registerMap(mr,this.rowHeightsMap),this.addHook("beforeRowResize",(e,t,n)=>cr(pr,this,br).call(this,e,t,n))}isEnabled(){const e=this.hot.getSettings()[hr];return!0===e||Object(o["isObject"])(e)}enablePlugin(){var e=this;this.enabled||(this.setSamplingOptions(),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cr(pr,e,vr).call(e,...n)})),this.addHook("beforeChangeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cr(pr,e,_r).call(e,...n)})),this.addHook("beforeColumnResize",()=>this.recalculateAllRowsHeight()),this.addHook("afterFormulasValuesUpdate",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return cr(pr,e,Er).call(e,...n)})),this.addHook("beforeRender",()=>cr(pr,this,wr).call(this)),this.addHook("modifyRowHeight",(e,t)=>this.getRowHeight(t,e)),this.addHook("init",()=>cr(pr,this,Sr).call(this)),this.addHook("modifyColumnHeaderHeight",()=>this.getColumnHeaderHeight()),super.enablePlugin())}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",(e,t,n)=>cr(pr,this,br).call(this,e,t,n))}calculateVisibleRowsHeight(){if(!this.hot.countCols())return;const e=this.getFirstVisibleRow(),t=this.getLastVisibleRow();if(-1===e||-1===t)return;const n=this.hot.renderCall;this.calculateRowsHeight({from:e,to:t},void 0,n)}calculateRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countRows()-1},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{from:0,to:this.hot.countCols()-1},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r="number"===typeof e?{from:e,to:e}:e,i="number"===typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,i);this.ghostTable.addColumnHeadersRow(e.get(-1))}Object(it["rangeEach"])(r.from,r.to,e=>{let t=this.hot.toPhysicalRow(e);if(null===t&&(t=e),n||null===this.rowHeightsMap.getValueAtIndex(t)){const t=this.samplesGenerator.generateRowSamples(e,i);t.forEach((e,t)=>this.ghostTable.addRow(t,e))}}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{e<0?this.headerHeight=t:this.rowHeightsMap.setValueAtIndex(this.hot.toPhysicalRow(e),t)})},!0),this.measuredRows=r.to+1,this.ghostTable.clean())}calculateAllRowsHeight(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{from:0,to:this.hot.countCols()-1},t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=0;const r=this.hot.countRows()-1;let i=null;this.inProgress=!0;const s=()=>{if(!this.hot)return Object(nn["cancelAnimationFrame"])(i),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+gr.CALCULATION_STEP,r)},e,t),n=n+gr.CALCULATION_STEP+1,n<r?i=Object(nn["requestAnimationFrame"])(s):(Object(nn["cancelAnimationFrame"])(i),this.inProgress=!1,this.hot.view.adjustElementsSize(),this.hot.view._wt.wtOverlays.inlineStartOverlay.needFullRender&&this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.draw())},o=this.getSyncCalculationLimit();o>=0&&(this.calculateRowsHeight({from:0,to:o},e,t),n=o+1),n<r?s():(this.inProgress=!1,this.hot.view.adjustElementsSize())}setSamplingOptions(){const e=this.hot.getSettings()[hr],t=e&&Object(o["hasOwnProperty"])(e,"samplingRatio")?e.samplingRatio:void 0,n=e&&Object(o["hasOwnProperty"])(e,"allowSampleDuplicates")?e.allowSampleDuplicates:void 0;t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),n&&this.samplesGenerator.setAllowDuplicates(n)}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[hr];let t=gr.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return Object(o["isObject"])(e)&&(t=e.syncLimit,Object(m["isPercentValue"])(t)?t=Object(it["valueAccordingPercent"])(n,t):t>>=0),Math.min(t,n)}getRowHeight(e,t){const n=e<0?this.headerHeight:this.rowHeightsMap.getValueAtIndex(this.hot.toPhysicalRow(e));let r=t;return null!==n&&n>(t||0)&&(r=n),r}getColumnHeaderHeight(){return this.headerHeight}getFirstVisibleRow(){var e;return null!==(e=this.hot.view.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.view.getLastRenderedVisibleRow())&&void 0!==e?e:-1}clearCache(e){this.headerHeight=null,Array.isArray(e)?this.hot.batchExecution(()=>{e.forEach(e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0):this.rowHeightsMap.clear()}clearCacheByRange(e){const{from:t,to:n}="number"===typeof e?{from:e,to:e}:e;this.hot.batchExecution(()=>{Object(it["rangeEach"])(Math.min(t,n),Math.max(t,n),e=>{this.rowHeightsMap.setValueAtIndex(e,null)})},!0)}isNeedRecalculate(){return!!this.rowHeightsMap.getValues().slice(0,this.measuredRows).filter(e=>null===e).length}destroy(){this.ghostTable.clean(),super.destroy()}}function yr(e){const t={from:0,to:this.hot.countCols()-1};e.forEach(e=>{const n=this.samplesGenerator.generateRowSamples(e,t);n.forEach((e,t)=>this.ghostTable.addRow(t,e))}),this.ghostTable.rows.length&&(this.hot.batchExecution(()=>{this.ghostTable.getHeights((e,t)=>{const n=this.hot.toPhysicalRow(e);this.rowHeightsMap.setValueAtIndex(n,t)})},!0),this.ghostTable.clean())}function wr(){this.calculateVisibleRowsHeight(),this.inProgress||(cr(pr,this,yr).call(this,ur(fr,this)),lr(fr,this,[]))}function br(e,t,n){let r=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),r}function vr(e,t){t||this.recalculateAllRowsHeight()}function _r(e){const t=e.reduce((e,t)=>{let[n]=t;return-1===e.indexOf(n)&&e.push(n),e},[]);ur(fr,this).push(...t)}function Sr(){this.recalculateAllRowsHeight()}function Er(e){const t=e.reduce((e,t)=>{var n;const r=null===(n=t.address)||void 0===n?void 0:n.row;if(Number.isInteger(r)){const t=this.hot.toVisualRow(r);-1===e.indexOf(t)&&e.push(t)}return e},[]);ur(fr,this).push(...t)}var Cr=n("bdd7"),Mr=n("1096"),Tr=n("a73f");const{getListWithInsertedItems:Rr,getListWithRemovedItems:Or}=Object(Cr["a"])("physicallyIndexed");class Nr extends Mr["a"]{constructor(){super(e=>e)}insert(e,t){const n=Object(Tr["b"])(this.indexedValues,t);this.indexedValues=Rr(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Or(this.indexedValues,e);this.indexedValues=Object(Tr["a"])(t,e),super.remove(e)}}var Ar=Nr;const{getListWithInsertedItems:Lr,getListWithRemovedItems:Ir}=Object(Cr["a"])("physicallyIndexed");class kr extends Mr["a"]{constructor(){super(e=>e)}insert(e,t){this.indexedValues=Lr(this.indexedValues,e,t,(e,t)=>this.getNextValue(t)),super.insert(e,t)}remove(e){this.indexedValues=Ir(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}var xr=kr;function Dr(e,t){Hr(e,t),t.add(e)}function Hr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pr(e,t,n){return(t=jr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jr(e){var t=Fr(e,"string");return"symbol"==typeof t?t:t+""}function Fr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Yr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ur="bindRowsWithHeaders",Vr=210,Br="loose",Wr=new Map([["loose",Ar],["strict",xr]]);var zr=new WeakSet;class Gr extends tn["a"]{constructor(){super(...arguments),Dr(this,zr),Pr(this,"headerIndexes",null)}static get PLUGIN_KEY(){return Ur}static get PLUGIN_PRIORITY(){return Vr}isEnabled(){return!!this.hot.getSettings()[Ur]}enablePlugin(){if(this.enabled)return;let e=this.hot.getSettings()[Ur];"string"!==typeof e&&(e=Br);const t=Wr.get(e);this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",e=>Yr(zr,this,Kr).call(this,e)),super.enablePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("bindRowsWithHeaders"),super.disablePlugin()}destroy(){super.destroy()}}function Kr(e){return this.headerIndexes.getValueAtIndex(this.hot.toPhysicalRow(e))}var Xr=n("bd5e");function $r(e,t){Jr(e,t),t.add(e)}function qr(e,t,n){Jr(e,t),t.set(e,n)}function Jr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qr(e,t,n){return(t=Zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zr(e){var t=ei(e,"string");return"symbol"==typeof t?t:t+""}function ei(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ti(e,t){return e.get(ri(e,t))}function ni(e,t,n){return e.set(ri(e,t),n),n}function ri(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ii="collapsibleColumns",si=290,oi=["nestedHeaders"],ai="collapsibleIndicator",li=ii,ui=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var ci=new WeakMap,hi=new WeakSet;class di extends tn["a"]{constructor(){super(...arguments),$r(this,hi),Qr(this,"nestedHeadersPlugin",null),Qr(this,"headerStateManager",null),qr(this,ci,null)}static get PLUGIN_KEY(){return ii}static get PLUGIN_PRIORITY(){return si}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[ii,...oi]}isEnabled(){return!!this.hot.getSettings()[ii]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||Object(Xr["b"])("You need to configure the Nested Headers plugin in order to use collapsible headers."),ni(ci,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",()=>ri(hi,this,pi).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ri(hi,e,gi).call(e,...n)})),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ri(hi,e,mi).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(e,t,n)=>ri(hi,this,fi).call(this,e,t,n)),this.registerShortcuts(),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(this.hot.view){if(!this.nestedHeadersPlugin.detectedOverlappedHeaders){const{collapsibleColumns:e}=this.hot.getSettings();"boolean"===typeof e?this.headerStateManager.mapState(e=>({collapsible:e.origColspan>1})):Array.isArray(e)&&(this.headerStateManager.mapState(()=>({collapsible:!1})),this.headerStateManager.mergeStateWith(e))}super.updatePlugin()}}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),ni(ci,this,null),this.nestedHeadersPlugin=null,this.unregisterShortcuts(),this.clearButtons(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{var e;const{row:t,col:n}=this.hot.getSelectedRangeLast().highlight,{collapsible:r,isCollapsed:i,columnIndex:s}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(r)return i?this.expandSection({row:t,col:s}):this.collapseSection({row:t,col:s}),!1},runOnlyIf:()=>{var e,t;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.isSingle())&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isHeader())},group:li,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(li)}clearButtons(){if(!this.hot.view)return;const e=this.hot.view._wt.getSetting("columnHeaders").length,t=this.hot.view._wt.wtTable.THEAD,n=this.hot.view._wt.wtOverlays.topOverlay.clone.wtTable.THEAD,r=this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay?this.hot.view._wt.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null,i=function(e){e&&e.parentNode.removeChild(e)};Object(it["rangeEach"])(0,e-1,e=>{const s=t.childNodes[e],o=n.childNodes[e],a=r?r.childNodes[e]:null;Object(it["rangeEach"])(0,s.childNodes.length-1,e=>{let t=s.childNodes[e].querySelector("."+ai);i(t),o&&o.childNodes[e]&&(t=o.childNodes[e].querySelector("."+ai),i(t)),r&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector("."+ai),i(t))})},!0)}expandSection(e){this.toggleCollapsibleSection([e],"expand")}collapseSection(e){this.toggleCollapsibleSection([e],"collapse")}toggleAllCollapsibleSections(e){const t=this.headerStateManager.mapNodes(t=>{const{collapsible:n,origColspan:r,headerLevel:i,columnIndex:s,isCollapsed:o}=t;if(!0===n&&r>1&&(o&&"expand"===e||!o&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(i),col:s}});this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!ui.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=Object(h["arrayFilter"])(e,e=>{let{row:t}=e;return t<0});let r=n.length>0;Object(h["arrayEach"])(n,e=>{var n;let{row:i,col:s}=e;const{collapsible:o,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(i,s))&&void 0!==n?n:{};if(!o||a&&"collapse"===t||!a&&"expand"===t)return r=!1,!1});const i=[],s=[];r&&Object(h["arrayEach"])(n,e=>{let{row:n,col:r}=e;const{colspanCompensation:o,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,n,r);o>0&&(s.push(...a),i.push(l))});const o=this.getCollapsedColumns();let a=[];"collapse"===t?a=Object(h["arrayUnique"])([...o,...s]):"expand"===t&&(a=Object(h["arrayFilter"])(o,e=>!s.includes(e)));const l=ui.get(t),u=this.hot.runHooks(l.beforeHook,o,a,r);if(!1===u)return void Object(h["arrayEach"])(i,e=>{e()});this.hot.batchExecution(()=>{Object(h["arrayEach"])(s,e=>{ti(ci,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)})},!0);const c=this.getCollapsedColumns().length!==o.length,d=this.hot.getSelectedRangeLast();if("collapse"===t&&c&&d){const{row:e,col:t}=d.highlight,n=this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t);if(n&&s.includes(t)){const n=e>=0?this.hot.rowIndexMapper.getNearestNotHiddenIndex(e,1,!0):e,r=t>=0?this.hot.columnIndexMapper.getNearestNotHiddenIndex(t,1,!0):t;null!==n&&null!==r&&this.hot.selectCell(n,r)}}this.hot.runHooks(l.afterHook,o,a,r,c),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return ti(ci,this).getHiddenIndexes()}destroy(){ni(ci,this,null),super.destroy()}}function mi(e,t,n){var r;const{collapsible:s,origColspan:o,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==r?r:{},l=s&&o>1&&e>=this.hot.getSettings().fixedColumnsStart,u=this.hot.getSettings().ariaTags;let c=t.querySelector("."+ai);var h;(Object(i["removeAttribute"])(t,[Object(y["k"])("")[0]]),l)?(c||(c=this.hot.rootDocument.createElement("div"),Object(i["addClass"])(c,ai),t.querySelector("div:first-child").appendChild(c)),Object(i["removeClass"])(c,["collapsed","expanded"]),a?(Object(i["addClass"])(c,"collapsed"),Object(i["fastInnerText"])(c,"+"),u&&Object(i["setAttribute"])(t,...Object(y["k"])(!1))):(Object(i["addClass"])(c,"expanded"),Object(i["fastInnerText"])(c,"-"),u&&Object(i["setAttribute"])(t,...Object(y["k"])(!0))),u&&Object(i["setAttribute"])(c,...Object(y["n"])())):null===(h=c)||void 0===h||h.remove()}function fi(e,t){Object(i["hasClass"])(e.target,ai)&&(Object(i["hasClass"])(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):Object(i["hasClass"])(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),Object(s["stopImmediatePropagation"])(e))}function pi(){this.updatePlugin()}function gi(e,t){t||this.updatePlugin()}var yi=n("97b9"),wi=n("1b1a"),bi=n("9056");function vi(e,t,n){return(t=_i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _i(e){var t=Si(e,"string");return"symbol"==typeof t?t:t+""}function Si(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Ei=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"],Ci=!1,Mi=!0,Ti=!0;class Ri{constructor(e,t){vi(this,"hot",void 0),vi(this,"sortingStates",new bi["a"]),vi(this,"sortEmptyCells",Ci),vi(this,"indicator",Mi),vi(this,"headerAction",Ti),vi(this,"compareFunctionFactory",void 0),vi(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){Object(o["isObject"])(e)&&Object(o["objectEach"])(e,(e,t)=>{Ei.includes(t)&&(this[t]=e)})}getAllColumnsProperties(){const e={sortEmptyCells:this.sortEmptyCells,indicator:this.indicator,headerAction:this.headerAction};return"function"===typeof this.compareFunctionFactory&&(e.compareFunctionFactory=this.compareFunctionFactory),e}getSortOrderOfColumn(e){var t;return null===(t=this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))||void 0===t?void 0:t.sortOrder}getIndexOfColumnInSortQueue(e){return e=this.hot.toPhysicalColumn(e),this.sortingStates.getEntries().findIndex(t=>{let[n]=t;return n===e})}getNumberOfSortedColumns(){return this.sortingStates.getLength()}isListOfSortedColumnsEmpty(){return 0===this.getNumberOfSortedColumns()}isColumnSorted(e){return Object(o["isObject"])(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){if(null===this.sortingStates)return[];const e=this.sortingStates.getEntries();return e.map(e=>{let[t,n]=e;return{column:this.hot.toVisualColumn(t),...n}})}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t))return{column:e,sortOrder:t}}setSortStates(e){this.sortingStates.clear();for(let t=0;t<e.length;t+=1)this.sortingStates.setValueAtIndex(this.hot.toPhysicalColumn(e[t].column),{sortOrder:e[t].sortOrder})}destroy(){this.hot.columnIndexMapper.unregisterMap(this.mapName),this.sortingStates=null}}n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7");function Oi(e,t,n){const r=t.locale;return function(t,i){const{sortEmptyCells:s}=n;return"string"===typeof t&&(t=t.toLocaleLowerCase(r)),"string"===typeof i&&(i=i.toLocaleLowerCase(r)),t===i?zi:Object(d["isEmpty"])(t)?Object(d["isEmpty"])(i)?zi:s&&"asc"===e?Gi:Ki:Object(d["isEmpty"])(i)?s&&"asc"===e?Ki:Gi:isNaN(t)&&!isNaN(i)?"asc"===e?Ki:Gi:!isNaN(t)&&isNaN(i)?"asc"===e?Gi:Ki:(isNaN(t)||isNaN(i)||(t=parseFloat(t),i=parseFloat(i)),t<i?"asc"===e?Gi:Ki:t>i?"asc"===e?Ki:Gi:zi)}}const Ni="default";function Ai(e,t,n){return function(t,r){const i=parseFloat(t),s=parseFloat(r),{sortEmptyCells:o}=n;if(i===s||isNaN(i)&&isNaN(s))return zi;if(o){if(Object(d["isEmpty"])(t))return"asc"===e?Gi:Ki;if(Object(d["isEmpty"])(r))return"asc"===e?Ki:Gi}return isNaN(i)?Ki:isNaN(s)?Gi:i<s?"asc"===e?Gi:Ki:i>s?"asc"===e?Ki:Gi:zi}}const Li="numeric";function Ii(e,t,n){const r=t.checkedTemplate,i=t.uncheckedTemplate,{sortEmptyCells:s}=n;return function(o,a){const l=Object(d["isEmpty"])(o),u=Object(d["isEmpty"])(a),c=l?i:o,h=u?i:a,m=c===i||c===r,f=h===i||h===r;if(!1===s){if(l&&!1===u)return Ki;if(!1===l&&u)return Gi}return!1===m&&f?"asc"===e?Gi:Ki:m&&!1===f?"asc"===e?Ki:Gi:!1===m&&!1===f?Oi(e,t,n)(o,a):c===i&&h===r?"asc"===e?Gi:Ki:c===r&&h===i?"asc"===e?Ki:Gi:zi}}const ki="checkbox";function xi(e,t,n){return is(e,t.dateFormat,n)}const Di="date";function Hi(e,t,n){return is(e,t.timeFormat,n)}const Pi="time";var ji=n("9acd");const{register:Fi,getItem:Yi,hasItem:Ui}=Object(ji["a"])("sorting.compareFunctionFactory"),{register:Vi,getItem:Bi}=Object(ji["a"])("sorting.mainSortComparator");function Wi(e){return Ui(e)?Yi(e):Yi(Ni)}Fi(ki,Ii),Fi(Di,xi),Fi(Ni,Oi),Fi(Li,Ai),Fi(Pi,Hi);const zi=0,Gi=-1,Ki=1;function Xi(e,t){const n=Bi(t);for(var r=arguments.length,i=new Array(r>2?r-2:0),s=2;s<r;s++)i[s-2]=arguments[s];e.sort(n(...i))}const $i="asc",qi="desc",Ji="colHeader";function Qi(e){if(!1===Object(o["isObject"])(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[$i,qi].includes(n)}function Zi(e){if(e.some(e=>!1===Qi(e)))return!1;const t=e.map(e=>{let{column:t}=e;return t});return new Set(t).size===t.length}function es(e){if(e!==qi)return e===$i?qi:$i}function ts(e){const t=e.querySelector("."+Ji);return t}function ns(e,t){if(e<0||!t.parentNode)return!1;const n=t.parentNode.parentNode.childNodes,r=Array.from(n).indexOf(t.parentNode)-n.length;return-1===r}function rs(e,t,n){return-1===e&&t>=0&&!1===Object(s["isRightClick"])(n)}function is(e,t,n){return function(r,i){const{sortEmptyCells:s}=n;if(r===i)return zi;if(Object(d["isEmpty"])(r))return Object(d["isEmpty"])(i)?zi:s&&"asc"===e?Gi:Ki;if(Object(d["isEmpty"])(i))return s&&"asc"===e?Ki:Gi;const o=I()(r,t),a=I()(i,t);return o.isValid()?a.isValid()?a.isAfter(o)?"asc"===e?Gi:Ki:a.isBefore(o)?"asc"===e?Ki:Gi:zi:Gi:Ki}}const ss="ascending",os="descending",as="indicatorDisabled",ls="columnSorting",us="sortAction",cs=new Map([[$i,ss],[qi,os]]);function hs(e,t,n,r){const i=[ls];if(r&&i.push(us),!1===n)return i.push(as),i;const s=e.getSortOrderOfColumn(t);return Object(d["isDefined"])(s)&&i.push(cs.get(s)),i}function ds(){return Array.from(cs.values()).concat(us,as,ls)}function ms(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function(n){const r=e[n],o=t[n],a=i[n],l=s[n],u=o.columnSorting,c=u.compareFunctionFactory?u.compareFunctionFactory:Wi(o.type),h=c(r,o,u)(a,l);return h}(0)}}function fs(e,t){ps(e,t),t.add(e)}function ps(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function gs(e,t,n){return(t=ys(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ys(e){var t=ws(e,"string");return"symbol"==typeof t?t:t+""}function ws(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function bs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const vs="columnSorting",_s=50,Ss="append",Es="replace",Cs=vs;Vi(vs,ms),pe["a"].getSingleton().register("beforeColumnSort"),pe["a"].getSingleton().register("afterColumnSort");var Ms=new WeakSet;class Ts extends tn["a"]{constructor(){super(...arguments),fs(this,Ms),gs(this,"columnStatesManager",null),gs(this,"columnMetaCache",null),gs(this,"pluginKey",vs),gs(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return vs}static get PLUGIN_PRIORITY(){return _s}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e=this;this.enabled||(this.columnStatesManager=new Ri(this.hot,this.pluginKey+".sortingStates"),this.columnMetaCache=new hn["a"](e=>{let t=this.hot.toVisualColumn(e);return null===t&&(t=e),this.getMergedPluginSettings(t)}),this.hot.columnIndexMapper.registerMap(this.pluginKey+".columnMeta",this.columnMetaCache),this.addHook("afterGetColHeader",(e,t)=>bs(Ms,this,Os).call(this,e,t)),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bs(Ms,e,As).call(e,...n)})),this.addHook("afterOnCellMouseDown",(e,t)=>this.onAfterOnCellMouseDown(e,t)),this.addHook("afterInit",()=>bs(Ms,this,Rs).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return bs(Ms,e,Ns).call(e,...n)})),this.hot.view&&bs(Ms,this,Rs).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=ts(t);!1!==ns(e,t)&&null!==n&&this.updateHeaderClasses(n)};this.hot.addHook("afterGetColHeader",e),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("afterGetColHeader",e)}),this.hot.batchExecution(()=>{null!==this.indexesSequenceCache&&(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginKey),this.indexesSequenceCache=null)},!0),this.hot.columnIndexMapper.unregisterMap(this.pluginKey+".columnMeta"),this.columnStatesManager.destroy(),this.columnMetaCache=null,this.columnStatesManager=null,this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return this.sort(this.getColumnNextConfig(e.col)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.row&&n.col>=0},relativeToGroup:a["a"],position:"before",group:Cs})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Cs)}sort(e){const t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),r=this.areValidSortConfigs(n),i=this.hot.runHooks("beforeColumnSort",t,n,r);!1!==i&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new wi["a"]),this.indexesSequenceCache.setValues(this.hot.rowIndexMapper.getIndexesSequence())),r&&(this.columnStatesManager.setSortStates(n),this.sortByPresetSortStates(n),this.saveAllSortSettings(n)),this.hot.runHooks("afterColumnSort",t,r?n:t,r),r&&(this.hot.render(),this.hot.forceFullRender=!1,this.hot.view.render()))}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return Object(d["isDefined"])(e)?this.columnStatesManager.getColumnSortState(e):this.columnStatesManager.getSortStates()}setSortConfig(e){const t=this.getNormalizedSortConfigs(e);this.areValidSortConfigs(t)&&this.columnStatesManager.setSortStates(t)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e.slice(0,1):[e]}areValidSortConfigs(e){const t=this.hot.countCols();return Zi(e)&&e.every(e=>{let{column:n}=e;return n<=t&&n>=0})}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties(),n=e=>{let{column:t,...n}=e;return{column:this.hot.toPhysicalColumn(t),...n}};t.initialConfig=Object(h["arrayMap"])(e,n),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value,n=e=>{let{column:t,...n}=e;return{column:this.hot.toVisualColumn(t),...n}};return Object(d["isDefined"])(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=Object(h["arrayMap"])(t.initialConfig,n)),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if(Object(d["isDefined"])(t)){const n=es(t);return Object(d["isDefined"])(n)?{column:e,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<n)return{column:e,sortOrder:es()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ss;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),r=-1!==n,i=this.getSortConfig(),s=this.getColumnNextConfig(e);if(r){if(Object(d["isUndefined"])(s))return[...i.slice(0,n),...i.slice(n+1)];if(t===Ss)return[...i.slice(0,n),...i.slice(n+1),s];if(t===Es)return[...i.slice(0,n),s,...i.slice(n+1)]}return Object(d["isDefined"])(s)?i.concat(s):i}getPluginColumnConfig(e){if(Object(o["isObject"])(e)){const t=e[this.pluginKey];if(Object(o["isObject"])(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),i=Object.getPrototypeOf(r);return Array.isArray(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns[e])):Object(yi["isFunction"])(i.columns)?Object.assign(n,t,this.getPluginColumnConfig(i.columns(e))):Object.assign(n,t)}getFirstCellSettings(e){const t=this.hot.getCellMeta(0,e),n=Object.create(t);return n[this.pluginKey]=this.columnMetaCache.getValueAtIndex(this.hot.toPhysicalColumn(e)),n}getNumberOfRowsToSort(e){const t=this.hot.getSettings();return t.maxRows<=e?t.maxRows:e-t.minSpareRows}sortByPresetSortStates(e){if(this.hot.rowIndexMapper.setIndexesSequence(this.indexesSequenceCache.getValues()),0===e.length)return;const t=[],n=this.hot.countRows(),r=t=>Object(h["arrayMap"])(e,e=>this.hot.getDataAtCell(t,e.column));for(let l=0;l<this.getNumberOfRowsToSort(n);l+=1)t.push([this.hot.toPhysicalRow(l)].concat(r(l)));const i=Object(h["arrayMap"])(t,e=>e[0]);Xi(t,this.pluginKey,Object(h["arrayMap"])(e,e=>e.sortOrder),Object(h["arrayMap"])(e,e=>this.getFirstCellSettings(e.column)));for(let l=t.length;l<n;l+=1)t.push([l].concat(r(l)));const s=Object(h["arrayMap"])(t,e=>e[0]),o=new Map(Object(h["arrayMap"])(i,(e,t)=>[e,s[t]])),a=Object(h["arrayMap"])(this.hot.rowIndexMapper.getIndexesSequence(),e=>o.has(e)?o.get(e):e);this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if(Object(o["isObject"])(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||Object(o["isObject"])(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if(Object(i["removeClass"])(e,ds(e)),!1!==this.enabled){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];Object(i["addClass"])(e,hs(...n))}}onUpdateSettings(e){super.onUpdateSettings(),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),Object(d["isDefined"])(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){const n=this.getFirstCellSettings(t)[this.pluginKey],r=n.headerAction;return r&&Object(i["hasClass"])(e.target,Ji)}onAfterOnCellMouseDown(e,t){if(!1!==rs(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)){this.hot.getShortcutManager().isCtrlPressed()&&(this.hot.deselectCell(),this.hot.selectColumns(t.col));const e=this.hot.getActiveEditor(),n=this.getColumnNextConfig(t.col);null!==e&&void 0!==e&&e.isOpened()&&this.hot.getCellValidator(e.row,e.col)?this.hot.addHookOnce("postAfterValidate",()=>{this.sort(n)}):this.sort(n)}}destroy(){var e;null===(e=this.columnStatesManager)||void 0===e||e.destroy(),super.destroy()}}function Rs(){const e=this.getAllSavedSortSettings();if(Object(o["isObject"])(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function Os(e,t){const n=ts(t);if(!1===ns(e,t)||null===n)return;const r=this.getFirstCellSettings(e)[this.pluginKey],s=r.indicator,o=r.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,s,o),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);Object(i["setAttribute"])(t,...Object(y["K"])(n?n+"ending":"none"))}}function Ns(e){!0===e&&this.hot.view&&bs(Ms,this,Rs).call(this)}function As(e,t,n,r){!1!==rs(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(r.column=!0)}function Ls(e,t,n){return(t=Is(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Is(e){var t=ks(e,"string");return"symbol"==typeof t?t:t+""}function ks(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class xs{constructor(e,t){Ls(this,"plugin",void 0),Ls(this,"hot",void 0),Ls(this,"endpoints",[]),Ls(this,"settings",void 0),Ls(this,"settingsType","array"),Ls(this,"currentEndpoint",null),Ls(this,"cellsToSetCache",[]),this.plugin=e,this.hot=this.plugin.hot,this.settings=t}initEndpoints(){this.endpoints=this.parseSettings(),this.refreshAllEndpoints()}getEndpoint(e){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings)[e]:this.endpoints[e]}getAllEndpoints(){return"function"===this.settingsType?this.fillMissingEndpointData(this.settings):this.endpoints}fillMissingEndpointData(e){return this.parseSettings(e.call(this))}parseSettings(e){const t=[];let n=e;if(n||"function"!==typeof this.settings)return n||(n=this.settings),Object(h["arrayEach"])(n,e=>{const n={};this.assignSetting(e,n,"ranges",[[0,this.hot.countRows()-1]]),this.assignSetting(e,n,"reversedRowCoords",!1),this.assignSetting(e,n,"destinationRow",new Error("\n You must provide a destination row for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"destinationColumn",new Error("\n You must provide a destination column for the Column Summary plugin in order to work properly!\n ")),this.assignSetting(e,n,"sourceColumn",e.destinationColumn),this.assignSetting(e,n,"type","sum"),this.assignSetting(e,n,"forceNumeric",!1),this.assignSetting(e,n,"suppressDataTypeErrors",!0),this.assignSetting(e,n,"customFunction",null),this.assignSetting(e,n,"readOnly",!0),this.assignSetting(e,n,"roundFloat",!1),t.push(n)}),t;this.settingsType="function"}assignSetting(e,t,n,r){if("ranges"!==n||void 0!==e[n]){if("ranges"!==n||0!==e[n].length)if(void 0===e[n]){if(r instanceof Error)throw r;t[n]=r}else"destinationRow"===n&&t.reversedRowCoords?t[n]=this.hot.countRows()-e[n]-1:t[n]=e[n]}else t[n]=r}resetSetupBeforeStructureAlteration(e,t,n){if("function"!==this.settingsType)return;const r=e.indexOf("row")>-1?"row":"col",i=this.getAllEndpoints();Object(h["arrayEach"])(i,i=>{"row"===r&&i.destinationRow>=t&&("insert_row"===e?i.alterRowOffset=n:"remove_row"===e&&(i.alterRowOffset=-1*n)),"col"===r&&i.destinationColumn>=t&&("insert_col"===e?i.alterColumnOffset=n:"remove_col"===e&&(i.alterColumnOffset=-1*n))}),this.resetAllEndpoints(i,!1)}resetSetupAfterStructureAlteration(e,t,n,r,i){let s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];if("function"===this.settingsType){const e=()=>(this.hot.removeHook("beforeViewRender",e),this.refreshAllEndpoints());return void this.hot.addHookOnce("beforeViewRender",e)}const o=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),u=0===e.indexOf("move_row"),c=t;Object(h["arrayEach"])(l,e=>{"row"===o&&e.destinationRow>=c&&(e.alterRowOffset=a*n),"col"===o&&e.destinationColumn>=c&&(e.alterColumnOffset=a*n)}),this.resetAllEndpoints(l,!u),u?Object(h["arrayEach"])(l,e=>{this.extendEndpointRanges(e,c,r[0],r.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)}):Object(h["arrayEach"])(l,e=>{this.shiftEndpointCoordinates(e,c)}),s&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,r){Object(h["arrayEach"])(e.ranges,e=>{e[1]&&(t>=e[0]&&t<=e[1]?n>e[1]?e[1]+=r:n<e[0]&&(e[0]-=r):n>=e[0]&&n<=e[1]&&(e[1]-=r,t<=e[0]&&(e[0]+=1,e[1]+=1)))})}recreatePhysicalRanges(e){const t=e.ranges,n=[],r=[];Object(h["arrayEach"])(t,e=>{const t=[];if(e[1])for(let n=e[0];n<=e[1];n++)t.push(this.hot.toPhysicalRow(n));else t.push(this.hot.toPhysicalRow(e[0]));r.push(t)}),Object(h["arrayEach"])(r,e=>{let t=[];Object(h["arrayEach"])(e,(r,i)=>{0===i?t.push(r):e[i]!==e[i-1]+1&&(t.push(e[i-1]),n.push(t),t=[],t.push(r)),i===e.length-1&&(t.push(r),n.push(t))})}),e.ranges=n}shiftEndpointCoordinates(e,t){e.alterRowOffset&&0!==e.alterRowOffset?(e.destinationRow+=e.alterRowOffset||0,Object(h["arrayEach"])(e.ranges,n=>{Object(h["arrayEach"])(n,(r,i)=>{r>=t&&(n[i]+=e.alterRowOffset||0)})})):e.alterColumnOffset&&0!==e.alterColumnOffset&&(e.destinationColumn+=e.alterColumnOffset||0,e.sourceColumn+=e.alterColumnOffset||0)}resetAllEndpoints(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getAllEndpoints(),t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.some(e=>{const t=e.alterRowOffset||0,n=e.alterColumnOffset||0;return e.destinationRow+t>=this.hot.countRows()||e.destinationColumn+n>=this.hot.countCols()});n||(this.cellsToSetCache=[],Object(h["arrayEach"])(e,e=>{this.resetEndpointValue(e,t)}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],Object(h["arrayEach"])(this.getAllEndpoints(),e=>{this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e,"init")}),this.currentEndpoint=null,this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshChangedEndpoints(e){const t=[];this.cellsToSetCache=[],Object(h["arrayEach"])(e,(e,n,r)=>{""+(e[2]||"")!==""+e[3]&&Object(h["arrayEach"])(this.getAllEndpoints(),(e,i)=>{this.hot.propToCol(r[n][1])===e.sourceColumn&&-1===t.indexOf(i)&&t.push(i)})}),Object(h["arrayEach"])(t,e=>{this.refreshEndpoint(this.getEndpoint(e))}),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[]}refreshCellMetas(){this.endpoints.forEach(e=>{const t=this.hot.toVisualRow(e.destinationRow);if(null!==t){const n=this.hot.getCellMeta(t,e.destinationColumn);n.readOnly=e.readOnly,n.className="columnSummaryResult"}})}refreshEndpoint(e){this.currentEndpoint=e,this.plugin.calculate(e),this.setEndpointValue(e),this.currentEndpoint=null}resetEndpointValue(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=e.alterRowOffset||0,r=e.alterColumnOffset||0;this.cellsToSetCache.push([this.hot.toVisualRow(e.destinationRow+(t?n:0)),this.hot.toVisualColumn(e.destinationColumn+(t?r:0)),""])}setEndpointValue(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.hot.toVisualRow(e.destinationRow);if(e.destinationRow>=this.hot.countRows()||e.destinationColumn>=this.hot.countCols())return void this.throwOutOfBoundsWarning();const i=this.hot.toVisualRow(e.destinationRow);if(null!==i){const n=this.hot.getCellMeta(i,e.destinationColumn);"init"!==t&&n.readOnly===e.readOnly||(n.readOnly=e.readOnly,n.className="columnSummaryResult")}if((!0===e.roundFloat||Number.isInteger(e.roundFloat))&&!isNaN(e.result)){const t=e.roundFloat;let n=0;Number.isInteger(t)&&(n=Math.min(Math.max(0,t),100)),e.result=e.result.toFixed(n)}n?this.hot.setDataAtCell(r,e.destinationColumn,e.result,"ColumnSummary.set"):this.cellsToSetCache.push([r,e.destinationColumn,e.result]),e.alterRowOffset=void 0,e.alterColumnOffset=void 0}throwOutOfBoundsWarning(){Object(Xr["b"])("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}}var Ds=xs,Hs=n("67a87");function Ps(e){return null===e||void 0===e||isNaN(e)}function js(e,t){Fs(e,t),t.add(e)}function Fs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ys(e,t,n){return(t=Us(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Us(e){var t=Vs(e,"string");return"symbol"==typeof t?t:t+""}function Vs(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Bs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Ws="columnSummary",zs=220;var Gs=new WeakSet;class Ks extends tn["a"]{constructor(){super(...arguments),js(this,Gs),Ys(this,"endpoints",null)}static get PLUGIN_KEY(){return Ws}static get PLUGIN_PRIORITY(){return zs}isEnabled(){return!!this.hot.getSettings()[Ws]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Ws],this.endpoints=new Ds(this,this.settings),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bs(Gs,e,Xs).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bs(Gs,e,qs).call(e,...n)})),this.addHook("afterUpdateSettings",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bs(Gs,e,$s).call(e,...n)})),this.addHook("beforeCreateRow",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_row",e,t,null,n)),this.addHook("beforeCreateCol",(e,t,n)=>this.endpoints.resetSetupBeforeStructureAlteration("insert_col",e,t,null,n)),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_row",...n)})),this.addHook("beforeRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupBeforeStructureAlteration("remove_col",...n)})),this.addHook("afterCreateRow",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_row",e,t,null,n)),this.addHook("afterCreateCol",(e,t,n)=>this.endpoints.resetSetupAfterStructureAlteration("insert_col",e,t,null,n)),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_row",...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.endpoints.resetSetupAfterStructureAlteration("remove_col",...n)})),this.addHook("afterRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Bs(Gs,e,Js).call(e,...n)})),super.enablePlugin())}disablePlugin(){this.endpoints=null,this.settings=null,this.currentEndpoint=null,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.endpoints.initEndpoints(),super.updatePlugin()}calculate(e){switch(e.type.toLowerCase()){case"sum":e.result=this.calculateSum(e);break;case"min":e.result=this.calculateMinMax(e,e.type);break;case"max":e.result=this.calculateMinMax(e,e.type);break;case"count":e.result=this.countEntries(e);break;case"average":e.result=this.calculateAverage(e);break;case"custom":e.result=e.customFunction.call(this,e);break;default:break}}calculateSum(e){let t=0;return Object(o["objectEach"])(e.ranges,n=>{t+=this.getPartialSum(n,e.sourceColumn)}),t}getPartialSum(e,t){let n=0,r=e[1]||e[0],i=null,s=0;do{if(i=this.getCellValue(r,t),i=Ps(i)?null:i,null!==i){const e=((""+i).split(".")[1]||[]).length||1;e>s&&(s=e)}n+=i||0,r-=1}while(r>=e[0]);return Math.round(n*10**s)/10**s}calculateMinMax(e,t){let n=null;return Object(o["objectEach"])(e.ranges,r=>{const i=this.getPartialMinMax(r,e.sourceColumn,t);if(null===n&&null!==i&&(n=i),null!==i)switch(t){case"min":n=Math.min(n,i);break;case"max":n=Math.max(n,i);break;default:break}}),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let r,i=null,s=e[1]||e[0];do{if(r=this.getCellValue(s,t),r=Ps(r)?null:r,null===i)i=r;else if(null!==r)switch(n){case"min":i=Math.min(i,r);break;case"max":i=Math.max(i,r);break;default:break}s-=1}while(s>=e[0]);return i}countEmpty(e,t){let n,r=0,i=e[1]||e[0];do{n=this.getCellValue(i,t),n=Ps(n)?null:n,null===n&&(r+=1),i-=1}while(i>=e[0]);return r}countEntries(e){let t=0;const n=e.ranges;return Object(o["objectEach"])(n,n=>{const r=void 0===n[1]?1:n[1]-n[0]+1,i=this.countEmpty(n,e.sourceColumn);t+=r,t-=i}),t}calculateAverage(e){const t=this.calculateSum(e),n=this.countEntries(e);return t/n}getCellValue(e,t){const n=this.hot.toVisualRow(e),r=this.hot.toVisualColumn(t);let i=this.hot.getSourceDataAtCell(e,t),s="";if(null!==n&&null!==r&&(s=this.hot.getCellMeta(n,r).className||""),s.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"===typeof i&&(i=i.replace(/,/,".")),i=parseFloat(i)),isNaN(i)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(Hs["a"]`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
- numeric format. Cannot do the calculation.`);return i}}function Xs(){this.endpoints.initEndpoints()}function $s(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function qs(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Js(e,t){this.endpoints.resetSetupBeforeStructureAlteration("move_row",e[0],e.length,e,this.pluginName),this.endpoints.resetSetupAfterStructureAlteration("move_row",t,e.length,e,this.pluginName)}var Qs=n("7ae0");function Zs(e,t){to(e,t),t.add(e)}function eo(e,t,n){to(e,t),t.set(e,n)}function to(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function no(e,t){return e.get(io(e,t))}function ro(e,t,n){return e.set(io(e,t),n),n}function io(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var so=new WeakMap,oo=new WeakMap,ao=new WeakMap,lo=new WeakSet;class uo{constructor(){Zs(this,lo),eo(this,so,!0),eo(this,oo,null),eo(this,ao,new ResizeObserver(e=>io(lo,this,co).call(this,e)))}setObservedElement(e){ro(oo,this,e)}unobserve(){no(ao,this).unobserve(no(oo,this))}observe(){ro(so,this,!0),no(ao,this).observe(no(oo,this))}destroy(){no(ao,this).disconnect()}}function co(e){!no(so,this)&&Array.isArray(e)&&e.length?e.forEach(e=>{let{borderBoxSize:t}=e;const{inlineSize:n,blockSize:r}=t[0];this.runLocalHooks("resize",n,r)}):ro(so,this,!1)}function ho(e,t,n){mo(e,t),t.set(e,n)}function mo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fo(e,t){return e.get(go(e,t))}function po(e,t,n){return e.set(go(e,t),n),n}function go(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(uo,Qs["a"]);var yo=new WeakMap,wo=new WeakMap,bo=new WeakMap,vo=new WeakMap,_o=new WeakMap,So=new WeakMap,Eo=new WeakMap;class Co{static get CLASS_EDITOR_CONTAINER(){return"htCommentsContainer"}static get CLASS_EDITOR(){return"htComments"}static get CLASS_INPUT(){return"htCommentTextArea"}static get CLASS_CELL(){return"htCommentCell"}constructor(e,t){var n=this;ho(this,yo,void 0),ho(this,wo,!1),ho(this,bo,null),ho(this,vo,void 0),ho(this,_o,void 0),ho(this,So,!0),ho(this,Eo,new uo),po(yo,this,e),po(wo,this,t),po(vo,this,this.createEditor()),po(_o,this,fo(vo,this).style),fo(Eo,this).setObservedElement(this.getInputElement()),fo(Eo,this).addLocalHook("resize",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("resize",...t)})),this.hide()}setPosition(e,t){fo(_o,this).left=e+"px",fo(_o,this).top=t+"px"}setSize(e,t){if(e&&t){const n=this.getInputElement();n.style.width=e+"px",n.style.height=t+"px"}}getSize(){return{width:Object(i["outerWidth"])(this.getInputElement()),height:Object(i["outerHeight"])(this.getInputElement())}}observeSize(){fo(Eo,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){const t=this.getInputElement();t.readOnly=e}show(){fo(_o,this).display="block",po(So,this,!1)}hide(){fo(Eo,this).unobserve(),fo(So,this)||(fo(_o,this).display="none"),po(So,this,!0)}isVisible(){return"block"===fo(_o,this).display}setValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e||"";this.getInputElement().value=t}getValue(){return this.getInputElement().value}isFocused(){return fo(yo,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=fo(yo,this).createElement("div"),t=fo(yo,this).createElement("textarea");return e.style.display="none",po(bo,this,fo(yo,this).createElement("div")),fo(bo,this).setAttribute("dir",fo(wo,this)?"rtl":"ltr"),Object(i["addClass"])(fo(bo,this),Co.CLASS_EDITOR_CONTAINER),fo(yo,this).body.appendChild(fo(bo,this)),Object(i["addClass"])(e,Co.CLASS_EDITOR),Object(i["addClass"])(t,Co.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),fo(bo,this).appendChild(e),e}getInputElement(){return fo(vo,this).querySelector("."+Co.CLASS_INPUT)}destroy(){const e=fo(bo,this)?fo(bo,this).parentNode:null;fo(vo,this).parentNode.removeChild(fo(vo,this)),po(vo,this,null),po(_o,this,null),fo(Eo,this).destroy(),e&&e.removeChild(fo(bo,this))}}Object(o["mixin"])(Co,Qs["a"]);var Mo=Co;function To(e,t,n){return(t=Ro(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ro(e){var t=Oo(e,"string");return"symbol"==typeof t?t:t+""}function Oo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const No=250,Ao=250;class Lo{constructor(e){To(this,"wasLastActionShow",!0),To(this,"showDebounced",null),To(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout(()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")},Ao)}show(e){this.wasLastActionShow=!0,this.showDebounced(e)}cancelHiding(){this.wasLastActionShow=!0,clearTimeout(this.hidingTimer),this.hidingTimer=null}updateDelay(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:No;this.showDebounced=Object(yi["debounce"])(e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)},e)}destroy(){this.clearLocalHooks()}}Object(o["mixin"])(Lo,Qs["a"]);var Io=Lo;const ko="---------";function xo(){return{name:ko}}function Do(e){return{key:"commentsAddEdit",name(){var t;const n=null===(t=this.getSelectedRangeLast())||void 0===t?void 0:t.highlight;return null!==n&&void 0!==n&&n.isCell()&&e.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_EDIT_COMMENT"]):this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ADD_COMMENT"])},callback(){const t=this.getSelectedRangeLast();e.setRange(t),e.show(),e.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Ho(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_COMMENT"])},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{t>=0&&n>=0&&e.removeCommentAtCell(t,n,!1)}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Po(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","");return`${n} ${t}`}function jo(e,t){if(-1!==e.indexOf(t))return e;const n=e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","");return`${n} ${t}`}function Fo(e,t){const n={};return Object(h["arrayEach"])(e,e=>{e.forAll((e,r)=>{e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))})}),n}function Yo(e,t,n,r,i){Object(h["arrayEach"])(e,e=>{e.forAll((e,s)=>{e>=0&&s>=0&&Uo(e,s,t,n,r,i)})})}function Uo(e,t,n,r,i,s){const o=i(e,t);let a=r;o.className&&(a="vertical"===n?Po(o.className,r):jo(o.className,r)),s(e,t,"className",a)}function Vo(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function Bo(e,t){let n=!1;return Array.isArray(e)&&Object(h["arrayEach"])(e,e=>(e.forAll((e,r)=>{if(e>=0&&r>=0&&t(e,r))return n=!0,!1}),n)),n}function Wo(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:r,left:i}=e.getBoundingClientRect();n.top=r,n.left=i}return n}function zo(e){return function(t,n){const r=this.getCellMeta(t,n).className;return r&&-1!==r.indexOf(e)}}function Go(e,t){return Bo(e.getSelectedRange(),zo(t).bind(e))}function Ko(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]),n=Bo(this.getSelectedRange(),(t,n)=>e.getCommentMeta(t,n,la));return n?Vo(t):t},callback(){const t=this.getSelectedRangeLast();t.forAll((t,n)=>{if(t>=0&&n>=0){const r=!!e.getCommentMeta(t,n,la);e.updateCommentMeta(t,n,{[la]:!r})}})},disabled(){const t=this.getSelectedRangeLast();return!!(!t||t.highlight.isHeader()||!e.getCommentAtCell(t.highlight.row,t.highlight.col)||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}}function Xo(e,t){qo(e,t),t.add(e)}function $o(e,t,n){qo(e,t),t.set(e,n)}function qo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jo(e,t,n){return(t=Qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qo(e){var t=Zo(e,"string");return"symbol"==typeof t?t:t+""}function Zo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ea(e,t,n){return e.set(na(e,t),n),n}function ta(e,t){return e.get(na(e,t))}function na(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ra="comments",ia=60,sa="comment",oa="value",aa="style",la="readOnly",ua=ra,ca="plugin:"+ra;var ha=new WeakMap,da=new WeakMap,ma=new WeakMap,fa=new WeakMap,pa=new WeakMap,ga=new WeakMap,ya=new WeakSet;class wa extends tn["a"]{constructor(){super(...arguments),Xo(this,ya),Jo(this,"range",{}),$o(this,ha,null),$o(this,da,null),$o(this,ma,!1),$o(this,fa,!1),$o(this,pa,null),$o(this,ga,"")}static get PLUGIN_KEY(){return ra}static get PLUGIN_PRIORITY(){return ia}isEnabled(){return!!this.hot.getSettings()[ra]}enablePlugin(){var e=this;this.enabled||(ta(ha,this)||(ea(ha,this,new Mo(this.hot.rootDocument,this.hot.isRtl())),ta(ha,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return na(ya,e,Ma).call(e,...n)}))),ta(da,this)||ea(da,this,new Io(this.getDisplayDelaySetting())),this.addHook("afterContextMenuDefaultOptions",e=>this.addToContextMenu(e)),this.addHook("afterRenderer",(e,t,n,r,i,s)=>na(ya,this,Sa).call(this,e,s)),this.addHook("afterScroll",()=>na(ya,this,Ra).call(this)),this.addHook("afterBeginEditing",()=>this.hide()),this.addHook("afterDocumentKeyDown",e=>na(ya,this,Ta).call(this,e)),ta(da,this).addLocalHook("hide",()=>this.hide()),ta(da,this).addLocalHook("show",(e,t)=>this.showAtCell(e,t)),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){ta(da,this).updateDelay(this.getDisplayDelaySetting()),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(ca);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();ea(fa,this,!0),this.hot.scrollToFocusedCell(()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(ca),this.hot._registerTimeout(()=>{ea(fa,this,!1)})})},stopPropagation:!0,runOnlyIf:()=>{var e;return(null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell())&&!ta(ha,this).isVisible()},group:ua}),n.addShortcut({keys:[["Escape"]],callback:()=>{ta(ha,this).setValue(ta(ga,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>ta(ha,this).isVisible()&&ta(ha,this).isFocused(),group:ua}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>ta(ha,this).isVisible()&&ta(ha,this).isFocused(),group:ua})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(ua)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",e=>na(ya,this,va).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>na(ya,this,ba).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>na(ya,this,_a).call(this)),this.eventManager.addEventListener(t,"focus",()=>na(ya,this,Ca).call(this)),this.eventManager.addEventListener(t,"blur",()=>na(ya,this,Ea).call(this))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=Object(i["closest"])(e.target,"TD","TBODY");return!!(t&&Object(i["hasClass"])(t,"htCommentCell")&&Object(i["closest"])(t,[this.hot.rootElement]))}targetIsCommentTextArea(e){return this.getEditorInputElement()===e.target}setComment(e){if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const t=ta(ha,this).getValue();let n="";null!==e&&void 0!==e?n=e:null!==t&&void 0!==t&&(n=t);const r=this.range.from.row,i=this.range.from.col;this.updateCommentMeta(r,i,{[oa]:n}),this.hot.render()}setCommentAtCell(e,t,n){this.setRange({from:this.hot._createCellCoords(e,t)}),this.setComment(n)}removeComment(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');this.hot.setCellMeta(this.range.from.row,this.range.from.col,sa),e&&this.hot.render(),this.hide()}removeCommentAtCell(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.setRange({from:this.hot._createCellCoords(e,t)}),this.removeComment(n)}getComment(){const e=this.range.from.row,t=this.range.from.col;return this.getCommentMeta(e,t,oa)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,oa)}show(){var e;if(!this.range.from)throw new Error('Before using this method, first set cell range (hot.getPlugin("comment").setRange())');const{from:{row:t,col:n}}=this.range;if(t<0||t>this.hot.countSourceRows()-1||n<0||n>this.hot.countSourceCols()-1)return!1;const r=this.hot.getCellMeta(this.range.from.row,this.range.from.col);return ta(da,this).cancelHiding(),ta(ha,this).setValue(null!==(e=r[sa]?r[sa][oa]:null)&&void 0!==e?e:""),ta(ha,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){ta(ha,this).hide()}refreshEditor(){var e,t;let n=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!n&&(!this.range.from||!ta(ha,this).isVisible()))return;const{rowIndexMapper:r,columnIndexMapper:s}=this.hot,{row:o,col:a}=this.range.from;let l=r.getRenderableFromVisualIndex(o),u=s.getRenderableFromVisualIndex(a);const c=null===l;ta(ha,this).setPosition(0,0),null===l&&(l=r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,-1))),null===u&&(u=s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(a,-1)));const h=null===l,d=null===u;l=null!==(e=l)&&void 0!==e?e:0,u=null!==(t=u)&&void 0!==t?t:0;const{rootWindow:m,view:{_wt:f}}=this.hot,{wtTable:p}=f,g=f.getCell({row:l,col:u},!0),y=this.getCommentMeta(o,a,aa);y?ta(ha,this).setSize(y.width,y.height):ta(ha,this).resetSize();const w=d?0:p.getStretchedColumnWidth(u),b=c&&!h?Object(i["outerHeight"])(g):0,{left:v,top:_,width:S,height:E}=g.getBoundingClientRect(),{width:C,height:M}=ta(ha,this).getSize(),{innerWidth:T,innerHeight:R}=this.hot.rootWindow,O=this.hot.rootDocument.documentElement;let N=v+m.scrollX+w,A=_+m.scrollY+b;this.hot.isRtl()&&(N-=C+w),this.hot.isLtr()&&v+S+C>T?N=v+m.scrollX-C-1:this.hot.isRtl()&&N<-(O.scrollWidth-O.clientWidth)&&(N=v+m.scrollX+w+1),_+M>R&&(A-=M-E+1),ta(ha,this).setPosition(N,A),ta(ha,this).setReadOnlyState(this.getCommentMeta(o,a,la)),ta(ha,this).observeSize()}focusEditor(){ta(ha,this).focus()}updateCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t)[sa];let i;r?(i=Object(o["deepClone"])(r),Object(o["deepExtend"])(i,n)):i=n,this.hot.setCellMeta(e,t,sa,i)}getCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t);if(r[sa])return r[sa][n]}addToContextMenu(e){e.items.push({name:ko},Do(this),Ho(this),Ko(this))}getDisplayDelaySetting(){const e=this.hot.getSettings()[ra];if(Object(o["isObject"])(e))return e.displayDelay}getEditorInputElement(){return ta(ha,this).getInputElement()}destroy(){var e,t;null===(e=ta(ha,this))||void 0===e||e.destroy(),null===(t=ta(da,this))||void 0===t||t.destroy(),super.destroy()}}function ba(e){if(this.hot.view&&this.hot.view._wt&&!ta(ma,this)&&!this.targetIsCommentTextArea(e)){const t=Object(i["closest"])(e.target,"TD","TBODY");let n=null;t&&(n=this.hot.getCoords(t)),(!t||this.range.from&&n&&(this.range.from.row!==n.row||this.range.from.col!==n.col))&&this.hide()}}function va(e){const{rootDocument:t}=this.hot;if(!(ta(ma,this)||ta(ha,this).isFocused()||Object(i["hasClass"])(e.target,"wtBorder")||ta(pa,this)===e.target)&&ta(ha,this))if(ea(pa,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));ta(da,this).show(t)}else Object(i["isChildOf"])(e.target,t)&&!this.targetIsCommentTextArea(e)&&ta(da,this).hide()}function _a(){ea(ma,this,!1)}function Sa(e,t){t[sa]&&t[sa][oa]&&Object(i["addClass"])(e,t.commentedCellClassName)}function Ea(){ea(ga,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function Ca(){ea(ga,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(ca)}function Ma(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[aa]:{width:e,height:t}})}function Ta(e){ta(ha,this).isVisible()&&Object(s["stopImmediatePropagation"])(e)}function Ra(){ta(fa,this)||this.hide()}n("956b");function Oa(e,t,n){return(t=Na(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Na(e){var t=Aa(e,"string");return"symbol"==typeof t?t:t+""}function Aa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class La{constructor(e){Oa(this,"hot",void 0),Oa(this,"commands",{}),Oa(this,"commonCallback",null),this.hot=e}registerCommand(e,t){this.commands[e]=t}setCommonCallback(e){this.commonCallback=e}execute(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];const i=e.split(":"),s=i[0],a=2===i.length?i[1]:null;let l=this.commands[s];if(!l)throw new Error(`Menu command '${s}' not exists.`);if(a&&l.submenu&&(l=Ia(a,l.submenu.items)),!0===l.disabled)return;if("function"===typeof l.disabled&&!0===l.disabled.call(this.hot))return;if(Object(o["hasOwnProperty"])(l,"submenu"))return;const u=[];"function"===typeof l.callback&&u.push(l.callback),"function"===typeof this.commonCallback&&u.push(this.commonCallback),n.unshift(i.join(":")),Object(h["arrayEach"])(u,e=>e.apply(this.hot,n))}}function Ia(e,t){let n;return Object(h["arrayEach"])(t,t=>{const r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1}),n}const ka="alignment";function xa(){return{key:ka,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT"])},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||!(this.getSelectedRange()&&!this.selection.isSelectedByCorner()))},submenu:{items:[{key:ka+":left",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"])},ariaChecked(){return Go(this,"htLeft")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]);return Go(this,"htLeft")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:ka+":center",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"])},ariaChecked(){return Go(this,"htCenter")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]);return Go(this,"htCenter")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:ka+":right",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"])},ariaChecked(){return Go(this,"htRight")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]);return Go(this,"htRight")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:ka+":justify",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"])},ariaChecked(){return Go(this,"htJustify")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]);return Go(this,"htJustify")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{name:ko},{key:ka+":top",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"])},ariaChecked(){return Go(this,"htTop")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]);return Go(this,"htTop")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:ka+":middle",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"])},ariaChecked(){return Go(this,"htMiddle")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]);return Go(this,"htMiddle")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1},{key:ka+":bottom",checkable:!0,ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"])},ariaChecked(){return Go(this,"htBottom")},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]);return Go(this,"htBottom")&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Fo(e,(e,t)=>this.getCellMeta(e,t).className),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",t,e,n,r),Yo(e,n,r,(e,t)=>this.getCellMeta(e,t),(e,t,n,r)=>this.setCellMeta(e,t,n,r)),this.render()},disabled:!1}]}}}const Da="clear_column";function Ha(){return{key:Da,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_CLEAR_COLUMN"])},callback(e,t){const n=t[0].start.col,r=t[0].end.col;this.countRows()&&this.populateFromArray(0,n,[[null]],Math.max(t[0].start.row,t[0].end.row),r,"ContextMenu.clearColumn")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByColumnHeader())}}}const Pa="col_left";function ja(){return{key:Pa,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_INSERT_LEFT"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner(),t=this.isRtl()?"insert_col_end":"insert_col_start";this.alter(t,e.col,1,"ContextMenu.columnLeft")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countCols();return 0===e}return this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols},hidden(){return!this.getSettings().allowInsertColumn}}}const Fa="col_right";function Ya(){return{key:Fa,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_INSERT_RIGHT"])},callback(){const e=this.getSelectedRangeLast().getTopRightCorner(),t=this.isRtl()?"insert_col_start":"insert_col_end";this.alter(t,e.col,1,"ContextMenu.columnRight")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.col<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByRowHeader()||this.countCols()>=this.getSettings().maxCols))},hidden(){return!this.getSettings().allowInsertColumn}}}const Ua="make_read_only";function Va(){return{key:Ua,checkable:!0,ariaChecked(){const e=Bo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return e},ariaLabel(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_READ_ONLY"])},name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_READ_ONLY"]);const t=Bo(this.getSelectedRange(),(e,t)=>this.getCellMeta(e,t).readOnly);return t&&(e=Vo(e)),e},callback(){const e=this.getSelectedRange(),t=Bo(e,(e,t)=>this.getCellMeta(e,t).readOnly);Object(h["arrayEach"])(e,e=>{e.forAll((e,n)=>{e>=0&&n>=0&&this.setCellMeta(e,n,"readOnly",!t)})}),this.render()},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||(!!this.selection.isSelectedByCorner()||(0===this.countRows()||0===this.countCols()||(!this.getSelectedRange()||0===this.getSelectedRange().length))))}}}const Ba="redo";function Wa(){return{key:Ba,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REDO"])},callback(){this.redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}}var za=n("a952");const Ga="remove_col";function Ka(){return{key:Ga,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[,n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_COLUMN"],t)},callback(){this.alter("remove_col",Object(za["e"])(this),null,"ContextMenu.removeColumn")},disabled(){if(!this.isColumnModificationAllowed())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.col<0)return!0;const t=this.countCols();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByRowHeader()||0===t},hidden(){return!this.getSettings().allowRemoveColumn}}}const Xa="remove_row";function $a(){return{key:Xa,name(){const e=this.getSelected();let t=0;if(e)if(e.length>1)t=1;else{const[n,,r]=e[0];n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_ROW"],t)},callback(){this.alter("remove_row",Object(za["f"])(this),1,"ContextMenu.removeRow")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;const t=this.countRows();return this.selection.isSelectedByCorner()?0===t:this.selection.isSelectedByColumnHeader()||0===t},hidden(){return!this.getSettings().allowRemoveRow}}}const qa="row_above";function Ja(){return{key:qa,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ROW_ABOVE"])},callback(){const e=this.getSelectedRangeLast().getTopLeftCorner();this.alter("insert_row_above",e.row,1,"ContextMenu.rowAbove")},disabled(){const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader()&&e.highlight.row<0)return!0;if(this.selection.isSelectedByCorner()){const e=this.countRows();return 0===e}return this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows},hidden(){return!this.getSettings().allowInsertRow}}}const Qa="row_below";function Za(){return{key:Qa,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_ROW_BELOW"])},callback(){const e=this.getSelectedRangeLast().getBottomRightCorner();this.alter("insert_row_below",e.row,1,"ContextMenu.rowBelow")},disabled(){const e=this.getSelectedRangeLast();return!e||(!!(e.isSingleHeader()&&e.highlight.row<0)||!this.selection.isSelectedByCorner()&&(this.selection.isSelectedByColumnHeader()||this.countRows()>=this.getSettings().maxRows))},hidden(){return!this.getSettings().allowInsertRow}}}const el="no_items";function tl(){return{key:el,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NO_ITEMS"])},disabled:!0,isCommand:!1}}const nl="undo";function rl(){return{key:nl,name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNDO"])},callback(){this.undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}}const il=[qa,Qa,Pa,Fa,Da,Xa,Ga,nl,Ba,Ua,ka,ko,el],sl={[ko]:xo,[el]:tl,[qa]:Ja,[Qa]:Za,[Pa]:ja,[Fa]:Ya,[Da]:Ha,[Xa]:$a,[Ga]:Ka,[nl]:rl,[Ba]:Wa,[Ua]:Va,[ka]:xa};function ol(){const e={};return Object(o["objectEach"])(sl,(t,n)=>{e[n]=t()}),e}function al(e,t,n){return(t=ll(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ll(e){var t=ul(e,"string");return"symbol"==typeof t?t:t+""}function ul(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class cl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;al(this,"hot",void 0),al(this,"predefinedItems",ol()),al(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,Object(o["objectEach"])(e,(e,n)=>{let r="";e.name===ko?(t[ko]=e,r=ko):isNaN(parseInt(n,10))?(e.key=void 0===e.key?n:e.key,t[n]=e,r=e.key):(t[e.key]=e,r=e.key),this.defaultOrderPattern.push(r)}),this.predefinedItems=t}getItems(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return hl(e,this.defaultOrderPattern,this.predefinedItems)}}function hl(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=[];let i=e;return i&&i.items?i=i.items:Array.isArray(i)||(i=t),Object(o["isObject"])(i)?Object(o["objectEach"])(i,(e,t)=>{let i=n["string"===typeof e?e:t];i||(i=e),Object(o["isObject"])(e)?Object(o["extend"])(i,e):"string"===typeof i&&(i={name:i}),void 0===i.key&&(i.key=t),r.push(i)}):Object(h["arrayEach"])(i,(e,t)=>{let i=n[e];!i&&il.indexOf(e)>=0||(i||(i={name:e,key:""+t}),Object(o["isObject"])(e)&&Object(o["extend"])(i,e),void 0===i.key&&(i.key=t),r.push(i))}),r}function dl(e,t,n){return(t=ml(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ml(e){var t=fl(e,"string");return"symbol"==typeof t?t:t+""}function fl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class pl{constructor(e,t){dl(this,"top",void 0),dl(this,"topRelative",void 0),dl(this,"left",void 0),dl(this,"leftRelative",void 0),dl(this,"scrollTop",void 0),dl(this,"scrollLeft",void 0),dl(this,"cellHeight",void 0),dl(this,"cellWidth",void 0);const n=t.scrollY,r=t.scrollX;let i,s,o,a,l,u;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(i=parseInt(e.top,10),o=parseInt(e.left,10),l=e.height||0,u=e.width||0,s=i,a=o,i+=n,o+=r):"event"===this.type&&(i=parseInt(e.pageY,10),o=parseInt(e.pageX,10),l=e.target.clientHeight,u=e.target.clientWidth,s=i-n,a=o-r),this.top=i,this.topRelative=s,this.left=o,this.leftRelative=a,this.scrollTop=n,this.scrollLeft=r,this.cellHeight=l,this.cellWidth=u}getSourceType(e){let t="literal";return e instanceof Event&&(t="event"),t}fitsAbove(e){return this.topRelative>=e.offsetHeight}fitsBelow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerHeight;return this.topRelative+e.offsetHeight<=t}fitsOnRight(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.rootWindow.innerWidth;return this.leftRelative+this.cellWidth+e.offsetWidth<=t}fitsOnLeft(e){return this.leftRelative>=e.offsetWidth}}function gl(e,t,n){yl(e,t),t.set(e,n)}function yl(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wl(e,t){return e.get(vl(e,t))}function bl(e,t,n){return e.set(vl(e,t),n),n}function vl(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var _l=new WeakMap,Sl=new WeakMap,El=new WeakMap,Cl=new WeakMap,Ml=new WeakMap;class Tl{constructor(e){gl(this,_l,void 0),gl(this,Sl,void 0),gl(this,El,void 0),gl(this,Cl,!1),gl(this,Ml,{above:0,below:0,left:0,right:0}),bl(Cl,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return wl(Ml,this)[e]=t,this}setElement(e){return bl(_l,this,e),this}setParentElement(e){return bl(Sl,this,e),this}updatePosition(e){bl(El,this,new pl(e,wl(_l,this).ownerDocument.defaultView)),wl(Cl,this)?(wl(El,this).fitsBelow(wl(_l,this))?this.setPositionBelowCursor():wl(El,this).fitsAbove(wl(_l,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===wl(_l,this).dir?wl(El,this).fitsOnLeft(wl(_l,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():wl(El,this).fitsOnRight(wl(_l,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=wl(Ml,this).above+wl(El,this).top-wl(_l,this).offsetHeight;wl(Sl,this)&&(e=wl(El,this).top+wl(El,this).cellHeight-wl(_l,this).offsetHeight+3),wl(_l,this).style.top=e+"px"}setPositionBelowCursor(){let e=wl(Ml,this).below+wl(El,this).top+1;wl(Sl,this)&&(e=wl(El,this).top-1),wl(_l,this).style.top=e+"px"}setPositionOnRightOfCursor(){let e=wl(El,this).left;if(wl(Sl,this)){const t=Number.parseInt(getComputedStyle(wl(Sl,this).querySelector(".htCore")).borderRightWidth,10);e+=wl(El,this).cellWidth+t}else e+=wl(Ml,this).right;wl(_l,this).style.left=e+"px"}setPositionOnLeftOfCursor(){let e=wl(Ml,this).left+wl(El,this).left-wl(_l,this).offsetWidth;if(wl(Sl,this)){const t=Number.parseInt(getComputedStyle(wl(Sl,this).querySelector(".htCore")).borderLeftWidth,10);e-=t}wl(_l,this).style.left=e+"px"}}function Rl(e){let{initialPage:t=-1,size:n=(()=>0),onItemSelect:r=(()=>{}),onClear:i=(()=>{})}=e;const s=new Set;let o=Object(it["clamp"])(t,-1,f()-1);function a(e,t){const n=f()-1;if(e<0&&(e=n),e>n&&(e=0),s.has(e))return-1;s.add(e);const i=r(e,!1);return!1===i&&(e=a(1===t?++e:--e,t)),e}function l(e){e>-1&&e<f()&&!1!==r(e,!0)&&(o=e)}function u(){return o}function c(){f()>0&&(s.clear(),o=a(0,1))}function h(){f()>0&&(s.clear(),o=a(f()-1,-1))}function d(){f()>0&&(s.clear(),o=a(++o,1))}function m(){f()>0&&(s.clear(),o=a(--o,-1))}function f(){return Math.max(n(),0)}function p(){s.clear(),o=t,i()}return{setCurrentPage:l,getCurrentPage:u,toFirstItem:c,toLastItem:h,toNextItem:d,toPreviousItem:m,getSize:f,clear:p}}function Ol(e){return Object(h["arrayMap"])(e,e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()}))}function Nl(e){return Object(o["hasOwnProperty"])(e,"submenu")}function Al(e){return new RegExp(ko,"i").test(e.name)}function Ll(e,t){return!0===e.disabled||"function"===typeof e.disabled&&!0===e.disabled.call(t)}function Il(e){return Object(o["hasOwnProperty"])(e,"disableSelection")}function kl(e){return Object(i["hasClass"])(e,"htSeparator")}function xl(e){return Object(i["hasClass"])(e,"htSubmenu")}function Dl(e){return Object(i["hasClass"])(e,"htDisabled")}function Hl(e){return Object(i["hasClass"])(e,"htSelectionDisabled")}function Pl(e,t){return!e.hidden||!("function"===typeof e.hidden&&e.hidden.call(t))}function jl(e,t){const n=e.slice(0);for(let r=0;r<n.length;){if(n[r].name!==t)break;n.shift()}return n}function Fl(e,t){let n=e.slice(0);return n.reverse(),n=jl(n,t),n.reverse(),n}function Yl(e){const t=[];return Object(h["arrayEach"])(e,(e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)}),t}function Ul(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ko,n=e.slice(0);return n=jl(n,t),n=Fl(n,t),n=Yl(n),n}function Vl(e){return!0===e.checkable}function Bl(e){return Rl({size:()=>e.countRows(),onItemSelect(t,n){const r=e.getCell(t,0);if(!r||kl(r)||Dl(r)||Hl(r))return!1;e.selectCell(t,0,...n?[t,0,!1,!1]:[])},onClear(){e.deselectCell()}})}function Wl(e){const{hot:t,hotMenu:n}=e;return[{keys:[["Control/Meta","A"]],forwardToContext:t.getShortcutManager().getContext("grid"),callback:()=>e.close(!0)},{keys:[["Tab"],["Shift","Tab"]],callback:(n,r)=>{const i=t.getSettings(),s="function"===typeof i.tabMoves?i.tabMoves(n):i.tabMoves;r.includes("shift")?t.selection.transformStart(-s.row,-s.col):t.selection.transformStart(s.row,s.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[["ArrowRight"]],callback:()=>{const t=n.getSelectedLast();if(t){const n=e.openSubMenu(t[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[["ArrowLeft"]],callback:()=>{const t=n.getSelectedLast();t&&e.isSubMenu()&&(e.close(),e.isSubMenu()&&e.parentMenu.hotMenu.listen())}},{keys:[["Control/Meta","ArrowUp"],["Home"]],callback:()=>e.getNavigator().toFirstItem()},{keys:[["Control/Meta","ArrowDown"],["End"]],callback:()=>e.getNavigator().toLastItem()},{keys:[["Enter"],["Space"]],callback:t=>{const r=n.getSelectedLast();r&&(n.getSourceDataAtRow(r[0]).submenu?e.openSubMenu(r[0]).getNavigator().toFirstItem():(e.executeCommand(t),e.close(!0)))}},{keys:[["PageUp"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(-n.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{const t=n.getSelectedLast();t?n.selection.transformStart(n.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}const zl="menu",Gl=zl;function Kl(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function r(e,t){a(t).addShortcuts(e,{group:zl})}function i(e,t){const i=a(t);e.forEach(e=>{let{keys:t}=e;t.forEach(e=>i.removeShortcutsByKeys(e))}),n.push({shortcuts:e,contextName:t}),r(e,t)}function s(){return[...n]}function o(e){return e?`${Gl}:${e}`:Gl}function a(t){var n;const r=e.hotMenu.getShortcutManager(),i=o(t);return null!==(n=r.getContext(i))&&void 0!==n?n:r.addContext(i)}function l(t){e.hotMenu.getShortcutManager().setActiveContextName(o(t))}return r(Wl(e)),t.forEach(e=>{let{shortcuts:t,contextName:n}=e;i(t,n)}),{addCustomShortcuts:i,getCustomShortcuts:s,getContext:a,listen:l}}function Xl(e){return(t,n,r,s,o,a)=>{const l=t.getSourceDataAtRow(r),u=e.rootDocument.createElement("div"),c="function"===typeof a?a.call(e):a,h="function"===typeof l.ariaLabel?l.ariaLabel.call(e):l.ariaLabel,d="function"===typeof l.ariaChecked?l.ariaChecked.call(e):l.ariaChecked;if(Object(i["empty"])(n),Object(i["addClass"])(u,"htItemWrapper"),e.getSettings().ariaTags){const t=!Ll(l,e)&&!Il(l)&&!Al(l);Object(i["setAttribute"])(n,[...Vl(l)?[Object(y["u"])(),Object(y["p"])(h),Object(y["d"])(d)]:[Object(y["t"])(),Object(y["p"])(c)],...t?[Object(y["L"])(-1)]:[],...Ll(l,e)?[Object(y["j"])()]:[],...Nl(l)?[Object(y["k"])(!1)]:[]])}n.className="",n.appendChild(u),Al(l)?Object(i["addClass"])(n,"htSeparator"):"function"===typeof l.renderer?(Object(i["addClass"])(n,"htCustomMenuRenderer"),n.appendChild(l.renderer(t,u,r,s,o,c))):Object(i["fastInnerHTML"])(u,c),Ll(l,e)?Object(i["addClass"])(n,"htDisabled"):Il(l)?Object(i["addClass"])(n,"htSelectionDisabled"):Nl(l)&&Object(i["addClass"])(n,"htSubmenu")}}function $l(e,t,n){ql(e,t),t.set(e,n)}function ql(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jl(e,t,n){return(t=Ql(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ql(e){var t=Zl(e,"string");return"symbol"==typeof t?t:t+""}function Zl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function eu(e,t,n){return e.set(nu(e,t),n),n}function tu(e,t){return e.get(nu(e,t))}function nu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const ru=215;var iu=new WeakMap,su=new WeakMap,ou=new WeakMap;class au{get tableBorderWidth(){return void 0===tu(ou,this)&&this.hotMenu&&eu(ou,this,parseInt(Object(i["getComputedStyle"])(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),tu(ou,this)}constructor(e,t){var n=this;Jl(this,"hot",void 0),Jl(this,"options",void 0),Jl(this,"eventManager",new ke["a"](this)),Jl(this,"container",void 0),Jl(this,"positioner",void 0),Jl(this,"hotMenu",null),Jl(this,"hotSubMenus",{}),Jl(this,"parentMenu",void 0),Jl(this,"menuItems",null),Jl(this,"origOutsideClickDeselects",null),$l(this,iu,void 0),$l(this,su,void 0),$l(this,ou,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:ru,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Tl(this.options.keepInViewport),this.parentMenu=this.options.parent||null,this.registerEvents(),this.isSubMenu()&&this.addLocalHook("afterSelectionChange",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.parentMenu.runLocalHooks("afterSelectionChange",...t)}))}registerEvents(){let e=this.hot.rootWindow;while(e)this.eventManager.addEventListener(e.document,"mousedown",e=>this.onDocumentMouseDown(e)),this.eventManager.addEventListener(e.document,"touchstart",e=>this.onDocumentMouseDown(e)),this.eventManager.addEventListener(e.document,"contextmenu",e=>this.onDocumentContextMenu(e)),e=Object(i["getParentWindow"])(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return tu(iu,this)}getKeyboardShortcutsCtrl(){return tu(su,this)}getSelectedItem(){return this.hasSelectedItem()?this.hotMenu.getSourceDataAtRow(this.hotMenu.getSelectedLast()[0]):null}hasSelectedItem(){return Array.isArray(this.hotMenu.getSelectedLast())}isSubMenu(){return null!==this.parentMenu}open(){this.runLocalHooks("beforeOpen"),this.container.removeAttribute("style"),this.container.style.display="block";const e=Object(yi["debounce"])(e=>this.openSubMenu(e),300),t=this.options.minWidth||ru;let n=!1,r=Object(h["arrayFilter"])(this.menuItems,e=>(e.key===el&&(n=!0),Pl(e,this.hot)));if(r.length<1&&!n)r.push(ol()[el]);else if(0===r.length)return;r=Ul(r,ko);let i=!1;const o={data:r,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth(e){return Object(d["isDefined"])(e)&&e<t?t:e},autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:Xl(this.hot)}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,beforeOnCellMouseOver:(e,t)=>{tu(iu,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},rowHeights:e=>r[e].name===ko?1:void 0,afterOnCellContextMenu:e=>{e.preventDefault(),Object(p["isWindowsOS"])()&&i&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,n,r,i)=>{this.hotMenu.view.isMouseDown()&&(i.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(i=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{Object(p["isWindowsOS"])()&&Object(s["isRightClick"])(e)||!i||!this.hasSelectedItem()||(Object(p["isMobileBrowser"])()||Object(p["isIpadOS"])()?this.hot._registerTimeout(()=>this.close(!0),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,o),this.hotMenu.addHook("afterInit",()=>this.onAfterInit()),this.hotMenu.init(),eu(iu,this,Bl(this.hotMenu)),eu(su,this,Kl(this)),tu(su,this).listen(),this.focus(),this.isSubMenu()&&this.addLocalHook("afterOpen",()=>this.parentMenu.runLocalHooks("afterSubmenuOpen",this)),this.runLocalHooks("afterOpen",this)}close(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.isOpened())if(e&&this.isSubMenu())this.parentMenu.close();else if(tu(iu,this).clear(),this.closeAllSubMenus(),this.container.style.display="none",this.hotMenu.destroy(),this.hotMenu=null,this.hot.getSettings().outsideClickDeselects=this.origOutsideClickDeselects,this.runLocalHooks("afterClose"),this.isSubMenu()){if(this.hot.getSettings().ariaTags){const e=this.parentMenu.hotMenu.getSelectedLast();if(e){const t=this.parentMenu.hotMenu.getCell(e[0],0);Object(i["setAttribute"])(t,[Object(y["k"])(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!xl(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),r=new au(this.hot,{parent:this,name:n.name,className:this.options.className,keepInViewport:!0,container:this.options.container});return r.setMenuItems(n.submenu.items),r.open(),r.setPosition(t.getBoundingClientRect()),this.hotSubMenus[n.key]=r,this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(t,[Object(y["k"])(!0)]),r}closeSubMenu(e){const t=this.hotMenu.getSourceDataAtRow(e),n=this.hotSubMenus[t.key];if(n){n.destroy(),delete this.hotSubMenus[t.key];const r=this.hotMenu.getCell(e,0);this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(r,[Object(y["k"])(!1)])}}closeAllSubMenus(){Object(h["arrayEach"])(this.hotMenu.getData(),(e,t)=>this.closeSubMenu(t))}isAllSubMenusClosed(){return 0===Object.keys(this.hotSubMenus).length}focus(){this.isOpened()&&(this.hotMenu.rootElement.focus({preventScroll:!0}),this.getKeyboardShortcutsCtrl().listen(),this.hotMenu.listen())}destroy(){const e=this.container.parentNode;this.clearLocalHooks(),this.close(),this.parentMenu=null,this.eventManager.destroy(),e&&e.removeChild(this.container)}isOpened(){return null!==this.hotMenu}executeCommand(e){if(!this.isOpened()||!this.hasSelectedItem())return;const t=this.getSelectedItem();if(this.runLocalHooks("select",t,e),this.isCommandPassive(t))return;const n=this.hot.getSelectedRange(),r=n?Ol(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}isCommandPassive(e){return!1===e.isCommand||Al(e)||Ll(e,this.hot)||Nl(e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.positioner.setOffset(e,t)}setPosition(e){this.isSubMenu()&&this.positioner.setParentElement(this.parentMenu.container),this.positioner.setElement(this.container).updatePosition(e)}updateMenuDimensions(){const{wtTable:e}=this.hotMenu.view._wt,t=this.hotMenu.getSettings().data,n=e.hider.style,r=e.holder.style,s=parseInt(n.width,10),o=Object(h["arrayReduce"])(t,(e,t,n)=>{const r=this.hotMenu.getCell(n,0),s=r?Object(i["outerHeight"])(this.hotMenu.getCell(n,0)):0;return e+(t.name===ko?1:s)},0);r.width=s+3+"px",r.height=o+3+"px",n.height=r.height}createContainer(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.options.container.ownerDocument;let n,r=e;return r&&(Object(yi["isFunction"])(r)&&(r=r.call(this.hot),r=null===r||Object(d["isUndefined"])(r)?"":r.toString()),r=r.replace(/[^A-z0-9]/g,"_"),r=`${this.options.className}Sub_${r}`,n=t.querySelector(`.${this.options.className}.${r}`)),n||(n=t.createElement("div"),Object(i["addClass"])(n,"htMenu "+this.options.className),r&&Object(i["addClass"])(n,r),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&Object(i["setAttribute"])(this.hotMenu.rootElement,[Object(y["s"])(),Object(y["L"])(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||Object(i["isChildOf"])(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&Object(i["hasClass"])(e.target,"htCore")&&Object(i["isChildOf"])(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function lu(e,t){uu(e,t),t.add(e)}function uu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cu(e,t,n){return(t=hu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hu(e){var t=du(e,"string");return"symbol"==typeof t?t:t+""}function du(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function mu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(au,Qs["a"]);const fu="contextMenu",pu=70,gu=fu;pe["a"].getSingleton().register("afterContextMenuDefaultOptions"),pe["a"].getSingleton().register("beforeContextMenuShow"),pe["a"].getSingleton().register("afterContextMenuShow"),pe["a"].getSingleton().register("afterContextMenuHide"),pe["a"].getSingleton().register("afterContextMenuExecute");var yu=new WeakSet;class wu extends tn["a"]{constructor(){super(...arguments),lu(this,yu),cu(this,"commandExecutor",new La(this.hot)),cu(this,"itemsFactory",null),cu(this,"menu",null)}static get PLUGIN_KEY(){return fu}static get PLUGIN_PRIORITY(){return pu}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[qa,Qa,ko,Pa,Fa,ko,Xa,Ga,ko,nl,Ba,ko,Ua,ko,ka]}isEnabled(){return!!this.hot.getSettings()[fu]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[fu];"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new au(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",()=>mu(yu,this,vu).call(this)),this.menu.addLocalHook("afterOpen",()=>mu(yu,this,_u).call(this)),this.menu.addLocalHook("afterClose",()=>mu(yu,this,Su).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),this.addHook("afterOnCellContextMenu",e=>mu(yu,this,bu).call(this,e)),this.registerShortcuts(),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&(this.menu.destroy(),this.menu=null),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control/Meta","Shift","Backslash"],["Shift","F10"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();this.hot.scrollToFocusedCell();const t=this.hot.getCell(e.row,e.col,!0).getBoundingClientRect(),n=Wo(this.menu.container,this.hot.rootDocument);this.open({left:t.left+n.left,top:t.top+n.top-1+t.height},{left:t.width,above:-t.height}),this.menu.getNavigator().toFirstItem()},runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&!this.menu.isOpened()},group:gu})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(gu)}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};if(null!==(t=this.menu)&&void 0!==t&&t.isOpened())return;this.prepareMenuItems(),this.menu.open();const r=this.menu.tableBorderWidth>0;r||(n.below+=1,n.right+=1,n.above-=1,n.left-=1),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e)}close(){var e;null===(e=this.menu)||void 0===e||e.close(),this.itemsFactory=null}executeCommand(e){null===this.itemsFactory&&this.prepareMenuItems();for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}prepareMenuItems(){this.itemsFactory=new cl(this.hot,wu.DEFAULT_ITEMS);const e=this.hot.getSettings()[fu],t={items:this.itemsFactory.getItems(e)};this.hot.runHooks("afterContextMenuDefaultOptions",t),this.itemsFactory.setPredefinedItems(t.items);const n=this.itemsFactory.getItems(e);this.hot.runHooks("beforeContextMenuSetItems",n),this.menu.setMenuItems(n),Object(h["arrayEach"])(n,e=>this.commandExecutor.registerCommand(e.key,e))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function bu(e){const t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders;function s(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}const o=e.target;if(this.close(),Object(i["hasClass"])(o,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!r&&!s(o)&&(!Object(i["hasClass"])(o,"current")||!Object(i["hasClass"])(o,"wtBorder")))return;const a=Wo(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+a.top,left:e.clientX+a.left})}function vu(){this.hot.runHooks("beforeContextMenuShow",this)}function _u(){this.hot.runHooks("afterContextMenuShow",this)}function Su(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}wu.SEPARATOR={name:ko};var Eu=n("3bc4");function Cu(e){return{key:"copy",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY"])},callback(){e.copyCellsOnly()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Mu(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?Object(it["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"],t)},callback(){e.copyColumnHeadersOnly()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Tu(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(it["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"],t)},callback(){e.copyWithAllColumnHeaders()},disabled(){if(!this.hasColHeaders()||!this.getSettings().nestedHeaders)return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Ru(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?Object(it["clamp"])(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"],t)},callback(){e.copyWithColumnHeaders()},disabled(){if(!this.hasColHeaders())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}function Ou(e){return{key:"cut",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_CUT"])},callback(){e.cut()},disabled(){if(0===this.countRows()||0===this.countCols())return!0;const e=this.getSelectedRangeLast();if(!e)return!0;if(e.isSingleHeader())return!0;const t=this.getSelected();return!t||t.length>1},hidden:!1}}class Nu{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class Au{constructor(){this.clipboardData=new Nu}preventDefault(){}}function Lu(e,t){ku(e,t),t.add(e)}function Iu(e,t,n){ku(e,t),t.set(e,n)}function ku(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function xu(e,t){return e.get(Hu(e,t))}function Du(e,t,n){return e.set(Hu(e,t),n),n}function Hu(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Pu=new WeakMap,ju=new WeakMap,Fu=new WeakMap,Yu=new WeakMap,Uu=new WeakMap,Vu=new WeakMap,Bu=new WeakSet;class Wu{constructor(e){let{countRows:t,countColumns:n,rowsLimit:r,columnsLimit:i,countColumnHeaders:s}=e;Lu(this,Bu),Iu(this,Pu,void 0),Iu(this,ju,void 0),Iu(this,Fu,void 0),Iu(this,Yu,void 0),Iu(this,Uu,void 0),Iu(this,Vu,void 0),Du(ju,this,t),Du(Fu,this,n),Du(Yu,this,r),Du(Uu,this,i),Du(Vu,this,s)}setSelectedRange(e){Du(Pu,this,e)}getCellsRange(){if(0===xu(ju,this).call(this)||0===xu(Fu,this).call(this))return null;const{row:e,col:t}=xu(Pu,this).getTopStartCorner(),{row:n,col:r}=xu(Pu,this).getBottomEndCorner(),i=Hu(Bu,this,Gu).call(this,e,n),s=Hu(Bu,this,zu).call(this,t,r),o=n!==i||r!==s;return{isRangeTrimmed:o,startRow:e,startCol:t,endRow:i,endCol:s}}getMostBottomColumnHeadersRange(){if(0===xu(Fu,this).call(this)||0===xu(Vu,this).call(this))return null;const{col:e}=xu(Pu,this).getTopStartCorner(),{col:t}=xu(Pu,this).getBottomEndCorner(),n=Hu(Bu,this,zu).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===xu(Fu,this).call(this)||0===xu(Vu,this).call(this))return null;const{col:e}=xu(Pu,this).getTopStartCorner(),{col:t}=xu(Pu,this).getBottomEndCorner(),n=Hu(Bu,this,zu).call(this,e,t),r=t!==n;return{isRangeTrimmed:r,startRow:-xu(Vu,this).call(this),startCol:e,endRow:-1,endCol:n}}}function zu(e,t){return Math.min(t,Math.max(e+xu(Uu,this).call(this)-1,e))}function Gu(e,t){return Math.min(t,Math.max(e+xu(Yu,this).call(this)-1,e))}function Ku(e){const t=[],n=[];return Object(h["arrayEach"])(e,e=>{const r=Math.min(e.startRow,e.endRow),i=Math.max(e.startRow,e.endRow);Object(it["rangeEach"])(r,i,e=>{-1===t.indexOf(e)&&t.push(e)});const s=Math.min(e.startCol,e.endCol),o=Math.max(e.startCol,e.endCol);Object(it["rangeEach"])(s,o,e=>{-1===n.indexOf(e)&&n.push(e)})}),{rows:t,columns:n}}var Xu=n("a776");function $u(e,t){Ju(e,t),t.add(e)}function qu(e,t,n){Ju(e,t),t.set(e,n)}function Ju(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qu(e,t,n){return(t=Zu(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zu(e){var t=ec(e,"string");return"symbol"==typeof t?t:t+""}function ec(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function tc(e,t){return e.get(rc(e,t))}function nc(e,t,n){return e.set(rc(e,t),n),n}function rc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("afterCopyLimit"),pe["a"].getSingleton().register("modifyCopyableRange"),pe["a"].getSingleton().register("beforeCut"),pe["a"].getSingleton().register("afterCut"),pe["a"].getSingleton().register("beforePaste"),pe["a"].getSingleton().register("afterPaste"),pe["a"].getSingleton().register("beforeCopy"),pe["a"].getSingleton().register("afterCopy");const ic="copyPaste",sc=80,oc=["fragmentSelection"],ac=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var lc=new WeakMap,uc=new WeakMap,cc=new WeakMap,hc=new WeakMap,dc=new WeakMap,mc=new WeakMap,fc=new WeakMap,pc=new WeakMap,gc=new WeakSet;class yc extends tn["a"]{constructor(){super(...arguments),$u(this,gc),Qu(this,"columnsLimit",1/0),Qu(this,"rowsLimit",1/0),Qu(this,"pasteMode","overwrite"),Qu(this,"uiContainer",this.hot.rootDocument.body),qu(this,lc,!1),qu(this,uc,!1),qu(this,cc,!1),qu(this,hc,"cells-only"),qu(this,dc,!1),qu(this,mc,!1),qu(this,fc,new Wu({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),qu(this,pc,!1),Qu(this,"copyableRanges",[])}static get PLUGIN_KEY(){return ic}static get SETTING_KEYS(){return[ic,...oc]}static get PLUGIN_PRIORITY(){return sc}isEnabled(){return!!this.hot.getSettings()[ic]}enablePlugin(){var e=this;if(this.enabled)return;const{[ic]:t}=this.hot.getSettings();var n,r;"object"===typeof t&&(this.pasteMode=null!==(n=t.pasteMode)&&void 0!==n?n:this.pasteMode,this.rowsLimit=isNaN(t.rowsLimit)?this.rowsLimit:t.rowsLimit,this.columnsLimit=isNaN(t.columnsLimit)?this.columnsLimit:t.columnsLimit,nc(lc,this,!!t.copyColumnHeaders),nc(uc,this,!!t.copyColumnGroupHeaders),nc(cc,this,!!t.copyColumnHeadersOnly),this.uiContainer=null!==(r=t.uiContainer)&&void 0!==r?r:this.uiContainer);this.addHook("afterContextMenuDefaultOptions",e=>rc(gc,this,Sc).call(this,e)),this.addHook("afterSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rc(gc,e,Ec).call(e,...n)})),this.addHook("afterSelectionEnd",()=>rc(gc,this,Cc).call(this)),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return e.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return e.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return e.onPaste(...arguments)})),Object(p["isSafari"])()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rc(gc,e,Mc).call(e,...n)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rc(gc,e,Tc).call(e,...n)})),this.addHook("afterSelection",()=>rc(gc,this,Rc).call(this))),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only";nc(hc,this,e),nc(dc,this,!0),rc(gc,this,wc).call(this,"copy")}copyCellsOnly(){this.copy("cells-only")}copyColumnHeadersOnly(){this.copy("column-headers-only")}copyWithAllColumnHeaders(){this.copy("with-column-group-headers")}copyWithColumnHeaders(){this.copy("with-column-headers")}cut(){nc(mc,this,!0),rc(gc,this,wc).call(this,"cut")}getRangedCopyableData(e){return Object(Eu["b"])(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:r}=Ku(e);return Object(h["arrayEach"])(n,e=>{const n=[];Object(h["arrayEach"])(r,t=>{e<0?n.push(this.hot.getColHeader(t,e)):n.push(this.hot.getCopyableData(e,t))}),t.push(n)}),t}paste(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;if(!e&&!t)return;const n=new Au;e&&n.clipboardData.setData("text/plain",e),t&&n.clipboardData.setData("text/html",t),this.onPaste(n)}setCopyableText(){const e=this.hot.getSelectedRangeLast();if(!e)return;if(e.isSingleHeader())return void(this.copyableRanges=[]);tc(fc,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===tc(hc,this)?t.set("headers",tc(fc,this).getMostBottomColumnHeadersRange()):("with-column-headers"===tc(hc,this)?t.set("headers",tc(fc,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===tc(hc,this)&&t.set("headers",tc(fc,this).getAllColumnHeadersRange()),t.set("cells",tc(fc,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter(e=>null!==e).map(e=>{let{startRow:t,startCol:n,endRow:r,endCol:i}=e;return{startRow:t,startCol:n,endRow:r,endCol:i}}),this.copyableRanges=this.hot.runHooks("modifyCopyableRange",this.copyableRanges);const n=t.get("cells");if(null!==n&&n.isRangeTrimmed){const{startRow:e,startCol:t,endRow:r,endCol:i}=n;this.hot.runHooks("afterCopyLimit",r-e+1,i-t+1,this.rowsLimit,this.columnsLimit)}}isEditorOpened(){var e;return null===(e=this.hot.getActiveEditor())||void 0===e?void 0:e.isOpened()}populateValues(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.hot.getSelectedRangeLast();if(!e.length)return;const n=e.length,r=e[0].length,i=[],{row:s,col:o}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let u=s,c=o,h=s,d=o;while(i.length<n||u<=a){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(u,o);if(u=a+1,!0===t)continue;h=a,c=o;const m=[],f=i.length%n;while(m.length<r||c<=l){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(s,c);if(c=n+1,!0===t)continue;d=n;const i=m.length%r;m.push(e[f][i])}i.push(m)}return nc(pc,this,!0),this.hot.populateFromArray(s,o,i,void 0,void 0,"CopyPaste.paste",this.pasteMode),[s,o,h,d]}onCopy(e){var t,n;const r=this.hot.getFocusManager().getRefocusElement(),i=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input"),s=null===(n=this.hot.getSelectedRangeLast())||void 0===n?void 0:n.highlight,o=s?this.hot.getCell(s.row,s.col,!0):null;if(!this.hot.isListening()&&!tc(dc,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(i&&e.target!==r||!i&&e.target!==this.hot.rootDocument.body&&o!==e.target))return;e.preventDefault(),this.setCopyableText(),nc(dc,this,!1);const a=this.getRangedData(this.copyableRanges),l=rc(gc,this,bc).call(this,this.copyableRanges),u=!!this.hot.runHooks("beforeCopy",a,this.copyableRanges,l);if(u){const t=Object(Eu["b"])(a);if(e&&e.clipboardData){const n=Object(Xu["_dataToHTML"])(a,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[ac,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",a,this.copyableRanges,l)}nc(hc,this,"cells-only")}onCut(e){var t,n;const r=this.hot.getFocusManager().getRefocusElement(),i=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input"),s=null===(n=this.hot.getSelectedRangeLast())||void 0===n?void 0:n.highlight,o=s?this.hot.getCell(s.row,s.col,!0):null;if(!this.hot.isListening()&&!tc(mc,this)||this.isEditorOpened()||e.target instanceof HTMLElement&&(i&&e.target!==r||!i&&e.target!==this.hot.rootDocument.body&&o!==e.target))return;e.preventDefault(),this.setCopyableText(),nc(mc,this,!1);const a=this.getRangedData(this.copyableRanges),l=!!this.hot.runHooks("beforeCut",a,this.copyableRanges);if(l){const t=Object(Eu["b"])(a);if(e&&e.clipboardData){const n=Object(Xu["_dataToHTML"])(a,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[ac,n].join(""))}else"undefined"===typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",a,this.copyableRanges)}}onPaste(e){var t,n;const r=this.hot.getFocusManager().getRefocusElement(),i=null===(t=e.target)||void 0===t?void 0:t.hasAttribute("data-hot-input"),s=null===(n=this.hot.getSelectedRangeLast())||void 0===n?void 0:n.highlight,o=s?this.hot.getCell(s.row,s.col,!0):null;if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||e.target instanceof HTMLElement&&(i&&e.target!==r||!i&&e.target!==this.hot.rootDocument.body&&o!==e.target))return;let a;if(e.preventDefault(),e&&"undefined"!==typeof e.clipboardData){const t=Object(m["sanitize"])(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});if(t&&/(<table)|(<TABLE)/g.test(t)){const e=Object(Xu["htmlToGridSettings"])(t,this.hot.rootDocument);a=e.data}else a=e.clipboardData.getData("text/plain")}else"undefined"===typeof ClipboardEvent&&"undefined"!==typeof this.hot.rootWindow.clipboardData&&(a=this.hot.rootWindow.clipboardData.getData("Text"));if("string"===typeof a&&(a=Object(Eu["a"])(a)),void 0===a||a&&0===a.length)return;if(!1===this.hot.runHooks("beforePaste",a,this.copyableRanges))return;const[l,u,c,h]=this.populateValues(a);this.hot.selectCell(l,u,Math.min(this.hot.countRows()-1,c),Math.min(this.hot.countCols()-1,h)),this.hot.runHooks("afterPaste",a,this.copyableRanges)}destroy(){super.destroy()}}function wc(e){if(Object(p["isSafari"])()){const t=this.hot.getSelectedRangeLast();if(t){const{row:n,col:r}=t.highlight,s=this.hot.getCell(n,r,!0);s&&Object(i["runWithSelectedContendEditableElement"])(s,()=>{this.hot.rootDocument.execCommand(e)})}}else this.hot.rootDocument.execCommand(e)}function bc(e){const{rows:t}=Ku(e);let n=0;for(let r=0;r<t.length;r++){if(t[r]>=0)break;n+=1}return{columnHeadersCount:n}}function vc(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);r&&Object(i["makeElementContentEditableAndSelectItsContent"])(r)}}}function _c(){if(this.hot.isListening()){const e=this.hot.getSelectedRangeLast();if(e){const{row:t,col:n}=e.highlight,r=this.hot.getCell(t,n,!0);null!==r&&void 0!==r&&r.hasAttribute("contenteditable")&&Object(i["removeContentEditableFromElementAndDeselect"])(r)}}}function Sc(e){e.items.push({name:"---------"},Cu(this)),tc(lc,this)&&e.items.push(Ru(this)),tc(uc,this)&&e.items.push(Tu(this)),tc(cc,this)&&e.items.push(Mu(this)),e.items.push(Ou(this))}function Ec(e,t,n,r,i){tc(pc,this)&&(i.value=!0),nc(pc,this,!1)}function Cc(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function Mc(){rc(gc,this,_c).call(this)}function Tc(){rc(gc,this,vc).call(this)}function Rc(){rc(gc,this,_c).call(this)}function Oc(e,t){return`border_row${e}col${t}`}function Nc(){return{width:1,color:"#000"}}function Ac(){return{hide:!0}}function Lc(){return{width:1,color:"#000",cornerVisible:!1}}function Ic(e){var t,n;(Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left);(Object(d["isDefined"])(e.end)||Object(d["isDefined"])(e.right))&&(e.end=null!==(n=e.end)&&void 0!==n?n:e.right);return delete e.left,delete e.right,e}function kc(e){return Object(d["isDefined"])(e.start)&&(e.left=e.start),Object(d["isDefined"])(e.end)&&(e.right=e.end),e}function xc(e,t){return{id:Oc(e,t),border:Lc(),row:e,col:t,top:Ac(),bottom:Ac(),start:Ac(),end:Ac()}}function Dc(e,t){return Object(o["hasOwnProperty"])(t,"border")&&t.border&&(e.border=t.border),Object(o["hasOwnProperty"])(t,"top")&&Object(d["isDefined"])(t.top)&&(t.top?(Object(o["isObject"])(t.top)||(t.top=Nc()),e.top=t.top):(t.top=Ac(),e.top=t.top)),Object(o["hasOwnProperty"])(t,"bottom")&&Object(d["isDefined"])(t.bottom)&&(t.bottom?(Object(o["isObject"])(t.bottom)||(t.bottom=Nc()),e.bottom=t.bottom):(t.bottom=Ac(),e.bottom=t.bottom)),Object(o["hasOwnProperty"])(t,"start")&&Object(d["isDefined"])(t.start)&&(t.start?(Object(o["isObject"])(t.start)||(t.start=Nc()),e.start=t.start):(t.start=Ac(),e.start=t.start)),Object(o["hasOwnProperty"])(t,"end")&&Object(d["isDefined"])(t.end)&&(t.end?(Object(o["isObject"])(t.end)||(t.end=Nc()),e.end=t.end):(t.end=Ac(),e.end=t.end)),e}function Hc(e,t){let n=!1;return Object(h["arrayEach"])(e.getSelectedRange(),r=>{r.forAll((r,i)=>{if(r<0||i<0)return;const s=e.getCellMeta(r,i).borders;if(s){if(!t)return n=!0,!1;if(!Object(o["hasOwnProperty"])(s[t],"hide")||!1===s[t].hide)return n=!0,!1}})}),n}function Pc(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function jc(e){return e.some(e=>Object(d["isDefined"])(e.left)||Object(d["isDefined"])(e.right))}function Fc(e){return e.some(e=>Object(d["isDefined"])(e.start)||Object(d["isDefined"])(e.end))}const Yc=new Map([["left","start"],["right","end"]]);function Uc(e){var t;return null!==(t=Yc.get(e))&&void 0!==t?t:e}function Vc(e){return{key:"borders:top",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_TOP"]);const t=Hc(this,"top");return t&&(e=Pc(e)),e},callback(t,n){const r=Hc(this,"top");e.prepareBorder(n,"top",r)}}}function Bc(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]);const n=Hc(this,t);return n&&(e=Pc(e)),e},callback(n,r){const i=Hc(this,t);e.prepareBorder(r,t,i)}}}function Wc(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]);const t=Hc(this,"bottom");return t&&(e=Pc(e)),e},callback(t,n){const r=Hc(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function zc(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS_LEFT"]);const n=Hc(this,t);return n&&(e=Pc(e)),e},callback(n,r){const i=Hc(this,t);e.prepareBorder(r,t,i)}}}function Gc(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_REMOVE_BORDERS"])},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!Hc(this)}}}function Kc(e,t){Xc(e,t),t.add(e)}function Xc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $c(e,t,n){return(t=qc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qc(e){var t=Jc(e,"string");return"symbol"==typeof t?t:t+""}function Jc(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Qc(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Zc="customBorders",eh=90;var th=new WeakSet;class nh extends tn["a"]{constructor(){super(...arguments),Kc(this,th),$c(this,"savedBorders",[])}static get PLUGIN_KEY(){return Zc}static get PLUGIN_PRIORITY(){return eh}isEnabled(){return!!this.hot.getSettings()[Zc]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>Qc(th,this,rh).call(this,e)),this.addHook("init",()=>Qc(th,this,ih).call(this)),super.enablePlugin())}disablePlugin(){this.hideBorders(),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.changeBorderSettings(),super.updatePlugin()}setBorders(e,t){let n=["top","bottom","start","end"],r=null;t&&(this.checkSettingsCohesion([t]),n=Object.keys(t),r=Ic(t));const i=Object(za["c"])(e),s=Object(za["d"])(i,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});Object(h["arrayEach"])(e,e=>{s(e).forAll((e,t)=>{Object(h["arrayEach"])(n,n=>{this.prepareBorderFromCustomAdded(e,t,r,Uc(n))})})}),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=Object(za["c"])(e),n=Object(za["d"])(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),r=[];return Object(h["arrayEach"])(e,e=>{n(e).forAll((e,t)=>{Object(h["arrayEach"])(this.savedBorders,n=>{n.row===e&&n.col===t&&r.push(kc(n))})})}),r}clearBorders(e){e?this.setBorders(e):(Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")}),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){const n=this.checkSavedBorders(e);n||this.savedBorders.push(e);const r=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col)),i=this.checkCustomSelections(e,r,t);i||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:r})}prepareBorderFromCustomAdded(e,t,n,r){const i=this.hot.countRows(),s=this.hot.countCols();if(e>=i||t>=s)return;let o=xc(e,t);n&&(o=Dc(o,n),Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,e=>{if(o.id===e.settings.id)return Object.assign(e.settings,n),o.id=e.settings.id,o.top=e.settings.top,o.bottom=e.settings.bottom,o.start=e.settings.start,o.end=e.settings.end,!1})),this.hot.setCellMeta(e,t,"borders",kc(o)),this.insertBorderIntoSettings(o,r)}prepareBorderFromCustomAddedRange(e,t){const n=Math.min(e.to.row,this.hot.countRows()-1),r=Math.min(e.to.col,this.hot.countCols()-1);Object(it["rangeEach"])(e.from.row,n,n=>{Object(it["rangeEach"])(e.from.col,r,r=>{const i=xc(n,r);let s=0;n===e.from.row&&Object(o["hasOwnProperty"])(t,"top")&&(s+=1,i.top=t.top),n===e.to.row&&Object(o["hasOwnProperty"])(t,"bottom")&&(s+=1,i.bottom=t.bottom),r===e.from.col&&Object(o["hasOwnProperty"])(t,"start")&&(s+=1,i.start=t.start),r===e.to.col&&Object(o["hasOwnProperty"])(t,"end")&&(s+=1,i.end=t.end),s>0&&(this.hot.setCellMeta(n,r,"borders",kc(i)),this.insertBorderIntoSettings(i))})})}removeAllBorders(e,t){const n=Oc(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,n,r){let i=this.hot.getCellMeta(e,t).borders;if(i=i&&void 0!==i.border?Ic(i):xc(e,t),r){i[n]=Ac();const s=this.countHide(i);if(4===s)this.removeAllBorders(e,t);else{const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",kc(i))}}else{i[n]=Nc();const s=this.checkCustomSelectionsFromContextMenu(i,n,r);s||this.insertBorderIntoSettings(i),this.hot.setCellMeta(e,t,"borders",kc(i))}}prepareBorder(e,t,n){Object(h["arrayEach"])(e,e=>{let{start:r,end:i}=e;if(r.row===i.row&&r.col===i.col)"noBorders"===t?this.removeAllBorders(r.row,r.col):this.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":Object(it["rangeEach"])(r.col,i.col,e=>{Object(it["rangeEach"])(r.row,i.row,t=>{this.removeAllBorders(t,e)})});break;case"top":Object(it["rangeEach"])(r.col,i.col,e=>{this.setBorder(r.row,e,t,n)});break;case"bottom":Object(it["rangeEach"])(r.col,i.col,e=>{this.setBorder(i.row,e,t,n)});break;case"start":Object(it["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,r.col,t,n)});break;case"end":Object(it["rangeEach"])(r.row,i.row,e=>{this.setBorder(e,i.col,t,n)});break;default:break}})}createCustomBorders(e){Object(h["arrayEach"])(e,e=>{const t=Ic(e);e.range?this.prepareBorderFromCustomAddedRange(e.range,t):this.prepareBorderFromCustomAdded(e.row,e.col,t)})}countHide(e){const{top:t,bottom:n,start:r,end:i}=e,s=[t,n,r,i];return Object(h["arrayReduce"])(s,(e,t)=>{let n=e;return t&&t.hide&&(n+=1),n},0)}clearBordersFromSelectionSettings(e){const t=Object(h["arrayMap"])(this.hot.selection.highlight.customSelections,e=>e.settings.id).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,(e,t)=>{if(null===e.cellRange)return this.hot.selection.highlight.customSelections[t].destroy(),this.hot.selection.highlight.customSelections.splice(t,1),!1})}hideBorders(){Object(h["arrayEach"])(this.savedBorders,e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()})}spliceBorder(e){const t=Object(h["arrayMap"])(this.savedBorders,e=>e.id).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;const n=this.countHide(e);return 4===n?(this.spliceBorder(e.id),t=!0):Object(h["arrayEach"])(this.savedBorders,(n,r)=>{if(e.id===n.id)return this.savedBorders[r]=e,t=!0,!1}),t}checkCustomSelectionsFromContextMenu(e,t,n){let r=!1;return Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,i=>{if(e.id===i.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(i);return Object(h["arrayEach"])(e,e=>{e.toggleHiddenClass(t,n)}),r=!0,!1}}),r}checkCustomSelections(e,t,n){const r=this.countHide(e);let i=!1;return 4===r?(this.removeAllBorders(e.row,e.col),i=!0):Object(h["arrayEach"])(this.hot.selection.highlight.customSelections,r=>{if(e.id===r.settings.id){if(r.visualCellRange=t,r.commit(),n){const t=this.hot.view._wt.selectionManager.getBorderInstances(r);Object(h["arrayEach"])(t,t=>{t.changeBorderStyle(n,e)})}return i=!0,!1}}),i}changeBorderSettings(){const e=this.hot.getSettings()[Zc];if(Array.isArray(e)){const t=Object(o["deepClone"])(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=jc(e),n=Fc(e);if(t&&n)throw new Error('The "left"/"right" and "start"/"end" options should not be used together. Please use only the option "start"/"end".');if(this.hot.isRtl()&&t)throw new Error('The "left"/"right" properties are not supported for RTL. Please use option "start"/"end".')}destroy(){super.destroy()}}function rh(e){this.hot.getSettings()[Zc]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_BORDERS"])},disabled(){const e=this.getSelectedRangeLast();return!e||(!!e.isSingleHeader()||this.selection.isSelectedByCorner())},submenu:{items:[Vc(this),Bc(this),Wc(this),zc(this),Gc(this)]}})}function ih(){this.changeBorderSettings()}function sh(e,t){oh(e,t),t.add(e)}function oh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ah(e,t,n){return(t=lh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lh(e){var t=uh(e,"string");return"symbol"==typeof t?t:t+""}function uh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function ch(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const hh="dragToScroll",dh=100;var mh=new WeakSet;class fh extends tn["a"]{constructor(){super(...arguments),sh(this,mh),ah(this,"boundaries",null),ah(this,"callback",null),ah(this,"listening",!1)}static get PLUGIN_KEY(){return hh}static get PLUGIN_PRIORITY(){return dh}isEnabled(){return!!this.hot.getSettings()[hh]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",e=>ch(mh,this,ph).call(this,e)),this.addHook("afterOnCellCornerMouseDown",e=>ch(mh,this,ph).call(this,e)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.unregisterEvents(),super.disablePlugin()}setBoundaries(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{left:0,right:this.hot.rootWindow.innerWidth,top:0,bottom:this.hot.rootWindow.innerHeight};this.boundaries=e}setCallback(e){this.callback=e}check(e,t){let n=0,r=0;t<this.boundaries.top?r=t-this.boundaries.top:t>this.boundaries.bottom&&(r=t-this.boundaries.bottom),e<this.boundaries.left?n=e-this.boundaries.left:e>this.boundaries.right&&(n=e-this.boundaries.right),this.callback(n,r)}listen(){this.listening=!0}unlisten(){this.listening=!1}isListening(){return this.listening}registerEvents(){const{rootWindow:e}=this.hot;let t=e;while(t)this.eventManager.addEventListener(t.document,"contextmenu",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mouseup",()=>this.unlisten()),this.eventManager.addEventListener(t.document,"mousemove",e=>this.onMouseMove(e)),t=Object(i["getParentWindow"])(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function ph(e){if(Object(s["isRightClick"])(e))return;const t=this.hot.view._wt.wtOverlays.topOverlay.mainTableScrollableElement;this.setBoundaries(t!==this.hot.rootWindow?t.getBoundingClientRect():void 0),this.setCallback((e,n)=>{var r,i;const s=null!==(r=t.scrollLeft)&&void 0!==r?r:t.scrollX,o=null!==(i=t.scrollTop)&&void 0!==i?i:t.scrollY;t.scroll(s+50*Math.sign(e),o+20*Math.sign(n))}),this.listen()}function gh(e,t){wh(e,t),t.add(e)}function yh(e,t,n){wh(e,t),t.set(e,n)}function wh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bh(e,t,n){return(t=vh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vh(e){var t=_h(e,"string");return"symbol"==typeof t?t:t+""}function _h(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Sh(e,t){return e.get(Ch(e,t))}function Eh(e,t,n){return e.set(Ch(e,t),n),n}function Ch(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("afterDropdownMenuDefaultOptions"),pe["a"].getSingleton().register("beforeDropdownMenuShow"),pe["a"].getSingleton().register("afterDropdownMenuShow"),pe["a"].getSingleton().register("afterDropdownMenuHide"),pe["a"].getSingleton().register("afterDropdownMenuExecute");const Mh="dropdownMenu",Th=230,Rh="changeType",Oh=Mh;var Nh=new WeakMap,Ah=new WeakSet;class Lh extends tn["a"]{static get PLUGIN_KEY(){return Mh}static get PLUGIN_PRIORITY(){return Th}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[Pa,Fa,ko,Ga,ko,Da,ko,Ua,ko,ka]}constructor(e){super(e),gh(this,Ah),bh(this,"commandExecutor",new La(this.hot)),bh(this,"itemsFactory",null),bh(this,"menu",null),yh(this,Nh,!1),this.hot.addHook("afterGetColHeader",(e,t)=>Ch(Ah,this,xh).call(this,e,t))}isEnabled(){return this.hot.getSettings()[Mh]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new cl(this.hot,Lh.DEFAULT_ITEMS),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ch(Ah,e,Yh).call(e,...n)})),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ch(Ah,e,Fh).call(e,...n)}));const t=this.hot.getSettings()[Mh],n={items:this.itemsFactory.getItems(t)};this.registerEvents(),"function"===typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.registerShortcuts(),super.enablePlugin(),this.callOnPluginsReady(()=>{this.hot.runHooks("afterDropdownMenuDefaultOptions",n),this.itemsFactory.setPredefinedItems(n.items);const r=this.itemsFactory.getItems(t);this.menu&&this.menu.destroy(),this.menu=new au(this.hot,{className:"htDropdownMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.hot.runHooks("beforeDropdownMenuSetItems",r),this.menu.setMenuItems(r),this.menu.addLocalHook("beforeOpen",()=>Ch(Ah,this,Dh).call(this)),this.menu.addLocalHook("afterOpen",()=>Ch(Ah,this,Hh).call(this)),this.menu.addLocalHook("afterSubmenuOpen",e=>Ch(Ah,this,Ph).call(this,e)),this.menu.addLocalHook("afterClose",()=>Ch(Ah,this,jh).call(this)),this.menu.addLocalHook("executeCommand",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.executeCommand.call(e,...n)})),Object(h["arrayEach"])(r,e=>this.commandExecutor.registerCommand(e.key,e))})}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.close(),this.menu&&this.menu.destroy(),this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t=()=>{const{highlight:e}=this.hot.getSelectedRangeLast();if((e.isHeader()&&-1===e.row||e.isCell())&&e.col>=0){this.hot.selectColumns(e.col,e.col,-1);const{from:t}=this.hot.getSelectedRangeLast(),n=Wo(this.menu.container,this.hot.rootDocument),r=this.hot.getCell(-1,t.col,!0).querySelector("."+Rh),i=r.getBoundingClientRect();this.open({left:i.left+n.left,top:i.top+r.offsetHeight+n.top},{left:i.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};e.addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isHeader()&&!this.menu.isOpened()},captureCtrl:!0,group:Oh},{keys:[["Shift","Alt","ArrowDown"]],callback:t,runOnlyIf:()=>{var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t&&this.hot.selection.isCellVisible(t)&&t.isCell()&&!this.menu.isOpened()},group:Oh}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Oh)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",e=>Ch(Ah,this,kh).call(this,e))}open(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{above:0,below:0,left:0,right:0};null!==(t=this.menu)&&void 0!==t&&t.isOpened()||(this.menu.open(),Object(o["objectEach"])(n,(e,t)=>{this.menu.setOffset(t,e)}),this.menu.setPosition(e))}close(){var e;null===(e=this.menu)||void 0===e||e.close()}executeCommand(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.commandExecutor.execute(e,...n)}setListening(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.menu.isOpened()&&(e?this.menu.hotMenu.listen():this.menu.hotMenu.unlisten())}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function Ih(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function kh(e){if(Object(i["hasClass"])(e.target,Rh)){const t=Wo(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),Eh(Nh,this,!1),this.open({left:n.left+t.left,top:n.top+e.target.offsetHeight+t.top},{left:n.width,right:0,above:0,below:3})}}function xh(e,t){const n=t.parentNode;if(!n)return;const r=n.parentNode.childNodes,s=Array.prototype.indexOf.call(r,n);if(e<0||s!==r.length-1)return;const o=t.querySelector("."+Rh);if(this.enabled&&o)return;if(!this.enabled)return void(o&&o.parentNode.removeChild(o));const a=this.hot.rootDocument.createElement("button");a.className=Rh,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(a,[Object(y["n"])(),Object(y["p"])(" ")]),Object(i["setAttribute"])(t,[Object(y["m"])("menu")])),a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}function Dh(){this.hot.runHooks("beforeDropdownMenuShow",this)}function Hh(){this.hot.runHooks("afterDropdownMenuShow",this),Ch(Ah,this,Ih).call(this,this.menu)}function Ph(e){Ch(Ah,this,Ih).call(this,e)}function jh(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function Fh(e){return Sh(Nh,this)?null:e}function Yh(e){Object(i["hasClass"])(e.target,Rh)&&Eh(Nh,this,!0)}function Uh(e,t,n){return(t=Vh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vh(e){var t=Bh(e,"string");return"symbol"==typeof t?t:t+""}function Bh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Lh.SEPARATOR={name:ko};class Wh{constructor(e){Uh(this,"hot",void 0),Uh(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:n,endCol:r}=this._getDataRange(),i=this.options,s=[];return Object(it["rangeEach"])(e,n,e=>{const n=[];!i.exportHiddenRows&&this._isHiddenRow(e)||(Object(it["rangeEach"])(t,r,t=>{!i.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))}),s.push(n))}),s}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),r=this.hot.getRowHeader();Object(it["rangeEach"])(t,n,t=>{!this.options.exportHiddenRows&&this._isHiddenRow(t)||e.push(r[t])})}return e}getColumnHeaders(){const e=[];if(this.options.columnHeaders){const{startCol:t,endCol:n}=this._getDataRange(),r=this.hot.getColHeader();Object(it["rangeEach"])(t,n,t=>{!this.options.exportHiddenColumns&&this._isHiddenColumn(t)||e.push(r[t])})}return e}_getDataRange(){const e=this.hot.countCols()-1,t=this.hot.countRows()-1;let[n=0,r=0,i=t,s=e]=this.options.range;return n=Math.max(n,0),r=Math.max(r,0),i=Math.min(i,t),s=Math.min(s,e),{startRow:n,startCol:r,endRow:i,endCol:s}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}}var zh=Wh;function Gh(e,t,n){return(t=Kh(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kh(e){var t=Xh(e,"string");return"symbol"==typeof t?t:t+""}function Xh(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class $h{static get DEFAULT_OPTIONS(){return{mimeType:"text/plain",fileExtension:"txt",filename:"Handsontable [YYYY]-[MM]-[DD]",encoding:"utf-8",bom:!1,columnHeaders:!1,rowHeaders:!1,exportHiddenColumns:!1,exportHiddenRows:!1,range:[]}}constructor(e,t){Gh(this,"dataProvider",void 0),Gh(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=Object(o["clone"])(this.constructor.DEFAULT_OPTIONS);const n=new Date;return t=Object(o["extend"])(Object(o["clone"])($h.DEFAULT_OPTIONS),t),t=Object(o["extend"])(t,e),t.filename=Object(m["substitute"])(t.filename,{YYYY:n.getFullYear(),MM:(""+(n.getMonth()+1)).padStart(2,"0"),DD:(""+n.getDate()).padStart(2,"0")}),t}}var qh=$h;const Jh=String.fromCharCode(13),Qh=String.fromCharCode(34),Zh=String.fromCharCode(10);class ed extends qh{static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n"}}export(){const e=this.options,t=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const r=n.length>0,i=this.dataProvider.getRowHeaders(),s=i.length>0;let o=e.bom?String.fromCharCode(65279):"";return r&&(n=Object(h["arrayMap"])(n,e=>this._escapeCell(e,!0)),s&&(o+=e.columnDelimiter),o+=n.join(e.columnDelimiter),o+=e.rowDelimiter),Object(h["arrayEach"])(t,(t,n)=>{n>0&&(o+=e.rowDelimiter),s&&(o+=this._escapeCell(i[n])+e.columnDelimiter),o+=t.map(e=>this._escapeCell(e)).join(e.columnDelimiter)}),o}_escapeCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=Object(d["stringify"])(e);return""!==n&&(t||n.indexOf(Jh)>=0||n.indexOf(Qh)>=0||n.indexOf(Zh)>=0||n.indexOf(this.options.columnDelimiter)>=0)&&(n=n.replace(new RegExp('"',"g"),'""'),n=`"${n}"`),n}}var td=ed;const nd="csv",rd={[nd]:td};function id(e,t,n){return"function"===typeof rd[e]?new rd[e](t,n):null}const sd="exportFile",od=240;class ad extends tn["a"]{static get PLUGIN_KEY(){return sd}static get PLUGIN_PRIORITY(){return od}isEnabled(){return!0}exportAsString(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createTypeFormatter(e,t).export()}exportAsBlob(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this._createBlob(this._createTypeFormatter(e,t))}downloadFile(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{rootDocument:n,rootWindow:r}=this.hot,i=this._createTypeFormatter(e,t),s=this._createBlob(i),o=r.URL||r.webkitURL,a=n.createElement("a"),l=`${i.options.filename}.${i.options.fileExtension}`;if(void 0!==a.download){const e=o.createObjectURL(s);a.style.display="none",a.setAttribute("href",e),a.setAttribute("download",l),n.body.appendChild(a),a.dispatchEvent(new MouseEvent("click")),n.body.removeChild(a),setTimeout(()=>{o.revokeObjectURL(e)},100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(s,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!rd[e])throw new Error(`Export format type "${e}" is not supported.`);return id(e,new zh(this.hot),t)}_createBlob(e){let t=null;return"undefined"!==typeof Blob&&(t=new Blob([e.export()],{type:`${e.options.mimeType};charset=${e.options.encoding}`})),t}}n("24b9e");function ld(e,t,n){return(t=ud(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ud(e){var t=cd(e,"string");return"symbol"==typeof t?t:t+""}function cd(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class hd{constructor(e,t){let{id:n,stateless:r=!0}=t;ld(this,"hot",void 0),ld(this,"id",void 0),ld(this,"elements",[]),ld(this,"hidden",!1),ld(this,"stateId",""),ld(this,"state",void 0),this.hot=e,this.id=n,this.stateId="Filters.component."+this.id,this.state=r?null:this.hot.columnIndexMapper.registerMap(this.stateId,new bi["a"])}getElements(){return this.elements}reset(){Object(h["arrayEach"])(this.elements,e=>e.reset())}hide(){this.hidden=!0}show(){this.hidden=!1}isHidden(){return null===this.hot||this.hidden}restoreState(e){this.state&&this.setState(this.state.getValueAtIndex(e))}setState(){throw new Error("The state setting logic is not implemented")}saveState(e){this.state&&this.state.setValueAtIndex(e,this.getState())}getState(){throw new Error("The state gathering logic is not implemented")}destroy(){this.hot.columnIndexMapper.unregisterMap(this.stateId),this.clearLocalHooks(),Object(h["arrayEach"])(this.elements,e=>e.destroy()),this.state=null,this.elements=null,this.hot=null}}Object(o["mixin"])(hd,Qs["a"]);const dd={};function md(e,t){if(!dd[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:r}=dd[e];let i=t;return r.inputValuesDecorator&&(i=r.inputValuesDecorator(i)),function(e){return n.apply(e.meta.instance,[].concat([e],[i]))}}function fd(e){if(!dd[e])throw Error(`Filter condition "${e}" does not exist.`);return dd[e].descriptor}function pd(e,t,n){n.key=e,dd[e]={condition:t,descriptor:n}}const gd="none";function yd(){return!0}pd(gd,yd,{name:je["FILTERS_CONDITIONS_NONE"],inputsCount:0,showOperators:!1});const wd="empty";function bd(e){return Object(d["isEmpty"])(e.value)}pd(wd,bd,{name:je["FILTERS_CONDITIONS_EMPTY"],inputsCount:0,showOperators:!0});const vd="not_empty";function _d(e,t){return!md(wd,t)(e)}pd(vd,_d,{name:je["FILTERS_CONDITIONS_NOT_EMPTY"],inputsCount:0,showOperators:!0});const Sd="eq";function Ed(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale)===Object(d["stringify"])(n)}pd(Sd,Ed,{name:je["FILTERS_CONDITIONS_EQUAL"],inputsCount:1,showOperators:!0});const Cd="neq";function Md(e,t){return!md(Sd,t)(e)}pd(Cd,Md,{name:je["FILTERS_CONDITIONS_NOT_EQUAL"],inputsCount:1,showOperators:!0});const Td="gt";function Rd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>r}pd(Td,Rd,{name:je["FILTERS_CONDITIONS_GREATER_THAN"],inputsCount:1,showOperators:!0});const Od="gte";function Nd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>=r}pd(Od,Nd,{name:je["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const Ad="lt";function Ld(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<r}pd(Ad,Ld,{name:je["FILTERS_CONDITIONS_LESS_THAN"],inputsCount:1,showOperators:!0});const Id="lte";function kd(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<=r}pd(Id,kd,{name:je["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"],inputsCount:1,showOperators:!0});const xd="date_after";function Dd(e,t){let[n]=t;const r=I()(e.value,e.meta.dateFormat),i=I()(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)>=0}pd(xd,Dd,{name:je["FILTERS_CONDITIONS_AFTER"],inputsCount:1,showOperators:!0});const Hd="date_before";function Pd(e,t){let[n]=t;const r=I()(e.value,e.meta.dateFormat),i=I()(n,e.meta.dateFormat);return!(!r.isValid()||!i.isValid())&&r.diff(i)<=0}pd(Hd,Pd,{name:je["FILTERS_CONDITIONS_BEFORE"],inputsCount:1,showOperators:!0});const jd="between";function Fd(e,t){let[n,r]=t,i=n,s=r;if("numeric"===e.meta.type){const e=parseFloat(i,10),t=parseFloat(s,10);i=Math.min(e,t),s=Math.max(e,t)}else if("date"===e.meta.type){const t=md(Hd,[s]),n=md(xd,[i]);return t(e)&&n(e)}return e.value>=i&&e.value<=s}pd(jd,Fd,{name:je["FILTERS_CONDITIONS_BETWEEN"],inputsCount:2,showOperators:!0});const Yd="not_between";function Ud(e,t){return!md(jd,t)(e)}pd(Yd,Ud,{name:je["FILTERS_CONDITIONS_NOT_BETWEEN"],inputsCount:2,showOperators:!0});const Vd="begins_with";function Bd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).startsWith(Object(d["stringify"])(n))}pd(Vd,Bd,{name:je["FILTERS_CONDITIONS_BEGINS_WITH"],inputsCount:1,showOperators:!0});const Wd="ends_with";function zd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).endsWith(Object(d["stringify"])(n))}pd(Wd,zd,{name:je["FILTERS_CONDITIONS_ENDS_WITH"],inputsCount:1,showOperators:!0});const Gd="contains";function Kd(e,t){let[n]=t;return Object(d["stringify"])(e.value).toLocaleLowerCase(e.meta.locale).indexOf(Object(d["stringify"])(n))>=0}pd(Gd,Kd,{name:je["FILTERS_CONDITIONS_CONTAINS"],inputsCount:1,showOperators:!0});const Xd="not_contains";function $d(e,t){return!md(Gd,t)(e)}pd(Xd,$d,{name:je["FILTERS_CONDITIONS_NOT_CONTAIN"],inputsCount:1,showOperators:!0});const qd="date_tomorrow";function Jd(e){const t=I()(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I()().subtract(-1,"days").startOf("day"),"d")}pd(qd,Jd,{name:je["FILTERS_CONDITIONS_TOMORROW"],inputsCount:0});const Qd="date_today";function Zd(e){const t=I()(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I()().startOf("day"),"d")}pd(Qd,Zd,{name:je["FILTERS_CONDITIONS_TODAY"],inputsCount:0});const em="date_yesterday";function tm(e){const t=I()(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(I()().subtract(1,"days").startOf("day"),"d")}pd(em,tm,{name:je["FILTERS_CONDITIONS_YESTERDAY"],inputsCount:0});const nm="numeric",rm="text",im="date",sm={[nm]:[gd,ko,wd,vd,ko,Sd,Cd,ko,Td,Od,Ad,Id,jd,Yd],[rm]:[gd,ko,wd,vd,ko,Sd,Cd,ko,Vd,Wd,ko,Gd,Xd],[im]:[gd,ko,wd,vd,ko,Sd,Cd,ko,Hd,xd,jd,ko,qd,Qd,em]};function om(e){const t=[];let n=e;return sm[n]||(n=rm),Object(h["arrayEach"])(sm[n],e=>{let n;n=e===ko?{name:ko}:Object(o["clone"])(fd(e)),t.push(n)}),t}function am(e,t,n){return(t=lm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lm(e){var t=um(e,"string");return"symbol"==typeof t?t:t+""}function um(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const cm="built",hm="building",dm=["click","input","keydown","keypress","keyup","focus","blur","change"];class mm{static get DEFAULTS(){return Object(o["clone"])({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){am(this,"hot",void 0),am(this,"eventManager",new ke["a"](this)),am(this,"options",void 0),am(this,"_element",void 0),am(this,"buildState",void 0),this.hot=e,this.options=Object(o["extend"])(mm.DEFAULTS,t),this._element=this.hot.rootDocument.createElement(this.options.wrapIt?"div":this.options.tagName)}setValue(e){this.options.value=e,this.update()}getValue(){return this.options.value}get element(){return this.buildState===hm?this._element:this.buildState===cm?(this.update(),this._element):(this.buildState=hm,this.build(),this.buildState=cm,this._element)}isBuilt(){return this.buildState===cm}translateIfPossible(e){return"string"===typeof e&&e.startsWith(je["FILTERS_NAMESPACE"])?this.hot.getTranslatedPhrase(e):e}build(){const e=(e,t)=>{this.eventManager.addEventListener(e,t,e=>this.runLocalHooks(t,e,this))};if(this.buildState||(this.buildState=hm),this._element.setAttribute("data-hot-input",!0),void 0!==this.options.tabIndex&&this._element.setAttribute("tabindex",this.options.tabIndex),void 0!==this.options.role&&this._element.setAttribute("role",this.options.role),this.options.className&&Object(i["addClass"])(this._element,this.options.className),this.options.children.length)Object(h["arrayEach"])(this.options.children,e=>this._element.appendChild(e.element));else if(this.options.wrapIt){const t=this.hot.rootDocument.createElement(this.options.tagName);t.setAttribute("data-hot-input",!0),Object(o["objectEach"])(this.options,(e,n)=>{void 0!==t[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(t[n]=this.translateIfPossible(e))}),this._element.appendChild(t),Object(h["arrayEach"])(dm,n=>e(t,n))}else Object(h["arrayEach"])(dm,t=>e(this._element,t))}update(){}reset(){this.options.value="",this.update()}show(){this.element.style.display=""}hide(){this.element.style.display="none"}focus(){}destroy(){this.eventManager.destroy(),this.eventManager=null,this.hot=null,this._element.parentNode&&this._element.parentNode.removeChild(this._element),this._element=null}}function fm(e,t){gm(e,t),t.add(e)}function pm(e,t,n){gm(e,t),t.set(e,n)}function gm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ym(e,t){return e.get(bm(e,t))}function wm(e,t,n){return e.set(bm(e,t),n),n}function bm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(o["mixin"])(mm,Qs["a"]);var vm=new WeakMap,_m=new WeakSet;class Sm extends mm{static get DEFAULTS(){return Object(o["clone"])({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Sm.DEFAULTS,t)),fm(this,_m),pm(this,vm,void 0),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",e=>bm(_m,this,Em).call(this,e))}build(){super.build();const e=this.hot.rootDocument.createElement("div");wm(vm,this,this._element.firstChild),Object(i["addClass"])(this._element,"htUIInput"),Object(i["addClass"])(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(ym(vm,this).type=this.options.type,ym(vm,this).placeholder=this.translateIfPossible(this.options.placeholder),ym(vm,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&ym(vm,this).focus()}}function Em(e){this.options.value=e.target.value}function Cm(e,t){Tm(e,t),t.add(e)}function Mm(e,t,n){Tm(e,t),t.set(e,n)}function Tm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Rm(e,t,n){return e.set(Nm(e,t),n),n}function Om(e,t){return e.get(Nm(e,t))}function Nm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Am=new WeakMap,Lm=new WeakMap,Im=new WeakMap,km=new WeakMap,xm=new WeakMap,Dm=new WeakSet;class Hm extends mm{static get DEFAULTS(){return Object(o["clone"])({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){super(e,Object(o["extend"])(Hm.DEFAULTS,t)),Cm(this,Dm),Mm(this,Am,null),Mm(this,Lm,[]),Mm(this,Im,void 0),Mm(this,km,void 0),Mm(this,xm,void 0),this.registerHooks()}getMenu(){return Om(Am,this)}registerHooks(){this.addLocalHook("click",()=>Nm(Dm,this,Fm).call(this))}setItems(e){Rm(Lm,this,this.translateNames(e)),Om(Am,this)&&Om(Am,this).setMenuItems(Om(Lm,this))}translateNames(e){return Object(h["arrayEach"])(e,e=>{e.name=this.translateIfPossible(e.name)}),e}build(){super.build(),Rm(Am,this,new au(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),Om(Am,this).setMenuItems(Om(Lm,this));const e=new mm(this.hot,{className:"htUISelectCaption"}),t=new mm(this.hot,{className:"htUISelectDropdown"});Rm(Im,this,e),Rm(km,this,e.element),Rm(xm,this,t),this.hot.getSettings().ariaTags&&(Object(i["setAttribute"])(t.element,[Object(y["n"])()]),Object(i["setAttribute"])(this._element,[Object(y["q"])()])),Object(h["arrayEach"])([e,t],e=>this._element.appendChild(e.element)),Om(Am,this).addLocalHook("select",e=>Nm(Dm,this,Pm).call(this,e)),Om(Am,this).addLocalHook("afterClose",()=>Nm(Dm,this,jm).call(this)),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:Om(Am,this).hot.getTranslatedPhrase(je["FILTERS_CONDITIONS_NONE"]),Om(km,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();Om(Am,this)&&(Om(Am,this).open(),Om(Am,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),Om(Am,this).getNavigator().toFirstItem(),Om(Am,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){Om(Am,this)&&Om(Am,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){Om(Am,this)&&(Om(Am,this).destroy(),Rm(Am,this,null)),Om(Im,this)&&Om(Im,this).destroy(),Om(xm,this)&&Om(xm,this).destroy(),super.destroy()}}function Pm(e){e.name!==ko&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function jm(){this.runLocalHooks("afterClose")}function Fm(){this.openOptions()}function Ym(e,t){Um(e,t),t.add(e)}function Um(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vm(e,t,n){return(t=Bm(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bm(e){var t=Wm(e,"string");return"symbol"==typeof t?t:t+""}function Wm(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function zm(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Gm=new WeakSet;class Km extends hd{constructor(e,t){super(e,{id:t.id,stateless:!1}),Ym(this,Gm),Vm(this,"name",""),Vm(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new Hm(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new Sm(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]})),this.elements.push(new Sm(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",e=>zm(Gm,this,Xm).call(this,e)).addLocalHook("afterClose",()=>this.runLocalHooks("afterClose")).addLocalHook("tabKeydown",e=>this.runLocalHooks("selectTabKeydown",e)),Object(h["arrayEach"])(this.getInputElements(),e=>{e.addLocalHook("keydown",e=>zm(Gm,this,$m).call(this,e))})}setState(e){if(this.reset(),!e)return;const t=Object(o["clone"])(e.command);t.name.startsWith(je["FILTERS_CONDITIONS_NAMESPACE"])&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),Object(h["arrayEach"])(e.args,(e,n)=>{if(n>t.inputsCount-1)return!1;const r=this.getInputElement(n);r.setValue(e),r[t.inputsCount>n?"show":"hide"](),n||this.hot._registerTimeout(()=>r.focus(),10)})}getState(){const e=this.getSelectElement().getValue()||fd(gd),t=[];return Object(h["arrayEach"])(this.getInputElements(),(n,r)=>{e.inputsCount>r&&t.push(n.getValue())}),{command:e,args:t}}updateState(e,t){const n=fd(e?e.name:gd);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||Object(h["arrayEach"])(this.getInputElements(),e=>e.setValue(null))}getSelectElement(){return this.elements.filter(e=>e instanceof Hm)[0]}getInputElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.getInputElements()[e]}getInputElements(){return this.elements.filter(e=>e instanceof Sm)}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&Object(i["addClass"])(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[fd(gd)];if(null!==e){const{visualIndex:n}=e;t=om(this.hot.getDataType(0,n,this.hot.countRows(),n))}Object(h["arrayEach"])(this.getInputElements(),e=>e.hide()),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function Xm(e){Object(h["arrayEach"])(this.getInputElements(),(t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout(()=>t.focus(),10)}),this.runLocalHooks("change",e)}function $m(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}const qm={};function Jm(e){if(!qm[e])throw Error(`Operation with id "${e}" does not exist.`);const t=qm[e].func;return function(e,n){return t(e,n)}}function Qm(e){return qm[e].name}function Zm(e,t,n){qm[e]={name:t,func:n}}const ef="conjunction",tf=je["FILTERS_LABELS_CONJUNCTION"];function nf(e,t){return e.every(e=>e.func(t))}Zm(ef,tf,nf);const rf="disjunction",sf=je["FILTERS_LABELS_DISJUNCTION"];function of(e,t){return e.some(e=>e.func(t))}Zm(rf,sf,of);const af="disjunctionWithExtraCondition",lf=je["FILTERS_LABELS_DISJUNCTION"];function uf(e,t){if(e.length<3)throw Error("Operation doesn't work on less then three conditions.");return e.slice(0,e.length-1).some(e=>e.func(t))&&e[e.length-1].func(t)}function cf(e,t,n){hf(e,t),t.set(e,n)}function hf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function df(e,t){return e.get(ff(e,t))}function mf(e,t,n){return e.set(ff(e,t),n),n}function ff(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Zm(af,lf,uf);var pf=new WeakMap,gf=new WeakMap;class yf extends mm{static get DEFAULTS(){return Object(o["clone"])({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,Object(o["extend"])(yf.DEFAULTS,t)),cf(this,pf,void 0),cf(this,gf,void 0)}build(){super.build();const e=this.hot.rootDocument.createElement("label");e.textContent=this.translateIfPossible(this.options.label.textContent),e.htmlFor=this.translateIfPossible(this.options.label.htmlFor),mf(gf,this,e),mf(pf,this,this._element.firstChild),df(pf,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(df(gf,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&df(pf,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(df(pf,this).checked=e)}focus(){this.isBuilt()&&df(pf,this).focus()}}function wf(e,t){bf(e,t),t.add(e)}function bf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vf(e,t,n){return(t=_f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _f(e){var t=Sf(e,"string");return"symbol"==typeof t?t:t+""}function Sf(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ef(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Cf=0;var Mf=new WeakSet;class Tf extends hd{constructor(e,t){super(e,{id:t.id,stateless:!1}),wf(this,Mf),vf(this,"name",""),this.name=t.name,this.buildOperatorsElement()}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuOperators"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}buildOperatorsElement(){const e=[ef,rf];Object(h["arrayEach"])(e,t=>{const n=new yf(this.hot,{name:"operator",label:{htmlFor:t,textContent:Qm(t)},value:t,checked:t===e[Cf],id:t});n.addLocalHook("change",e=>Ef(Mf,this,Rf).call(this,e)),this.elements.push(n)})}setChecked(e){if(this.elements.length<e)throw Error(Hs["a"]`Radio button with index ${e} doesn't exist.`);Object(h["arrayEach"])(this.elements,(t,n)=>{t.setChecked(n===e)})}getActiveOperationId(){const e=this.elements.find(e=>e instanceof yf&&e.isChecked());return e?e.getValue():ef}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&Object(h["arrayEach"])(this.elements,t=>{t.setChecked(t.getValue()===e)})}updateState(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ef,t=arguments.length>1?arguments[1]:void 0,n=e;n===af&&(n=rf),this.state.setValueAtIndex(t,n)}reset(){this.setChecked(Cf)}}function Rf(e){this.setState(e.target.value)}Object(nn["getComparisonFunction"])();function Of(e,t){let n=e;return""===n&&(n=`(${t})`),n}const Nf=new Set([1]).has(1),Af=Nf&&"function"===typeof Array.from;function Lf(e){let t=e;return Nf&&(t=new Set(t)),function(e){let n;return n=Nf?t.has(e):!!~t.indexOf(e),n}}function If(e){return null===e||void 0===e?"":e}function kf(e){let t=e;return t=Af?Array.from(new Set(t)):Object(h["arrayUnique"])(t),t=t.sort((e,t)=>"number"===typeof e&&"number"===typeof t?e-t:e===t?0:e>t?1:-1),t}function xf(e,t,n,r){const i=[],s=e===t;let o;return s||(o=Lf(t)),Object(h["arrayEach"])(e,e=>{let t=!1;(s||o(e))&&(t=!0);const a={checked:t,value:e,visualValue:Of(e,n)};r&&r(a),i.push(a)}),i}var Df=n("480c");function Hf(e,t,n){Pf(e,t),t.set(e,n)}function Pf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jf(e,t){return e.get(Yf(e,t))}function Ff(e,t,n){return e.set(Yf(e,t),n),n}function Yf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Uf=new WeakMap;class Vf extends mm{static get DEFAULTS(){return Object(o["clone"])({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){super(e,Object(o["extend"])(Vf.DEFAULTS,t)),Hf(this,Uf,void 0)}build(){super.build(),Ff(Uf,this,this._element.firstChild)}update(){this.isBuilt()&&(jf(Uf,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&jf(Uf,this).focus()}activate(){jf(Uf,this).click()}}function Bf(e,t){zf(e,t),t.add(e)}function Wf(e,t,n){zf(e,t),t.set(e,n)}function zf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gf(e,t){return e.get(Xf(e,t))}function Kf(e,t,n){return e.set(Xf(e,t),n),n}function Xf(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const $f="multipleSelect.itemBox";var qf=new WeakMap,Jf=new WeakMap,Qf=new WeakMap,Zf=new WeakMap,ep=new WeakMap,tp=new WeakMap,np=new WeakSet;class rp extends mm{static get DEFAULTS(){return Object(o["clone"])({className:"htUIMultipleSelect",value:[]})}constructor(e,t){super(e,Object(o["extend"])(rp.DEFAULTS,t)),Bf(this,np),Wf(this,qf,[]),Wf(this,Jf,void 0),Wf(this,Qf,void 0),Wf(this,Zf,void 0),Wf(this,ep,void 0),Wf(this,tp,void 0),Kf(Zf,this,new Sm(this.hot,{placeholder:je["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"],className:"htUIMultipleSelectSearch"})),Kf(ep,this,new Vf(this.hot,{textContent:je["FILTERS_BUTTONS_SELECT_ALL"],className:"htUISelectAll"})),Kf(tp,this,new Vf(this.hot,{textContent:je["FILTERS_BUTTONS_CLEAR"],className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Gf(Jf,this)}registerHooks(){Gf(Zf,this).addLocalHook("keydown",e=>Xf(np,this,sp).call(this,e)),Gf(Zf,this).addLocalHook("input",e=>Xf(np,this,ip).call(this,e)),Gf(ep,this).addLocalHook("click",e=>Xf(np,this,op).call(this,e)),Gf(tp,this).addLocalHook("click",e=>Xf(np,this,ap).call(this,e))}setItems(e){var t;Kf(qf,this,e),null===(t=Gf(Jf,this))||void 0===t||t.loadData(Gf(qf,this))}setLocale(e){Kf(Qf,this,e)}getLocale(){return Gf(Qf,this)}getItems(){return[...Gf(qf,this)]}getValue(){return up(Gf(qf,this))}getSearchInputElement(){return Gf(Zf,this)}getSelectAllElement(){return Gf(ep,this)}getClearAllElement(){return Gf(tp,this)}isSelectedAllValues(){return Gf(qf,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new mm(this.hot,{className:"htUISelectionControls",children:[Gf(ep,this),Gf(tp,this)]});this._element.appendChild(Gf(Zf,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const r=t=>{var n;if(!this._element)return;null===(n=Gf(Jf,this))||void 0===n||n.destroy(),Object(i["addClass"])(t,"htUIMultipleSelectHot"),Kf(Jf,this,new this.hot.constructor(t,{data:Gf(qf,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,n,r,i,s)=>{e.title=s.instance.getDataAtRowProp(t,s.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Gf(Jf,this).listen()},colWidths:()=>Gf(Jf,this).container.scrollWidth-Object(i["getScrollbarWidth"])(e),maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Gf(Jf,this).init();const r=Gf(Jf,this).getShortcutManager(),s=r.getContext("grid");s.removeShortcutsByKeys(["Tab"]),s.removeShortcutsByKeys(["Shift","Tab"]),s.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:$f}),s.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{Gf(Jf,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:$f})};r(t),this.hot._registerTimeout(()=>r(t),100)}focus(){this.isBuilt()&&Gf(Jf,this).listen()}reset(){Gf(Zf,this).reset(),Gf(ep,this).reset(),Gf(tp,this).reset()}update(){this.isBuilt()&&(Gf(Jf,this).loadData(lp(Gf(qf,this),this.options.value)),super.update())}destroy(){var e;null===(e=Gf(Jf,this))||void 0===e||e.destroy(),Gf(Zf,this).destroy(),Gf(tp,this).destroy(),Gf(ep,this).destroy(),Kf(Zf,this,null),Kf(tp,this,null),Kf(ep,this,null),Kf(Jf,this,null),Kf(qf,this,null),super.destroy()}}function ip(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...Gf(qf,this)]:Gf(qf,this).filter(e=>(""+e.value).toLocaleLowerCase(this.getLocale()).indexOf(t)>=0),Gf(Jf,this).loadData(n)}function sp(e){this.runLocalHooks("keydown",e,this);const t=Object(yi["partial"])(f["isKey"],e.keyCode);t("ARROW_DOWN")&&(e.preventDefault(),Object(s["stopImmediatePropagation"])(e),Gf(Jf,this).listen(),Gf(Jf,this).selectCell(0,0))}function op(e){const t=[];e.preventDefault(),Gf(Jf,this).getSourceData().forEach((e,n)=>{e.checked=!0,t.push(Object(Df["dataRowToChangesArray"])(e,n)[0])}),Gf(Jf,this).setSourceDataAtCell(t)}function ap(e){const t=[];e.preventDefault(),Gf(Jf,this).getSourceData().forEach((e,n)=>{e.checked=!1,t.push(Object(Df["dataRowToChangesArray"])(e,n)[0])}),Gf(Jf,this).setSourceDataAtCell(t)}function lp(e,t){const n=Lf(t);return e.map(e=>(e.checked=n(e.value),e))}function up(e){const t=[];return e.forEach(e=>{e.checked&&t.push(e.value)}),t}const cp="by_value";function hp(e,t){let[n]=t;return n(e.value)}function dp(e,t){mp(e,t),t.add(e)}function mp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fp(e,t,n){return(t=pp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pp(e){var t=gp(e,"string");return"symbol"==typeof t?t:t+""}function gp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function yp(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pd(cp,hp,{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[Lf(t)]},showOperators:!1});var wp,bp=new WeakSet;class vp extends hd{constructor(e,t){super(e,{id:t.id,stateless:!1}),dp(this,bp),fp(this,"name",""),this.name=t.name,this.elements.push(new rp(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",e=>yp(bp,this,_p).call(this,e)).addLocalHook("listTabKeydown",e=>this.runLocalHooks("listTabKeydown",e)),this.hot.addHook("modifyFiltersMultiSelectValue",(e,t)=>yp(bp,this,Ep).call(this,e,t))}getElements(){const e=this.getMultipleSelectElement();return[e.getSearchInputElement(),e.getSelectAllElement(),e.getClearAllElement(),this.getMultipleSelectElement()]}setState(e){if(this.reset(),e&&e.command.key===cp){const t=this.getMultipleSelectElement();t.setItems(e.itemsSnapshot),t.setValue(e.args[0]),t.setLocale(e.locale)}}getState(){const e=this.getMultipleSelectElement(),t=e.getItems();return{command:{key:e.isSelectedAllValues()||!t.length?gd:cp},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,r,i,s)=>{const[o]=Object(h["arrayFilter"])(n,e=>e.name===cp),a={},l=this.hot.getTranslatedPhrase(je["FILTERS_VALUES_BLANK_CELLS"]);if(o){const n=i(t,s),u=Object(h["arrayMap"])(n,e=>e.value),c=new Map(n.map(e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)])),d=kf(u);r&&(o.args[0]=r);const m=[],f=xf(d,o.args[0],l,e=>{e.checked&&m.push(e.value),yp(bp,this,Sp).call(this,e,c)}),p=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,p).locale,a.args=[m],a.command=fd(cp),a.itemsSnapshot=f}else a.args=[],a.command=fd(gd);this.state.setValueAtIndex(t,a)};t(e.editedConditionStack.column,e.editedConditionStack.conditions,e.conditionArgsChange,e.filteredRowsFactory),e.dependentConditionStacks.length&&t(e.dependentConditionStacks[0].column,e.dependentConditionStacks[0].conditions,e.conditionArgsChange,e.filteredRowsFactory,e.editedConditionStack)}getMultipleSelectElement(){return this.elements.filter(e=>e instanceof rp)[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,s,o)=>{Object(i["addClass"])(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return Object(i["addClass"])(a,"htFiltersMenuLabel"),a.textContent=o,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t}}}reset(){const e=this.hot.getTranslatedPhrase(je["FILTERS_VALUES_BLANK_CELLS"]),t=this._getColumnVisibleValues(),n=t.map(e=>e.value),r=new Map(t.map(e=>[e.value,e.meta])),i=kf(n),s=xf(i,i,e,e=>{yp(bp,this,Sp).call(this,e,r)});this.getMultipleSelectElement().setItems(s),super.reset(),this.getMultipleSelectElement().setValue(i);const o=this.hot.getPlugin("filters").getSelectedColumn();null!==o&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,o.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:Object(h["arrayMap"])(this.hot.getDataAtCol(e.visualIndex),(t,n)=>({value:If(t),meta:this.hot.getCellMeta(n,e.visualIndex)}))}}function _p(e){Object(f["isKey"])(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),Object(s["stopImmediatePropagation"])(e))}function Sp(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function Ep(e,t){switch(t.type){case"numeric":return ot(e,t);default:return e}}function Cp(e,t){Mp(e,t),t.add(e)}function Mp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tp(e,t,n){return(t=Rp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rp(e){var t=Op(e,"string");return"symbol"==typeof t?t:t+""}function Op(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Np(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ap=new WeakSet;class Lp extends hd{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){super(e,{id:t.id,stateless:!0}),Cp(this,Ap),Tp(this,"name",""),this.name=t.name,this.elements.push(new Sm(this.hot,{type:"button",value:je["FILTERS_BUTTONS_OK"],className:"htUIButton htUIButtonOK",identifier:Lp.BUTTON_OK})),this.elements.push(new Sm(this.hot,{type:"button",value:je["FILTERS_BUTTONS_CANCEL"],className:"htUIButton htUIButtonCancel",identifier:Lp.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){Object(h["arrayEach"])(this.elements,e=>{e.addLocalHook("click",(e,t)=>Np(Ap,this,Ip).call(this,e,t))})}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>(Object(i["addClass"])(t.parentNode,"htFiltersMenuActionBar"),Object(h["arrayEach"])(this.elements,e=>t.appendChild(e.element)),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Ip(e,t){t.options.identifier===wp.BUTTON_OK?this.accept():this.cancel()}function kp(e,t,n){return(t=xp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xp(e){var t=Dp(e,"string");return"symbol"==typeof t?t:t+""}function Dp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}wp=Lp;const Hp="ConditionCollection.filteringStates";class Pp{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];kp(this,"hot",void 0),kp(this,"isMapRegistrable",void 0),kp(this,"filteringStates",new bi["a"]),kp(this,"previousConditionStack",null),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(Hp,this.filteringStates):this.filteringStates.init(this.hot.columnIndexMapper.getNumberOfIndexes())}isEmpty(){return 0===this.getFilteredColumns().length}isMatch(e,t){var n;const r=this.filteringStates.getValueAtIndex(t),i=null!==(n=null===r||void 0===r?void 0:r.conditions)&&void 0!==n?n:[],s=null===r||void 0===r?void 0:r.operation;return this.isMatchInConditions(i,e,s)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ef;return!e.length||Jm(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:ef,r=arguments.length>3?arguments[3]:void 0;const i=this.hot.getCellMeta(0,e).locale,s=Object(h["arrayMap"])(t.args,e=>"string"===typeof e?e.toLocaleLowerCase(i):e),o=t.name||t.command.key;null===this.previousConditionStack&&this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(Hs["a"]`The column of index ${e} has been already applied with a \`${a}\`\x20
- filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
- Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
- use it consequently for a particular column).`)}else if(Object(d["isUndefined"])(qm[n]))throw new Error(Hs["a"]`Unexpected operation named \`${n}\`. Possible ones are\x20
- \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:o,args:s,func:md(o,s)}]},r):l.push({name:o,args:s,func:md(o,s)}),this.runLocalHooks("afterAdd",e)}getConditions(e){var t,n;return null!==(t=null===(n=this.filteringStates.getValueAtIndex(e))||void 0===n?void 0:n.conditions)&&void 0!==t?t:[]}getOperation(e){var t;return null===(t=this.filteringStates.getValueAtIndex(e))||void 0===t?void 0:t.operation}getFilteredColumns(){return this.filteringStates.getEntries().map(e=>{let[t]=e;return t})}getColumnStackPosition(e){return this.getFilteredColumns().indexOf(e)}exportAllConditions(){return Object(h["arrayReduce"])(this.filteringStates.getEntries(),(e,t)=>{let[n,{operation:r,conditions:i}]=t;return e.push({column:n,operation:r,conditions:Object(h["arrayMap"])(i,e=>{let{name:t,args:n}=e;return{name:t,args:n}})}),e},[])}importAllConditions(e){this.clean(),Object(h["arrayEach"])(e,e=>{Object(h["arrayEach"])(e.conditions,t=>this.addCondition(e.column,t))})}removeConditions(e){this.setPreviousConditionStack(this.exportAllConditions()),this.runLocalHooks("beforeRemove",e),this.filteringStates.clearValue(e),this.runLocalHooks("afterRemove",e)}clean(){this.runLocalHooks("beforeClean"),this.filteringStates.clear(),this.runLocalHooks("afterClean")}hasConditions(e,t){const n=this.getConditions(e);return t?n.some(e=>e.name===t):n.length>0}setPreviousConditionStack(e){this.previousConditionStack=e}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(Hp),this.filteringStates=null,this.clearLocalHooks()}}Object(o["mixin"])(Pp,Qs["a"]);var jp=Pp;function Fp(e,t,n){return(t=Yp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yp(e){var t=Up(e,"string");return"symbol"==typeof t?t:t+""}function Up(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Vp{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Fp(this,"conditionCollection",void 0),Fp(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return Object(h["arrayEach"])(this.conditionCollection.getFilteredColumns(),(t,n)=>{let r=this.columnDataFactory(t);n&&(r=this._getIntersectData(r,e)),e=this.filterByColumn(t,r)}),e}filterByColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];return Object(h["arrayEach"])(t,t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)}),n}_getIntersectData(e,t){const n=[];return Object(h["arrayEach"])(t,t=>{const r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])}),n}}var Bp=Vp;function Wp(e,t){zp(e,t),t.add(e)}function zp(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gp(e,t,n){return(t=Kp(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kp(e){var t=Xp(e,"string");return"symbol"==typeof t?t:t+""}function Xp(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function $p(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var qp=new WeakSet;class Jp{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];Wp(this,qp),Gp(this,"hot",void 0),Gp(this,"conditionCollection",void 0),Gp(this,"columnDataFactory",void 0),Gp(this,"changes",[]),Gp(this,"grouping",!1),Gp(this,"latestEditedColumnPosition",-1),Gp(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",e=>$p(qp,this,Qp).call(this,e)),this.conditionCollection.addLocalHook("afterRemove",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("afterAdd",e=>this.updateStatesAtColumn(e)),this.conditionCollection.addLocalHook("beforeClean",()=>$p(qp,this,Zp).call(this)),this.conditionCollection.addLocalHook("afterClean",()=>$p(qp,this,eg).call(this))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,Object(h["arrayEach"])(this.changes,e=>{this.updateStatesAtColumn(e)}),this.changes.length=0}updateStatesAtColumn(e,t){var n=this;if(this.grouping)return void(-1===this.changes.indexOf(e)&&this.changes.push(e));const r=this.conditionCollection.exportAllConditions();let i=this.conditionCollection.getColumnStackPosition(e);-1===i&&(i=this.latestEditedColumnPosition);const s=r.slice(0,i),o=r.slice(i);o.length&&o[0].column===e&&o.shift();const a=Object(yi["curry"])((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const i=new jp(n.hot,!1),s=[].concat(e,r);i.importAllConditions(s);const o=n.columnDataFactory(t);let a;a=i.isEmpty()?o:new Bp(i,e=>n.columnDataFactory(e)).filter(),a=Object(h["arrayMap"])(a,e=>e.meta.visualRow);const l=Lf(a);return i.destroy(),Object(h["arrayFilter"])(o,e=>l(e.meta.visualRow))}))(s),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:o,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),Object(o["objectEach"])(this,(e,t)=>{this[t]=null})}}function Qp(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function Zp(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function eg(){Object(h["arrayEach"])(this.latestOrderStack,e=>{this.updateStatesAtColumn(e)})}Object(o["mixin"])(Jp,Qs["a"]);var tg=Jp;function ng(e){const t=Rl({initialPage:0,size:()=>e.length,onItemSelect:(t,n)=>{const r=e[t];return r instanceof rp?n:!(r.element&&!Object(i["isVisible"])(r.element))&&void r.focus()}});return t}const rg="filters";function ig(e,t){let n=-1;const r=ng(t),i=n=>()=>{e.isOpened()&&e.getKeyboardShortcutsCtrl().listen(rg),r.setCurrentPage(t.indexOf(n))};function s(i){const s=e.getKeyboardShortcutsCtrl(),o=i.getKeyboardShortcutsCtrl();r.clear(),o.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:s.getContext(rg),callback:()=>{i.isSubMenu()&&i.close(),s.listen(rg)}}]),i.isSubMenu()||s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:t=>{const i=e.getNavigator();i.getCurrentPage()>-1&&(n=i.getCurrentPage()),i.clear(),t.shiftKey?r.toPreviousItem():r.toNextItem()}},{keys:[["Escape"]],callback:()=>{e.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[r.getCurrentPage()];n instanceof Hm&&(n.openOptions(),e.preventDefault()),n instanceof Vf&&(n.activate(),e.preventDefault()),n instanceof mm||e.preventDefault()}}],rg)}function o(){e.focus(),e.getKeyboardShortcutsCtrl().listen(rg)}function a(){return n}return t.forEach(e=>{e instanceof mm&&(e.addLocalHook("click",i(e)),e.addLocalHook("focus",i(e)),e.addLocalHook("afterClose",i(e)))}),e.addLocalHook("afterSelectionChange",e=>{e.key.startsWith("filter_")||r.clear()}),e.addLocalHook("afterSubmenuOpen",s),e.addLocalHook("afterOpen",s),{...r,listen:o,getLastMenuPage:a}}var sg=n("00fd");function og(e,t){lg(e,t),t.add(e)}function ag(e,t,n){lg(e,t),t.set(e,n)}function lg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ug(e,t,n){return(t=cg(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cg(e){var t=hg(e,"string");return"symbol"==typeof t?t:t+""}function hg(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function dg(e,t,n){return e.set(fg(e,t),n),n}function mg(e,t){return e.get(fg(e,t))}function fg(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const pg="filters",gg=250,yg=pg;var wg=new WeakMap,bg=new WeakSet;class vg extends tn["a"]{static get PLUGIN_KEY(){return pg}static get PLUGIN_PRIORITY(){return gg}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){super(e),og(this,bg),ug(this,"dropdownMenuPlugin",null),ug(this,"conditionCollection",null),ug(this,"conditionUpdateObserver",null),ug(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),ug(this,"filtersRowsMap",null),ag(this,wg,void 0),this.hot.addHook("afterGetColHeader",(e,t)=>fg(bg,this,Og).call(this,e,t))}isEnabled(){return!!this.hot.getSettings()[pg]}enablePlugin(){if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new sg["a"]),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const e=this.hot.getSettings().dropdownMenu,t=e&&e.uiContainer||this.hot.rootDocument.body,n=e=>(e.addLocalHook("accept",()=>fg(bg,this,Mg).call(this,"accept")),e.addLocalHook("cancel",()=>fg(bg,this,Mg).call(this,"cancel")),e.addLocalHook("change",t=>fg(bg,this,Tg).call(this,e,t)),e),r=()=>this.hot.getTranslatedPhrase(je["FILTERS_DIVS_FILTER_BY_CONDITION"])+":",i=()=>this.hot.getTranslatedPhrase(je["FILTERS_DIVS_FILTER_BY_VALUE"])+":";if(!this.components.get("filter_by_condition")){const e=new Km(this.hot,{id:"filter_by_condition",name:r,addSeparator:!1,menuContainer:t});e.addLocalHook("afterClose",()=>fg(bg,this,Rg).call(this)),this.components.set("filter_by_condition",n(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new Tf(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new Km(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:t});e.addLocalHook("afterClose",()=>fg(bg,this,Rg).call(this)),this.components.set("filter_by_condition2",n(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",n(new vp(this.hot,{id:"filter_by_value",name:i}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",n(new Lp(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new jp(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new tg(this.hot,this.conditionCollection,e=>this.getDataMapAtColumn(e)),this.conditionUpdateObserver.addLocalHook("update",e=>fg(bg,this,Ng).call(this,e))),this.components.forEach(e=>e.show()),this.addHook("afterDropdownMenuDefaultOptions",e=>fg(bg,this,Cg).call(this,e)),this.addHook("afterDropdownMenuShow",()=>fg(bg,this,Sg).call(this)),this.addHook("afterDropdownMenuHide",()=>fg(bg,this,Eg).call(this)),this.addHook("afterChange",e=>fg(bg,this,_g).call(this,e)),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!mg(wg,this)&&this.dropdownMenuPlugin.enabled){const e=this.dropdownMenuPlugin.menu,t=[{focus:()=>{const t=e.getNavigator(),n=mg(wg,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map(e=>{let[,t]=e;return t.getElements()}).flat()];dg(wg,this,ig(e,t));const n=e=>{mg(wg,this).listen(),e.preventDefault(),Object(f["isKey"])(e.keyCode,"TAB")&&(e.shiftKey?mg(wg,this).toPreviousItem():mg(wg,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",n),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",n)}this.registerShortcuts(),super.enablePlugin()}disablePlugin(){var e;this.enabled&&(null!==(e=this.dropdownMenuPlugin)&&void 0!==e&&e.enabled&&this.dropdownMenuPlugin.menu.clearLocalHooks(),this.components.forEach((e,t)=>{e.destroy(),this.components.set(t,null)}),this.conditionCollection.destroy(),this.conditionCollection=null,this.hot.rowIndexMapper.unregisterMap(this.pluginName));this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Alt","A"]],stopPropagation:!0,callback:()=>{const e=this.hot.getSelected();this.clearConditions(),this.filter(),e&&this.hot.selectCells(e)},group:yg})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(yg)}addCondition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ef;const i=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(i,{command:{key:t},args:n},r)}removeConditions(e){const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}clearConditions(e){if(void 0===e)this.conditionCollection.clean();else{const t=this.hot.toPhysicalColumn(e);this.conditionCollection.removeConditions(t)}}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),n=!this.conditionCollection.isEmpty();let r=[];const i=this.conditionCollection.exportAllConditions(),s=this.hot.runHooks("beforeFilter",i,this.conditionCollection.previousConditionStack);if(!1!==s)if(n){const n=[];this.hot.batchExecution(()=>{this.filtersRowsMap.clear(),r=Object(h["arrayMap"])(t.filter(),e=>e.meta.visualRow);const e=Lf(r);Object(it["rangeEach"])(this.hot.countSourceRows()-1,t=>{e(t)||n.push(t)}),Object(h["arrayEach"])(n,e=>{this.filtersRowsMap.setValueAtIndex(e,!0)})},!0),e||r.length||this.hot.deselectCell()}else this.filtersRowsMap.clear();this.hot.runHooks("afterFilter",i),this.conditionCollection.setPreviousConditionStack(null),this.hot.view.adjustElementsSize(),this.hot.render(),this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col)}getSelectedColumn(){var e;const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return t?{visualIndex:t.col,physicalIndex:this.hot.toPhysicalColumn(t.col)}:null}getDataMapAtColumn(e){const t=this.hot.toVisualColumn(e),n=[];return Object(h["arrayEach"])(this.hot.getSourceDataAtCol(t),(e,r)=>{var i;const{row:s,col:o,visualCol:a,visualRow:l,type:u,instance:c,dateFormat:h,locale:d}=this.hot.getCellMeta(r,t),m=null!==(i=this.hot.getDataAtCell(this.hot.toVisualRow(r),t))&&void 0!==i?i:e;n.push({meta:{row:s,col:o,visualCol:a,visualRow:l,type:u,instance:c,dateFormat:h,locale:d},value:If(m)})}),n}updateValueComponentCondition(e){const t=this.hot.getDataAtCol(e),n=kf(t);this.conditionUpdateObserver.updateStatesAtColumn(e,n)}restoreComponents(e){var t;const n=null===(t=this.getSelectedColumn())||void 0===t?void 0:t.physicalIndex;e.forEach(e=>{e.isHidden()||e.restoreState(n)}),this.updateDependentComponentsVisibility()}getOperationBasedOnArguments(e,t,n,r){let i=e;return i===rf&&t.command.key!==gd&&n.command.key!==gd&&r.command.key!==gd?i=af:r.command.key!==gd&&(t.command.key!==gd&&n.command.key!==gd||(i=ef)),i}setListeningDropdownMenu(){this.dropdownMenuPlugin&&this.dropdownMenuPlugin.setListening()}updateDependentComponentsVisibility(){const e=this.components.get("filter_by_condition"),{command:t}=e.getState(),n=[this.components.get("filter_by_condition2"),this.components.get("filter_operators")];t.showOperators?this.showComponents(...n):this.hideComponents(...n)}_createDataFilter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.conditionCollection;return new Bp(e,e=>this.getDataMapAtColumn(e))}getIndexesOfComponents(){const e=[];if(!this.dropdownMenuPlugin)return e;const t=this.dropdownMenuPlugin.menu;for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return Object(h["arrayEach"])(r,n=>{Object(h["arrayEach"])(t.menuItems,(t,r)=>{t.key===n.getMenuItemDescriptor().key&&e.push(r)})}),e}changeComponentsVisibility(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!this.dropdownMenuPlugin)return;const t=this.dropdownMenuPlugin.menu,n=t.hotMenu,r=n.getPlugin("hiddenRows");for(var i=arguments.length,s=new Array(i>1?i-1:0),o=1;o<i;o++)s[o-1]=arguments[o];const a=this.getIndexesOfComponents(...s);e?r.showRows(a):r.hideRows(a),n.render()}hideComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!1,...t)}showComponents(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.changeComponentsVisibility(!0,...t)}destroy(){this.enabled&&(this.components.forEach((e,t)=>{null!==e&&(e.destroy(),this.components.set(t,null))}),this.conditionCollection.destroy(),this.conditionUpdateObserver.destroy(),this.hot.rowIndexMapper.unregisterMap(this.pluginName)),super.destroy()}}function _g(e){e&&Object(h["arrayEach"])(e,e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)})}function Sg(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function Eg(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function Cg(e){e.items.push({name:ko}),this.components.forEach(t=>{e.items.push(t.getMenuItemDescriptor())})}function Mg(e){var t;if("accept"===e){const e=this.getSelectedColumn();var n;if(null===e)return void(null===(n=this.dropdownMenuPlugin)||void 0===n||n.close());const{physicalIndex:t}=e,r=this.components.get("filter_by_condition").getState(),i=this.components.get("filter_by_condition2").getState(),s=this.components.get("filter_by_value").getState(),o=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,i,s);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),r.command.key!==gd&&(this.conditionCollection.addCondition(t,r,o,a),i.command.key!==gd&&this.conditionCollection.addCondition(t,i,o,a)),s.command.key!==gd&&this.conditionCollection.addCondition(t,s,o,a),this.conditionUpdateObserver.flush(),this.components.forEach(e=>e.saveState(t)),this.filtersRowsMap.clear(),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function Tg(e,t){this.updateDependentComponentsVisibility(),e.constructor!==Km||t.inputsCount||this.setListeningDropdownMenu()}function Rg(){this.setListeningDropdownMenu()}function Og(e,t){const n=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(n)?Object(i["addClass"])(t,"htFiltersActive"):Object(i["removeClass"])(t,"htFiltersActive")}function Ng(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:n,column:r}}=e,i=n.filter(e=>e.name===cp),s=n.filter(e=>e.name!==cp);if(i.length>=2||s.length>=3)Object(Xr["b"])(Hs["a"]`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
- The overall amount of conditions exceed the capability of the dropdown menu.\x20
- For more details see the documentation.`);else{const t=this.conditionCollection.getOperation(r);this.components.get("filter_by_condition").updateState(s[0],r),this.components.get("filter_by_condition2").updateState(s[1],r),this.components.get("filter_operators").updateState(t,r),this.components.get("filter_by_value").updateState(e)}}n("5b82");const Ag="internal-use-in-handsontable",Lg={licenseKey:Ag,useArrayArithmetic:!0,useColumnIndex:!1,useStats:!1,evaluateNullToZero:!0,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,leapYear1900:!1,nullDate:{year:1899,month:12,day:30},nullYear:30,dateFormats:["DD/MM/YYYY","DD/MM/YY"],timeFormats:["hh:mm","hh:mm:ss.sss"],matchWholeCell:!0,useRegularExpressions:!1,useWildcards:!0,functionArgSeparator:",",thousandSeparator:"",decimalSeparator:".",language:"enGB"};function Ig(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[By])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function kg(e){return Object.keys(e).reduce((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t),{})}function xg(e){var t;const n=e[By],r=kg(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=Ig(e);return{...Lg,...r,...i}}function Dg(e){var t;const n=e[By],r=kg(null!==n&&void 0!==n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),i=Ig(e);return{...r,...i}}function Hg(e,t){return Object.keys(t).some(n=>void 0!==t[n]&&t[n]!==e[n])}function Pg(){const e="engine_relationship",t=Object(ji["a"])(By);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function jg(){const e="shared_engine_usage",t=Object(ji["a"])(By);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function Fg(e){const t=e.getSettings(),n=t[By],r=null===n||void 0===n?void 0:n.engine;if(!0===n)return null;if(Object(d["isUndefined"])(r))return null;var i;if("function"===typeof r.hyperformula||"function"===typeof r)return Yg(null!==(i=r.hyperformula)&&void 0!==i?i:r,t,e);if("object"===typeof r&&Object(d["isUndefined"])(r.hyperformula)){const t=Pg(),n=jg().get(r);return t.has(r)||t.set(r,[]),t.get(r).push(e),n&&n.push(e.guid),r.getConfig().licenseKey||r.updateConfig({licenseKey:Ag}),r.getConfig().leapYear1900===Lg.leapYear1900&&!1!==Object(o["isObjectEqual"])(r.getConfig().nullDate,Lg.nullDate)||Object(Xr["b"])(Hs["a"]`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
- settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),r}return null}function Yg(e,t,n){const r=t[By],i=xg(t),s=Pg(),o=jg();Bg(e,r.functions),Wg(e,r.language);const a=e.buildEmpty(i);return s.set(a,[n]),o.set(a,[n.guid]),zg(a,r.namedExpressions),a.on("sheetAdded",()=>{a.rebuildAndRecalculate()}),a.on("sheetRemoved",()=>{a.rebuildAndRecalculate()}),a}function Ug(e){var t;const n=Pg(),r=0===n.size?[]:Array.from(null!==(t=n.get(e))&&void 0!==t?t:[]);return new Map(r.map(e=>[e.getPlugin("formulas").sheetId,e]))}function Vg(e,t){if(e){const n=Pg(),r=n.get(e),i=jg(),s=i.get(e);r&&r.includes(t)&&(r.splice(r.indexOf(t),1),0===r.length&&n.delete(e)),s&&s.includes(t.guid)&&(s.splice(s.indexOf(t.guid),1),0===s.length&&(i.delete(e),e.destroy()))}}function Bg(e,t){t&&t.forEach(t=>{const{name:n,plugin:r,translations:i}=t;try{e.registerFunction(n,r,i)}catch(s){Object(Xr["b"])(s.message)}})}function Wg(e,t){if(t){const{langCode:r}=t;try{e.registerLanguage(r,t)}catch(n){Object(Xr["b"])(n.message)}}}function zg(e,t){t&&(e.suspendEvaluation(),t.forEach(t=>{const{name:n,expression:r,scope:i,options:s}=t;try{e.addNamedExpression(n,r,i,s)}catch(o){Object(Xr["b"])(o.message)}}),e.resumeEvaluation())}function Gg(e,t){return!Object(d["isUndefined"])(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}const Kg="DD/MM/YYYY";function Xg(e){return"string"===typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}function $g(e){return Xg(e)?e.substr(1):e}function qg(e){return"string"===typeof e&&e.startsWith("=")}function Jg(e,t){return"string"===typeof e&&"date"===t}function Qg(e,t){return I()(e,t,!0).isValid()}function Zg(e,t){return I()(e,t,!0).format(Kg)}function ey(e,t){return I()(e,Kg,!0).format(t)}function ty(e,t){const n=-1,r=new Date(Date.UTC(0,0,e+n));return I()(r).format(t)}function ny(e,t,n){const r=Array.from(Array(n).keys()).filter(t=>!1===e.includes(t));var i;return 0===t?null!==(i=r[t])&&void 0!==i?i:0:r[t-1]+1}function ry(e,t){const n=[];return e.forEach(e=>{const r={from:e,to:t};n.forEach(e=>{const t=e.from>e.to,n=e.to<=r.from,i=e.from>r.from;i&&n&&t&&(r.from+=1)}),r.from>=t&&(t+=1),n.push(r)}),n}function iy(e){return e.forEach((t,n)=>{const r=e.slice(n+1);r.forEach(e=>{const n=e.from<e.to;e.from>t.from&&n&&(e.from-=1)})}),e}function sy(e,t,n){const r=ry(e,ny(e,t,n));return iy(r)}function oy(e,t,n){ay(e,t),t.set(e,n)}function ay(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ly(e,t){return e.get(cy(e,t))}function uy(e,t,n){return e.set(cy(e,t),n),n}function cy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var hy=new WeakMap,dy=new WeakMap,my=new WeakMap,fy=new WeakMap,py=new WeakMap,gy=new WeakMap,yy=new WeakMap;class wy{constructor(e,t,n){oy(this,hy,void 0),oy(this,dy,void 0),oy(this,my,void 0),oy(this,fy,[]),oy(this,py,[]),oy(this,gy,void 0),oy(this,yy,[]),uy(hy,this,e),uy(dy,this,t),uy(my,this,n)}setRemovedHfIndexes(e){return uy(yy,this,e.map(e=>{const t=ly(dy,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)})),ly(yy,this)}getRemovedHfIndexes(){return ly(yy,this)}getHfIndexFromVisualIndex(e){const t=ly(dy,this).getIndexesSequence(),n=ly(dy,this).getNotTrimmedIndexes();return t.indexOf(n[e])}syncMoves(e){const t=1,n=`move${Object(m["toUpperCaseFirst"])(ly(hy,this))}s`;ly(my,this).getEngine().batch(()=>{e.forEach(e=>{const r=e.from!==e.to,i=e.from+1!==e.to;r&&i&&ly(my,this).getEngine()[n](ly(my,this).getSheetId(),e.from,t,e.to)})})}storeMovesInformation(e,t,n){!1!==n&&(uy(py,this,e.map(e=>this.getHfIndexFromVisualIndex(e))),uy(gy,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(ly(my,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=sy(ly(py,this),ly(gy,this),ly(dy,this).getNumberOfIndexes());null===ly(my,this).getSheetId()?ly(my,this).getPostponeAction(()=>this.syncMoves(n)):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${Object(m["toUpperCaseFirst"])(ly(hy,this))}Order`;return t=>{if(ly(my,this).isPerformingUndoRedo())return;const n=ly(dy,this).getIndexesSequence();if("update"===t&&n.length>0){const t=ly(fy,this).map(e=>n.indexOf(e)),r=ly(my,this).getEngine().getSheetDimensions(ly(my,this).getSheetId());let i;i="row"===ly(hy,this)?r.height:r.width;const s=t.length;for(let e=s;e<i;e+=1)t.push(e);ly(my,this).getEngine()[e](ly(my,this).getSheetId(),t)}uy(fy,this,n)}}init(){uy(fy,this,ly(dy,this).getIndexesSequence())}}var by=wy;function vy(e,t,n){_y(e,t),t.set(e,n)}function _y(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sy(e,t){return e.get(Cy(e,t))}function Ey(e,t,n){return e.set(Cy(e,t),n),n}function Cy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var My=new WeakMap,Ty=new WeakMap,Ry=new WeakMap,Oy=new WeakMap,Ny=new WeakMap,Ay=new WeakMap,Ly=new WeakMap;class Iy{constructor(e,t,n){vy(this,My,void 0),vy(this,Ty,void 0),vy(this,Ry,void 0),vy(this,Oy,!1),vy(this,Ny,!1),vy(this,Ay,null),vy(this,Ly,null),Ey(My,this,new by("row",e,this)),Ey(Ty,this,new by("column",t,this)),Ey(Ry,this,n)}getForAxis(e){return Sy("row"===e?My:Ty,this)}setPerformUndo(e){Ey(Oy,this,e)}setPerformRedo(e){Ey(Ny,this,e)}isPerformingUndoRedo(){return Sy(Oy,this)||Sy(Ny,this)}getSheetId(){return Sy(Ly,this)}getEngine(){return Sy(Ay,this)}getPostponeAction(){return Sy(Ry,this)}setupSyncEndpoint(e,t){Ey(Ay,this,e),Ey(Ly,this,t),Sy(My,this).init(),Sy(Ty,this).init()}}var ky=Iy;function xy(e,t){Fy(e,t),t.add(e)}function Dy(e,t,n){return(t=Hy(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hy(e){var t=Py(e,"string");return"symbol"==typeof t?t:t+""}function Py(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function jy(e,t,n){Fy(e,t),t.set(e,n)}function Fy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yy(e,t,n){return e.set(Vy(e,t),n),n}function Uy(e,t){return e.get(Vy(e,t))}function Vy(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const By="formulas",Wy=["maxRows","maxColumns","language"],zy=260;pe["a"].getSingleton().register("afterNamedExpressionAdded"),pe["a"].getSingleton().register("afterNamedExpressionRemoved"),pe["a"].getSingleton().register("afterSheetAdded"),pe["a"].getSingleton().register("afterSheetRemoved"),pe["a"].getSingleton().register("afterSheetRenamed"),pe["a"].getSingleton().register("afterFormulasValuesUpdate");const Gy=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var Ky=new WeakMap,Xy=new WeakMap,$y=new WeakMap,qy=new WeakSet;class Jy extends tn["a"]{constructor(){var e;super(...arguments),e=this,xy(this,qy),jy(this,Ky,!1),jy(this,Xy,!1),jy(this,$y,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,gw).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,yw).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,ww).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,bw).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,vw).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Vy(qy,e,_w).call(e,...n)}]]),Dy(this,"staticRegister",Object(ji["a"])("formulas")),Dy(this,"engine",null),Dy(this,"sheetName",null),Dy(this,"indexSyncer",null),Dy(this,"rowAxisSyncer",null),Dy(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return By}static get PLUGIN_PRIORITY(){return zy}static get SETTING_KEYS(){return[By,...Wy]}get sheetId(){return null===this.sheetName?null:this.engine.getSheetId(this.sheetName)}isEnabled(){return!!this.hot.getSettings()[By]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=Fg(this.hot))&&void 0!==e?e:this.engine,this.engine){if(null!==this.sheetName&&!this.engine.doesSheetExist(this.sheetName)){const e=this.addSheet(this.sheetName,this.hot.getSourceDataArray());!1!==e&&(this.sheetName=e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,ew).call(t,...n)})),this.addHook("afterLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,nw).call(t,...n)})),this.addHook("beforeUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,ew).call(t,...n)})),this.addHook("afterUpdateData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,nw).call(t,...n)})),this.addHook("modifyData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,rw).call(t,...n)})),this.addHook("modifySourceData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,iw).call(t,...n)})),this.addHook("beforeValidate",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,Qy).call(t,...n)})),this.addHook("afterSetSourceDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,ow).call(t,...n)})),this.addHook("afterSetDataAtCell",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,sw).call(t,...n)})),this.addHook("afterSetDataAtRowProp",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,sw).call(t,...n)})),this.addHook("beforeCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,aw).call(t,...n)})),this.addHook("beforeCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,lw).call(t,...n)})),this.addHook("afterCreateRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,hw).call(t,...n)})),this.addHook("afterCreateCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,dw).call(t,...n)})),this.addHook("beforeRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,uw).call(t,...n)})),this.addHook("beforeRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,cw).call(t,...n)})),this.addHook("afterRemoveRow",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,mw).call(t,...n)})),this.addHook("afterRemoveCol",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,fw).call(t,...n)})),this.indexSyncer=new ky(this.hot.rowIndexMapper,this.hot.columnIndexMapper,e=>{this.hot.addHookOnce("init",()=>{e()})}),this.rowAxisSyncer=this.indexSyncer.getForAxis("row"),this.columnAxisSyncer=this.indexSyncer.getForAxis("column"),this.hot.addHook("afterRowSequenceChange",this.rowAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("afterColumnSequenceChange",this.columnAxisSyncer.getIndexesChangeSyncMethod()),this.hot.addHook("beforeRowMove",(e,t,n,r)=>{this.rowAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("beforeColumnMove",(e,t,n,r)=>{this.columnAxisSyncer.storeMovesInformation(e,t,r)}),this.hot.addHook("afterRowMove",(e,t,n,r,i)=>{this.rowAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("afterColumnMove",(e,t,n,r,i)=>{this.columnAxisSyncer.calculateAndSyncMoves(r,i)}),this.hot.addHook("beforeColumnFreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart,t)}),this.hot.addHook("afterColumnFreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.hot.addHook("beforeColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.storeMovesInformation([e],this.hot.getSettings().fixedColumnsStart-1,t)}),this.hot.addHook("afterColumnUnfreeze",(e,t)=>{this.columnAxisSyncer.calculateAndSyncMoves(t,t)}),this.addHook("afterCellMetaReset",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,tw).call(t,...n)})),this.addHook("beforeUndo",()=>{this.indexSyncer.setPerformUndo(!0),this.engine.undo()}),this.addHook("beforeRedo",()=>{this.indexSyncer.setPerformRedo(!0),this.engine.redo()}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformUndo(!1)}),this.addHook("afterUndo",()=>{this.indexSyncer.setPerformRedo(!1)}),this.addHook("afterDetachChild",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,pw).call(t,...n)})),this.addHook("beforeAutofill",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return Vy(qy,t,Zy).call(t,...n)})),Uy($y,this).forEach(e=>{let[t,n]=e;return this.engine.on(t,n)}),super.enablePlugin()}else Object(Xr["b"])("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){Uy($y,this).forEach(e=>{let[t,n]=e;return this.engine.off(t,n)}),Vg(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=Dg(this.hot.getSettings());Hg(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[By];if(Object(d["isDefined"])(n)&&Object(d["isDefined"])(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[By].sheetName;e&&this.engine.doesSheetExist(e)?this.switchSheet(this.sheetName):this.sheetName=this.addSheet(null!==e&&void 0!==e?e:void 0,this.hot.getSourceDataArray())}super.updatePlugin(e)}destroy(){Uy($y,this).forEach(e=>{var t;let[n,r]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,r)}),Yy($y,this,null),Vg(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if(Object(d["isDefined"])(t)&&!Object(Df["isArrayOfArrays"])(t))return Object(Xr["b"])("The provided data should be an array of arrays."),!1;if(void 0!==e&&null!==e&&this.engine.doesSheetExist(e))return Object(Xr["b"])("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!==e&&void 0!==e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(n){return Object(Xr["b"])(n.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void Object(Xr["a"])(`The sheet named \`${e}\` does not exist, switch aborted.`);this.sheetName=e;const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,Object(m["toUpperCaseFirst"])(By)+".switchSheet")}getCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const r=this.hot.toPhysicalRow(e),i=this.hot.toPhysicalColumn(t);return null!==r&&null!==i?this.engine.getCellType({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)}):"EMPTY"}isFormulaCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;return this.engine.doesCellHaveFormula({sheet:n,row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t)})}renderDependentSheets(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=new Set;e.forEach(e=>{var t;const r=null===e||void 0===e||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==r&&(n.has(r)||n.add(r))}),Ug(this.engine).forEach((e,r)=>{var i;(t||r!==this.sheetId)&&n.has(r)&&(e.render(),null===(i=e.view)||void 0===i||i.adjustElementsSize())})}validateDependentCells(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=e=>{var t;const{row:n,col:r,sheet:i}=null!==(t=null===e||void 0===e?void 0:e.address)&&void 0!==t?t:{};return Object(d["isDefined"])(i)?`${i}:${n}x${r}`:""},r=new Set(t.map(e=>n(e)));e.forEach(e=>{var t,i;const{row:s,col:o}=null!==(t=e.address)&&void 0!==t?t:{};if(!1===Object(d["isDefined"])(s)||!1===Object(d["isDefined"])(o)||s>=this.hot.countRows()||o>=this.hot.countCols())return;const a=null===e||void 0===e||null===(i=e.address)||void 0===i?void 0:i.sheet,l=n(e);if(void 0!==a&&!r.has(l)){const e=Ug(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(s,o),e.getCellMeta(s,o),()=>{})}})}syncChangeWithEngine(e,t,n){const r={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(e),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};if(!this.engine.isItPossibleToSetCellContents(r))return void Object(Xr["b"])("Not possible to set cell data at "+JSON.stringify(r));const i=this.hot.getCellMeta(e,t);return Jg(n,i.type)&&(Qg(n,i.dateFormat)?n=Zg(n,i.dateFormat):!1===qg(n)&&(n="'"+n)),this.engine.setCellContents(r,n)}}function Qy(e,t,n){const r=this.hot.propToCol(n);if(this.isFormulaCellType(t,r)){const e={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(r),sheet:this.sheetId},n=this.hot.getCellMeta(t,r);let i=this.engine.getCellValue(e);return"date"===n.type&&Object(it["isNumeric"])(i)&&(i=ty(i,n.dateFormat)),"object"===typeof i&&null!==i?i.value:i}return e}function Zy(e,t,n){const{row:r,col:i}=t.getTopStartCorner(),{row:s,col:o}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:u,col:c}=n.getBottomEndCorner(),h={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(s),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId}},d={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(a),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(l),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(u),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(c),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const m=this.engine.getFillRangeData(h,d),{row:f,col:p}=h.start,{row:g,col:y}=h.end,w=g-f+1,b=y-p+1;for(let v=0;v<m.length;v+=1)for(let e=0;e<m[v].length;e+=1){const t=m[v][e],n=f+v%w,r=p+e%b,i=this.hot.getCellMeta(n,r);Jg(t,i.type)&&(t.startsWith("'")?m[v][e]=t.slice(1):!1===this.isFormulaCellType(n,r,this.sheetId)&&(m[v][e]=ey(t,i.dateFormat)))}return m}function ew(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";n.includes(Object(m["toUpperCaseFirst"])(By))||Yy(Xy,this,Object(d["isUndefined"])(this.hot.getSettings().data))}function tw(){const e=this.hot.getSourceDataArray();let t=!1;e.forEach((n,r)=>{n.forEach((n,i)=>{const s=this.hot.getCellMeta(r,i),o=s.dateFormat;Jg(n,s.type)&&(t=!0,Qg(n,o)?e[r][i]=Zg(n,o):!1===this.isFormulaCellType(r,i)&&(e[r][i]="'"+n))})}),!0===t&&(Yy(Ky,this,!0),this.engine.setSheetContent(this.sheetId,e),Yy(Ky,this,!1))}function nw(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!n.includes(Object(m["toUpperCaseFirst"])(By)))if(this.sheetName=Gg(this.engine,this.hot.getSettings()[By].sheetName),Uy(Xy,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){Yy(Ky,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Yy(Ky,this,!1)}}}function rw(e,t,n,r){if("get"!==r||Uy(Ky,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e);if(null===i||null===t)return;const s=this.isFormulaCellType(i,t);if(!s){const e=this.getCellType(i,t);if("ARRAY"!==e)return void(Xg(n.value)&&(n.value=$g(n.value)))}const o={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let a=this.engine.getCellValue(o),l=this.hot.getCellsMeta().find(e=>e.visualRow===i&&e.visualCol===t);void 0===l&&(l={}),"date"===l.type&&Object(it["isNumeric"])(a)&&(a=ty(a,l.dateFormat));const u="object"===typeof a&&null!==a?a.value:a;n.value=u}function iw(e,t,n,r){if("get"!==r||Uy(Ky,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const i=this.hot.toVisualRow(e),s=this.hot.propToCol(t);if(null===i||null===s)return;const o=this.isFormulaCellType(i,s);if(!o){const e=this.getCellType(i,s);if("ARRAY"!==e)return}const a=this.engine.getSheetDimensions(this.engine.getSheetId(this.sheetName));if(0===a.width&&0===a.height)return;const l={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function sw(e,t){if(Gy(t))return;const n=[],r=[],i=this.engine.batch(()=>{e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(o),u={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,o,s):n.push([t,o,s]),r.push({address:u})})});n.length&&this.hot.addHookOnce("afterChange",()=>{const e=this.engine.batch(()=>{n.forEach(e=>{let[t,n,r]=e;this.syncChangeWithEngine(t,n,r)})});this.renderDependentSheets(e,!0)}),this.renderDependentSheets(i),this.validateDependentCells(i,r)}function ow(e,t){if(Gy(t))return;const n=[],r=[];e.forEach(e=>{let[t,i,,s]=e;const o=this.hot.propToCol(i);if(!Object(it["isNumeric"])(o))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(r.push({address:a}),n.push(...this.engine.setCellContents(a,s))):Object(Xr["b"])("Not possible to set source cell data at "+JSON.stringify(a))}),this.renderDependentSheets(n),this.validateDependentCells(n,r)}function aw(e,t){let n=this.rowAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countRows()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddRows(this.sheetId,[n,t]))return!1}function lw(e,t){let n=this.columnAxisSyncer.getHfIndexFromVisualIndex(e);if(e>=this.hot.countCols()&&(n=e),null===this.sheetId||!this.engine.doesSheetExist(this.sheetName)||!this.engine.isItPossibleToAddColumns(this.sheetId,[n,t]))return!1}function uw(e,t,n){const r=this.rowAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1]));return!1!==i&&void 0}function cw(e,t,n){const r=this.columnAxisSyncer.setRemovedHfIndexes(n),i=r.every(e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1]));return!1!==i&&void 0}function hw(e,t,n){if(Gy(n))return;const r=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function dw(e,t,n){if(Gy(n))return;const r=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function mw(e,t,n,r){if(Gy(r))return;const i=this.rowAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeRows(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function fw(e,t,n,r){if(Gy(r))return;const i=this.columnAxisSyncer.getRemovedHfIndexes().sort((e,t)=>t-e),s=this.engine.batch(()=>{i.forEach(e=>{this.engine.removeColumns(this.sheetId,[e,1])})});this.renderDependentSheets(s)}function pw(e,t,n){var r;Yy(Ky,this,!0);const i=this.hot.getSourceDataArray(n,0,n+((null===(r=t.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());Yy(Ky,this,!1),i.forEach((e,t)=>{e.forEach((e,r)=>{this.engine.setCellContents({col:r,row:n+t,sheet:this.sheetId},[[e]])})})}function gw(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function yw(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function ww(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function bw(e){this.hot.runHooks("afterSheetAdded",e)}function vw(e,t){this.sheetName=t,this.hot.runHooks("afterSheetRenamed",e,t)}function _w(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}function Sw(e){return{key:"hidden_columns_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[,n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_HIDE_COLUMN"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.col,n.col),0),i=Math.max(t.col,n.col),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideColumns(s);const o=s[s.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectColumns(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByColumnHeader()||this.selection.isSelectedByCorner())}}}function Ew(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_SHOW_COLUMN"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.columnIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize();const o=s-i+1===this.countCols();o||this.selectColumns(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenColumns(),e=>this.toPhysicalColumn(e));if(!this.selection.isSelectedByColumnHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().col,s=r.getBottomEndCorner().col,o=this.columnIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),u=o.getNotTrimmedIndexes(),c=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=u.slice(i,s+1);c.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)c.push(...u.slice(0,i));else if(null===a)c.push(...u.slice(0,this.countCols()));else{const e=this.countCols()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&c.push(...u.slice(s+1))}return Object(h["arrayEach"])(c,e=>{t.push(this.toVisualColumn(e))}),0===t.length}}}var Cw=n("cef7");function Mw(e,t){Rw(e,t),t.add(e)}function Tw(e,t,n){Rw(e,t),t.set(e,n)}function Rw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ow(e,t){return e.get(Aw(e,t))}function Nw(e,t,n){return e.set(Aw(e,t),n),n}function Aw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeHideColumns"),pe["a"].getSingleton().register("afterHideColumns"),pe["a"].getSingleton().register("beforeUnhideColumns"),pe["a"].getSingleton().register("afterUnhideColumns");const Lw="hiddenColumns",Iw=310;var kw=new WeakMap,xw=new WeakMap,Dw=new WeakSet;class Hw extends tn["a"]{constructor(){super(...arguments),Mw(this,Dw),Tw(this,kw,{}),Tw(this,xw,null)}static get PLUGIN_KEY(){return Lw}static get PLUGIN_PRIORITY(){return Iw}isEnabled(){return!!this.hot.getSettings()[Lw]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Lw];Object(o["isObject"])(t)&&(Nw(kw,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),Nw(xw,this,new Cw["a"]),Ow(xw,this).addLocalHook("init",()=>Aw(Dw,this,Vw).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,Ow(xw,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Aw(Dw,e,Uw).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>Aw(Dw,this,jw).call(this,e,t,n)),this.addHook("modifyColWidth",(e,t)=>Aw(Dw,this,Pw).call(this,e,t),2),this.addHook("afterGetColHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Aw(Dw,e,Yw).call(e,...n)})),this.addHook("modifyCopyableRange",e=>Aw(Dw,this,Fw).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.columnIndexMapper.unregisterMap(this.pluginName),Nw(kw,this,{}),super.disablePlugin(),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;const i=Ow(xw,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalColumn(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e),[])}const o=this.hot.runHooks("beforeUnhideColumns",t,r,n&&s);!1!==o&&(n&&s&&Ow(xw,this).setValues(i),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,r,n&&s,n&&r.length<t.length))}showColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showColumns(t)}hideColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideColumns",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{Ow(xw,this).setValueAtIndex(this.hot.toPhysicalColumn(e),!0)})},!0),this.hot.runHooks("afterHideColumns",t,r,n,n&&r.length>t.length))}hideColumn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideColumns(t)}getHiddenColumns(){return Object(h["arrayMap"])(Ow(xw,this).getHiddenIndexes(),e=>this.hot.toVisualColumn(e))}isHidden(e){return Ow(xw,this).getValueAtIndex(this.hot.toPhysicalColumn(e))||!1}isValidConfig(e){const t=this.hot.countCols();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipColumnOnPaste=!1)})}destroy(){Nw(kw,this,null),Nw(xw,this,null),super.destroy()}}function Pw(e,t){return this.isHidden(t)?0:Ow(kw,this).indicators&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"===typeof e&&this.hot.hasColHeaders()?e+15:void 0}function jw(e,t,n){if(!1===Ow(kw,this).copyPasteEnabled&&this.isHidden(t)&&(n.skipColumnOnPaste=!0),this.isHidden(t-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenColumn")&&(n.className+=" afterHiddenColumn");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenColumn");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function Fw(e){if(Ow(kw,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(it["rangeEach"])(e.startCol,e.endCol,i=>{this.isHidden(i)?(t||n(e.startRow,e.endRow,r,i-1),t=!0):(t&&(r=i),i===e.endCol&&n(e.startRow,e.endRow,r,i),t=!1)})}),t}function Yw(e,t){if(!Ow(kw,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenColumn"),e<this.hot.countCols()-1&&this.isHidden(e+1)&&n.push("beforeHiddenColumn"),Object(i["addClass"])(t,n)}function Uw(e){e.items.push({name:ko},Sw(this),Ew(this))}function Vw(){Array.isArray(Ow(kw,this).columns)&&this.hideColumns(Ow(kw,this).columns)}function Bw(e){return{key:"hidden_rows_hide",name(){const e=this.getSelectedLast();let t=0;if(Array.isArray(e)){const[n,,r]=e;n-r!==0&&(t=1)}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_HIDE_ROW"],t)},callback(){const{from:t,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(t.row,n.row),0),i=Math.max(t.row,n.row),s=[];for(let e=r;e<=i;e+=1)s.push(e);e.hideRows(s);const o=s[s.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(o,1,!0);Number.isInteger(a)&&a>=0?this.selectRows(a):this.deselectCell(),this.render(),this.view.adjustElementsSize()},disabled:!1,hidden(){return!(this.selection.isSelectedByRowHeader()||this.selection.isSelectedByCorner())}}}function Ww(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_SHOW_ROW"],e)},callback(){var n,r;if(0===t.length)return;let i=t[0],s=t[t.length-1];i=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(i-1,-1))&&void 0!==n?n:0,s=null!==(r=this.rowIndexMapper.getNearestNotHiddenIndex(s+1,1))&&void 0!==r?r:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize();const o=s-i+1===this.countRows();o||this.selectRows(i,s)},disabled:!1,hidden(){const n=Object(h["arrayMap"])(e.getHiddenRows(),e=>this.toPhysicalRow(e));if(!this.selection.isSelectedByRowHeader()&&!this.selection.isSelectedByCorner()||n.length<1)return!0;t.length=0;const r=this.getSelectedRangeLast(),i=r.getTopStartCorner().row,s=r.getBottomEndCorner().row,o=this.rowIndexMapper,a=o.getRenderableFromVisualIndex(i),l=o.getRenderableFromVisualIndex(s),u=o.getNotTrimmedIndexes(),c=[];if(i!==s){const e=s-i+1,t=l-a+1;if(e>t){const e=u.slice(i,s+1);c.push(...e.filter(e=>n.includes(e)))}}else if(0===a&&a<i)c.push(...u.slice(0,i));else if(null===a)c.push(...u.slice(0,this.countRows()));else{const e=this.countRows()-1,t=o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,-1));l===t&&e>s&&c.push(...u.slice(s+1))}return Object(h["arrayEach"])(c,e=>{t.push(this.toVisualRow(e))}),0===t.length}}}function zw(e,t){Kw(e,t),t.add(e)}function Gw(e,t,n){Kw(e,t),t.set(e,n)}function Kw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xw(e,t){return e.get(qw(e,t))}function $w(e,t,n){return e.set(qw(e,t),n),n}function qw(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeHideRows"),pe["a"].getSingleton().register("afterHideRows"),pe["a"].getSingleton().register("beforeUnhideRows"),pe["a"].getSingleton().register("afterUnhideRows");const Jw="hiddenRows",Qw=320;var Zw=new WeakMap,eb=new WeakMap,tb=new WeakSet;class nb extends tn["a"]{constructor(){super(...arguments),zw(this,tb),Gw(this,Zw,{}),Gw(this,eb,null)}static get PLUGIN_KEY(){return Jw}static get PLUGIN_PRIORITY(){return Qw}isEnabled(){return!!this.hot.getSettings()[Jw]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[Jw];Object(o["isObject"])(t)&&($w(Zw,this,t),Object(d["isUndefined"])(t.copyPasteEnabled)&&(t.copyPasteEnabled=!0)),$w(eb,this,new Cw["a"]),Xw(eb,this).addLocalHook("init",()=>qw(tb,this,lb).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,Xw(eb,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qw(tb,e,ab).call(e,...n)})),this.addHook("afterGetCellMeta",(e,t,n)=>qw(tb,this,ib).call(this,e,t,n)),this.addHook("modifyRowHeight",(e,t)=>qw(tb,this,rb).call(this,e,t)),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qw(tb,e,ob).call(e,...n)})),this.addHook("modifyCopyableRange",e=>qw(tb,this,sb).call(this,e)),super.enablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap(this.pluginName),$w(Zw,this,{}),super.disablePlugin(),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;const i=Xw(eb,this).getValues().slice(),s=e.length>0;if(n&&s){const t=e.map(e=>this.hot.toPhysicalRow(e));Object(h["arrayEach"])(t,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e),[])}const o=this.hot.runHooks("beforeUnhideRows",t,r,n&&s);!1!==o&&(n&&s&&Xw(eb,this).setValues(i),this.hot.runHooks("afterUnhideRows",t,r,n&&s,n&&r.length<t.length))}showRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.showRows(t)}hideRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeHideRows",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{Xw(eb,this).setValueAtIndex(this.hot.toPhysicalRow(e),!0)})},!0),this.hot.runHooks("afterHideRows",t,r,n,n&&r.length>t.length))}hideRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.hideRows(t)}getHiddenRows(){return Object(h["arrayMap"])(Xw(eb,this).getHiddenIndexes(),e=>this.hot.toVisualRow(e))}isHidden(e){return Xw(eb,this).getValueAtIndex(this.hot.toPhysicalRow(e))||!1}isValidConfig(e){const t=this.hot.countRows();return!!(Array.isArray(e)&&e.length>0)&&e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}resetCellsMeta(){Object(h["arrayEach"])(this.hot.getCellsMeta(),e=>{e&&(e.skipRowOnPaste=!1)})}destroy(){$w(Zw,this,null),$w(eb,this,null),super.destroy()}}function rb(e,t){return this.isHidden(t)?0:e}function ib(e,t,n){if(!1===Xw(Zw,this).copyPasteEnabled&&this.isHidden(e)&&(n.skipRowOnPaste=!0),this.isHidden(e-1))n.className=n.className||"",-1===n.className.indexOf("afterHiddenRow")&&(n.className+=" afterHiddenRow");else if(n.className){const e=n.className.split(" ");if(e.length>0){const t=e.indexOf("afterHiddenRow");t>-1&&e.splice(t,1),n.className=e.join(" ")}}}function sb(e){if(Xw(Zw,this).copyPasteEnabled)return e;const t=[],n=(e,n,r,i)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:i})};return Object(h["arrayEach"])(e,e=>{let t=!0,r=0;Object(it["rangeEach"])(e.startRow,e.endRow,i=>{this.isHidden(i)?(t||n(r,i-1,e.startCol,e.endCol),t=!0):(t&&(r=i),i===e.endRow&&n(r,i,e.startCol,e.endCol),t=!1)})}),t}function ob(e,t){if(!Xw(Zw,this).indicators||e<0)return;const n=[];e>=1&&this.isHidden(e-1)&&n.push("afterHiddenRow"),e<this.hot.countRows()-1&&this.isHidden(e+1)&&n.push("beforeHiddenRow"),Object(i["addClass"])(t,n)}function ab(e){e.items.push({name:ko},Bw(this),Ww(this))}function lb(){Array.isArray(Xw(Zw,this).rows)&&this.hideRows(Xw(Zw,this).rows)}function ub(e){return{key:"freeze_column",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_FREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.freezeColumn(r),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col<=this.getSettings().fixedColumnsStart-1)&&(t=!0),t}}}function cb(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"])},callback(t,n){const[{start:{col:r}}]=n;e.unfreezeColumn(r),this.render(),this.view.adjustElementsSize()},hidden(){const e=this.getSelectedRange();let t=!1;return(void 0===e||e.length>1||e[0].from.col!==e[0].to.col||e[0].from.col>=this.getSettings().fixedColumnsStart)&&(t=!0),t}}}function hb(e,t){mb(e,t),t.add(e)}function db(e,t,n){mb(e,t),t.set(e,n)}function mb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fb(e,t){return e.get(gb(e,t))}function pb(e,t,n){return e.set(gb(e,t),n),n}function gb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeColumnFreeze"),pe["a"].getSingleton().register("afterColumnFreeze"),pe["a"].getSingleton().register("beforeColumnUnfreeze"),pe["a"].getSingleton().register("afterColumnUnfreeze");const yb="manualColumnFreeze",wb=110;var bb=new WeakMap,vb=new WeakSet;class _b extends tn["a"]{constructor(){super(...arguments),hb(this,vb),db(this,bb,!1)}static get PLUGIN_KEY(){return yb}static get PLUGIN_PRIORITY(){return wb}isEnabled(){return!!this.hot.getSettings()[yb]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",e=>gb(vb,this,Sb).call(this,e)),this.addHook("beforeColumnMove",(e,t)=>gb(vb,this,Eb).call(this,e,t)),super.enablePlugin())}disablePlugin(){pb(bb,this,!1),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}freezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart<this.hot.countCols()&&e>t.fixedColumnsStart-1;fb(bb,this)||pb(bb,this,!0);const r=this.hot.runHooks("beforeColumnFreeze",e,n);!1!==r&&(n&&(this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart),t._fixedColumnsStart+=1),this.hot.runHooks("afterColumnFreeze",e,n))}unfreezeColumn(e){const t=this.hot.getSettings(),n=t.fixedColumnsStart>0&&e<=t.fixedColumnsStart-1;fb(bb,this)||pb(bb,this,!0);const r=this.hot.runHooks("beforeColumnUnfreeze",e,n);!1!==r&&(n&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,n))}}function Sb(e){e.items.push({name:"---------"},ub(this),cb(this))}function Eb(e,t){if(fb(bb,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some(e=>e<n))return!1}}function Cb(e,t,n){return(t=Mb(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mb(e){var t=Tb(e,"string");return"symbol"==typeof t?t:t+""}function Tb(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const Rb=0,Ob=1,Nb=2,Ab="px";class Lb{constructor(e){Cb(this,"hot",void 0),Cb(this,"_element",null),Cb(this,"state",Rb),Cb(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=Nb}build(){this.state===Rb&&(this._element=this.hot.rootDocument.createElement("div"),this.state=Ob)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=Rb}isAppended(){return this.state===Nb}isBuilt(){return this.state>=Ob}setPosition(e,t){Object(it["isNumeric"])(e)&&(this._element.style.top=e+Ab),Object(it["isNumeric"])(t)&&(this._element.style[this.inlineProperty]=t+Ab)}getPosition(){const e=this._element.style;return{top:e.top?parseInt(e.top,10):0,start:e[this.inlineProperty]?parseInt(e[this.inlineProperty],10):0}}setSize(e,t){Object(it["isNumeric"])(e)&&(this._element.style.width=e+Ab),Object(it["isNumeric"])(t)&&(this._element.style.height=t+Ab)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){Object(it["isNumeric"])(e)&&(this._element.style.marginTop=e+Ab),Object(it["isNumeric"])(t)&&(this._element.style["margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty)]=t+Ab)}getOffset(){const e=this._element.style,t="margin"+Object(m["toUpperCaseFirst"])(this.inlineProperty);return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}}var Ib=Lb;const kb="ht__manualColumnMove--backlight";class xb extends Ib{build(){super.build(),Object(i["addClass"])(this._element,kb)}}var Db=xb;const Hb="ht__manualColumnMove--guideline";class Pb extends Ib{build(){super.build(),Object(i["addClass"])(this._element,Hb)}}var jb=Pb;function Fb(e,t){Ub(e,t),t.add(e)}function Yb(e,t,n){Ub(e,t),t.set(e,n)}function Ub(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vb(e,t,n){return e.set(Wb(e,t),n),n}function Bb(e,t){return e.get(Wb(e,t))}function Wb(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeColumnMove"),pe["a"].getSingleton().register("afterColumnMove");const zb="manualColumnMove",Gb=120,Kb="ht__manualColumnMove",Xb="show-ui",$b="on-moving--columns",qb="after-selection--columns";var Jb=new WeakMap,Qb=new WeakMap,Zb=new WeakMap,ev=new WeakMap,tv=new WeakMap,nv=new WeakMap,rv=new WeakMap,iv=new WeakMap,sv=new WeakMap,ov=new WeakMap,av=new WeakMap,lv=new WeakSet;class uv extends tn["a"]{constructor(){super(...arguments),Fb(this,lv),Yb(this,Jb,new Db(this.hot)),Yb(this,Qb,new jb(this.hot)),Yb(this,Zb,[]),Yb(this,ev,0),Yb(this,tv,!1),Yb(this,nv,{}),Yb(this,rv,void 0),Yb(this,iv,void 0),Yb(this,sv,void 0),Yb(this,ov,void 0),Yb(this,av,void 0)}static get PLUGIN_KEY(){return zb}static get PLUGIN_PRIORITY(){return Gb}isEnabled(){return!!this.hot.getSettings()[zb]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wb(lv,e,cv).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wb(lv,e,dv).call(e,...n)})),this.addHook("afterScrollVertically",()=>Wb(lv,this,fv).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Wb(lv,e,pv).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,Kb),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,Kb),this.unregisterEvents(),Bb(Jb,this).destroy(),Bb(Qb,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=Bb(rv,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeColumnMove",e,t,n,r);if(Vb(rv,this,void 0),!1===i)return;r&&this.hot.columnIndexMapper.moveIndexes(e,t);const s=r&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,r,s),s}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return Vb(rv,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isColumnOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getColumnsWidth(e,t){const n=this.hot.columnIndexMapper;let r=0;for(let i=e;i<=t;i+=1){const e=n.getRenderableFromVisualIndex(i);i<0?r+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(r+=this.hot.view._wt.wtTable.getStretchedColumnWidth(e)||0)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[zb];if(Array.isArray(e))this.moveColumns(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveColumns(e,0)}}isFixedColumnsStart(e){return e<this.hot.getSettings().fixedColumnsStart}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualColumnMove",this.hot.columnIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualColumnMove",e),e.value?e.value:[]}prepareColumnsToMoving(e,t){const n=[];return Object(it["rangeEach"])(e,t,e=>{n.push(e)}),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(Bb(iv,this))&&e>0&&this.hot.scrollViewportTo({col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(e-1,-1)});const t=this.hot.view._wt.wtTable,n=this.hot.view._wt.wtOverlays.scrollableElement,r="number"===typeof n.scrollX?n.scrollX:n.scrollLeft;let s=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,Bb(iv,this)-1);const o=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=Bb(Jb,this).getOffset().start,u=Bb(Jb,this).getSize().width;let c=0,h=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=Object(i["outerWidth"])(this.hot.rootElement),s=e.innerWidth-Bb(sv,this)-t;h=e.innerWidth-Bb(nv,this).eventPageX-s-(void 0===n.scrollX?r:0)}else h=Bb(nv,this).eventPageX-(Bb(sv,this)-(void 0===n.scrollX?r:0));if(Bb(ov,this)&&(c=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(Bb(iv,this))&&(s+=r),s+=c,Bb(iv,this)<0)Bb(av,this)>0?Bb(nv,this).col=0:Bb(nv,this).col=e>0?e-1:e;else if(Bb(nv,this).TD.offsetWidth/2+s<=h){const e=Bb(iv,this)>=Bb(ev,this)?Bb(ev,this)-1:Bb(iv,this);Bb(nv,this).col=e+1,s+=Bb(nv,this).TD.offsetWidth}else Bb(nv,this).col=Bb(iv,this);let d=h,m=s;h+u+l>=o?d=o-u-l:h+l<a+c&&(d=a+c+Math.abs(l)),s>=o-1?m=o-1:0===m?m=1:void 0!==n.scrollX&&Bb(iv,this)<Bb(av,this)&&(m-=Bb(sv,this)<=n.scrollX?Bb(sv,this):0),Bb(Jb,this).setPosition(null,d),Bb(Qb,this).setPosition(null,m)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>Wb(lv,this,hv).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>Wb(lv,this,mv).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Bb(Jb,this).build(),Bb(Qb,this).build()}destroy(){Bb(Jb,this).destroy(),Bb(Qb,this).destroy(),super.destroy()}}function cv(e,t,n,r){const o=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),u=Object(i["hasClass"])(e.target,"sortAction");if(!l||!a||Bb(tv,this)||0!==e.button||u)return Vb(tv,this,!1),Bb(Zb,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[$b,Xb]);const c=Bb(Qb,this).isBuilt()&&!Bb(Qb,this).isAppended(),h=Bb(Jb,this).isBuilt()&&!Bb(Jb,this).isAppended();c&&h&&(Bb(Qb,this).appendTo(o.hider),Bb(Jb,this).appendTo(o.hider));const{from:d,to:m}=l,f=Math.min(d.col,m.col),p=Math.max(d.col,m.col);if(t.row<0&&t.col>=f&&t.col<=p){r.column=!0,Vb(tv,this,!0);const a=n.firstChild?Object(s["offsetRelativeTo"])(e,n.firstChild).x:e.offsetX;Bb(nv,this).eventPageX=e.pageX,Vb(iv,this,t.col),Bb(nv,this).TD=n,Bb(nv,this).col=t.col,Vb(Zb,this,this.prepareColumnsToMoving(f,p)),Vb(ov,this,!!this.hot.getSettings().rowHeaders),Vb(ev,this,this.hot.countCols()),Vb(av,this,this.hot.getSettings().fixedColumnsStart),Vb(sv,this,Object(i["offset"])(this.hot.rootElement).left);const l=Bb(ov,this)?-1:0,u=o.holder.scrollTop+o.getColumnHeaderHeight(0)+1,c=t.col<Bb(av,this),h=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),m=this.getColumnsWidth(f,t.col-1)+d,g=this.getColumnsWidth(l,f-1)+(c?h:0)+m;Bb(Jb,this).setPosition(u,g),Bb(Jb,this).setSize(this.getColumnsWidth(f,p),o.hider.offsetHeight-u),Bb(Jb,this).setOffset(null,-m),Object(i["addClass"])(this.hot.rootElement,$b)}else Object(i["removeClass"])(this.hot.rootElement,qb),Vb(tv,this,!1),Bb(Zb,this).length=0}function hv(e){Bb(tv,this)&&(Bb(nv,this).eventPageX=e.pageX,this.refreshPositions())}function dv(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&Bb(tv,this)&&(Bb(Zb,this).indexOf(t.col)>-1?Object(i["removeClass"])(this.hot.rootElement,Xb):Object(i["addClass"])(this.hot.rootElement,Xb),r.row=!0,r.column=!0,r.cell=!0,Vb(iv,this,t.col),Bb(nv,this).TD=n)}function mv(){const e=Bb(nv,this).col,t=Bb(Zb,this).length;if(Vb(iv,this,void 0),Vb(tv,this,!1),Object(i["removeClass"])(this.hot.rootElement,[$b,Xb,qb]),this.hot.selection.isSelectedByColumnHeader()&&Object(i["addClass"])(this.hot.rootElement,qb),t<1||void 0===e)return;const n=Bb(Zb,this)[0],r=this.hot.toPhysicalColumn(n),s=this.dragColumns(Bb(Zb,this),e);if(Bb(Zb,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualColumn(r),n=e+t-1;this.hot.selectColumns(e,n)}}function fv(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1,n=e.holder.scrollTop,r=t+n;Bb(Jb,this).setPosition(r),Bb(Jb,this).setSize(null,e.hider.offsetHeight-r)}function pv(){this.moveBySettingsOrLoad()}function gv(e,t){wv(e,t),t.add(e)}function yv(e,t,n){wv(e,t),t.set(e,n)}function wv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function bv(e,t,n){return e.set(_v(e,t),n),n}function vv(e,t){return e.get(_v(e,t))}function _v(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const Sv="manualColumnResize",Ev=130,Cv="manualColumnWidths";var Mv=new WeakMap,Tv=new WeakMap,Rv=new WeakMap,Ov=new WeakMap,Nv=new WeakMap,Av=new WeakMap,Lv=new WeakMap,Iv=new WeakMap,kv=new WeakMap,xv=new WeakMap,Dv=new WeakMap,Hv=new WeakMap,Pv=new WeakMap,jv=new WeakMap,Fv=new WeakMap,Yv=new WeakMap,Uv=new WeakSet;class Vv extends tn["a"]{static get PLUGIN_KEY(){return Sv}static get PLUGIN_PRIORITY(){return Ev}constructor(e){super(e),gv(this,Uv),yv(this,Mv,null),yv(this,Tv,null),yv(this,Rv,[]),yv(this,Ov,null),yv(this,Nv,null),yv(this,Av,null),yv(this,Lv,null),yv(this,Iv,null),yv(this,kv,this.hot.rootDocument.createElement("DIV")),yv(this,xv,this.hot.rootDocument.createElement("DIV")),yv(this,Dv,null),yv(this,Hv,!1),yv(this,Pv,0),yv(this,jv,null),yv(this,Fv,void 0),yv(this,Yv,void 0),Object(i["addClass"])(vv(kv,this),"manualColumnResizer"),Object(i["addClass"])(vv(xv,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[Sv]}enablePlugin(){this.enabled||(bv(Fv,this,new hn["a"]),vv(Fv,this).addLocalHook("init",()=>_v(Uv,this,Bv).call(this)),this.hot.columnIndexMapper.registerMap(this.pluginName,vv(Fv,this)),this.addHook("modifyColWidth",(e,t)=>_v(Uv,this,$v).call(this,e,t),1),this.addHook("beforeStretchingColumnWidth",(e,t)=>_v(Uv,this,qv).call(this,e,t)),this.addHook("beforeColumnResize",(e,t,n)=>_v(Uv,this,Jv).call(this,e,t,n)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){bv(Yv,this,vv(Fv,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",Cv,vv(Fv,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",Cv,e),e.value}setManualSize(e,t){const n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return vv(Fv,this).setValueAtIndex(r,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);vv(Fv,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;bv(Mv,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(vv(Mv,this)),r=n.col;if(r<0)return;const s=Object(i["outerHeight"])(vv(Mv,this)),o=vv(Mv,this).getBoundingClientRect(),a=r<t.getSetting("fixedColumnsStart");let l;a&&(l=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(vv(Mv,this),n.row,n.col)),l||(l=t.wtOverlays.topOverlay.getRelativeCellPosition(vv(Mv,this),n.row,n.col)),bv(Tv,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)),bv(Rv,this,[]);const u=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&u){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;Object(it["rangeEach"])(t,n,e=>{vv(Rv,this).includes(e)||vv(Rv,this).push(e)})})}vv(Rv,this).includes(vv(Tv,this))||bv(Rv,this,[vv(Tv,this)]),bv(Iv,this,l.start-6),bv(Lv,this,parseInt(o.width,10)),vv(kv,this).style.top=l.top+"px",vv(kv,this).style[this.inlineDir]=vv(Iv,this)+vv(Lv,this)+"px",vv(kv,this).style.height=s+"px",this.hot.rootElement.appendChild(vv(kv,this))}refreshHandlePosition(){vv(kv,this).style[this.inlineDir]=vv(Iv,this)+vv(Ov,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerHeight"])(vv(kv,this)),10),t=parseInt(vv(kv,this).style.top,10)+e,n=parseInt(this.hot.view.maximumVisibleElementHeight(0),10);Object(i["addClass"])(vv(kv,this),"active"),Object(i["addClass"])(vv(xv,this),"active"),vv(xv,this).style.top=t+"px",this.refreshGuidePosition(),vv(xv,this).style.height=n-e+"px",this.hot.rootElement.appendChild(vv(xv,this))}refreshGuidePosition(){vv(xv,this).style[this.inlineDir]=vv(kv,this).style[this.inlineDir]}hideHandleAndGuide(){Object(i["removeClass"])(vv(kv,this),"active"),Object(i["removeClass"])(vv(xv,this),"active")}checkIfColumnHeader(e){const t=Object(i["closest"])(e,["THEAD"],this.hot.rootElement),{topOverlay:n,topInlineStartCornerOverlay:r}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.THEAD,r.clone.wtTable.THEAD].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeColumnResize",vv(Nv,this),t,!0);void 0!==r&&bv(Nv,this,r),"all"===this.hot.getSettings().stretchH?this.clearManualSize(t):this.setManualSize(t,vv(Nv,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",vv(Nv,this),t,!0),n&&e()};if(vv(Pv,this)>=2){const n=vv(Rv,this).length;n>1?(Object(h["arrayEach"])(vv(Rv,this),e=>{t(e)}),e()):Object(h["arrayEach"])(vv(Rv,this),e=>{t(e,!0)})}bv(Pv,this,0),bv(jv,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",e=>_v(Uv,this,Wv).call(this,e)),this.eventManager.addEventListener(t,"mousedown",e=>_v(Uv,this,zv).call(this,e)),this.eventManager.addEventListener(e,"mousemove",e=>_v(Uv,this,Gv).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>_v(Uv,this,Kv).call(this)),this.eventManager.addEventListener(vv(kv,this),"contextmenu",()=>_v(Uv,this,Xv).call(this))}destroy(){super.destroy()}}function Bv(){const e=this.hot.getSettings()[Sv],t=this.loadManualColumnWidths();"undefined"!==typeof t?this.hot.batchExecution(()=>{t.forEach((e,t)=>{vv(Fv,this).setValueAtIndex(t,e)})},!0):Array.isArray(e)?(this.hot.batchExecution(()=>{e.forEach((e,t)=>{vv(Fv,this).setValueAtIndex(t,e)})},!0),bv(Yv,this,e)):!0===e&&Array.isArray(vv(Yv,this))&&this.hot.batchExecution(()=>{vv(Yv,this).forEach((e,t)=>{vv(Fv,this).setValueAtIndex(t,e)})},!0)}function Wv(e){if(!Object(i["isDetached"])(e.target)&&!0!==vv(Hv,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||vv(Dv,this)||this.setupHandlePosition(t)}}function zv(e){e.target.parentNode===this.hot.rootElement&&Object(i["hasClass"])(e.target,"manualColumnResizer")&&(this.setupHandlePosition(vv(Mv,this)),this.setupGuidePosition(),bv(Dv,this,!0),null===vv(jv,this)&&(bv(jv,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(vv(jv,this))),bv(Pv,this,vv(Pv,this)+1),this.startX=e.pageX,bv(Nv,this,vv(Lv,this)))}function Gv(e){if(vv(Dv,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();bv(Ov,this,vv(Lv,this)+t),Object(h["arrayEach"])(vv(Rv,this),e=>{bv(Nv,this,this.setManualSize(e,vv(Ov,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition()}}function Kv(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",vv(Nv,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",vv(Nv,this),t,!1)};if(vv(Dv,this)){if(this.hideHandleAndGuide(),bv(Dv,this,!1),vv(Nv,this)!==vv(Lv,this)){const n=vv(Rv,this).length;n>1?(Object(h["arrayEach"])(vv(Rv,this),e=>{t(e)}),e()):Object(h["arrayEach"])(vv(Rv,this),e=>{t(e,!0)})}this.setupHandlePosition(vv(Mv,this))}}function Xv(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(vv(kv,this)),this.hot.rootElement.removeChild(vv(xv,this)),bv(Dv,this,!1),bv(Hv,this,!0),this.hot._registerImmediate(()=>{bv(Hv,this,!1)})}function $v(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),r=vv(Fv,this).getValueAtIndex(e);this.hot.getSettings()[Sv]&&r&&(n=r)}return n}function qv(e,t){let n=vv(Fv,this).getValueAtIndex(t);return null===n&&(n=e),n}function Jv(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function Qv(e,t,n){return(t=Zv(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zv(e){var t=e_(e,"string");return"symbol"==typeof t?t:t+""}function e_(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const t_=0,n_=1,r_=2,i_="px";class s_{constructor(e){Qv(this,"hot",void 0),Qv(this,"_element",null),Qv(this,"state",t_),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=r_}build(){this.state===t_&&(this._element=this.hot.rootDocument.createElement("div"),this.state=n_)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=t_}isAppended(){return this.state===r_}isBuilt(){return this.state>=n_}setPosition(e,t){void 0!==e&&(this._element.style.top=e+i_),void 0!==t&&(this._element.style.left=t+i_)}getPosition(){return{top:this._element.style.top?parseInt(this._element.style.top,10):0,left:this._element.style.left?parseInt(this._element.style.left,10):0}}setSize(e,t){e&&(this._element.style.width=e+i_),t&&(this._element.style.height=t+i_)}getSize(){return{width:this._element.style.width?parseInt(this._element.style.width,10):0,height:this._element.style.height?parseInt(this._element.style.height,10):0}}setOffset(e,t){e&&(this._element.style.marginTop=e+i_),t&&(this._element.style.marginLeft=t+i_)}getOffset(){return{top:this._element.style.marginTop?parseInt(this._element.style.marginTop,10):0,left:this._element.style.marginLeft?parseInt(this._element.style.marginLeft,10):0}}}var o_=s_;const a_="ht__manualRowMove--backlight";class l_ extends o_{build(){super.build(),Object(i["addClass"])(this._element,a_)}}var u_=l_;const c_="ht__manualRowMove--guideline";class h_ extends o_{build(){super.build(),Object(i["addClass"])(this._element,c_)}}var d_=h_;function m_(e,t){p_(e,t),t.add(e)}function f_(e,t,n){p_(e,t),t.set(e,n)}function p_(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function g_(e,t,n){return e.set(w_(e,t),n),n}function y_(e,t){return e.get(w_(e,t))}function w_(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeRowMove"),pe["a"].getSingleton().register("afterRowMove");const b_="manualRowMove",v_=140,__="ht__manualRowMove",S_="show-ui",E_="on-moving--rows",C_="after-selection--rows";var M_=new WeakMap,T_=new WeakMap,R_=new WeakMap,O_=new WeakMap,N_=new WeakMap,A_=new WeakMap,L_=new WeakSet;class I_ extends tn["a"]{constructor(){super(...arguments),m_(this,L_),f_(this,M_,new u_(this.hot)),f_(this,T_,new d_(this.hot)),f_(this,R_,[]),f_(this,O_,void 0),f_(this,N_,{}),f_(this,A_,void 0)}static get PLUGIN_KEY(){return b_}static get PLUGIN_PRIORITY(){return v_}isEnabled(){return!!this.hot.getSettings()[b_]}enablePlugin(){var e=this;this.enabled||(this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w_(L_,e,k_).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w_(L_,e,D_).call(e,...n)})),this.addHook("afterScrollHorizontally",()=>w_(L_,this,P_).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return w_(L_,e,j_).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),Object(i["addClass"])(this.hot.rootElement,__),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){Object(i["removeClass"])(this.hot.rootElement,__),this.unregisterEvents(),y_(M_,this).destroy(),y_(T_,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=y_(A_,this),r=this.isMovePossible(e,t),i=this.hot.runHooks("beforeRowMove",e,t,n,r);if(g_(A_,this,void 0),!1===i)return;r&&this.hot.rowIndexMapper.moveIndexes(e,t);const s=r&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,r,s),s}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return g_(A_,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,i=t<0,s=e.some(e=>e<0),o=e.some(e=>e>=n);return!(r||i||s||o)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}countFinalIndex(e,t){const n=Object(h["arrayReduce"])(e,(e,n)=>(n<t&&(e+=1),e),0);return t-n}getRowsHeight(e,t){const n=this.hot.rowIndexMapper;let r=0;for(let i=e;i<=t;i++){const e=n.getRenderableFromVisualIndex(i);null!==e&&(r+=this.hot.view._wt.wtTable.getRowHeight(e)||23)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[b_];if(Array.isArray(e))this.moveRows(e,0);else if(void 0!==e){const e=this.persistentStateLoad();e.length&&this.moveRows(e,0)}}isFixedRowTop(e){return e<this.hot.getSettings().fixedRowsTop}isFixedRowBottom(e){return e>this.hot.countRows()-1-this.hot.getSettings().fixedRowsBottom}persistentStateSave(){this.hot.runHooks("persistentStateSave","manualRowMove",this.hot.rowIndexMapper.getIndexesSequence())}persistentStateLoad(){const e={};return this.hot.runHooks("persistentStateLoad","manualRowMove",e),e.value?e.value:[]}prepareRowsToMoving(){const e=this.hot.getSelectedRangeLast(),t=[];if(!e)return t;const{from:n,to:r}=e,i=Math.min(n.row,r.row),s=Math.max(n.row,r.row);return Object(it["rangeEach"])(i,s,e=>{t.push(e)}),t}refreshPositions(){const e=y_(N_,this).coords,t=this.hot.view.getFirstFullyVisibleRow(),n=this.hot.view.getLastFullyVisibleRow(),r=this.hot.countRows();this.isFixedRowTop(e.row)&&t>0&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(t-1,-1)),this.isFixedRowBottom(e.row)&&n<r&&this.hot.scrollViewportTo(this.hot.rowIndexMapper.getNearestNotHiddenIndex(n+1,1),void 0,!0);const s=this.hot.view._wt.wtTable,o=y_(N_,this).TD,a=this.hot.rootElement,l=Object(i["offset"])(a),u=Object(i["getTrimmingContainer"])(a),c=s.holder.scrollTop,h=this.hot.rootWindow!==u?u.scrollTop:0,d=l.top-h,m=y_(N_,this).eventPageY-d+c,f=s.hider.offsetHeight,p=s.TBODY.offsetTop,g=y_(M_,this).getOffset().top,y=y_(M_,this).getSize().height,w=o.offsetHeight/2,b=o.offsetHeight;let v=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const _=m>=v+w;this.isFixedRowTop(e.row)&&(v+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?y_(N_,this).row=t>0?t-1:t:_?(y_(N_,this).row=e.row+1,v+=0===e.row?b-1:b):y_(N_,this).row=e.row;let S=m,E=v;m+y+g>=f?S=f-y-g:m+g<p&&(S=p+Math.abs(g)),v>=f-1&&(E=f-1),y_(M_,this).setPosition(S),y_(T_,this).setPosition(E)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",e=>w_(L_,this,x_).call(this,e)),this.eventManager.addEventListener(e,"mouseup",()=>w_(L_,this,H_).call(this))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){y_(M_,this).build(),y_(T_,this).build()}destroy(){y_(M_,this).destroy(),y_(T_,this).destroy(),super.destroy()}}function k_(e,t,n,r){const{wtTable:s,wtViewport:o}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||y_(O_,this)||0!==e.button)return g_(O_,this,!1),y_(R_,this).length=0,void Object(i["removeClass"])(this.hot.rootElement,[E_,S_]);const u=y_(T_,this).isBuilt()&&!y_(T_,this).isAppended(),c=y_(M_,this).isBuilt()&&!y_(M_,this).isAppended();u&&c&&(y_(T_,this).appendTo(s.hider),y_(M_,this).appendTo(s.hider));const{from:h,to:d}=l,m=Math.min(h.row,d.row),f=Math.max(h.row,d.row);if(t.col<0&&t.row>=m&&t.row<=f){r.row=!0,g_(O_,this,!0),y_(N_,this).eventPageY=e.pageY,y_(N_,this).coords=t,y_(N_,this).TD=n,g_(R_,this,this.prepareRowsToMoving());const a=s.holder.scrollLeft+o.getRowHeaderWidth(),l=this.getRowsHeight(m,t.row-1)+e.offsetY;y_(M_,this).setPosition(null,a),y_(M_,this).setSize(s.hider.offsetWidth-a,this.getRowsHeight(m,f)),y_(M_,this).setOffset(-l,null),Object(i["addClass"])(this.hot.rootElement,E_),this.refreshPositions()}else Object(i["removeClass"])(this.hot.rootElement,C_),g_(O_,this,!1),y_(R_,this).length=0}function x_(e){y_(O_,this)&&(y_(N_,this).eventPageY=e.pageY,this.refreshPositions())}function D_(e,t,n,r){const s=this.hot.getSelectedRangeLast();s&&y_(O_,this)&&(y_(R_,this).indexOf(t.row)>-1?Object(i["removeClass"])(this.hot.rootElement,S_):Object(i["addClass"])(this.hot.rootElement,S_),r.row=!0,r.column=!0,r.cell=!0,y_(N_,this).coords=t,y_(N_,this).TD=n)}function H_(){const e=y_(N_,this).row,t=y_(R_,this).length;if(g_(O_,this,!1),Object(i["removeClass"])(this.hot.rootElement,[E_,S_,C_]),this.hot.selection.isSelectedByRowHeader()&&Object(i["addClass"])(this.hot.rootElement,C_),t<1||void 0===e)return;const n=y_(R_,this)[0],r=this.hot.toPhysicalRow(n),s=this.dragRows(y_(R_,this),e);if(y_(R_,this).length=0,!0===s){this.persistentStateSave(),this.hot.render(),this.hot.view.adjustElementsSize();const e=this.hot.toVisualRow(r),n=e+t-1;this.hot.selectRows(e,n)}}function P_(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth(),n=e.holder.scrollLeft,r=t+n;y_(M_,this).setPosition(null,r),y_(M_,this).setSize(e.hider.offsetWidth-r)}function j_(){this.moveBySettingsOrLoad()}var F_=n("eb36");function Y_(e,t){V_(e,t),t.add(e)}function U_(e,t,n){V_(e,t),t.set(e,n)}function V_(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function B_(e,t,n){return e.set(z_(e,t),n),n}function W_(e,t){return e.get(z_(e,t))}function z_(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const G_="manualRowResize",K_=30,X_="manualRowHeights";var $_=new WeakMap,q_=new WeakMap,J_=new WeakMap,Q_=new WeakMap,Z_=new WeakMap,eS=new WeakMap,tS=new WeakMap,nS=new WeakMap,rS=new WeakMap,iS=new WeakMap,sS=new WeakMap,oS=new WeakMap,aS=new WeakMap,lS=new WeakMap,uS=new WeakMap,cS=new WeakMap,hS=new WeakSet;class dS extends tn["a"]{static get PLUGIN_KEY(){return G_}static get PLUGIN_PRIORITY(){return K_}constructor(e){super(e),Y_(this,hS),U_(this,$_,null),U_(this,q_,null),U_(this,J_,[]),U_(this,Q_,null),U_(this,Z_,null),U_(this,eS,null),U_(this,tS,null),U_(this,nS,null),U_(this,rS,this.hot.rootDocument.createElement("DIV")),U_(this,iS,this.hot.rootDocument.createElement("DIV")),U_(this,sS,!1),U_(this,oS,!1),U_(this,aS,0),U_(this,lS,null),U_(this,uS,void 0),U_(this,cS,void 0),Object(i["addClass"])(W_(rS,this),"manualRowResizer"),Object(i["addClass"])(W_(iS,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[G_]}enablePlugin(){this.enabled||(B_(uS,this,new hn["a"]),W_(uS,this).addLocalHook("init",()=>z_(hS,this,bS).call(this)),this.hot.rowIndexMapper.registerMap(this.pluginName,W_(uS,this)),this.addHook("modifyRowHeight",(e,t)=>z_(hS,this,wS).call(this,e,t)),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){B_(cS,this,W_(uS,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",X_,W_(uS,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",X_,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),r=Math.max(t,F_["a"]);return W_(uS,this).setValueAtIndex(n,r),r}getLastDesiredRowHeight(){return W_(Q_,this)}setupHandlePosition(e){B_($_,this,e);const{view:t}=this.hot,{_wt:n}=t,r=n.wtTable.getCoords(W_($_,this)),s=r.row;if(s<0)return;const o=Object(i["outerWidth"])(W_($_,this)),a=W_($_,this).getBoundingClientRect(),l=s<n.getSetting("fixedRowsTop"),u=s>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let c;l?c=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(W_($_,this),r.row,r.col):u&&(c=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(W_($_,this),r.row,r.col)),c||(c=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(W_($_,this),r.row,r.col)),B_(q_,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(s)),B_(J_,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();Object(h["arrayEach"])(e,e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;Object(it["rangeEach"])(t,n,e=>{W_(J_,this).includes(e)||W_(J_,this).push(e)})})}W_(J_,this).includes(W_(q_,this))||B_(J_,this,[W_(q_,this)]),B_(nS,this,c.top-6),B_(tS,this,parseInt(a.height,10)),W_(rS,this).style.top=W_(nS,this)+W_(tS,this)+"px",W_(rS,this).style[this.inlineDir]=c.start+"px",W_(rS,this).style.width=o+"px",this.hot.rootElement.appendChild(W_(rS,this))}refreshHandlePosition(){W_(rS,this).style.top=W_(nS,this)+W_(Q_,this)+"px"}setupGuidePosition(){const e=parseInt(Object(i["outerWidth"])(W_(rS,this)),10),t=parseInt(W_(rS,this).style[this.inlineDir],10)+e,n=parseInt(this.hot.view.maximumVisibleElementWidth(0),10);Object(i["addClass"])(W_(rS,this),"active"),Object(i["addClass"])(W_(iS,this),"active"),W_(iS,this).style.top=W_(rS,this).style.top,W_(iS,this).style[this.inlineDir]=t+"px",W_(iS,this).style.width=n-e+"px",this.hot.rootElement.appendChild(W_(iS,this))}refreshGuidePosition(){W_(iS,this).style.top=W_(rS,this).style.top}hideHandleAndGuide(){Object(i["removeClass"])(W_(rS,this),"active"),Object(i["removeClass"])(W_(iS,this),"active")}checkIfRowHeader(e){const t=Object(i["closest"])(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:s}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,r.clone.wtTable.TBODY,s.clone.wtTable.TBODY].includes(t)}getClosestTHParent(e){return"TABLE"!==e.tagName?"TH"===e.tagName?e:this.getClosestTHParent(e.parentNode):null}getActualRowHeight(e){const t=this.hot.view._wt.wtTable.getRowHeight(e);return void 0!==t&&W_(Z_,this)<t?t:W_(Z_,this)}afterMouseDownTimeout(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==r&&B_(Z_,this,r),this.setManualSize(t,W_(Z_,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};if(W_(aS,this)>=2){const n=W_(J_,this).length;n>1?(Object(h["arrayEach"])(W_(J_,this),e=>{t(e)}),e()):Object(h["arrayEach"])(W_(J_,this),e=>{t(e,!0)})}B_(aS,this,0),B_(lS,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",e=>z_(hS,this,mS).call(this,e)),this.eventManager.addEventListener(e,"mousedown",e=>z_(hS,this,fS).call(this,e)),this.eventManager.addEventListener(t,"mousemove",e=>z_(hS,this,pS).call(this,e)),this.eventManager.addEventListener(t,"mouseup",()=>z_(hS,this,gS).call(this)),this.eventManager.addEventListener(W_(rS,this),"contextmenu",()=>z_(hS,this,yS).call(this))}destroy(){super.destroy()}}function mS(e){if(!Object(i["isDetached"])(e.target)&&!0!==W_(oS,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(W_(sS,this)||this.setupHandlePosition(t))}}function fS(e){Object(i["hasClass"])(e.target,"manualRowResizer")&&(this.setupHandlePosition(W_($_,this)),this.setupGuidePosition(),B_(sS,this,!0),null===W_(lS,this)&&(B_(lS,this,setTimeout(()=>this.afterMouseDownTimeout(),500)),this.hot._registerTimeout(W_(lS,this))),B_(aS,this,W_(aS,this)+1),B_(eS,this,e.pageY),B_(Z_,this,W_(tS,this)))}function pS(e){W_(sS,this)&&(B_(Q_,this,W_(tS,this)+(e.pageY-W_(eS,this))),Object(h["arrayEach"])(W_(J_,this),e=>{B_(Z_,this,this.setManualSize(e,W_(Q_,this)))}),this.refreshHandlePosition(),this.refreshGuidePosition())}function gS(){const e=()=>{this.hot.forceFullRender=!0,this.hot.view.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!1),n&&e(),this.saveManualRowHeights(),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!1)};if(W_(sS,this)){if(this.hideHandleAndGuide(),B_(sS,this,!1),W_(Z_,this)!==W_(tS,this)){const n=W_(J_,this).length;n>1?(Object(h["arrayEach"])(W_(J_,this),e=>{t(e)}),e()):Object(h["arrayEach"])(W_(J_,this),e=>{t(e,!0)})}this.setupHandlePosition(W_($_,this))}}function yS(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(W_(rS,this)),this.hot.rootElement.removeChild(W_(iS,this)),B_(sS,this,!1),B_(oS,this,!0),this.hot._registerImmediate(()=>{B_(oS,this,!1)})}function wS(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),r=W_(uS,this).getValueAtIndex(e);this.hot.getSettings()[G_]&&r&&(n=r)}return n}function bS(){const e=this.hot.getSettings()[G_],t=this.loadManualRowHeights();this.hot.batchExecution(()=>{"undefined"!==typeof t?t.forEach((e,t)=>{W_(uS,this).setValueAtIndex(t,e)}):Array.isArray(e)?(e.forEach((e,t)=>{W_(uS,this).setValueAtIndex(t,e)}),B_(cS,this,e)):!0===e&&Array.isArray(W_(cS,this))&&W_(cS,this).forEach((e,t)=>{W_(uS,this).setValueAtIndex(t,e)})},!0)}n("4cd6");function vS(e,t,n){_S(e,t),t.set(e,n)}function _S(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function SS(e,t,n){return(t=ES(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ES(e){var t=CS(e,"string");return"symbol"==typeof t?t:t+""}function CS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function MS(e,t){return e.get(RS(e,t))}function TS(e,t,n){return e.set(RS(e,t),n),n}function RS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var OS=new WeakMap;class NS{constructor(e,t,n,r,i,s){SS(this,"row",void 0),SS(this,"col",void 0),SS(this,"rowspan",void 0),SS(this,"colspan",void 0),SS(this,"removed",!1),SS(this,"cellCoordsFactory",void 0),SS(this,"cellRangeFactory",void 0),vS(this,OS,null),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.cellCoordsFactory=i,this.cellRangeFactory=s}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return Hs["a"]`The merged cell declared with {row: ${t}, col: ${n},\x20
- rowspan: ${r}, colspan: ${i}} contains negative values, which is\x20
- not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return Hs["a"]`The merged cell declared at [${t}, ${n}] is positioned\x20
- (or positioned partially) outside of the table range. It was not added to the table, please fix your setup.`}static IS_SINGLE_CELL(e){let{row:t,col:n}=e;return Hs["a"]`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
- and "colspan" declared as "1", which makes it a single cell. It cannot be added to the collection.`}static ZERO_SPAN_WARNING(e){let{row:t,col:n}=e;return Hs["a"]`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
- or "colspan" declared as "0", which is not supported. It cannot be added to the collection.`}static containsNegativeValues(e){let{row:t,col:n,rowspan:r,colspan:i}=e;return t<0||n<0||r<0||i<0}static isSingleCell(e){let{rowspan:t,colspan:n}=e;return 1===n&&1===t}static containsZeroSpan(e){let{rowspan:t,colspan:n}=e;return 0===n||0===t}static isOutOfBounds(e,t,n){return e.row<0||e.col<0||e.row>=t||e.row+e.rowspan-1>=t||e.col>=n||e.col+e.colspan-1>=n}normalize(e){const t=e.countRows(),n=e.countCols();this.row<0?this.row=0:this.row>t-1&&(this.row=t-1),this.col<0?this.col=0:this.col>n-1&&(this.col=n-1),this.row+this.rowspan>t-1&&(this.rowspan=t-this.row),this.col+this.colspan>n-1&&(this.colspan=n-this.col),TS(OS,this,null)}includes(e,t){return this.row<=e&&this.col<=t&&this.row+this.rowspan-1>=e&&this.col+this.colspan-1>=t}includesHorizontally(e){return this.col<=e&&this.col+this.colspan-1>=e}includesVertically(e){return this.row<=e&&this.row+this.rowspan-1>=e}shift(e,t){const n=e[0]||e[1],r=t+Math.abs(e[0]||e[1])-1,i=e[0]?"colspan":"rowspan",s=e[0]?"col":"row",o=Math.min(t,r),a=Math.max(t,r),l=this[s],u=this[s]+this[i]-1;if(l>=t&&(this[s]+=n),n>0)t<=u&&t>l&&(this[i]+=n);else if(n<0){if(o<=l&&a>=u)return this.removed=!0,TS(OS,this,null),!1;if(l>=o&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[s]-=t+n,this[i]-=e}else if(l<=o&&u>=a)this[i]+=n;else if(l<=o&&u>=o&&u<a){const e=u-o+1;this[i]-=e}}return TS(OS,this,null),!0}isFarther(e,t){return!e||("down"===t?e.row+e.rowspan-1<this.row+this.rowspan-1:"up"===t?e.row>this.row:"right"===t?e.col+e.colspan-1<this.col+this.colspan-1:"left"===t?e.col>this.col:null)}getLastRow(){return this.row+this.rowspan-1}getLastColumn(){return this.col+this.colspan-1}getRange(){return MS(OS,this)||TS(OS,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),MS(OS,this)}}var AS=NS;function LS(e,t){IS(e,t),t.add(e)}function IS(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kS(e,t,n){return(t=xS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xS(e){var t=DS(e,"string");return"symbol"==typeof t?t:t+""}function DS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function HS(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var PS=new WeakSet;class jS{constructor(e){LS(this,PS),kS(this,"plugin",void 0),kS(this,"mergedCells",[]),kS(this,"mergedCellsMatrix",new Map),kS(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return Hs["a"]`The merged cell declared at [${t}, ${n}], overlaps\x20
- with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
- fix your setup.`}get(e,t){var n;return!!this.mergedCellsMatrix.has(e)&&(null!==(n=this.mergedCellsMatrix.get(e).get(t))&&void 0!==n&&n)}getByRange(e){let t=!1;return Object(h["arrayEach"])(this.mergedCells,n=>!(n.row<=e.from.row&&n.row+n.rowspan-1>=e.to.row&&n.col<=e.from.col&&n.col+n.colspan-1>=e.to.col)||(t=n,t)),t}filterOverlappingMergeCells(e){const t=new Set;this.mergedCells.forEach(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e;for(let o=n;o<n+s;o++)for(let e=r;e<r+i;e++)t.add(`r${o},c${e}`)});const n=e.filter(e=>{const{row:n,col:r,colspan:i,rowspan:s}=e,o=new Set;let a=!1;for(let l=n;l<n+s;l++){for(let n=r;n<r+i;n++){const r=`r${l},c${n}`;if(t.has(r)){Object(Xr["b"])(jS.IS_OVERLAPPING_WARNING(e)),a=!0;break}o.add(r)}if(a)break}return a||t.add(...o),!a});return n}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:r}=e.getTopStartCorner(),{row:i,col:s}=e.getBottomEndCorner(),o=[];for(let a=n;a<=i;a++)for(let e=r;e<=s;e++){const n=this.get(a,e);n&&(t||!t&&n.row===a&&n.col===e)&&o.push(n)}return o}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.row,r=e.col,i=e.rowspan,s=e.colspan,o=new AS(n,r,i,s,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,r),l=!t&&this.isOverlapping(o);return a||l?(Object(Xr["b"])(jS.IS_OVERLAPPING_WARNING(o)),!1):(this.hot&&o.normalize(this.hot),this.mergedCells.push(o),HS(PS,this,YS).call(this,o),o)}remove(e,t){const n=this.get(e,t),r=n?this.mergedCells.indexOf(n):-1;return!(!n||-1===r)&&(this.mergedCells.splice(r,1),HS(PS,this,US).call(this,n),n)}clear(){Object(h["arrayEach"])(this.mergedCells,e=>{let{row:t,col:n,rowspan:r,colspan:i}=e;Object(it["rangeEach"])(t,t+r,e=>{Object(it["rangeEach"])(n,n+i,t=>{const n=this.hot.getCell(e,t);n&&(n.removeAttribute("rowspan"),n.removeAttribute("colspan"),n.style.display="")})})}),this.mergedCells.length=0,this.mergedCellsMatrix=new Map}isOverlapping(e){const t=e.getRange();for(let n=0;n<this.mergedCells.length;n++){const e=this.mergedCells[n],r=e.getRange();if(r.overlaps(t))return!0}return!1}isFirstRenderableMergedCell(e,t){const n=this.get(e,t);return n&&this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1)===t}getFirstRenderableCoords(e,t){const n=this.get(e,t);if(!n||this.isFirstRenderableMergedCell(e,t))return this.hot._createCellCoords(e,t);const r=this.hot.rowIndexMapper.getNearestNotHiddenIndex(n.row,1),i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(r,i)}getStartMostColumnIndex(e,t){const n=HS(PS,this,FS).call(this,e,"col",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getEndMostColumnIndex(e,t){const n=HS(PS,this,FS).call(this,e,"col",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}getTopMostRowIndex(e,t){const n=HS(PS,this,FS).call(this,e,"row",-1);let r=t;for(let i=0;i<n.length;i++)if(n[i]<=t){r=n[i];break}return r}getBottomMostRowIndex(e,t){const n=HS(PS,this,FS).call(this,e,"row",1);let r=t;for(let i=0;i<n.length;i++)if(n[i]>=t){r=n[i];break}return r}shiftCollections(e,t,n){const r=[0,0];switch(e){case"right":r[0]+=n;break;case"left":r[0]-=n;break;case"down":r[1]+=n;break;case"up":r[1]-=n;break;default:}const i=[];this.mergedCells.forEach(e=>{e.shift(r,t),e.removed&&i.push(e)}),i.forEach(e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)}),this.mergedCellsMatrix.clear(),this.mergedCells.forEach(e=>{HS(PS,this,YS).call(this,e)})}}function FS(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=new Map,i=1===n?e.getTopStartCorner():e.getBottomEndCorner(),s=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let o=i.row;1===n?o<=s.row:o>=s.row;o+=n)for(let e=i.col;1===n?e<=s.col:e>=s.col;e+=n){const i="row"===t?o:e,s=this.get(o,e);let a=i;s&&(a=1===n?s[t]+s[t+"span"]-1:s[t]),r.has(i)||r.set(i,new Set),r.get(i).add(a)}return Array.from(new Set(Array.from(r.entries()).filter(e=>{let[,t]=e;return 1===t.size}).flatMap(e=>{let[,t]=e;return Array.from(t)})))}function YS(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.has(t)||this.mergedCellsMatrix.set(t,new Map),this.mergedCellsMatrix.get(t).set(n,e)}function US(e){for(let t=e.row;t<e.row+e.rowspan;t++)for(let n=e.col;n<e.col+e.colspan;n++)this.mergedCellsMatrix.get(t).delete(n)}var VS=jS;function BS(e,t,n){return(t=WS(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WS(e){var t=zS(e,"string");return"symbol"==typeof t?t:t+""}function zS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class GS{constructor(e){BS(this,"plugin",void 0),BS(this,"mergedCellsCollection",void 0),BS(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}correctSelectionAreaSize(e){if(e[0]===e[2]&&e[1]===e[3]){const t=this.mergedCellsCollection.get(e[0],e[1]);t&&(e[2]=e[0]+t.rowspan-1,e[3]=e[1]+t.colspan-1)}}getDirection(e,t){let n=null;return n=t[0]===e[0]&&t[1]===e[1]&&t[3]===e[3]?"down":t[2]===e[2]&&t[1]===e[1]&&t[3]===e[3]?"up":t[1]===e[1]&&t[2]===e[2]?"right":"left",n}snapDragArea(e,t,n,r){const i=t.slice(0),s=this.getAutofillSize(e,t,n),[o,a,l,u]=e,c=["up","down"].indexOf(n)>-1,h=c?l-o+1:u-a+1,d=Math.floor(s/h)*h,m=s-d,f=this.getFarthestCollection(e,t,n,r);if(f)if("down"===n){const e=f.row+f.rowspan-o-m,t=i[2]+e;t>=this.plugin.hot.countRows()?i[2]-=m:i[2]+=m?e:0}else if("right"===n){const e=f.col+f.colspan-a-m,t=i[3]+e;t>=this.plugin.hot.countCols()?i[3]-=m:i[3]+=m?e:0}else if("up"===n){const e=l-m-f.row+1,t=i[0]+e;t<0?i[0]+=m:i[0]-=m?e:0}else if("left"===n){const e=u-m-f.col+1,t=i[1]+e;t<0?i[1]+=m:i[1]-=m?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:s,dragArea:i,cycleLength:h}),i}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),Object(o["extend"])(this.currentFillData,e)}getAutofillSize(e,t,n){const[r,i,s,o]=e,[a,l,u,c]=t;switch(n){case"up":return r-a;case"down":return u-s;case"left":return i-l;case"right":return c-o;default:return null}}getDragArea(e,t,n){const[r,i,s,o]=e,[a,l,u,c]=t;switch(n){case"up":return[a,l,r-1,o];case"down":return[s+1,i,u,o];case"left":return[a,l,s,i-1];case"right":return[r,o+1,u,c];default:return null}}getFarthestCollection(e,t,n,r){const[i,s,o,a]=e,l=["up","down"].indexOf(n)>-1,u=l?o:a,c=l?i:s,d=this.getAutofillSize(e,t,n),m=l?o-i+1:a-s+1,f=Math.floor(d/m)*m,p=d-f;let g=null,y=null,w=null;switch(n){case"up":g="includesVertically",w=u-p+1;break;case"left":g="includesHorizontally",w=u-p+1;break;case"down":g="includesVertically",w=c+p-1;break;case"right":g="includesHorizontally",w=c+p-1;break;default:}return Object(h["arrayEach"])(r,e=>{e[g](w)&&e.isFarther(y,n)&&(y=e)}),y}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,i=(e,n)=>{switch(r){case"up":return e.row-n>=t.from.row;case"down":return e.row+e.rowspan-1+n<=t.to.row;case"left":return e.col-n>=t.from.column;case"right":return e.col+e.colspan-1+n<=t.to.column;default:return null}};let s=0,o=null,a=1;do{for(let e=0;e<n.length;e+=1){if(o=n[e],s=a*this.currentFillData.cycleLength,i(o,s))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:o.row-s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"down":this.plugin.mergedCellsCollection.add({row:o.row+s,rowspan:o.rowspan,col:o.col,colspan:o.colspan});break;case"left":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col-s,colspan:o.colspan});break;case"right":this.plugin.mergedCellsCollection.add({row:o.row,rowspan:o.rowspan,col:o.col+s,colspan:o.colspan});break;default:}e===n.length-1&&(a+=1)}}while(i(o,s));this.currentFillData=null,this.plugin.hot.render(),n.length>0&&this.plugin.ifChromeForceRepaint()}getRangeFromChanges(e){const t={min:null,max:null},n={min:null,max:null};return Object(h["arrayEach"])(e,e=>{const r=e[0],i=this.plugin.hot.propToCol(e[1]);(null===t.min||r<t.min)&&(t.min=r),(null===t.max||r>t.max)&&(t.max=r),(null===n.min||i<n.min)&&(n.min=i),(null===n.max||i>n.max)&&(n.max=i)}),{from:{row:t.min,column:n.min},to:{row:t.max,column:n.max}}}dragAreaOverlapsCollections(e,t,n){const r=this.getDragArea(e,t,n),[i,s,o,a]=r,l=this.plugin.hot._createCellCoords(i,s),u=this.plugin.hot._createCellCoords(o,a),c=this.plugin.hot._createCellRange(l,l,u);return this.mergedCellsCollection.getWithinRange(c,!0).length>0}}var KS=GS;function XS(e,t,n){return(t=$S(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $S(e){var t=qS(e,"string");return"symbol"==typeof t?t:t+""}function qS(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class JS{constructor(e){XS(this,"plugin",void 0),XS(this,"hot",void 0),XS(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,n,r){const i=Math.min(n[0],n[2]),s=Math.min(n[1],n[3]),o=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===r)return;const l=this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t);if(!l)return;const u=this.plugin.mergedCellsCollection.get(e,t);if(!u)return;const c=u.getLastRow(),h=u.getLastColumn(),d=i<=u.row&&s<=u.col&&o>=c&&a>=h;return d?`${this.fullySelectedMergedCellClassName}-${r}`:this.isMergeCellFullySelected(u,this.plugin.hot.getSelectedRange())?this.fullySelectedMergedCellClassName+"-multiple":void 0}isMergeCellFullySelected(e,t){const n=[];if(!t||!e)return!1;for(let r=0;r<e.rowspan;r+=1)for(let t=0;t<e.colspan;t+=1)n.push(this.hot._createCellCoords(e.row+r,e.col+t));for(let r=0;r<n.length;r+=1){const e=[];for(let i=0;i<t.length;i+=1)e[i]=t[i].includes(n[r]);if(!e.includes(!0))return!1}return!0}getSelectedMergedCellClassNameToRemove(){const e=[];for(let t=0;t<=7;t+=1)e.push(`${this.fullySelectedMergedCellClassName}-${t}`);return e.push(this.fullySelectedMergedCellClassName+"-multiple"),e}}var QS=JS;function ZS(e){return{key:"mergeCells",name(){const t=this.getSelectedLast();if(t){const n=e.mergedCellsCollection.get(t[0],t[1]);if(n.row===t[0]&&n.col===t[1]&&n.row+n.rowspan-1===t[2]&&n.col+n.colspan-1===t[3])return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_UNMERGE_CELLS"])}return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_MERGE_CELLS"])},callback(){const t=this.getSelectedRangeLast();if(!t)return;t.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:r}=t;e.toggleMerge(t),this.selectCell(n.row,n.col,r.row,r.col,!1)},disabled(){const e=this.getSelectedLast();if(!e)return!0;const t=AS.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1});return t||this.selection.isSelectedByCorner()},hidden:!1}}function eE(e,t,n){return(t=tE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tE(e){var t=nE(e,"string");return"symbol"==typeof t?t:t+""}function nE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class rE{constructor(e){eE(this,"data",void 0),eE(this,"next",null),eE(this,"prev",null),this.data=e}}class iE{constructor(){eE(this,"first",null),eE(this,"last",null)}push(e){const t=new rE(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.last;this.last=t,t.prev=e,e.next=t}return t}unshift(e){const t=new rE(e);if(null===this.first)this.first=t,this.last=t;else{const e=this.first;this.first=t,t.next=e,e.prev=t}}inorder(e){let t=this.first;while(t){const n=e(t);if(t===this.last||!0===n)break;t=t.next}}remove(e){if(null===this.first)return!1;let t,n,r=this.first;while(r){if(r.data===e)return t=r.next,n=r.prev,t&&(t.prev=n),n&&(n.next=t),r===this.first&&(this.first=t),r===this.last&&(this.last=n),!0;r=r.next}return!1}hasCycle(){let e=this.first,t=this.first;while(1){if(null===e)return!1;if(e=e.next,null===e)return!1;if(e=e.next,t=t.next,e===t)return!0}}pop(){if(null===this.last)return null;const e=this.last;return this.last=this.last.prev,e}shift(){if(null===this.first)return null;const e=this.first;return this.first=this.first.next,e}recursiveReverse(){function e(t,n){n&&(e(n,n.next),n.next=t)}if(!this.first)return;e(this.first,this.first.next),this.first.next=null;const t=this.first;this.first=this.last,this.last=t}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,n=this.first;while(t)e=t.next,t.next=n,n.prev=t,n=t,t=e;this.first.next=null,this.last.prev=null,e=this.first,this.first=n,this.last=e}}var sE=iE;function oE(e,t){lE(e,t),t.add(e)}function aE(e,t,n){lE(e,t),t.set(e,n)}function lE(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function uE(e,t){return e.get(hE(e,t))}function cE(e,t,n){return e.set(hE(e,t),n),n}function hE(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var dE=new WeakMap,mE=new WeakMap,fE=new WeakMap,pE=new WeakMap,gE=new WeakMap,yE=new WeakMap,wE=new WeakMap,bE=new WeakSet;class vE{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:r}=e;oE(this,bE),aE(this,dE,new sE),aE(this,mE,new sE),aE(this,fE,null),aE(this,pE,null),aE(this,gE,null),aE(this,yE,null),aE(this,wE,null),cE(gE,this,t),cE(yE,this,n),cE(wE,this,r)}getCurrentVerticalNode(){return uE(pE,this).data}getFirstVerticalNode(){return uE(mE,this).first.data}getNextVerticalNode(){return uE(pE,this).next.data}getPrevVerticalNode(){return uE(pE,this).prev.data}getCurrentHorizontalNode(){return uE(fE,this).data}getFirstHorizontalNode(){return uE(dE,this).first.data}getNextHorizontalNode(){return uE(fE,this).next.data}getPrevHorizontalNode(){return uE(fE,this).prev.data}setPrevNodeAsActive(){cE(pE,this,uE(pE,this).prev),cE(fE,this,uE(fE,this).prev)}setNextNodeAsActive(){cE(pE,this,uE(pE,this).next),cE(fE,this,uE(fE,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),r=new WeakSet;cE(dE,this,new sE);for(let s=t.row;s<=n.row;s++)if(!uE(yE,this).isHidden(s))for(let i=t.col;i<=n.col;i++){if(uE(wE,this).isHidden(i))continue;const t=hE(bE,this,_E).call(this,e,uE(dE,this),r,s,i);t&&cE(fE,this,t)}uE(dE,this).first&&(uE(dE,this).first.prev=uE(dE,this).last,uE(dE,this).last.next=uE(dE,this).first);const i=new WeakSet;cE(mE,this,new sE);for(let s=t.col;s<=n.col;s++)if(!uE(wE,this).isHidden(s))for(let r=t.row;r<=n.row;r++){if(uE(yE,this).isHidden(r))continue;const t=hE(bE,this,_E).call(this,e,uE(mE,this),i,r,s);t&&cE(pE,this,t)}uE(mE,this).first&&(uE(mE,this).first.prev=uE(mE,this).last,uE(mE,this).last.next=uE(mE,this).first)}setActiveNode(e,t){return uE(dE,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return cE(fE,this,n),!1}),uE(mE,this).inorder(n=>{const{rowStart:r,rowEnd:i,colStart:s,colEnd:o}=n.data;if(e>=r&&e<=i&&t>=s&&t<=o)return cE(pE,this,n),!1}),this}}function _E(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=uE(gE,this).call(this,r,i);if(l&&n.has(l))return null;const u={colStart:i,colEnd:i,rowStart:r,rowEnd:r};if(l){if(n.add(l),l.row<s.row||l.row+l.rowspan-1>o.row||l.col<s.col||l.col+l.colspan-1>o.col)return null;u.colStart=l.col,u.colEnd=l.col+l.colspan-1,u.rowStart=l.row,u.rowEnd=l.row+l.rowspan-1}const c=t.push(u);return r===a.row&&i===a.col||l&&a.row>=l.row&&a.row<=l.row+l.rowspan-1&&a.col>=l.col&&a.col<=l.col+l.colspan-1?c:null}function SE(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:r}=t;function i(){}function s(t,i,s){const a=e.mergedCellsCollection.get(i,s);if(!Object(o["isObject"])(a))return t.removeAttribute("rowspan"),t.removeAttribute("colspan"),void(t.style.display="");const{row:l,col:u,colspan:c,rowspan:h}=a,[d,m]=e.translateMergedCellToRenderable(l,h,u,c),f=n.getRenderableFromVisualIndex(i),p=r.getRenderableFromVisualIndex(s),g=d-f+1,y=m-p+1,w=n.getNearestNotHiddenIndex(l,1),b=r.getNearestNotHiddenIndex(u,1),v=Math.min(h,g),_=Math.min(c,y);w===i&&b===s?(t.setAttribute("rowspan",v),t.setAttribute("colspan",_)):(t.removeAttribute("rowspan"),t.removeAttribute("colspan"),t.style.display="none")}return{before:i,after:s}}function EE(e,t){ME(e,t),t.add(e)}function CE(e,t,n){ME(e,t),t.set(e,n)}function ME(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function TE(e,t,n){return(t=RE(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RE(e){var t=OE(e,"string");return"symbol"==typeof t?t:t+""}function OE(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function NE(e,t,n){return e.set(LE(e,t),n),n}function AE(e,t){return e.get(LE(e,t))}function LE(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}pe["a"].getSingleton().register("beforeMergeCells"),pe["a"].getSingleton().register("afterMergeCells"),pe["a"].getSingleton().register("beforeUnmergeCells"),pe["a"].getSingleton().register("afterUnmergeCells");const IE="mergeCells",kE=150,xE=IE;var DE=new WeakMap,HE=new WeakMap,PE=new WeakMap,jE=new WeakMap,FE=new WeakSet;class YE extends tn["a"]{constructor(){super(...arguments),EE(this,FE),TE(this,"mergedCellsCollection",null),TE(this,"autofillCalculations",null),TE(this,"selectionCalculations",null),CE(this,DE,null),CE(this,HE,{row:0,col:0}),CE(this,PE,new vE({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),CE(this,jE,SE(this))}static get PLUGIN_KEY(){return IE}static get PLUGIN_PRIORITY(){return kE}isEnabled(){return!!this.hot.getSettings()[IE]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new VS(this),this.autofillCalculations=new KS(this),this.selectionCalculations=new QS(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,UE).call(e,...n)})),this.addHook("modifyTransformFocus",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,BE).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,WE).call(e,...n)})),this.addHook("modifyTransformEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,zE).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,GE).call(e,...n)})),this.addHook("beforeSetRangeStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,$E).call(e,...n)})),this.addHook("beforeSetRangeStartOnly",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,$E).call(e,...n)})),this.addHook("beforeSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,qE).call(e,...n)})),this.addHook("afterSelectionFocusSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,JE).call(e,...n)})),this.addHook("afterSelectionEnd",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,QE).call(e,...n)})),this.addHook("modifyGetCellCoords",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,KE).call(e,...n)})),this.addHook("afterIsMultipleSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,VE).call(e,...n)})),this.addHook("afterRenderer",(function(){return AE(jE,e).after(...arguments)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,XE).call(e,...n)})),this.addHook("afterGetCellMeta",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,ZE).call(e,...n)})),this.addHook("afterViewportRowCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,eC).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,tC).call(e,...n)})),this.addHook("modifyAutofillRange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,nC).call(e,...n)})),this.addHook("afterCreateCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,rC).call(e,...n)})),this.addHook("afterRemoveCol",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,iC).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,sC).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,oC).call(e,...n)})),this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,aC).call(e,...n)})),this.addHook("beforeDrawBorders",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,lC).call(e,...n)})),this.addHook("afterDrawSelection",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,uC).call(e,...n)})),this.addHook("beforeRemoveCellClassNames",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,cC).call(e,...n)})),this.addHook("beforeBeginEditing",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,hC).call(e,...n)})),this.addHook("modifyRowHeightByOverlayName",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return LE(FE,e,dC).call(e,...n)})),this.addHook("beforeUndoStackChange",(e,t)=>{if("MergeCells"===t)return!1}),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.clearCollections(),this.unregisterShortcuts(),this.hot.render(),super.disablePlugin()}updatePlugin(){const e=this.hot.getSettings()[IE];this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(e),super.updatePlugin()}ifChromeForceRepaint(){if(!Object(p["isChrome"])())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach(e=>{const{row:n,rowspan:r}=e;for(let i=n+1;i<n+r;i++)t.push(i)}),t=[...new Set(t)],t.forEach(t=>{const n=this.hot.rowIndexMapper.getRenderableFromVisualIndex(t);this.hot.view._wt.wtOverlays.getOverlays(!0).map(e=>"master"===(null===e||void 0===e?void 0:e.name)?e:e.clone.wtTable).forEach(t=>{const r=t.getRow(n);r&&(r.style.background=Object(i["getStyle"])(r,"backgroundColor").replace(")",", 0.99)"),e.push(r))})}),this.hot._registerTimeout(()=>{e.forEach(e=>{e.style.background=Object(i["getStyle"])(e,"backgroundColor").replace(", 0.99)",")")})},1)}validateSetting(e){return!!e&&(AS.containsNegativeValues(e)?(Object(Xr["b"])(AS.NEGATIVE_VALUES_WARNING(e)),!1):AS.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?(Object(Xr["b"])(AS.IS_OUT_OF_BOUNDS_WARNING(e)),!1):AS.isSingleCell(e)?(Object(Xr["b"])(AS.IS_SINGLE_CELL(e)),!1):!AS.containsZeroSpan(e)||(Object(Xr["b"])(AS.ZERO_SPAN_WARNING(e)),!1))}generateFromSettings(e){if(!Array.isArray(e))return;const t=e.filter(e=>this.validateSetting(e)),n=this.mergedCellsCollection.filterOverlappingMergeCells(t),r=[];n.forEach(e=>{const{row:t,col:n,rowspan:i,colspan:s}=e,o=this.hot._createCellCoords(t,n),a=this.hot._createCellCoords(t+i-1,n+s-1),l=this.hot._createCellRange(o,o,a);this.mergeRange(l,!0,!0);for(let u=t;u<t+i;u++)for(let e=n;e<n+s;e++)u===t&&e===n||r.push([u,e,null])}),0!==r.length&&this.hot.setDataAtCell(r,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!!t||this.validateSetting(e)}mergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;e.setDirection(this.hot.isRtl()?"NE-SW":"NW-SE");const{from:t,to:n}=e;this.unmergeRange(e,!0),this.mergeRange(e),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}unmergeSelection(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.hot.getSelectedRangeLast();if(!e)return;const{from:t,to:n}=e;this.unmergeRange(e,!0),this.hot.selectCell(t.row,t.col,n.row,n.col,!1)}mergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e.getTopStartCorner(),i=e.getBottomEndCorner(),s={row:r.row,col:r.col,rowspan:i.row-r.row+1,colspan:i.col-r.col+1},o=[];let a=null;if(!this.canMergeRange(s,t))return!1;this.hot.runHooks("beforeMergeCells",e,t),Object(it["rangeEach"])(0,s.rowspan-1,e=>{Object(it["rangeEach"])(0,s.colspan-1,t=>{let n=null;o[e]||(o[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s.row),this.hot.toPhysicalColumn(s.col)):this.hot.setCellMeta(s.row+e,s.col+t,"hidden",!0),o[e][t]=n})}),this.hot.setCellMeta(s.row,s.col,"spanned",!0);const l=this.mergedCellsCollection.add(s,t);return!l||(n?a=[s.row,s.col,o]:this.hot.populateFromArray(s.row,s.col,o,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,s,t),a)}unmergeRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.mergedCellsCollection.getWithinRange(e);0!==n.length&&(this.hot.runHooks("beforeUnmergeCells",e,t),Object(h["arrayEach"])(n,e=>{this.mergedCellsCollection.remove(e.row,e.col),Object(it["rangeEach"])(0,e.rowspan-1,t=>{Object(it["rangeEach"])(0,e.colspan-1,n=>{this.hot.removeCellMeta(e.row+t,e.col+n,"hidden"),this.hot.removeCellMeta(e.row+t,e.col+n,"copyable")})}),this.hot.removeCellMeta(e.row,e.col,"spanned")}),this.hot.runHooks("afterUnmergeCells",e,t),this.hot.render())}toggleMerge(e){const t=this.mergedCellsCollection.get(e.from.row,e.from.col),n=t.row===e.from.row&&t.col===e.from.col&&t.row+t.rowspan-1===e.to.row&&t.col+t.colspan-1===e.to.col;n?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.mergeRange(this.hot._createCellRange(i,i,s))}unmerge(e,t,n,r){const i=this.hot._createCellCoords(e,t),s=this.hot._createCellCoords(n,r);this.unmergeRange(this.hot._createCellRange(i,i,s))}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:xE})}unregisterShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(xE)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.startRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.row,1));if(r<e.startRow)return e.startRow=r,void this.modifyViewportRowStart(e,t)}}}modifyViewportRowEnd(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.endRow);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(r,i);if(Object(o["isObject"])(s)){const r=s.row+s.rowspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endRow)return e.endRow=i,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.startColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(s.col,1));if(r<e.startColumn)return e.startColumn=r,void this.modifyViewportColumnStart(e,t)}}}modifyViewportColumnEnd(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.endColumn);for(let i=0;i<t;i+=1){const s=this.mergedCellsCollection.get(i,r);if(Object(o["isObject"])(s)){const r=s.col+s.colspan-1,i=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(i>e.endColumn)return e.endColumn=i,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,r){const{rowIndexMapper:i,columnIndexMapper:s}=this.hot;let o,a;o=0===t?i.getNearestNotHiddenIndex(e,1):i.getNearestNotHiddenIndex(e+t-1,-1),a=0===r?s.getNearestNotHiddenIndex(n,1):s.getNearestNotHiddenIndex(n+r-1,-1);const l=e>=0?i.getRenderableFromVisualIndex(o):e,u=n>=0?s.getRenderableFromVisualIndex(a):n;return[l,u]}}function UE(){this.generateFromSettings(this.hot.getSettings()[IE]),this.hot.render()}function VE(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let i=0;i<e.length;i+=1)if(n.row===e[i].row&&n.col===e[i].col&&r.row===e[i].row+e[i].rowspan-1&&r.col===e[i].col+e[i].colspan-1)return!1}return e}function BE(e){AE(HE,this).row=e.row,AE(HE,this).col=e.col}function WE(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:r,rowIndexMapper:i}=this.hot;AE(DE,this)&&(null!==i.getRenderableFromVisualIndex(AE(DE,this).row)&&(n.row=AE(DE,this).row),null!==r.getRenderableFromVisualIndex(AE(DE,this).col)&&(n.col=AE(DE,this).col),NE(DE,this,null));const s=this.mergedCellsCollection.get(n.row,n.col);if(!s)return;const o=s.col,a=s.col+s.colspan-1;if(e.col<0){const t=n.col>=o&&n.col<=a?o-1:a,i=r.getNearestNotHiddenIndex(t,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,n.col)-1,1)}else if(e.col>0){const t=n.col>=o&&n.col<=a?a+1:o,i=r.getNearestNotHiddenIndex(t,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,i)-1,1)}const l=s.row,u=s.row+s.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=u?l-1:u,r=i.getNearestNotHiddenIndex(t,-1);e.row=null===r?-this.hot.view.countRenderableRowsInRange(0,n.row):-Math.max(this.hot.view.countRenderableRowsInRange(r,n.row)-1,1)}else if(e.row>0){const t=n.row>=l&&n.row<=u?u+1:l,r=i.getNearestNotHiddenIndex(t,1);e.row=null===r?this.hot.view.countRenderableRowsInRange(n.row,this.hot.countRows()):Math.max(this.hot.view.countRenderableRowsInRange(n.row,r)-1,1)}}function zE(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:r}=t,{columnIndexMapper:i,rowIndexMapper:s}=this.hot,o=(e,t)=>{n.expand(this.hot._createCellCoords(e,t));for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange())};if(e.col<0){let s=this.mergedCellsCollection.getStartMostColumnIndex(t,r.col)+e.col;o(r.row,s),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(s=n.getTopStartCorner().col);const a=i.getNearestNotHiddenIndex(s,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,r.col)-1,1))}else if(e.col>0){let s=this.mergedCellsCollection.getEndMostColumnIndex(t,r.col)+e.col;o(r.row,s),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(s=n.getBottomEndCorner().col);const a=i.getNearestNotHiddenIndex(s,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(r.col,a)-1,1))}if(e.row<0){let i=this.mergedCellsCollection.getTopMostRowIndex(t,r.row)+e.row;o(i,r.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(i=n.getTopStartCorner().row);const a=s.getNearestNotHiddenIndex(i,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,r.row)-1,1))}else if(e.row>0){let i=this.mergedCellsCollection.getBottomMostRowIndex(t,r.row)+e.row;o(i,r.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(i=n.getBottomStartCorner().row);const a=s.getNearestNotHiddenIndex(i,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(r.row,a)-1,1))}}function GE(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void NE(DE,this,t.clone());for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);for(let r=0;r<this.mergedCellsCollection.mergedCells.length;r+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[r].getRange(),!1);const n=this.mergedCellsCollection.get(t.row,t.col);NE(DE,this,t.clone()),n&&t.assign(n)}function KE(e,t){if(e<0||t<0)return;const n=this.mergedCellsCollection.get(e,t);if(!n)return;const{row:r,col:i,colspan:s,rowspan:o}=n;return[r,i,r+o-1,i+s-1]}function XE(e){e.items.push({name:"---------"},ZS(this))}function $E(){NE(DE,this,null)}function qE(){if(AE(DE,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),r=AE(DE,this).clone().normalize();AE(PE,this).setActiveNode(r.row,r.col),AE(HE,this).row>0||AE(HE,this).col>0?AE(PE,this).setPrevNodeAsActive():("E-W"===n&&AE(HE,this).col<0||"S-N"===t&&AE(HE,this).row<0)&&AE(PE,this).setNextNodeAsActive()}function JE(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:r,rowIndexMapper:i}=this.hot;let s=null,o=null;if(AE(HE,this).col<0){const{rowEnd:e,colEnd:t}=AE(PE,this).getPrevHorizontalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(AE(HE,this).col>0){const{rowStart:e,colStart:t}=AE(PE,this).getNextHorizontalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}else if(AE(HE,this).row<0){const{rowEnd:e,colEnd:t}=AE(PE,this).getPrevVerticalNode();o=r.getNearestNotHiddenIndex(t,-1),s=i.getNearestNotHiddenIndex(e,-1)}else if(AE(HE,this).row>0){const{rowStart:e,colStart:t}=AE(PE,this).getNextVerticalNode();o=r.getNearestNotHiddenIndex(t,1),s=i.getNearestNotHiddenIndex(e,1)}if(null!==s||null!==o){const r=this.hot._createCellCoords(s,o),i=this.mergedCellsCollection.get(r.row,r.col),a=this.hot.selection.highlight.getFocus();e=r.row,t=r.col,i?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(i.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(i.col,1)}):n.highlight.assign(r),a.clear(),a.add(r).commit()}AE(PE,this).setActiveNode(e,t),NE(HE,this,{row:0,col:0})}function QE(){const e=this.hot.getSelectedRangeLast();e.isHeader()||AE(PE,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function ZE(e,t,n){const r=this.mergedCellsCollection.get(e,t);r&&(r.row!==e||r.col!==t?n.copyable=!1:(n.rowspan=r.rowspan,n.colspan=r.colspan))}function eC(e){const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function tC(e){const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function nC(e,t){this.autofillCalculations.correctSelectionAreaSize(t);const n=this.autofillCalculations.getDirection(t,e);let r=e;if(this.autofillCalculations.dragAreaOverlapsCollections(t,r,n))return r=t,r;const i=this.hot._createCellCoords(t[0],t[1]),s=this.hot._createCellCoords(t[2],t[3]),o=this.hot._createCellRange(i,i,s),a=this.mergedCellsCollection.getWithinRange(o);return 0===a.length||(r=this.autofillCalculations.snapDragArea(t,r,n,a)),r}function rC(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function iC(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function sC(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function oC(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function aC(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function lC(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);Object(h["arrayEach"])(n,n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)})}}function uC(e,t,n,r){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}function cC(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function hC(e,t,n,r){if(!(r instanceof MouseEvent))return;const i=this.hot.getSelectedRangeLast(),s=this.mergedCellsCollection.getByRange(i);if(!s)return;const o=this.hot._createCellCoords(s.row,s.col),a=this.hot._createCellCoords(s.row+s.rowspan-1,s.col+s.colspan-1);return 0===this.hot.selection.getLayerLevel()&&i.isEqual(this.hot._createCellRange(o,o,a))}function dC(e,t,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return e;let r,i;if("master"===n)r=this.hot.view.getFirstRenderedVisibleColumn(),i=this.hot.view.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),i=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}const s=this.mergedCellsCollection.get(t,r);if(!s)return e;const o=this.hot._createCellCoords(t,r),a=this.hot._createCellCoords(t,i),l=this.hot._createCellRange(o,o,a),u=this.mergedCellsCollection.getWithinRange(l),c=u.reduce((e,t)=>{let{rowspan:n}=t;return Math.max(e,n)},1);let h=0;return u.length>1&&u[0].rowspan<c&&(h=c-u[0].rowspan),u.forEach(r=>{var i;let{rowspan:s}=r,o=0;o="top"===n||"top_inline_start_corner"===n?Math.min(c,this.hot.view.countNotHiddenFixedRowsTop()-t):s-h,e=Math.max(null!==(i=e)&&void 0!==i?i:0,LE(FE,this,mC).call(this,t,o))}),e}function mC(e,t){const n=this.hot.view._wt.wtSettings.getSettingPure("defaultRowHeight"),r=this.hot.getPlugin("autoRowSize");let i=0;for(let o=e;o<e+t;o++){var s;if(!this.hot.rowIndexMapper.isHidden(o))i+=null!==(s=null===r||void 0===r?void 0:r.getRowHeight(o))&&void 0!==s?s:n}return i}function fC(e,t){return function(n,r){const[,...i]=n,[,...s]=r;return function n(r){const o=e[r],a=t[r],l=i[r],u=s[r],c=a.multiColumnSorting,h=c.compareFunctionFactory?c.compareFunctionFactory:Wi(a.type),d=h(o,a,c)(l,u);if(d===zi){const e=r+1;if("undefined"!==typeof t[e])return n(e)}return d}(0)}}function pC(){Object(Xr["b"])(Hs["a"]`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.
- Only \`multiColumnSorting\` will work. The \`columnSorting\` plugin will be disabled.`)}const gC="sort";function yC(e,t,n){const r=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&r.push(`${gC}-${e.getIndexOfColumnInSortQueue(t)+1}`),r}function wC(e){const t=e.className.split(" "),n=new RegExp(`^${gC}-[0-9]{1,2}$`);return t.filter(e=>n.test(e))}function bC(e,t,n){return(t=vC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vC(e){var t=_C(e,"string");return"symbol"==typeof t?t:t+""}function _C(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const SC="multiColumnSorting",EC=170,CC="columnSorting",MC=SC;Vi(SC,fC);class TC extends Ts{constructor(){super(...arguments),bC(this,"pluginKey",SC)}static get PLUGIN_KEY(){return SC}static get PLUGIN_PRIORITY(){return EC}isEnabled(){return super.isEnabled()}enablePlugin(){!this.enabled&&this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[CC]&&(pC(),this.hot.getPlugin(CC).disablePlugin()),super.enablePlugin()}disablePlugin(){super.disablePlugin()}registerShortcuts(){super.registerShortcuts(),this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Shift","Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast();return-1===e.row&&e.col>=0&&this.sort(this.getNextSortConfig(e.col,Ss)),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&n.isHeader()},relativeToGroup:a["a"],position:"before",group:MC})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(MC)}sort(e){super.sort(e)}clearSort(){super.clearSort()}isSorted(){return super.isSorted()}getSortConfig(e){return super.getSortConfig(e)}setSortConfig(e){super.setSortConfig(e)}getNormalizedSortConfigs(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Array.isArray(e)?e:[e]}updateHeaderClasses(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];super.updateHeaderClasses(e,...n),Object(i["removeClass"])(e,wC(e)),!1!==this.enabled&&Object(i["addClass"])(e,yC(...n))}onUpdateSettings(e){this.hot.getSettings()[this.pluginKey]&&this.hot.getSettings()[CC]&&pC(),super.onUpdateSettings(e)}onAfterOnCellMouseDown(e,t){!1!==rs(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&(this.hot.getShortcutManager().isCtrlPressed()?(this.hot.deselectCell(),this.hot.selectColumns(t.col),this.sort(this.getNextSortConfig(t.col,Ss))):this.sort(this.getColumnNextConfig(t.col)))}}function RC(e,t,n){return(t=OC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OC(e){var t=NC(e,"string");return"symbol"==typeof t?t:t+""}function NC(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const AC="multipleSelectionHandles",LC=160;class IC extends tn["a"]{constructor(){super(...arguments),RC(this,"dragged",[]),RC(this,"lastSetCell",null)}static get PLUGIN_KEY(){return AC}static get PLUGIN_PRIORITY(){return LC}isEnabled(){return Object(p["isMobileBrowser"])()}enablePlugin(){this.enabled||(this.registerListeners(),super.enablePlugin())}registerListeners(){const e=this,{rootElement:t}=this.hot;function n(t){if(1===e.dragged.length)return e.dragged.splice(0,e.dragged.length),!0;const n=e.dragged.indexOf(t);if(-1===n)return!1;0===n?e.dragged=e.dragged.slice(0,1):1===n&&(e.dragged=e.dragged.slice(-1))}this.eventManager.addEventListener(t,"touchstart",t=>{let n;return Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("top"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n=e.hot.getSelectedRangeLast(),e.dragged.push("bottom"),e.touchStartRange={width:n.getWidth(),height:n.getHeight(),direction:n.getDirection()},t.preventDefault(),!1):void 0}),this.eventManager.addEventListener(t,"touchend",t=>Object(i["hasClass"])(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):Object(i["hasClass"])(t.target,"bottomSelectionHandle-HitArea")?(n.call(e,"bottom"),e.touchStartRange=void 0,t.preventDefault(),!1):void 0),this.eventManager.addEventListener(t,"touchmove",t=>{const{rootDocument:n}=this.hot;let r,i,s,o,a,l;if(0===e.dragged.length)return;const u=n.elementFromPoint(t.touches[0].clientX,t.touches[0].clientY);u&&u!==e.lastSetCell&&("TD"!==u.nodeName&&"TH"!==u.nodeName||(r=e.hot.getCoords(u),-1===r.col&&(r.col=0),i=e.hot.getSelectedRangeLast(),s=i.getWidth(),o=i.getHeight(),a=i.getDirection(),1===s&&1===o&&e.hot.selection.setRangeEnd(r),l=e.getCurrentRangeCoords(i,r,e.touchStartRange.direction,a,e.dragged[0]),null!==l.start&&e.hot.selection.setRangeStart(l.start),e.hot.selection.setRangeEnd(l.end),e.lastSetCell=u),t.preventDefault())})}getCurrentRangeCoords(e,t,n,r,i){const s=e.getTopStartCorner(),o=e.getBottomEndCorner(),a=e.getBottomStartCorner(),l=e.getTopEndCorner();let u={start:null,end:null};switch(n){case"NE-SW":switch(r){case"NE-SW":case"NW-SE":u="top"===i?{start:this.hot._createCellCoords(t.row,e.highlight.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SE-NW":"bottom"===i&&(u={start:this.hot._createCellCoords(o.row,t.col),end:this.hot._createCellCoords(t.row,s.col)});break;default:break}break;case"NW-SE":switch(r){case"NE-SW":"top"===i?u={start:t,end:a}:u.end=t;break;case"NW-SE":"top"===i?u={start:t,end:o}:u.end=t;break;case"SE-NW":"top"===i?u={start:t,end:s}:u.end=t;break;case"SW-NE":"top"===i?u={start:t,end:l}:u.end=t;break;default:break}break;case"SW-NE":switch(r){case"NW-SE":u="bottom"===i?{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,o.col)};break;case"SW-NE":u="top"===i?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,o.col)}:{start:this.hot._createCellCoords(t.row,s.col),end:this.hot._createCellCoords(s.row,t.col)};break;case"SE-NW":"bottom"===i?u={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(s.row,t.col)}:"top"===i&&(u={start:a,end:t});break;default:break}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"top"===i&&(u.end=t);break;case"SE-NW":"top"===i?u.end=t:u={start:t,end:s};break;default:break}break;default:break}return u}isDragged(){return this.dragged.length>0}}var kC=n("a309");function xC(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:r=!1,crossHiddenColumns:i=[],isCollapsed:s=!1,isHidden:o=!1,isRoot:a=!1,isPlaceholder:l=!1,headerClassNames:u=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{label:e,colspan:t,origColspan:n,collapsible:r,isCollapsed:s,crossHiddenColumns:i,isHidden:o,isRoot:a,isPlaceholder:l,headerClassNames:u}}function DC(){return{label:"",isPlaceholder:!0}}function HC(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;Object(h["arrayEach"])(e,e=>{const r=[];let i=0;n.push(r),Object(h["arrayEach"])(e,e=>{const n=xC();if(Object(o["isObject"])(e)){const{label:t,colspan:r,headerClassName:i}=e;n.label=Object(d["stringify"])(t),"number"===typeof r&&r>1&&(n.colspan=r,n.origColspan=r),"string"===typeof i&&(n.headerClassNames=[...i.split(" ")])}else n.label=Object(d["stringify"])(e);i+=n.origColspan;let s=!1;if(i>=t&&(n.colspan=n.origColspan-(i-t),n.origColspan=n.colspan,s=!0),r.push(n),n.colspan>1)for(let t=0;t<n.colspan-1;t++)r.push(DC());return!s})});const r=Math.max(...Object(h["arrayMap"])(n,e=>e.length));return Object(h["arrayEach"])(n,e=>{if(e.length<r){const t=Object(h["arrayMap"])(new Array(r-e.length),()=>xC());e.splice(e.length,0,...t)}}),n}function PC(e,t,n){jC(e,t),t.set(e,n)}function jC(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function FC(e,t){return e.get(UC(e,t))}function YC(e,t,n){return e.set(UC(e,t),n),n}function UC(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const VC=["label","collapsible"];var BC=new WeakMap,WC=new WeakMap,zC=new WeakMap;class GC{constructor(){PC(this,BC,[]),PC(this,WC,0),PC(this,zC,1/0)}setColumnsLimit(e){YC(zC,this,e)}setData(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];YC(BC,this,HC(e,FC(zC,this))),YC(WC,this,FC(BC,this).length)}getData(){return FC(BC,this)}mergeWith(e){Object(h["arrayEach"])(e,e=>{let{row:t,col:n,...r}=e;const i=this.getHeaderSettings(t,n);null!==i&&Object(o["extend"])(i,r,VC)})}map(e){Object(h["arrayEach"])(FC(BC,this),t=>{Object(h["arrayEach"])(t,t=>{const n=e({...t});Object(o["isObject"])(n)&&Object(o["extend"])(t,n,VC)})})}getHeaderSettings(e,t){var n;if(e>=FC(WC,this)||e<0)return null;const r=FC(BC,this)[e];return!1===Array.isArray(r)||t>=r.length?null:null!==(n=r[t])&&void 0!==n?n:null}getHeadersSettings(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=[];if(e>=FC(WC,this)||e<0)return r;const i=FC(BC,this)[e];let s=0;for(let o=t;o<i.length;o++){const e=i[o];if(e.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(s+=e.colspan,r.push(e),e.colspan>1&&(o+=e.colspan-1),s===n)break;if(s>n)throw new Error("The last column settings cannot overlap the other header layers")}return r}getLayersCount(){return FC(WC,this)}getColumnsCount(){return FC(WC,this)>0?FC(BC,this)[0].length:0}clear(){YC(BC,this,[]),YC(WC,this,0)}}function KC(e,t,n){return(t=XC(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function XC(e){var t=$C(e,"string");return"symbol"==typeof t?t:t+""}function $C(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const qC="DF-pre-order";function JC(e,t){let n=e.call(t,this);for(let r=0;r<this.childs.length;r++){if(!1===n)return!1;n=JC.call(this.childs[r],e,t)}return n}const QC="DF-post-order";function ZC(e,t){for(let n=0;n<this.childs.length;n++){const r=ZC.call(this.childs[n],e,t);if(!1===r)return!1}return e.call(t,this)}const eM="BF";function tM(e,t){const n=[this];function r(){if(0===n.length)return;const i=n.shift();n.push(...i.childs),!1!==e.call(t,i)&&r()}r()}const nM=eM,rM=new Map([[qC,JC],[QC,ZC],[eM,tM]]);class iM{constructor(e){KC(this,"data",{}),KC(this,"parent",null),KC(this,"childs",[]),this.data=e}addChild(e){e.parent=this,this.childs.push(e)}cloneTree(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this;const t=new iM({...e.data});for(let n=0;n<e.childs.length;n++)t.addChild(this.cloneTree(e.childs[n]));return t}replaceTreeWith(e){this.data={...e.data},this.childs=[];for(let t=0;t<e.childs.length;t++)this.addChild(e.childs[t])}walkDown(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:nM;if(!rM.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);rM.get(t).call(this,e,this)}walkUp(e){const t=this,n=r=>{const i=e.call(t,r);!1!==i&&null!==r.parent&&n(r.parent)};n(this)}}function sM(e,t,n){oM(e,t),t.set(e,n)}function oM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function aM(e,t){return e.get(uM(e,t))}function lM(e,t,n){return e.set(uM(e,t),n),n}function uM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var cM=new WeakMap,hM=new WeakMap,dM=new WeakMap;class mM{constructor(e){sM(this,cM,new Map),sM(this,hM,new Map),sM(this,dM,null),lM(dM,this,e)}getRoots(){return Array.from(aM(cM,this).values())}getRootByColumn(e){let t;return aM(hM,this).has(e)&&(t=aM(cM,this).get(aM(hM,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const r=t-aM(hM,this).get(t);let i,s=0;return n.walkDown(n=>{const{data:{origColspan:o,headerLevel:a}}=n;if(e===a){if(r>=s&&r<=s+o-1)return i=n,i.data.isRoot=t===i.data.columnIndex,!1;s+=o}}),i}rebuildTreeIndex(){let e=0;aM(hM,this).clear(),Object(h["arrayEach"])(aM(cM,this),t=>{let[,{data:{colspan:n}}]=t;for(let r=e;r<e+n;r++)aM(hM,this).set(r,e);e+=n})}buildTree(){this.clear();const e=aM(dM,this).getColumnsCount();let t=0;while(t<e){const e=aM(dM,this).getHeaderSettings(0,t),n=new iM;aM(cM,this).set(t,n),this.buildLeaves(n,t,0,e.origColspan),t+=e.origColspan}this.rebuildTreeIndex()}buildLeaves(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const i=aM(dM,this).getHeadersSettings(n,t,r);n+=1,Object(h["arrayEach"])(i,r=>{const i={...r,headerLevel:n-1,columnIndex:t};let s;1===n?(e.data=i,s=e):(s=new iM(i),e.addChild(s)),n<aM(dM,this).getLayersCount()&&this.buildLeaves(s,t,n,r.origColspan),t+=r.origColspan})}clear(){aM(cM,this).clear(),aM(hM,this).clear()}}function fM(e,t){e.walkDown(e=>{let{data:n,childs:r}=e;if(!n.isHidden&&(t(n.columnIndex),0===r.length))for(let i=1;i<n.colspan;i++)t(n.columnIndex+i)})}function pM(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function gM(e){return pM(e,"origColspan")===e.data.origColspan}function yM(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const r=gM(e);if(r)return yM(n[0]);t.isCollapsed=!1;const i=n.slice(1),s=new Set;let o=0;if(i.length>0)Object(h["arrayEach"])(i,e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;o+=t.colspan,fM(e,e=>{s.add(e)})});else{const{colspan:e,origColspan:n,columnIndex:r}=t;o=n-e;for(let t=1;t<n;t++)s.add(r+t)}return e.walkUp(e=>{const{data:t}=e;t.colspan+=o,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):gM(e)&&(t.isCollapsed=pM(e,"isCollapsed"))}),{rollbackModification:()=>wM(e),affectedColumns:Array.from(s),colspanCompensation:o}}function wM(e){var t;const{data:n,childs:r}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};const i=gM(e);if(i)return wM(r[0]);n.isCollapsed=!0;const s=r.slice(1),o=new Set;if(s.length>0)Object(h["arrayEach"])(s,e=>{fM(e,e=>{o.add(e)}),e.data.clonedTree=e.cloneTree(),e.walkDown(e=>{let{data:t}=e;t.isHidden=!0})});else{const{origColspan:e,columnIndex:t}=n;for(let n=1;n<e;n++){const e=t+n;o.add(e)}}const a=n.colspan-(null!==(t=pM(e,"colspan"))&&void 0!==t?t:1);return e.walkUp(e=>{const{data:t}=e;t.colspan-=a,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):gM(e)&&(t.isCollapsed=pM(e,"isCollapsed"))}),{rollbackModification:()=>yM(e),affectedColumns:Array.from(o),colspanCompensation:a}}function bM(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Hs["a"]`The passed node is not the last node on the tree. Only for\x20
- the last node, the hide column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.push(t),n.colspan>1?n.colspan-=1:n.isHidden=!0})}function vM(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(Hs["a"]`The passed node is not the last node on the tree. Only for\x20
- the last node, the show column modification can be applied.`);const{crossHiddenColumns:n}=e.data;if(!n.includes(t))return;let r=!1;e.walkUp(e=>{const{data:{collapsible:t}}=e;if(t)return r=!0,!1}),r||e.walkUp(e=>{const{data:n}=e;n.crossHiddenColumns.splice(n.crossHiddenColumns.indexOf(t),1),!n.isHidden&&n.colspan<n.origColspan&&(n.colspan+=1),n.isHidden=!1})}const _M=new Map([["collapse",wM],["expand",yM],["hide-column",bM],["show-column",vM]]);function SM(e,t,n){if(!_M.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return _M.get(e)(t,n)}function EM(e){const t=[];return Object(h["arrayEach"])(e,e=>{e.walkDown(e=>{const n=e.data,{origColspan:r,columnIndex:i,headerLevel:s,crossHiddenColumns:o}=n,a=MM(t,s);let l=!1;for(let t=i;t<i+r;t++){const e=o.includes(t);if(e||l)a.push(DC(n));else{const e=CM(n);e.isRoot=!0,a.push(e),l=!0}}})}),t}function CM(e){const{crossHiddenColumns:t,...n}=xC(e);return n}function MM(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}function TM(e,t,n){RM(e,t),t.set(e,n)}function RM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function OM(e,t,n){return e.set(AM(e,t),n),n}function NM(e,t){return e.get(AM(e,t))}function AM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var LM=new WeakMap,IM=new WeakMap,kM=new WeakMap;class xM{constructor(){TM(this,LM,new GC),TM(this,IM,new mM(NM(LM,this))),TM(this,kM,[[]])}setState(e){NM(LM,this).setData(e);let t=!1;try{NM(IM,this).buildTree()}catch(n){NM(IM,this).clear(),NM(LM,this).clear(),t=!0}return OM(kM,this,EM(NM(IM,this).getRoots())),t}setColumnsLimit(e){NM(LM,this).setColumnsLimit(e)}mergeStateWith(e){const t=Object(h["arrayMap"])(e,e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}});NM(LM,this).mergeWith(t),NM(IM,this).buildTree(),OM(kM,this,EM(NM(IM,this).getRoots()))}mapState(e){NM(LM,this).map(e),NM(IM,this).buildTree(),OM(kM,this,EM(NM(IM,this).getRoots()))}mapNodes(e){return Object(h["arrayReduce"])(NM(IM,this).getRoots(),(t,n)=>(n.walkDown(n=>{const r=e(n.data);void 0!==r&&t.push(r)}),t),[])}triggerNodeModification(e,t,n){t<0&&(t=this.rowCoordsToLevel(t));const r=NM(IM,this).getNode(t,n);let i;return r&&(i=SM(e,r,n),OM(kM,this,EM(NM(IM,this).getRoots()))),i}triggerColumnModification(e,t){return this.triggerNodeModification(e,-1,t)}rowCoordsToLevel(e){if(e>=0)return null;const t=e+Math.max(this.getLayersCount(),1);return t<0?null:t}levelToRowCoords(e){if(e<0)return null;const t=e-Math.max(this.getLayersCount(),1);return t>=0?null:t}getHeaderSettings(e,t){var n,r;return e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount()?null:null!==(n=null===(r=NM(kM,this)[e])||void 0===r?void 0:r[t])&&void 0!==n?n:null}getHeaderTreeNodeData(e,t){const n=this.getHeaderTreeNode(e,t);return n?{...n.data}:null}getHeaderTreeNode(e,t){if(e<0&&(e=this.rowCoordsToLevel(e)),null===e||e>=this.getLayersCount())return null;const n=NM(IM,this).getNode(e,t);return n||null}findTopMostEntireHeaderLevel(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const r=n-e+1;let i=!1,s=null;for(let o=e;o<=n;o++){const t=NM(IM,this).getRootByColumn(o);if(!t)break;i=!0,t.walkDown(t=>{const{columnIndex:i,headerLevel:o,origColspan:a,isHidden:l}=t.data;l||a<=r&&i>=e&&i+a-1<=n&&(null===s||o<s)&&(s=o)},qC)}return i&&null===s?-1:this.levelToRowCoords(null!==(t=s)&&void 0!==t?t:0)}findLeftMostColumnIndex(e,t){var n;const{isRoot:r}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0};if(r)return t;let i=t-1;while(i>=0){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,i))&&void 0!==s?s:{isRoot:!0};if(t)break;i-=1}return i}findRightMostColumnIndex(e,t){var n;const{isRoot:r,origColspan:i}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(r)return t+i-1;let s=t+1;while(s<this.getColumnsCount()){var o;const{isRoot:t}=null!==(o=this.getHeaderSettings(e,s))&&void 0!==o?o:{isRoot:!0};if(t)break;s+=1}return s-1}getLayersCount(){return NM(LM,this).getLayersCount()}getColumnsCount(){return NM(LM,this).getColumnsCount()}clear(){OM(kM,this,[]),NM(LM,this).clear(),NM(IM,this).clear()}}function DM(e,t,n){return(t=HM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function HM(e){var t=PM(e,"string");return"symbol"==typeof t?t:t+""}function PM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class jM{constructor(e,t){DM(this,"hot",void 0),DM(this,"nestedHeaderSettingsGetter",void 0),DM(this,"layersCount",0),DM(this,"container",void 0),DM(this,"widthsMap",void 0),this.hot=e,this.nestedHeaderSettingsGetter=t,this.widthsMap=this.hot.columnIndexMapper.createAndRegisterIndexMap("nestedHeaders.widthsMap","physicalIndexToValue")}setLayersCount(e){return this.layersCount=e,this}getWidth(e){return this.widthsMap.getValueAtIndex(this.hot.toPhysicalColumn(e))}buildWidthsMap(){this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const e=this.container.querySelectorAll("tr:last-of-type th"),t=e.length;this.widthsMap.clear();for(let n=0;n<t;n++){const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(n),r=this.hot.toPhysicalColumn(t);this.widthsMap.setValueAtIndex(r,e[n].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:n}=this.hot,r=t.createDocumentFragment(),s=t.createElement("table"),o=!!this.hot.getSettings().dropdownMenu,a=n.getRenderableIndexesLength();for(let l=0;l<this.layersCount;l++){const e=t.createElement("tr");for(let r=0;r<a;r++){let s=n.getVisualFromRenderableIndex(r);null===s&&(s=r);const a=t.createElement("th"),u=this.nestedHeaderSettingsGetter(l,s);if(u&&(!u.isPlaceholder||u.isHidden)){let t=u.label;o&&(t+='<button class="changeType"></button>'),Object(i["fastInnerHTML"])(a,t),a.colSpan=u.colspan,e.appendChild(a)}}s.appendChild(e)}r.appendChild(s),e.appendChild(r)}clear(){this.widthsMap.clear(),this.container=null}}var FM=jM;function YM(e,t){zM(e,t),t.add(e)}function UM(e,t,n){return(t=VM(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VM(e){var t=BM(e,"string");return"symbol"==typeof t?t:t+""}function BM(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function WM(e,t,n){zM(e,t),t.set(e,n)}function zM(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function GM(e,t,n){return e.set(XM(e,t),n),n}function KM(e,t){return e.get(XM(e,t))}function XM(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const $M="nestedHeaders",qM=280;var JM=new WeakMap,QM=new WeakMap,ZM=new WeakMap,eT=new WeakMap,tT=new WeakSet;class nT extends tn["a"]{constructor(){super(...arguments),YM(this,tT),WM(this,JM,new xM),WM(this,QM,null),WM(this,ZM,null),WM(this,eT,!1),UM(this,"ghostTable",new FM(this.hot,(e,t)=>this.getHeaderSettings(e,t))),UM(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return $M}static get PLUGIN_PRIORITY(){return qM}isEnabled(){return!!this.hot.getSettings()[$M]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||Object(Xr["b"])(Hs["a"]`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
- passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",()=>XM(tT,this,bT).call(this)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,vT).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,aT).call(e,...n)})),this.addHook("afterOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,lT).call(e,...n)})),this.addHook("beforeOnCellMouseOver",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,uT).call(e,...n)})),this.addHook("beforeOnCellMouseUp",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,cT).call(e,...n)})),this.addHook("beforeSelectionHighlightSet",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,hT).call(e,...n)})),this.addHook("modifyTransformStart",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,dT).call(e,...n)})),this.addHook("afterSelection",()=>XM(tT,this,rT).call(this)),this.addHook("afterSelectionFocusSet",()=>XM(tT,this,rT).call(this)),this.addHook("beforeViewportScrollHorizontally",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,iT).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",e=>XM(tT,this,fT).call(this,e)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,gT).call(e,...n)})),this.addHook("modifyColumnHeaderValue",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,yT).call(e,...n)})),this.addHook("beforeHighlightingColumnHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,sT).call(e,...n)})),this.addHook("beforeCopy",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,oT).call(e,...n)})),this.addHook("beforeSelectColumns",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,mT).call(e,...n)})),this.addHook("afterViewportColumnCalculatorOverride",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,pT).call(e,...n)})),this.addHook("modifyFocusedElement",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return XM(tT,e,wT).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",()=>XM(tT,this,rT).call(this)),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",()=>XM(tT,this,rT).call(this)),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();KM(JM,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=KM(JM,this).setState(e)),this.detectedOverlappedHeaders&&Object(Xr["b"])(Hs["a"]`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
- is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach((e,t)=>{const n=!0===e?"hide-column":"show-column";KM(JM,this).triggerColumnModification(n,t)}),!KM(QM,this)&&this.enabled&&GM(QM,this,this.hot.columnIndexMapper.createChangesObserver("hiding").subscribe(e=>{e.forEach(e=>{let{op:t,index:n,newValue:r}=e;if("replace"===t){const e=!0===r?"hide-column":"show-column";KM(JM,this).triggerColumnModification(e,n)}}),this.ghostTable.buildWidthsMap()})),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),KM(JM,this).clear(),KM(QM,this).unsubscribe(),GM(QM,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return KM(JM,this)}getLayersCount(){return KM(JM,this).getLayersCount()}getHeaderSettings(e,t){return KM(JM,this).getHeaderSettings(e,t)}clearColspans(){if(!this.hot.view)return;const{_wt:e}=this.hot.view,t=e.getSetting("columnHeaders").length,n=e.wtTable.THEAD,r=e.wtOverlays.topOverlay.clone.wtTable.THEAD,s=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let o=0;o<t;o++){const e=n.childNodes[o];if(!e)break;const t=r.childNodes[o],a=s?s.childNodes[o]:null;for(let n=0,r=e.childNodes.length;n<r;n++)e.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(e.childNodes[n],"hiddenHeader"),t&&t.childNodes[n]&&(t.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(t.childNodes[n],"hiddenHeader")),s&&a&&a.childNodes[n]&&(a.childNodes[n].removeAttribute("colspan"),Object(i["removeClass"])(a.childNodes[n],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(r,s)=>{var o;const{columnIndexMapper:a,view:l}=this.hot;let u=a.getVisualFromRenderableIndex(r);null===u&&(u=r),s.removeAttribute("colspan"),Object(i["removeClass"])(s,"hiddenHeader");const{colspan:c,isHidden:h,isPlaceholder:d,headerClassNames:m}=null!==(o=KM(JM,this).getHeaderSettings(e,u))&&void 0!==o?o:{label:""};if(d||h)Object(i["addClass"])(s,"hiddenHeader");else if(c>1){var f,p;const{wtOverlays:e}=l._wt,t=null===(f=e.topInlineStartCornerOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(s),i=null===(p=e.inlineStartOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(s),o=t||i?Math.min(c,n-r):c;o>1&&s.setAttribute("colspan",o)}if(this.hot.view.appendColHeader(u,s,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!h){const e=s.querySelector("div.relative");e&&m&&m.length>0&&(Object(i["removeClass"])(e,this.hot.getColumnMeta(u).headerClassName),Object(i["addClass"])(e,m))}}}getColumnHeaderValue(e,t){var n;const{isHidden:r,isPlaceholder:i}=null!==(n=KM(JM,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return i||r?"":this.hot.getColHeader(e,t)}destroy(){GM(JM,this,null),null!==KM(QM,this)&&(KM(QM,this).unsubscribe(),GM(QM,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return KM(JM,this).getHeaderTreeNodeData(e.row,e.col)}}function rT(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(r){const e=KM(JM,this).findLeftMostColumnIndex(n.row,n.col),t=this.hot.selection.highlight.getFocus();t.visualCellRange.highlight.col=e,t.visualCellRange.from.col=e,t.visualCellRange.to.col=e,t.commit()}}function iT(e){const t=this.hot.getSelectedRangeLast();if(!t)return e;const{highlight:n}=t,r=n.isHeader()&&n.col>=0;if(!r)return e;const i=this.hot.view.getFirstFullyVisibleColumn(),s=this.hot.view.getLastFullyVisibleColumn(),o=KM(JM,this).findLeftMostColumnIndex(n.row,n.col),a=KM(JM,this).findRightMostColumnIndex(n.row,n.col);return o<i&&a>s?e:o<i?o:a}function sT(e,t,n){const r=KM(JM,this).getHeaderTreeNodeData(t,e);if(!r)return e;const{columnCursor:i,selectionType:s,selectionWidth:o}=n,{isRoot:a,colspan:l}=KM(JM,this).getHeaderSettings(t,e);if(s===kC["g"]){if(!a)return r.columnIndex}else if(s===kC["a"]&&(l>o-i||!a))return null;return e}function oT(e,t,n){let{columnHeadersCount:r}=n;if(0!==r)for(let s=0;s<t.length;s++){const{startRow:n,startCol:r,endRow:o,endCol:a}=t[s],l=o-n+1,u=r-a+1;if(n>=0||1===u)break;for(let t=r;t<=a;t++)for(let s=n;s<=o;s++){var i;const n=l+s,o=t-r;if(0===o)continue;const a=null===(i=KM(JM,this).getHeaderTreeNodeData(s,t))||void 0===i?void 0:i.isRoot;!1===a&&(e[n][o]="")}}}function aT(e,t,n,r){const i=this._getHeaderTreeNodeDataByCoords(t);i&&(r.column=!0)}function lT(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;GM(ZM,this,t.clone()),GM(eT,this,!0);const{selection:r}=this.hot,i=r.isSelected()?r.getSelectedRange().current():null,o=[],{columnIndex:a,origColspan:l}=n,u=!r.inInSelection(t);e.shiftKey&&i?t.col<i.from.col?o.push(i.getTopEndCorner().col,a,t.row):t.col>i.from.col?o.push(i.getTopStartCorner().col,a+l-1,t.row):o.push(a,a+l-1,t.row):(Object(s["isLeftClick"])(e)||Object(s["isRightClick"])(e)&&u||Object(s["isTouchEvent"])(e))&&o.push(a,a+l-1,t.row),r.selectColumns(...o)}function uT(e,t,n,r){if(!this.hot.view.isMouseDown())return;const i=this._getHeaderTreeNodeDataByCoords(t);if(!i)return;const{columnIndex:s,origColspan:o}=i,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),u=a.getBottomEndCorner(),{from:c}=a;r.column=!0,r.cell=!0;const h=[],d=Object(it["clamp"])(t.row,-1/0,-1);t.col<c.col?h.push(u.col,s,d):t.col>c.col?h.push(l.col,s+o-1,d):h.push(s,s+o-1,d),this.hot.selection.selectColumns(...h)}function cT(){GM(eT,this,!1)}function hT(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!KM(eT,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,r=t.getBottomEndCorner().col,{columnIndex:i,origColspan:s}=KM(JM,this).getHeaderTreeNodeData(KM(ZM,this).row,KM(ZM,this).col);if(t.setHighlight(KM(ZM,this)),s>t.getWidth()||i<n||i+s-1>r){const e=KM(JM,this).findTopMostEntireHeaderLevel(Object(it["clamp"])(n,i,i+s-1),Object(it["clamp"])(r,i,i+s-1));t.highlight.row=e,t.highlight.col=t.from.col}}function dT(e){const{highlight:t}=this.hot.getSelectedRangeLast(),n=this.hot._createCellCoords(t.row+e.row,t.col+e.col),r=n.isHeader()&&n.col>=0;if(!r)return;const i=KM(JM,this).findLeftMostColumnIndex(n.row,n.col),s=KM(JM,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=i&&t.col<=s?i-1:s,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===r?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(r,t.col)-1,1)}else if(e.col>0){const n=t.col>=i&&t.col<=s?s+1:i,r=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===r?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,r)-1,1)}}function mT(e,t){const n=e.row,r=this._getHeaderTreeNodeDataByCoords({row:n,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:n,col:t.col});t.col<e.col?(r&&(e.col=r.columnIndex+r.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(r&&(e.col=r.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function fT(e){e.length=0;for(let t=0;t<KM(JM,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}function pT(e){const t=KM(JM,this).getLayersCount();let n=e.startColumn,r=!!t;for(let i=0;i<t;i++){const t=KM(JM,this).findLeftMostColumnIndex(i,e.startColumn),s=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(r=!1),Object(it["isNumeric"])(s)&&s<e.startColumn){n=s;break}}e.startColumn=r?KM(JM,this).getHeaderTreeNodeData(0,n).columnIndex:n}function gT(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function yT(e,t,n){var r;const{label:i}=null!==(r=KM(JM,this).getHeaderTreeNodeData(n,t))&&void 0!==r?r:{label:""};return i}function wT(e,t){if(e<0)return this.hot.getCell(e,KM(JM,this).findLeftMostColumnIndex(e,t),!0)}function bT(){this.updatePlugin()}function vT(e,t){t||this.updatePlugin()}function _T(e,t,n){return(t=ST(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ST(e){var t=ET(e,"string");return"symbol"==typeof t?t:t+""}function ET(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class CT{constructor(e,t){_T(this,"hot",void 0),_T(this,"data",null),_T(this,"plugin",void 0),_T(this,"parentReference",new WeakMap),_T(this,"cache",{levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap}),this.hot=t,this.plugin=e}setData(e){this.data=e}getData(){return this.data}getRawSourceData(){let e=null;return this.plugin.disableCoreAPIModifiers(),e=this.hot.getSourceData(),this.plugin.enableCoreAPIModifiers(),e}updateWithData(e){this.setData(e),this.rewriteCache()}rewriteCache(){this.cache={levels:[],levelCount:0,rows:[],nodeInfo:new WeakMap},Object(it["rangeEach"])(0,this.data.length-1,e=>{this.cacheNode(this.data[e],0,null)})}cacheNode(e,t,n){this.cache.levels[t]||(this.cache.levels[t]=[],this.cache.levelCount+=1),this.cache.levels[t].push(e),this.cache.rows.push(e),this.cache.nodeInfo.set(e,{parent:n,row:this.cache.rows.length-1,level:t}),this.hasChildren(e)&&Object(h["arrayEach"])(e.__children,n=>{this.cacheNode(n,t+1,e)})}getDataObject(e){return null===e||void 0===e?null:this.cache.rows[e]}readTreeNodes(e,t,n,r){let i=!1,s=t;if(isNaN(s)&&s.end)return s;let o=e;return o||(o={__children:this.data},i=!0,s-=1),null!==n&&void 0!==n&&s===n?{result:o,end:!0}:null!==r&&void 0!==r&&o===r?{result:s,end:!0}:(s+=1,o.__children&&Object(h["arrayEach"])(o.__children,e=>{if(this.parentReference.set(e,i?null:o),s=this.readTreeNodes(e,s,n,r),isNaN(s)&&s.end)return!1}),s)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return Object(o["objectEach"])(this.data[0],(t,n)=>{e[n]=null}),e}getRowIndex(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).row}getRowIndexWithinParent(e){let t=null;t=isNaN(e)?e:this.getDataObject(e);const n=this.getRowParent(e);return null===n||void 0===n?this.data.indexOf(t):n.__children.indexOf(t)}countAllRows(){const e={__children:this.data};return this.countChildren(e)}countChildren(e){let t=0,n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&n.__children?(Object(h["arrayEach"])(n.__children,e=>{t+=1,e.__children&&(t+=this.countChildren(e))}),t):0}getRowParent(e){let t;return t=isNaN(e)?e:this.getDataObject(e),this.getRowObjectParent(t)}getRowObjectParent(e){return e&&"object"===typeof e?this.cache.nodeInfo.get(e).parent:null}getRowLevel(e){let t=null;return t=isNaN(e)?e:this.getDataObject(e),t?this.getRowObjectLevel(t):null}getRowObjectLevel(e){return null===e||void 0===e?null:this.cache.nodeInfo.get(e).level}hasChildren(e){let t=e;return isNaN(t)||(t=this.getDataObject(t)),!(!t.__children||!t.__children.length)}isChild(e){return null!==this.getRowParent(e)}getChild(e,t){var n;return(null===(n=e.__children)||void 0===n?void 0:n[t])||null}isRowHighestLevel(e){return!this.isChild(e)}isParent(e){var t;let n=e;return isNaN(n)||(n=this.getDataObject(n)),n&&!!n.__children&&0!==(null===(t=n.__children)||void 0===t?void 0:t.length)}addChild(e,t){let n=t;this.hot.runHooks("beforeAddChild",e,n);let r=null;e&&(r=this.getRowIndex(e)),this.hot.runHooks("beforeCreateRow",r+this.countChildren(e)+1,1);let i=e;e||(i=this.mockParent()),i.__children||(i.__children=[]),n||(n=this.mockNode()),i.__children.push(n),this.rewriteCache();const s=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(s,1),this.hot.runHooks("afterCreateRow",s,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let r,i=n;if(i||(i=this.mockNode()),this.hot.runHooks("beforeAddChild",e,i,t),e){const n=this.getRowIndex(e),s=n+t+1;this.hot.runHooks("beforeCreateRow",s,1),e.__children.splice(t,null,i),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(s,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",s,1),r=s}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),r=this.getRowIndex(this.data[t]);i=this.getDataObject(r),this.hot.runHooks("afterAddChild",e,i,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),r=this.getRowParent(n),i=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(r,i+1,null);break;case"above":this.addChildAtIndex(r,i,null);break;default:break}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const r=[];Array.isArray(e)?(Object(it["rangeEach"])(e[0],e[2],e=>{const t=this.translateTrimmedRow(e);r.push(this.getDataObject(t))}),Object(it["rangeEach"])(0,r.length-2,e=>{this.detachFromParent(r[e],!1)}),n=r[r.length-1]):n=e;const i=this.getRowIndex(n),s=this.countChildren(n),o=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),u=this.getRowIndex(l);let c=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!==o&&void 0!==o){const e=Array.from(new Array(i+s+1).keys()).splice(-1*(s+1));if(this.hot.runHooks("beforeRemoveRow",i,s+1,e,this.plugin.pluginName),a.__children.splice(o,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",i,s+1,e,this.plugin.pluginName),l){c=u+this.countChildren(l);const e=this.getChild(l,this.countChildren(l)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,s+1,this.plugin.pluginName),l.__children.push(n)}else c=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",c-2,s+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",c-2,s+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),t&&this.hot.render()}filterData(e,t,n){const r=[];Object(h["arrayEach"])(n,e=>{r.push(this.getDataObject(e))}),Object(h["arrayEach"])(r,e=>{const t=this.getRowIndexWithinParent(e),n=this.getRowParent(e);null===n?this.data.splice(t,1):n.__children.splice(t,1)}),this.rewriteCache()}spliceData(e,t,n){const r=this.getDataObject(e-1);let i=null,s=e;r&&r.__children&&0===r.__children.length?(i=r,s=0):e<this.countAllRows()&&(i=this.getRowParent(e),s=this.getRowIndexWithinParent(e)),i?n?i.__children.splice(s,t,...n):i.__children.splice(s,t):n?this.data.splice(s,t,...n):this.data.splice(s,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,n=null;do{n=this.getRowParent(n),null!==n&&(t=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndex(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,n,r){const i=t===this.hot.countRows(),s=this.getRowParent(e),o=this.getRowIndexWithinParent(e),a=s.__children.slice(o,o+1),l=e>t;let u=i?this.getRowParent(t-1):this.getRowParent(t);null!==u&&void 0!==u||(u=this.getRowParent(t-1)),null!==u&&void 0!==u||(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const c=i||n||r?u.__children.length:this.getRowIndexWithinParent(t),h=s===u;u.__children.splice(c,0,a[0]),s.__children.splice(o+(l&&h?1:0),1),this.syncRowWithRawSource(s),h||this.syncRowWithRawSource(u)}translateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.translateTrimmedRow(e):e}untranslateTrimmedRow(e){return this.plugin.collapsingUI?this.plugin.collapsingUI.untranslateTrimmedRow(e):e}}var MT=CT;function TT(e,t,n){return(t=RT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function RT(e){var t=OT(e,"string");return"symbol"==typeof t?t:t+""}function OT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class NT{constructor(e,t){TT(this,"hot",void 0),TT(this,"plugin",void 0),this.hot=t,this.plugin=e}}var AT=NT;class LT extends AT{static get CSS_CLASSES(){return{indicatorContainer:"ht_nestingLevels",parent:"ht_nestingParent",indicator:"ht_nestingLevel",emptyIndicator:"ht_nestingLevel_empty",button:"ht_nestingButton",expandButton:"ht_nestingExpand",collapseButton:"ht_nestingCollapse"}}constructor(e,t){super(e,t),this.dataManager=this.plugin.dataManager,this.collapsingUI=this.plugin.collapsingUI,this.rowHeaderWidthCache=null}appendLevelIndicators(e,t){const n=this.hot.toPhysicalRow(e),r=this.dataManager.getRowLevel(n),s=this.dataManager.getDataObject(n),o=t.getElementsByTagName("DIV")[0],a=o.querySelector("span.rowHeader"),l=o.querySelectorAll('[class^="ht_nesting"]'),u=this.hot.getSettings().ariaTags;if(Object(h["arrayEach"])(l,e=>{e&&o.removeChild(e)}),Object(i["addClass"])(t,LT.CSS_CLASSES.indicatorContainer),r){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);o.innerHTML="",Object(it["rangeEach"])(0,r-1,()=>{const t=e.createElement("SPAN");Object(i["addClass"])(t,LT.CSS_CLASSES.emptyIndicator),o.appendChild(t)}),o.appendChild(t)}if(this.dataManager.hasChildren(s)){const e=this.hot.rootDocument.createElement("DIV");u&&Object(i["setAttribute"])(e,[Object(y["n"])()]),Object(i["addClass"])(t,LT.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?(Object(i["addClass"])(e,`${LT.CSS_CLASSES.button} ${LT.CSS_CLASSES.expandButton}`),u&&Object(i["setAttribute"])(t,[Object(y["k"])(!1)])):(Object(i["addClass"])(e,`${LT.CSS_CLASSES.button} ${LT.CSS_CLASSES.collapseButton}`),u&&Object(i["setAttribute"])(t,[Object(y["k"])(!0)])),o.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount),this.rowHeaderWidthCache=Math.max(50,11+10*t+25),this.hot.render()}}var IT=LT;class kT extends AT{constructor(e,t){var n;super(e,t),n=this,this.dataManager=this.plugin.dataManager,this.collapsedRows=[],this.collapsedRowsStash={stash:function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];n.lastCollapsedRows=n.collapsedRows.slice(0),n.expandMultipleChildren(n.lastCollapsedRows,e)},shiftStash:function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;null!==t&&void 0!==t||(t=1/0),Object(h["arrayEach"])(n.lastCollapsedRows,(i,s)=>{i>=e&&i<t&&(n.lastCollapsedRows[s]=i+r)})},applyStash:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];n.collapseMultipleChildren(n.lastCollapsedRows,e),n.lastCollapsedRows=void 0},trimStash:(e,t)=>{Object(it["rangeEach"])(e,e+t-1,e=>{const t=this.lastCollapsedRows.indexOf(e);t>-1&&this.lastCollapsedRows.splice(t,1)})}}}collapseChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(i)):(i=this.dataManager.getDataObject(e),s=e),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{r.push(this.dataManager.getRowIndex(e))}),o=this.collapseRows(r,!0,!1),n&&this.trimRows(o),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(s)&&this.collapsedRows.push(s),o}collapseMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.collapseChildren(e,!1,!1))}),n&&this.trimRows(r),t&&this.renderAndAdjust()}collapseRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.collapseRows([e],t)}collapseRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.collapseChildRows(e,r)}),n&&this.trimRows(r),r}collapseChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{const n=this.dataManager.getRowIndex(e);t.push(n),this.collapseChildRows(n,t)})}n&&this.trimRows(t)}expandRow(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.expandRows([e],t)}expandRows(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=[];return Object(h["arrayEach"])(e,e=>{r.push(e),t&&this.expandChildRows(e,r)}),n&&this.untrimRows(r),r}expandChildRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.dataManager.hasChildren(e)){const n=this.dataManager.getDataObject(e);Object(h["arrayEach"])(n.__children,e=>{if(!this.isAnyParentCollapsed(e)){const n=this.dataManager.getRowIndex(e);t.push(n),this.expandChildRows(n,t)}})}n&&this.untrimRows(t)}expandChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];let i=null,s=null,o=null;return isNaN(e)?(i=e,s=this.dataManager.getRowIndex(e)):(i=this.dataManager.getDataObject(e),s=e),this.collapsedRows.splice(this.collapsedRows.indexOf(s),1),this.dataManager.hasChildren(i)&&Object(h["arrayEach"])(i.__children,e=>{const t=this.dataManager.getRowIndex(e);r.push(t)}),o=this.expandRows(r,!0,!1),n&&this.untrimRows(o),t&&this.renderAndAdjust(),o}expandMultipleChildren(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];const r=[];Object(h["arrayEach"])(e,e=>{r.push(...this.expandChildren(e,!1,!1))}),n&&this.untrimRows(r),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];Object(h["arrayEach"])(e,e=>{this.dataManager.hasChildren(e)&&t.push(e)}),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)})},!0)}untrimRows(e){this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!1)})},!0)}areChildrenCollapsed(e){let t=isNaN(e)?e:this.dataManager.getDataObject(e),n=!0;return null===t&&(t={__children:this.dataManager.data}),this.dataManager.hasChildren(t)&&Object(h["arrayEach"])(t.__children,e=>{const t=this.dataManager.getRowIndex(e);if(!this.plugin.collapsedRowsMap.getValueAtIndex(t))return n=!1,!1}),n}isAnyParentCollapsed(e){let t=e;while(null!==t){t=this.dataManager.getRowParent(t);const e=this.dataManager.getRowIndex(t);if(this.collapsedRows.indexOf(e)>-1)return!0}return!1}toggleState(e,t){if(t.col>=0)return;const n=this.translateTrimmedRow(t.row);Object(i["hasClass"])(e.target,IT.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),Object(s["stopImmediatePropagation"])(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}}var xT=kT;function DT(e,t,n){HT(e,t),t.set(e,n)}function HT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function PT(e,t,n){return(t=jT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jT(e){var t=FT(e,"string");return"symbol"==typeof t?t:t+""}function FT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function YT(e,t){return e.get(UT(e,t))}function UT(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var VT=new WeakMap;class BT extends AT{constructor(){super(...arguments),PT(this,"dataManager",this.plugin.dataManager),DT(this,VT,{row_above:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"above")},row_below:(e,t)=>{const n=t[t.length-1];this.dataManager.addSibling(n.start.row,"below")}})}appendOptions(e){const t=[{key:"add_child",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"])},callback:()=>{const e=this.dataManager.translateTrimmedRow(this.hot.getSelectedLast()[0]),t=this.dataManager.getDataObject(e);this.dataManager.addChild(t)},disabled:()=>{const e=this.hot.getSelectedLast();return!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{key:"detach_from_parent",name(){return this.getTranslatedPhrase(je["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"])},callback:()=>{this.dataManager.detachFromParent(this.hot.getSelectedLast())},disabled:()=>{const e=this.hot.getSelectedLast(),t=this.dataManager.translateTrimmedRow(e[0]),n=this.dataManager.getRowParent(t);return!n||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return Object(it["rangeEach"])(0,e.items.length-1,n=>{if(0===n)return Object(h["arrayEach"])(t,(t,r)=>{e.items.splice(n+r,0,t)}),!1}),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return Object(it["rangeEach"])(0,e.items.length-1,t=>{const n=YT(VT,this)[e.items[t].key];null!==n&&void 0!==n&&(e.items[t].callback=n)}),e}}var WT=BT;function zT(e,t,n){return(t=GT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function GT(e){var t=KT(e,"string");return"symbol"==typeof t?t:t+""}function KT(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class XT{constructor(e){zT(this,"plugin",void 0),zT(this,"hot",void 0),zT(this,"dataManager",void 0),zT(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,n,r){const i=this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:n,movePossible:r});if(i)return!1;this.movedToCollapsed=!1;const s=n===this.hot.countRows(),o=s?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let a=!0;const l=e.map(e=>{if(!a)return!1;const t=this.dataManager.translateTrimmedRow(e);return a=this.shouldAllowMoving(t,o),t}),u=-1===l.indexOf(o);if(!a||!u)return!1;const c=this.getBaseParent(l),h=this.getTargetParent(s,o),d=c===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(l,o,d),this.moveRows(l,o,h),this.dataManager.rewriteCache(),this.moveCellsMeta(l,o),this.collapsingUI.collapsedRowsStash.applyStash(!1),this.hot.runHooks("afterRowMove",e,t,n,r,r&&this.isRowOrderChanged(e,t)),this.hot.render(),this.selectCells(e,n),!1}displayAPICompatibilityWarning(e){const{rows:t,finalIndex:n,dropIndex:r,movePossible:i}=e;let s=!1;return Object(d["isUndefined"])(r)&&(Object(Xr["b"])(Hs["a"]`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
- when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,r,i,!1),s=!0),s}shouldAllowMoving(e,t){return!(this.dataManager.isParent(e)||this.dataManager.isRowHighestLevel(e)||e===t||0===t)}getBaseParent(e){return this.dataManager.getRowParent(e[0])}getTargetParent(e,t){let n=this.dataManager.getRowParent(e?t-1:t);return null!==n&&void 0!==n||(n=this.dataManager.getRowParent(t-1)),n}shiftCollapsibleParentsLocations(e,t,n){n||(Math.max(...e)<=t?this.collapsingUI.collapsedRowsStash.shiftStash(e[0],t,-1*e.length):this.collapsingUI.collapsedRowsStash.shiftStash(t,e[0],e.length))}moveRows(e,t,n){const r=t===this.dataManager.getRowIndex(n)+this.dataManager.countChildren(n)+1;this.hot.batchRender(()=>{e.forEach(e=>{this.dataManager.moveRow(e,t,this.movedToCollapsed,r)})})}moveCellsMeta(e,t){const n=[],r=Math.max(...e)<t;e.forEach(e=>{n.push(this.hot.getCellMetaAtRow(e))}),this.hot.spliceCellsMeta(e[0],e.length),this.hot.spliceCellsMeta(t-(r?n.length:0),0,...n)}selectCells(e,t){const n=e.length;let r=0,i=0,s=null,o=null;if(this.movedToCollapsed){let s=null;s=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const o=this.dataManager.getRowParent(null===s?this.hot.countSourceRows()-1:s-1),a=this.dataManager.getRowIndex(o);r=this.dataManager.untranslateTrimmedRow(a),i=r}else e[n-1]<t?(i=t-1,r=i-n+1):(r=t,i=r+n-1);s=this.hot.selection,o=this.hot.countCols()-1,s.setRangeStart(this.hot._createCellCoords(r,0)),s.setRangeEnd(this.hot._createCellCoords(i,o),!0)}isRowOrderChanged(e,t){return e.some((e,n)=>e-n!==t)}}function $T(e,t){JT(e,t),t.add(e)}function qT(e,t,n){JT(e,t),t.set(e,n)}function JT(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function QT(e,t,n){return(t=ZT(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZT(e){var t=eR(e,"string");return"symbol"==typeof t?t:t+""}function eR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function tR(e,t){return e.get(rR(e,t))}function nR(e,t,n){return e.set(rR(e,t),n),n}function rR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const iR="nestedRows",sR=300,oR=iR,aR="The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled.";var lR=new WeakMap,uR=new WeakMap,cR=new WeakSet;class hR extends tn["a"]{constructor(){super(...arguments),$T(this,cR),QT(this,"dataManager",null),QT(this,"headersUI",null),QT(this,"collapsedRowsMap",null),qT(this,lR,!1),qT(this,uR,!1)}static get PLUGIN_KEY(){return iR}static get PLUGIN_PRIORITY(){return sR}isEnabled(){return!!this.hot.getSettings()[iR]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new sg["a"]),this.dataManager=new MT(this,this.hot),this.collapsingUI=new xT(this,this.hot),this.headersUI=new IT(this,this.hot),this.contextMenuUI=new WT(this,this.hot),this.rowMoveController=new XT(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,MR).call(e,...n)})),this.addHook("beforeViewRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,TR).call(e,...n)})),this.addHook("modifyRowData",(function(){return e.onModifyRowData(...arguments)})),this.addHook("modifySourceLength",(function(){return e.onModifySourceLength(...arguments)})),this.addHook("beforeDataSplice",(function(){return e.onBeforeDataSplice(...arguments)})),this.addHook("filterData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,fR).call(e,...n)})),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,pR).call(e,...n)})),this.addHook("afterGetRowHeader",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,gR).call(e,...n)})),this.addHook("beforeOnCellMouseDown",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,mR).call(e,...n)})),this.addHook("beforeRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,bR).call(e,...n)})),this.addHook("afterRemoveRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,wR).call(e,...n)})),this.addHook("beforeAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,vR).call(e,...n)})),this.addHook("afterAddChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,_R).call(e,...n)})),this.addHook("beforeDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,SR).call(e,...n)})),this.addHook("afterDetachChild",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,ER).call(e,...n)})),this.addHook("modifyRowHeaderWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,yR).call(e,...n)})),this.addHook("afterCreateRow",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,CR).call(e,...n)})),this.addHook("beforeRowMove",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rR(cR,e,dR).call(e,...n)})),this.addHook("beforeLoadData",e=>rR(cR,this,RR).call(this,e)),this.addHook("beforeUpdateData",e=>rR(cR,this,RR).call(this,e)),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("nestedRows"),this.unregisterShortcuts(),super.disablePlugin()}updatePlugin(){this.disablePlugin();const e=this.dataManager.getData();this.enablePlugin(),this.dataManager.updateWithData(e),super.updatePlugin()}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Enter"]],callback:()=>{const{highlight:e}=this.hot.getSelectedRangeLast(),t=this.collapsingUI.translateTrimmedRow(e.row);return this.collapsingUI.areChildrenCollapsed(t)?this.collapsingUI.expandChildren(t):this.collapsingUI.collapseChildren(t),!1},runOnlyIf:()=>{var e,t;const n=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return n&&(null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingle())&&this.hot.selection.isCellVisible(n)&&-1===n.col&&n.row>=0},group:oR,relativeToGroup:a["a"],position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(oR)}disableCoreAPIModifiers(){nR(uR,this,!0)}enableCoreAPIModifiers(){nR(uR,this,!1)}onModifyRowData(e){if(!tR(uR,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!tR(uR,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!tR(uR,this)&&!this.dataManager.isRowHighestLevel(e))||(this.dataManager.spliceData(e,t,n),!1)}destroy(){super.destroy()}}function dR(e,t,n,r){return this.rowMoveController.onBeforeRowMove(e,t,n,r)}function mR(e,t,n){this.collapsingUI.toggleState(e,t,n)}function fR(e,t,n){return this.collapsingUI.collapsedRowsStash.stash(),this.collapsingUI.collapsedRowsStash.trimStash(n[0],t),this.collapsingUI.collapsedRowsStash.shiftStash(n[0],null,-1*t),this.dataManager.filterData(e,t,n),nR(lR,this,!0),this.dataManager.getData().slice()}function pR(e){return this.contextMenuUI.appendOptions(e)}function gR(e,t){this.headersUI.appendLevelIndicators(e,t)}function yR(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function wR(e,t,n,r){r!==this.pluginName&&this.hot._registerTimeout(()=>{nR(lR,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()})}function bR(e,t,n){const r=Array.from(n.reduce((e,t)=>{if(this.dataManager.isParent(t)){const n=this.dataManager.getDataObject(t).__children;return e.add(t),Array.isArray(n)&&n.forEach(t=>e.add(this.dataManager.getRowIndex(t))),e}return e.add(t)},new Set));n.length=0,n.push(...r)}function vR(){this.collapsingUI.collapsedRowsStash.stash()}function _R(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function SR(){this.collapsingUI.collapsedRowsStash.stash()}function ER(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function CR(){this.dataManager.rewriteCache()}function MR(){this.headersUI.updateRowHeaderWidth()}function TR(e,t){tR(lR,this)&&(t.skipRender=!0)}function RR(e){if(!Object(Df["isArrayOfObjects"])(e))return Object(Xr["a"])(aR),this.hot.getSettings()[iR]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function OR(e,t,n){return(t=NR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NR(e){var t=AR(e,"string");return"symbol"==typeof t?t:t+""}function AR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class LR{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;OR(this,"rootWindow",void 0),OR(this,"prefix",void 0),OR(this,"savedKeys",[]),this.rootWindow=t,this.prefix=e,this.loadSavedKeys()}saveValue(e,t){this.rootWindow.localStorage.setItem(`${this.prefix}_${e}`,JSON.stringify(t)),-1===this.savedKeys.indexOf(e)&&(this.savedKeys.push(e),this.saveSavedKeys())}loadValue(e,t){const n="undefined"===typeof e?t:e,r=this.rootWindow.localStorage.getItem(`${this.prefix}_${n}`);return null===r?void 0:JSON.parse(r)}reset(e){this.rootWindow.localStorage.removeItem(`${this.prefix}_${e}`)}resetAll(){Object(h["arrayEach"])(this.savedKeys,(e,t)=>{this.rootWindow.localStorage.removeItem(`${this.prefix}_${this.savedKeys[t]}`)}),this.clearSavedKeys()}loadSavedKeys(){const e=this.rootWindow.localStorage.getItem(this.prefix+"__persistentStateKeys"),t="string"===typeof e?JSON.parse(e):void 0;this.savedKeys=t||[]}saveSavedKeys(){this.rootWindow.localStorage.setItem(this.prefix+"__persistentStateKeys",JSON.stringify(this.savedKeys))}clearSavedKeys(){this.savedKeys.length=0,this.saveSavedKeys()}}var IR=LR;function kR(e,t,n){return(t=xR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xR(e){var t=DR(e,"string");return"symbol"==typeof t?t:t+""}function DR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}pe["a"].getSingleton().register("persistentStateSave"),pe["a"].getSingleton().register("persistentStateLoad"),pe["a"].getSingleton().register("persistentStateReset");const HR="persistentState",PR=0;class jR extends tn["a"]{constructor(){super(...arguments),kR(this,"storage",void 0)}static get PLUGIN_KEY(){return HR}static get PLUGIN_PRIORITY(){return PR}isEnabled(){return!!this.hot.getSettings()[HR]}enablePlugin(){this.enabled||(this.storage||(this.storage=new IR(this.hot.rootElement.id,this.hot.rootWindow)),this.addHook("persistentStateSave",(e,t)=>this.saveValue(e,t)),this.addHook("persistentStateLoad",(e,t)=>this.loadValue(e,t)),this.addHook("persistentStateReset",()=>this.resetValue()),super.enablePlugin())}disablePlugin(){this.storage=void 0,super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}loadValue(e,t){t.value=this.storage.loadValue(e)}saveValue(e,t){this.storage.saveValue(e,t)}resetValue(e){"undefined"===typeof e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}function FR(e,t){YR(e,t),t.add(e)}function YR(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function UR(e,t,n){return(t=VR(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VR(e){var t=BR(e,"string");return"symbol"==typeof t?t:t+""}function BR(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function WR(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const zR="search",GR=190,KR="htSearchResult",XR=function(e,t,n,r,i){e.getCellMeta(t,n).isSearchResult=i},$R=function(e,t,n){return!(Object(d["isUndefined"])(e)||null===e||!e.toLocaleLowerCase||0===e.length)&&(!Object(d["isUndefined"])(t)&&null!==t&&-1!==t.toString().toLocaleLowerCase(n.locale).indexOf(e.toLocaleLowerCase(n.locale)))};var qR=new WeakSet;class JR extends tn["a"]{constructor(){super(...arguments),FR(this,qR),UR(this,"callback",XR),UR(this,"queryMethod",$R),UR(this,"searchResultClass",KR)}static get PLUGIN_KEY(){return zR}static get PLUGIN_PRIORITY(){return GR}isEnabled(){return this.hot.getSettings()[zR]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[zR];this.updatePluginSettings(t),this.addHook("beforeRenderer",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WR(qR,e,QR).call(e,...n)})),super.enablePlugin()}disablePlugin(){var e=this;const t=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return WR(qR,e,QR).call(e,...n)};this.hot.addHook("beforeRenderer",t),this.hot.addHookOnce("afterViewRender",()=>{this.hot.removeHook("beforeRenderer",t)}),super.disablePlugin()}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}query(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCallback(),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.getQueryMethod();const r=this.hot.countRows(),i=this.hot.countCols(),s=[],o=this.hot;return Object(it["rangeEach"])(0,r-1,r=>{Object(it["rangeEach"])(0,i-1,i=>{const a=this.hot.getDataAtCell(r,i),l=this.hot.getCellMeta(r,i),u=l.search.callback||t,c=l.search.queryMethod||n,h=c(e,a,l);if(h){const e={row:r,col:i,data:a};s.push(e)}u&&u(o,r,i,a,h)})}),s}getCallback(){return this.callback}setCallback(e){this.callback=e}getQueryMethod(){return this.queryMethod}setQueryMethod(e){this.queryMethod=e}getSearchResultClass(){return this.searchResultClass}setSearchResultClass(e){this.searchResultClass=e}updatePluginSettings(e){Object(o["isObject"])(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function QR(e,t,n,r,i,s){const o=s.className||[];let a=[];"string"===typeof o?a=o.split(" "):a.push(...o),this.isEnabled()&&s.isSearchResult?a.includes(this.searchResultClass)||a.push(""+this.searchResultClass):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),s.className=a.join(" ")}function ZR(e,t){eO(e,t),t.add(e)}function eO(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tO(e,t,n){return(t=nO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nO(e){var t=rO(e,"string");return"symbol"==typeof t?t:t+""}function rO(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function iO(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const sO="touchScroll",oO=200;var aO=new WeakSet;class lO extends tn["a"]{constructor(){super(...arguments),ZR(this,aO),tO(this,"scrollbars",[]),tO(this,"clones",[]),tO(this,"lockedCollection",!1),tO(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return sO}static get PLUGIN_PRIORITY(){return oO}static get SETTING_KEYS(){return!0}isEnabled(){return Object(nn["isTouchSupported"])()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",()=>iO(aO,this,uO).call(this)),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",()=>iO(aO,this,cO).call(this)),this.addHook("afterMomentumScroll",()=>iO(aO,this,hO).call(this))}}function uO(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;this.lockedCollection=!0,this.scrollbars.length=0,this.scrollbars.push(e),t.clone&&this.scrollbars.push(t),this.scrollbars.push(n),r&&this.scrollbars.push(r),i&&i.clone&&this.scrollbars.push(i),this.clones=[],e.needFullRender&&this.clones.push(e.clone.wtTable.holder.parentNode),t.needFullRender&&this.clones.push(t.clone.wtTable.holder.parentNode),n.needFullRender&&this.clones.push(n.clone.wtTable.holder.parentNode),r&&this.clones.push(r.clone.wtTable.holder.parentNode),i&&i.clone&&this.clones.push(i.clone.wtTable.holder.parentNode)}function cO(){this.freezeOverlays=!0,Object(h["arrayEach"])(this.clones,e=>{Object(i["addClass"])(e,"hide-tween")})}function hO(){this.freezeOverlays=!1,Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"hide-tween"),Object(i["addClass"])(e,"show-tween")}),this.hot._registerTimeout(()=>{Object(h["arrayEach"])(this.clones,e=>{Object(i["removeClass"])(e,"show-tween")})},400),Object(h["arrayEach"])(this.scrollbars,e=>{e.refresh(),e.resetFixedPosition()}),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}function dO(e,t){mO(e,t),t.add(e)}function mO(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fO(e,t,n){return(t=pO(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pO(e){var t=gO(e,"string");return"symbol"==typeof t?t:t+""}function gO(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function yO(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const wO="trimRows",bO=330;var vO=new WeakSet;class _O extends tn["a"]{constructor(){super(...arguments),dO(this,vO),fO(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return wO}static get PLUGIN_PRIORITY(){return bO}isEnabled(){return!!this.hot.getSettings()[wO]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new sg["a"]),this.trimmedRowsMap.addLocalHook("init",()=>yO(vO,this,SO).call(this)),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[wO];Array.isArray(e)&&this.hot.batchExecution(()=>{this.trimmedRowsMap.clear(),Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),super.updatePlugin()}disablePlugin(){this.hot.rowIndexMapper.unregisterMap("trimRows"),super.disablePlugin()}getTrimmedRows(){return this.trimmedRowsMap.getTrimmedIndexes()}trimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;n&&(r=Array.from(new Set(t.concat(e))));const i=this.hot.runHooks("beforeTrimRow",t,r,n);!1!==i&&(n&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0),this.hot.runHooks("afterTrimRow",t,r,n,n&&r.length>t.length))}trimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.trimRows(t)}untrimRows(e){const t=this.getTrimmedRows(),n=this.isValidConfig(e);let r=t;const i=this.trimmedRowsMap.getValues().slice(),s=e.length>0;n&&s&&(Object(h["arrayEach"])(e,e=>{i[e]=!1}),r=Object(h["arrayReduce"])(i,(e,t,n)=>(t&&e.push(n),e),[]));const o=this.hot.runHooks("beforeUntrimRow",t,r,n&&s);!1!==o&&(n&&s&&this.trimmedRowsMap.setValues(i),this.hot.runHooks("afterUntrimRow",t,r,n&&s,n&&r.length<t.length))}untrimRow(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];this.untrimRows(t)}isTrimmed(e){return this.trimmedRowsMap.getValueAtIndex(e)||!1}untrimAll(){this.untrimRows(this.getTrimmedRows())}isValidConfig(e){const t=this.hot.countSourceRows();return e.every(e=>Number.isInteger(e)&&e>=0&&e<t)}destroy(){super.destroy()}}function SO(){const e=this.hot.getSettings()[wO];Array.isArray(e)&&this.hot.batchExecution(()=>{Object(h["arrayEach"])(e,e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)})},!0)}n("8e39");const EO="undoRedo",CO="undoRedo";function MO(e){const t=this;this.instance=e,this.doneActions=[],this.undoneActions=[],this.ignoreNewActions=!1,this.enabled=!1,e.addHook("afterChange",(function(n,r){const i=n&&n.length;if(!i)return;const s=n.find(e=>{const[,,t,n]=e;return t!==n});if(!s)return;const o=()=>{const t=n.reduce((e,t)=>(e.push([...t]),e),[]);Object(h["arrayEach"])(t,t=>{t[1]=e.propToCol(t[1])});const r=i>1?this.getSelected():[[t[0][0],t[0][1]]];return new MO.ChangeAction(t,r)};t.done(o,r)})),e.addHook("afterCreateRow",(e,n,r)=>{t.done(()=>new MO.CreateRowAction(e,n),r)});const n=(t,n,r,i)=>{const s=["visualRow","visualCol","row","col","prop"],o=s.length,a=[];return Object(it["rangeEach"])(r,i,r=>{Object(it["rangeEach"])(t,n,t=>{const n=e.getCellMeta(t,r);if(Object.keys(n).length!==o){const e=Object.fromEntries(Object.entries(n).filter(e=>{let[t]=e;return!1===s.includes(t)}));a.push([n.visualRow,n.visualCol,e])}})}),a};e.addHook("beforeRemoveRow",(r,i,s,a)=>{const l=()=>{const s=e.toPhysicalRow(r),a=s+i-1,l=Object(o["deepClone"])(t.instance.getSourceData(s,0,s+i-1,t.instance.countSourceCols()-1));return new MO.RemoveRowAction(s,l,e.getSettings().fixedRowsBottom,e.getSettings().fixedRowsTop,e.rowIndexMapper.getIndexesSequence(),n(s,a,0,e.countCols()-1))};t.done(l,a)}),e.addHook("afterCreateCol",(e,n,r)=>{t.done(()=>new MO.CreateColumnAction(e,n),r)}),e.addHook("beforeRemoveCol",(r,i,s,o)=>{const a=()=>{const s=t.instance.getSourceDataArray(),o=(t.instance.countCols()+r)%t.instance.countCols(),a=o+i-1,l=[],u=[],c=[];Object(it["rangeEach"])(s.length-1,t=>{const n=[],r=s[t];Object(it["rangeEach"])(o,a,t=>{n.push(r[e.toPhysicalColumn(t)])}),l.push(n)}),Object(it["rangeEach"])(i-1,t=>{c.push(e.toPhysicalColumn(o+t))}),Array.isArray(e.getSettings().colHeaders)&&Object(it["rangeEach"])(i-1,t=>{u.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)});const h=e.columnIndexMapper.getIndexesSequence(),d=e.rowIndexMapper.getIndexesSequence();return new MO.RemoveColumnAction(o,c,l,u,h,d,e.getSettings().fixedColumnsStart,n(0,e.countRows(),o,a))};t.done(a,o)}),e.addHook("beforeCellAlignment",(e,n,r,i)=>{t.done(()=>new MO.CellAlignmentAction(e,n,r,i))}),e.addHook("beforeFilter",(e,n)=>{t.done(()=>new MO.FiltersAction(e,n))}),e.addHook("beforeRowMove",(e,n)=>{!1!==e&&t.done(()=>new MO.RowMoveAction(e,n))}),e.addHook("beforeColumnMove",(e,n)=>{!1!==e&&t.done(()=>new MO.ColumnMoveAction(e,n))}),e.addHook("beforeMergeCells",(n,r)=>{r||t.done(()=>new MO.MergeCellsAction(e,n))}),e.addHook("afterUnmergeCells",(n,r)=>{r||t.done(()=>new MO.UnmergeCellsAction(e,n))}),e.addHook("beforeColumnSort",(e,n,r)=>{r&&t.done(()=>new MO.ColumnSortAction(e,n))}),e.addHook("afterInit",()=>{t.init()})}MO.prototype.done=function(e,t){if(this.ignoreNewActions)return;const n="UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t;if(n)return;const r=this.doneActions.slice(),i=this.instance.runHooks("beforeUndoStackChange",r,t);if(!1===i)return;const s=e(),o=this.undoneActions.slice();this.doneActions.push(s),this.instance.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.instance.runHooks("beforeRedoStackChange",o),this.undoneActions.length=0,this.instance.runHooks("afterRedoStackChange",o,this.undoneActions.slice())},MO.prototype.undo=function(){if(this.isUndoAvailable()){const e=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.instance.runHooks("afterUndoStackChange",e,this.doneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeUndo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",s),t.undo(this.instance,()=>{i.ignoreNewActions=!1,i.undoneActions.push(t)}),this.instance.runHooks("afterRedoStackChange",s,this.undoneActions.slice()),this.instance.runHooks("afterUndo",n)}},MO.prototype.redo=function(){if(this.isRedoAvailable()){const e=this.undoneActions.slice();this.instance.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.instance.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const n=Object(o["deepClone"])(t),r=this.instance.runHooks("beforeRedo",n);if(!1===r)return;this.ignoreNewActions=!0;const i=this,s=this.doneActions.slice();this.instance.runHooks("beforeUndoStackChange",s),t.redo(this.instance,()=>{i.ignoreNewActions=!1,i.doneActions.push(t)}),this.instance.runHooks("afterUndoStackChange",s,this.doneActions.slice()),this.instance.runHooks("afterRedo",n)}},MO.prototype.isUndoAvailable=function(){return this.doneActions.length>0},MO.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},MO.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},MO.prototype.isEnabled=function(){return this.enabled},MO.prototype.enable=function(){if(this.isEnabled())return;const e=this.instance;this.enabled=!0,NO(e),this.registerShortcuts(),e.addHook("afterChange",OO)},MO.prototype.disable=function(){if(!this.isEnabled())return;const e=this.instance;this.enabled=!1,AO(e),this.unregisterShortcuts(),e.removeHook("afterChange",OO)},MO.prototype.destroy=function(){this.clear(),this.instance=null,this.doneActions=null,this.undoneActions=null},MO.Action=function(){},MO.Action.prototype.undo=function(){},MO.Action.prototype.redo=function(){},MO.ChangeAction=function(e,t){this.changes=e,this.selected=t,this.actionType="change"},Object(o["inherit"])(MO.ChangeAction,MO.Action),MO.ChangeAction.prototype.undo=function(e,t){const n=Object(o["deepClone"])(this.changes),r=e.countEmptyRows(!0),i=e.countEmptyCols(!0);for(let o=0,a=n.length;o<a;o++)n[o].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.undo");for(let o=0,a=n.length;o<a;o++){const[t,s]=n[o];e.getSettings().minSpareRows&&t+1+e.getSettings().minSpareRows===e.countRows()&&r===e.getSettings().minSpareRows&&(e.alter("remove_row",parseInt(t+1,10),e.getSettings().minSpareRows),e.undoRedo.doneActions.pop()),e.getSettings().minSpareCols&&s+1+e.getSettings().minSpareCols===e.countCols()&&i===e.getSettings().minSpareCols&&(e.alter("remove_col",parseInt(s+1,10),e.getSettings().minSpareCols),e.undoRedo.doneActions.pop())}const s=e.getSelectedLast();if(void 0!==s){const[t,r]=n[0],[i,o]=s,a=e.view.getFirstFullyVisibleRow(),l=e.view.getFirstFullyVisibleColumn(),u=t>=a,c=r>=l,h=u&&c,d=i!==t||o!==r;if(!1===h&&!0===d){const n={row:t,col:r};!1===u&&(n.verticalSnap="top"),!1===c&&(n.horizontalSnap="start"),e.scrollViewportTo(n)}}e.selectCells(this.selected,!1,!1)},MO.ChangeAction.prototype.redo=function(e,t){const n=Object(o["deepClone"])(this.changes);for(let r=0,i=n.length;r<i;r++)n[r].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)},MO.CreateRowAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_row"},Object(o["inherit"])(MO.CreateRowAction,MO.Action),MO.CreateRowAction.prototype.undo=function(e,t){const n=e.countRows(),r=e.getSettings().minSpareRows;this.index>=n&&this.index-r<n&&(this.index-=r),e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.amount,"UndoRedo.undo")},MO.CreateRowAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")},MO.RemoveRowAction=function(e,t,n,r,i,s){this.index=e,this.data=t,this.actionType="remove_row",this.fixedRowsBottom=n,this.fixedRowsTop=r,this.rowIndexesSequence=i,this.removedCellMetas=s},Object(o["inherit"])(MO.RemoveRowAction,MO.Action),MO.RemoveRowAction.prototype.undo=function(e,t){const n=e.getSettings(),r=[];n.fixedRowsBottom=this.fixedRowsBottom,n.fixedRowsTop=this.fixedRowsTop,this.data.forEach((e,t)=>{Object.keys(e).forEach(n=>{const i=parseInt(n,10);r.push([this.index+t,isNaN(i)?n:i,e[n]])})}),e.alter("insert_row_above",this.index,this.data.length,"UndoRedo.undo"),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(r,null,null,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence)},MO.RemoveRowAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",this.index,this.data.length,"UndoRedo.redo")},MO.CreateColumnAction=function(e,t){this.index=e,this.amount=t,this.actionType="insert_col"},Object(o["inherit"])(MO.CreateColumnAction,MO.Action),MO.CreateColumnAction.prototype.undo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")},MO.CreateColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")},MO.RemoveColumnAction=function(e,t,n,r,i,s,o,a){this.index=e,this.indexes=t,this.data=n,this.amount=this.data[0].length,this.headers=r,this.columnPositions=i.slice(0),this.rowPositions=s.slice(0),this.actionType="remove_col",this.fixedColumnsStart=o,this.removedCellMetas=a},Object(o["inherit"])(MO.RemoveColumnAction,MO.Action),MO.RemoveColumnAction.prototype.undo=function(e,t){const n=e.getSettings();n.fixedColumnsStart=this.fixedColumnsStart;const r=this.indexes.slice(0).sort(),i=(e,t,n)=>n[this.indexes.indexOf(r[t])],s=this.data.length,o=[];for(let u=0;u<s;u++)o.push(Object(h["arrayMap"])(this.data[u],i));const a=Object(h["arrayMap"])(this.headers,i),l=[];e.alter("insert_col_start",this.indexes[0],this.indexes.length,"UndoRedo.undo"),Object(h["arrayEach"])(e.getSourceDataArray(),(e,t)=>{Object(h["arrayEach"])(r,(n,r)=>{e[n]=o[t][r],l.push([t,n,e[n]])})}),e.setSourceDataAtCell(l,void 0,void 0,"UndoRedo.undo"),"undefined"!==typeof this.headers&&Object(h["arrayEach"])(a,(t,n)=>{e.getSettings().colHeaders[r[n]]=t}),this.removedCellMetas.forEach(t=>{let[n,r,i]=t;e.setCellMetaObject(n,r,i)}),e.batchExecution(()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)},!0),e.addHookOnce("afterViewRender",t),e.render()},MO.RemoveColumnAction.prototype.redo=function(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")},MO.CellAlignmentAction=function(e,t,n,r){this.stateBefore=e,this.range=t,this.type=n,this.alignment=r},MO.CellAlignmentAction.prototype.undo=function(e,t){Object(h["arrayEach"])(this.range,t=>{t.forAll((t,n)=>{t>=0&&n>=0&&e.setCellMeta(t,n,"className",this.stateBefore[t][n]||" htLeft")})}),e.addHookOnce("afterViewRender",t),e.render()},MO.CellAlignmentAction.prototype.redo=function(e,t){Yo(this.range,this.type,this.alignment,(t,n)=>e.getCellMeta(t,n),(t,n,r,i)=>e.setCellMeta(t,n,r,i)),e.addHookOnce("afterViewRender",t),e.render()},MO.FiltersAction=function(e,t){this.previousConditionsStack=t,this.conditionsStack=e,this.actionType="filter"},Object(o["inherit"])(MO.FiltersAction,MO.Action),MO.FiltersAction.prototype.undo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),this.previousConditionsStack&&n.conditionCollection.importAllConditions(this.previousConditionsStack),n.filter()},MO.FiltersAction.prototype.redo=function(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.conditionCollection.importAllConditions(this.conditionsStack),n.filter()};class TO extends MO.Action{constructor(e,t){super(),this.cellRange=t;const n=this.cellRange.getTopStartCorner(),r=this.cellRange.getBottomEndCorner();this.rangeData=e.getData(n.row,n.col,r.row,r.col)}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0);const r=this.cellRange.getTopStartCorner();e.populateFromArray(r.row,r.col,this.rangeData,void 0,void 0,"MergeCells")}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange)}}MO.MergeCellsAction=TO;class RO extends MO.Action{constructor(e,t){super(),this.cellRange=t}undo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange,!0)}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.unmergeRange(this.cellRange,!0),e.render()}}function OO(e,t){const n=this;if("loadData"===t)return n.undoRedo.clear()}function NO(e){e.undo=function(){return e.undoRedo.undo()},e.redo=function(){return e.undoRedo.redo()},e.isUndoAvailable=function(){return e.undoRedo.isUndoAvailable()},e.isRedoAvailable=function(){return e.undoRedo.isRedoAvailable()},e.clearUndo=function(){return e.undoRedo.clear()}}function AO(e){delete e.undo,delete e.redo,delete e.isUndoAvailable,delete e.isRedoAvailable,delete e.clearUndo}MO.UnmergeCellsAction=RO,MO.RowMoveAction=function(e,t){this.rows=e.slice(),this.finalRowIndex=t,this.actionType="row_move"},Object(o["inherit"])(MO.RowMoveAction,MO.Action),MO.RowMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t);const r=sy(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveRow(r,t)}),e.render(),e.deselectCell(),e.selectRows(this.rows[0],this.rows[0]+this.rows.length-1)},MO.RowMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),n.moveRows(this.rows.slice(),this.finalRowIndex),e.render(),e.deselectCell(),e.selectRows(this.finalRowIndex,this.finalRowIndex+this.rows.length-1)},MO.ColumnMoveAction=function(e,t){this.columns=e.slice(),this.finalColumnIndex=t,this.actionType="col_move"},Object(o["inherit"])(MO.ColumnMoveAction,MO.Action),MO.ColumnMoveAction.prototype.undo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t);const r=sy(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes());r.reverse().forEach(e=>{let{from:t,to:r}=e;t<r&&(r-=1),n.moveColumn(r,t)}),e.render(),e.deselectCell(),e.selectColumns(this.columns[0],this.columns[0]+this.columns.length-1)},MO.ColumnMoveAction.prototype.redo=function(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),n.moveColumns(this.columns.slice(),this.finalColumnIndex),e.render(),e.deselectCell(),e.selectColumns(this.finalColumnIndex,this.finalColumnIndex+this.columns.length-1)},MO.ColumnSortAction=function(e,t){this.previousSortState=e,this.nextSortState=t},Object(o["inherit"])(MO.ColumnSortAction,MO.Action),MO.ColumnSortAction.prototype.undo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;this.previousSortState.length?i.sort(this.previousSortState):i.clearSort(),t()},MO.ColumnSortAction.prototype.redo=function(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),i=r.isEnabled()?r:n;i.sort(this.nextSortState),t()},MO.prototype.init=function(){const e=this.instance.getSettings().undo,t="undefined"===typeof e||e;this.instance.undoRedo||(this.instance.undoRedo=this),t?this.instance.undoRedo.enable():this.instance.undoRedo.disable()},MO.prototype.registerShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid"),n=e=>!e.altKey,r={runOnlyIf:n,group:EO};t.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],r)},MO.prototype.unregisterShortcuts=function(){const e=this.instance.getShortcutManager(),t=e.getContext("grid");t.removeShortcutsByGroup(EO)};const LO=pe["a"].getSingleton();LO.add("afterUpdateSettings",(function(){var e;null===(e=this.getPlugin("undoRedo"))||void 0===e||e.init()})),LO.register("beforeUndo"),LO.register("afterUndo"),LO.register("beforeRedo"),LO.register("afterRedo"),MO.PLUGIN_KEY=CO,MO.SETTING_KEYS=!0;var IO=MO,kO=n("24b5");function xO(){Object(kO["d"])(Rn),Object(kO["d"])(qn),Object(kO["d"])(gr),Object(kO["d"])(Gr),Object(kO["d"])(di),Object(kO["d"])(Ts),Object(kO["d"])(Ks),Object(kO["d"])(wa),Object(kO["d"])(wu),Object(kO["d"])(yc),Object(kO["d"])(nh),Object(kO["d"])(fh),Object(kO["d"])(Lh),Object(kO["d"])(ad),Object(kO["d"])(vg),Object(kO["d"])(Jy),Object(kO["d"])(Hw),Object(kO["d"])(nb),Object(kO["d"])(_b),Object(kO["d"])(uv),Object(kO["d"])(Vv),Object(kO["d"])(I_),Object(kO["d"])(dS),Object(kO["d"])(YE),Object(kO["d"])(TC),Object(kO["d"])(IC),Object(kO["d"])(nT),Object(kO["d"])(hR),Object(kO["d"])(jR),Object(kO["d"])(JR),Object(kO["d"])(lO),Object(kO["d"])(_O),Object(kO["d"])(IO)}function DO(){Ne(),pt(),Lt(),en(),xO()}},"8d47":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}var n=e.defineLocale("el",{monthsNominativeEl:"Ιανουάριος_Φεβρουάριος_Μάρτιος_Απρίλιος_Μάιος_Ιούνιος_Ιούλιος_Αύγουστος_Σεπτέμβριος_Οκτώβριος_Νοέμβριος_Δεκέμβριος".split("_"),monthsGenitiveEl:"Ιανουαρίου_Φεβρουαρίου_Μαρτίου_Απριλίου_Μαΐου_Ιουνίου_Ιουλίου_Αυγούστου_Σεπτεμβρίου_Οκτωβρίου_Νοεμβρίου_Δεκεμβρίου".split("_"),months:function(e,t){return e?"string"===typeof t&&/D/.test(t.substring(0,t.indexOf("MMMM")))?this._monthsGenitiveEl[e.month()]:this._monthsNominativeEl[e.month()]:this._monthsNominativeEl},monthsShort:"Ιαν_Φεβ_Μαρ_Απρ_Μαϊ_Ιουν_Ιουλ_Αυγ_Σεπ_Οκτ_Νοε_Δεκ".split("_"),weekdays:"Κυριακή_Δευτέρα_Τρίτη_Τετάρτη_Πέμπτη_Παρασκευή_Σάββατο".split("_"),weekdaysShort:"Κυρ_Δευ_Τρι_Τετ_Πεμ_Παρ_Σαβ".split("_"),weekdaysMin:"Κυ_Δε_Τρ_Τε_Πε_Πα_Σα".split("_"),meridiem:function(e,t,n){return e>11?n?"μμ":"ΜΜ":n?"πμ":"ΠΜ"},isPM:function(e){return"μ"===(e+"").toLowerCase()[0]},meridiemParse:/[ΠΜ]\.?Μ?\.?/i,longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendarEl:{sameDay:"[Σήμερα {}] LT",nextDay:"[Αύριο {}] LT",nextWeek:"dddd [{}] LT",lastDay:"[Χθες {}] LT",lastWeek:function(){switch(this.day()){case 6:return"[το προηγούμενο] dddd [{}] LT";default:return"[την προηγούμενη] dddd [{}] LT"}},sameElse:"L"},calendar:function(e,n){var r=this._calendarEl[e],i=n&&n.hours();return t(r)&&(r=r.apply(n)),r.replace("{}",i%12===1?"στη":"στις")},relativeTime:{future:"σε %s",past:"%s πριν",s:"λίγα δευτερόλεπτα",ss:"%d δευτερόλεπτα",m:"ένα λεπτό",mm:"%d λεπτά",h:"μία ώρα",hh:"%d ώρες",d:"μία μέρα",dd:"%d μέρες",M:"ένας μήνας",MM:"%d μήνες",y:"ένας χρόνος",yy:"%d χρόνια"},dayOfMonthOrdinalParse:/\d{1,2}η/,ordinal:"%dη",week:{dow:1,doy:4}});return n}))},"8d57":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień".split("_"),n="stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia".split("_"),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function i(e){return e%10<5&&e%10>1&&~~(e/10)%10!==1}function s(e,t,n){var r=e+" ";switch(n){case"ss":return r+(i(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(i(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(i(e)?"godziny":"godzin");case"ww":return r+(i(e)?"tygodnie":"tygodni");case"MM":return r+(i(e)?"miesiące":"miesięcy");case"yy":return r+(i(e)?"lata":"lat")}}var o=e.defineLocale("pl",{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota".split("_"),weekdaysShort:"ndz_pon_wt_śr_czw_pt_sob".split("_"),weekdaysMin:"Nd_Pn_Wt_Śr_Cz_Pt_So".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Dziś o] LT",nextDay:"[Jutro o] LT",nextWeek:function(){switch(this.day()){case 0:return"[W niedzielę o] LT";case 2:return"[We wtorek o] LT";case 3:return"[W środę o] LT";case 6:return"[W sobotę o] LT";default:return"[W] dddd [o] LT"}},lastDay:"[Wczoraj o] LT",lastWeek:function(){switch(this.day()){case 0:return"[W zeszłą niedzielę o] LT";case 3:return"[W zeszłą środę o] LT";case 6:return"[W zeszłą sobotę o] LT";default:return"[W zeszły] dddd [o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"%s temu",s:"kilka sekund",ss:s,m:s,mm:s,h:s,hh:s,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:s,M:"miesiąc",MM:s,y:"rok",yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},"8df48":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"},r=e.defineLocale("fa",{months:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),monthsShort:"ژانویه_فوریه_مارس_آوریل_مه_ژوئن_ژوئیه_اوت_سپتامبر_اکتبر_نوامبر_دسامبر".split("_"),weekdays:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysShort:"یکشنبه_دوشنبه_سهشنبه_چهارشنبه_پنجشنبه_جمعه_شنبه".split("_"),weekdaysMin:"ی_د_س_چ_پ_ج_ش".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/قبل از ظهر|بعد از ظهر/,isPM:function(e){return/بعد از ظهر/.test(e)},meridiem:function(e,t,n){return e<12?"قبل از ظهر":"بعد از ظهر"},calendar:{sameDay:"[امروز ساعت] LT",nextDay:"[فردا ساعت] LT",nextWeek:"dddd [ساعت] LT",lastDay:"[دیروز ساعت] LT",lastWeek:"dddd [پیش] [ساعت] LT",sameElse:"L"},relativeTime:{future:"در %s",past:"%s پیش",s:"چند ثانیه",ss:"%d ثانیه",m:"یک دقیقه",mm:"%d دقیقه",h:"یک ساعت",hh:"%d ساعت",d:"یک روز",dd:"%d روز",M:"یک ماه",MM:"%d ماه",y:"یک سال",yy:"%d سال"},preparse:function(e){return e.replace(/[۰-۹]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},dayOfMonthOrdinalParse:/\d{1,2}م/,ordinal:"%dم",week:{dow:6,doy:12}});return r}))},"8e39":function(e,t,n){"use strict";var r=n("ac4f"),i=n("d3e6"),s=n("cac7");r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return i(e,(function(e,n){s(t,e,n)}),{AS_ENTRIES:!0}),t}})},"8e73":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"},r=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},i={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},s=function(e){return function(t,n,s,o){var a=r(t),l=i[e][r(t)];return 2===a&&(l=l[n?0:1]),l.replace(/%d/i,t)}},o=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],a=e.defineLocale("ar",{months:o,monthsShort:o,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:s("s"),ss:s("s"),m:s("m"),mm:s("m"),h:s("h"),hh:s("h"),d:s("d"),dd:s("d"),M:s("M"),MM:s("M"),y:s("y"),yy:s("y")},preparse:function(e){return e.replace(/[١٢٣٤٥٦٧٨٩٠]/g,(function(e){return n[e]})).replace(/،/g,",")},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]})).replace(/,/g,"،")},week:{dow:6,doy:12}});return a}))},9043:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|সকাল|দুপুর|বিকাল|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t&&e>=4||"দুপুর"===t&&e<5||"বিকাল"===t?e+12:e},meridiem:function(e,t,n){return e<4?"রাত":e<10?"সকাল":e<17?"দুপুর":e<20?"বিকাল":"রাত"},week:{dow:0,doy:6}});return r}))},9046:function(e,t,n){"use strict";var r=n("939b"),i=n("fd18");e.exports=function(e){if("Function"===r(e))return i(e)}},9056:function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));n("7a89");var r=n("1096"),i=n("e90f"),s=n("3d57"),o=n("a73f"),a=n("97b9");function l(e,t,n){return(t=u(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e){var t=c(e,"string");return"symbol"==typeof t?t:t+""}function c(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class h extends r["a"]{constructor(){super(...arguments),l(this,"orderOfIndexes",[])}getValues(){return this.orderOfIndexes.map(e=>this.indexedValues[e])}setValues(e){this.orderOfIndexes=[...Array(e.length).keys()],super.setValues(e)}setValueAtIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.orderOfIndexes.length;return e<this.indexedValues.length&&(this.indexedValues[e]=t,!1===this.orderOfIndexes.includes(e)&&this.orderOfIndexes.splice(n,0,e),this.runLocalHooks("change"),!0)}clearValue(e){this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,[e]),Object(a["isFunction"])(this.initValueOrFn)?super.setValueAtIndex(e,this.initValueOrFn(e)):super.setValueAtIndex(e,this.initValueOrFn)}getLength(){return this.orderOfIndexes.length}setDefaultValues(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.indexedValues.length;this.orderOfIndexes.length=0,super.setDefaultValues(e)}insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=Object(o["b"])(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),this.orderOfIndexes=Object(s["b"])(this.orderOfIndexes,e),this.orderOfIndexes=Object(o["a"])(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map(e=>[e,this.getValueAtIndex(e)])}}},"90ea":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("zh-tw",{months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"週日_週一_週二_週三_週四_週五_週六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日dddd HH:mm",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},meridiemParse:/凌晨|早上|上午|中午|下午|晚上/,meridiemHour:function(e,t){return 12===e&&(e=0),"凌晨"===t||"早上"===t||"上午"===t?e:"中午"===t?e>=11?e:e+12:"下午"===t||"晚上"===t?e+12:void 0},meridiem:function(e,t,n){var r=100*e+t;return r<600?"凌晨":r<900?"早上":r<1130?"上午":r<1230?"中午":r<1800?"下午":"晚上"},calendar:{sameDay:"[今天] LT",nextDay:"[明天] LT",nextWeek:"[下]dddd LT",lastDay:"[昨天] LT",lastWeek:"[上]dddd LT",sameElse:"L"},dayOfMonthOrdinalParse:/\d{1,2}(日|月|週)/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+"日";case"M":return e+"月";case"w":case"W":return e+"週";default:return e}},relativeTime:{future:"%s後",past:"%s前",s:"幾秒",ss:"%d 秒",m:"1 分鐘",mm:"%d 分鐘",h:"1 小時",hh:"%d 小時",d:"1 天",dd:"%d 天",M:"1 個月",MM:"%d 個月",y:"1 年",yy:"%d 年"}});return t}))},"911c":function(e,t,n){"use strict";var r=n("6269");e.exports="NODE"===r},"930d":function(e,t,n){"use strict";var r=n("5438"),i=n("ff56"),s=n("6f539"),o=n("0f98");e.exports=function(e){var t=r(this),n=o(e);return!(i(t)>n.size)&&!1!==s(t,(function(e){if(!n.includes(e))return!1}),!0)}},9394:function(e,t,n){"use strict";var r=n("81b7"),i=n("bf78");e.exports=function(e){return r(i(e))}},"939b":function(e,t,n){"use strict";var r=n("fd18"),i=r({}.toString),s=r("".slice);e.exports=function(e){return s(i(e),8,-1)}},"956b":function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("2349"),a=n("bf80"),l=n("ae20"),u=1!==[].unshift(0),c=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}},h=u||!c();r({target:"Array",proto:!0,arity:1,forced:h},{unshift:function(e){var t=i(this),n=s(t),r=arguments.length;if(r){l(n+r);var u=n;while(u--){var c=u+r;u in t?t[c]=t[u]:a(t,c)}for(var h=0;h<r;h++)t[h]=arguments[h]}return o(t,n+r)}})},"957c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:n?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"};return"m"===r?n?"минута":"минуту":e+" "+t(i[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i],i=e.defineLocale("ru",{months:{format:"января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"),standalone:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_")},monthsShort:{format:"янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"),standalone:"янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_")},weekdays:{standalone:"воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),format:"воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу".split("_"),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:"вс_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"вс_пн_вт_ср_чт_пт_сб".split("_"),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY г.",LLL:"D MMMM YYYY г., H:mm",LLLL:"dddd, D MMMM YYYY г., H:mm"},calendar:{sameDay:"[Сегодня, в] LT",nextDay:"[Завтра, в] LT",lastDay:"[Вчера, в] LT",nextWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В следующее] dddd, [в] LT";case 1:case 2:case 4:return"[В следующий] dddd, [в] LT";case 3:case 5:case 6:return"[В следующую] dddd, [в] LT"}},lastWeek:function(e){if(e.week()===this.week())return 2===this.day()?"[Во] dddd, [в] LT":"[В] dddd, [в] LT";switch(this.day()){case 0:return"[В прошлое] dddd, [в] LT";case 1:case 2:case 4:return"[В прошлый] dddd, [в] LT";case 3:case 5:case 6:return"[В прошлую] dddd, [в] LT"}},sameElse:"L"},relativeTime:{future:"через %s",past:"%s назад",s:"несколько секунд",ss:n,m:n,mm:n,h:"час",hh:n,d:"день",dd:n,w:"неделя",ww:n,M:"месяц",MM:n,y:"год",yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночи":e<12?"утра":e<17?"дня":"вечера"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":return e+"-й";case"D":return e+"-го";case"w":case"W":return e+"-я";default:return e}},week:{dow:1,doy:4}});return i}))},9582:function(e,t,n){"use strict";var r=n("e156"),i=n("2471"),s=n("022b"),o=n("c272"),a=n("80dd"),l=a("iterator");e.exports=function(e){if(!s(e))return i(e,l)||i(e,"@@iterator")||o[r(e)]}},"958b":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){switch(n){case"s":return t?"хэдхэн секунд":"хэдхэн секундын";case"ss":return e+(t?" секунд":" секундын");case"m":case"mm":return e+(t?" минут":" минутын");case"h":case"hh":return e+(t?" цаг":" цагийн");case"d":case"dd":return e+(t?" өдөр":" өдрийн");case"M":case"MM":return e+(t?" сар":" сарын");case"y":case"yy":return e+(t?" жил":" жилийн");default:return e}}var n=e.defineLocale("mn",{months:"Нэгдүгээр сар_Хоёрдугаар сар_Гуравдугаар сар_Дөрөвдүгээр сар_Тавдугаар сар_Зургадугаар сар_Долдугаар сар_Наймдугаар сар_Есдүгээр сар_Аравдугаар сар_Арван нэгдүгээр сар_Арван хоёрдугаар сар".split("_"),monthsShort:"1 сар_2 сар_3 сар_4 сар_5 сар_6 сар_7 сар_8 сар_9 сар_10 сар_11 сар_12 сар".split("_"),monthsParseExact:!0,weekdays:"Ням_Даваа_Мягмар_Лхагва_Пүрэв_Баасан_Бямба".split("_"),weekdaysShort:"Ням_Дав_Мяг_Лха_Пүр_Баа_Бям".split("_"),weekdaysMin:"Ня_Да_Мя_Лх_Пү_Ба_Бя".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"YYYY оны MMMMын D",LLL:"YYYY оны MMMMын D HH:mm",LLLL:"dddd, YYYY оны MMMMын D HH:mm"},meridiemParse:/ҮӨ|ҮХ/i,isPM:function(e){return"ҮХ"===e},meridiem:function(e,t,n){return e<12?"ҮӨ":"ҮХ"},calendar:{sameDay:"[Өнөөдөр] LT",nextDay:"[Маргааш] LT",nextWeek:"[Ирэх] dddd LT",lastDay:"[Өчигдөр] LT",lastWeek:"[Өнгөрсөн] dddd LT",sameElse:"L"},relativeTime:{future:"%s дараа",past:"%s өмнө",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2} өдөр/,ordinal:function(e,t){switch(t){case"d":case"D":case"DDD":return e+" өдөр";default:return e}}});return n}))},9609:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"},n=e.defineLocale("ky",{months:"январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"),monthsShort:"янв_фев_март_апр_май_июнь_июль_авг_сен_окт_ноя_дек".split("_"),weekdays:"Жекшемби_Дүйшөмбү_Шейшемби_Шаршемби_Бейшемби_Жума_Ишемби".split("_"),weekdaysShort:"Жек_Дүй_Шей_Шар_Бей_Жум_Ише".split("_"),weekdaysMin:"Жк_Дй_Шй_Шр_Бй_Жм_Иш".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Бүгүн саат] LT",nextDay:"[Эртең саат] LT",nextWeek:"dddd [саат] LT",lastDay:"[Кечээ саат] LT",lastWeek:"[Өткөн аптанын] dddd [күнү] [саат] LT",sameElse:"L"},relativeTime:{future:"%s ичинде",past:"%s мурун",s:"бирнече секунд",ss:"%d секунд",m:"бир мүнөт",mm:"%d мүнөт",h:"бир саат",hh:"%d саат",d:"бир күн",dd:"%d күн",M:"бир ай",MM:"%d ай",y:"бир жыл",yy:"%d жыл"},dayOfMonthOrdinalParse:/\d{1,2}-(чи|чы|чү|чу)/,ordinal:function(e){var n=e%10,r=e>=100?100:null;return e+(t[e]||t[n]||t[r])},week:{dow:1,doy:7}});return n}))},9674:function(e,t,n){"use strict";var r=n("fd18");e.exports=r([].slice)},9686:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"},r=e.defineLocale("bn-bd",{months:"জানুয়ারি_ফেব্রুয়ারি_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্টেম্বর_অক্টোবর_নভেম্বর_ডিসেম্বর".split("_"),monthsShort:"জানু_ফেব্রু_মার্চ_এপ্রিল_মে_জুন_জুলাই_আগস্ট_সেপ্ট_অক্টো_নভে_ডিসে".split("_"),weekdays:"রবিবার_সোমবার_মঙ্গলবার_বুধবার_বৃহস্পতিবার_শুক্রবার_শনিবার".split("_"),weekdaysShort:"রবি_সোম_মঙ্গল_বুধ_বৃহস্পতি_শুক্র_শনি".split("_"),weekdaysMin:"রবি_সোম_মঙ্গল_বুধ_বৃহ_শুক্র_শনি".split("_"),longDateFormat:{LT:"A h:mm সময়",LTS:"A h:mm:ss সময়",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm সময়",LLLL:"dddd, D MMMM YYYY, A h:mm সময়"},calendar:{sameDay:"[আজ] LT",nextDay:"[আগামীকাল] LT",nextWeek:"dddd, LT",lastDay:"[গতকাল] LT",lastWeek:"[গত] dddd, LT",sameElse:"L"},relativeTime:{future:"%s পরে",past:"%s আগে",s:"কয়েক সেকেন্ড",ss:"%d সেকেন্ড",m:"এক মিনিট",mm:"%d মিনিট",h:"এক ঘন্টা",hh:"%d ঘন্টা",d:"এক দিন",dd:"%d দিন",M:"এক মাস",MM:"%d মাস",y:"এক বছর",yy:"%d বছর"},preparse:function(e){return e.replace(/[১২৩৪৫৬৭৮৯০]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/রাত|ভোর|সকাল|দুপুর|বিকাল|সন্ধ্যা|রাত/,meridiemHour:function(e,t){return 12===e&&(e=0),"রাত"===t?e<4?e:e+12:"ভোর"===t||"সকাল"===t?e:"দুপুর"===t?e>=3?e:e+12:"বিকাল"===t||"সন্ধ্যা"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"রাত":e<6?"ভোর":e<12?"সকাল":e<15?"দুপুর":e<18?"বিকাল":e<20?"সন্ধ্যা":"রাত"},week:{dow:0,doy:6}});return r}))},9718:function(e,t,n){"use strict";var r=n("8793"),i=n("2d2d");e.exports=function(e,t){r(t)&&"cause"in t&&i(e,"cause",t.cause)}},"972c":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n){var r={ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"},i=" ";return(e%100>=20||e>=100&&e%100===0)&&(i=" de "),e+i+r[n]}var n=e.defineLocale("ro",{months:"ianuarie_februarie_martie_aprilie_mai_iunie_iulie_august_septembrie_octombrie_noiembrie_decembrie".split("_"),monthsShort:"ian._feb._mart._apr._mai_iun._iul._aug._sept._oct._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"duminică_luni_marți_miercuri_joi_vineri_sâmbătă".split("_"),weekdaysShort:"Dum_Lun_Mar_Mie_Joi_Vin_Sâm".split("_"),weekdaysMin:"Du_Lu_Ma_Mi_Jo_Vi_Sâ".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY H:mm",LLLL:"dddd, D MMMM YYYY H:mm"},calendar:{sameDay:"[azi la] LT",nextDay:"[mâine la] LT",nextWeek:"dddd [la] LT",lastDay:"[ieri la] LT",lastWeek:"[fosta] dddd [la] LT",sameElse:"L"},relativeTime:{future:"peste %s",past:"%s în urmă",s:"câteva secunde",ss:t,m:"un minut",mm:t,h:"o oră",hh:t,d:"o zi",dd:t,w:"o săptămână",ww:t,M:"o lună",MM:t,y:"un an",yy:t},week:{dow:1,doy:7}});return n}))},9797:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("cy",{months:"Ionawr_Chwefror_Mawrth_Ebrill_Mai_Mehefin_Gorffennaf_Awst_Medi_Hydref_Tachwedd_Rhagfyr".split("_"),monthsShort:"Ion_Chwe_Maw_Ebr_Mai_Meh_Gor_Aws_Med_Hyd_Tach_Rhag".split("_"),weekdays:"Dydd Sul_Dydd Llun_Dydd Mawrth_Dydd Mercher_Dydd Iau_Dydd Gwener_Dydd Sadwrn".split("_"),weekdaysShort:"Sul_Llun_Maw_Mer_Iau_Gwe_Sad".split("_"),weekdaysMin:"Su_Ll_Ma_Me_Ia_Gw_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Heddiw am] LT",nextDay:"[Yfory am] LT",nextWeek:"dddd [am] LT",lastDay:"[Ddoe am] LT",lastWeek:"dddd [diwethaf am] LT",sameElse:"L"},relativeTime:{future:"mewn %s",past:"%s yn ôl",s:"ychydig eiliadau",ss:"%d eiliad",m:"munud",mm:"%d munud",h:"awr",hh:"%d awr",d:"diwrnod",dd:"%d diwrnod",M:"mis",MM:"%d mis",y:"blwyddyn",yy:"%d flynedd"},dayOfMonthOrdinalParse:/\d{1,2}(fed|ain|af|il|ydd|ed|eg)/,ordinal:function(e){var t=e,n="",r=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"];return t>20?n=40===t||50===t||60===t||80===t||100===t?"fed":"ain":t>0&&(n=r[t]),e+n},week:{dow:1,doy:4}});return t}))},"97b9":function(e,t,n){"use strict";n.r(t),n.d(t,"isFunction",(function(){return s})),n.d(t,"throttle",(function(){return o})),n.d(t,"throttleAfterHits",(function(){return a})),n.d(t,"debounce",(function(){return l})),n.d(t,"pipe",(function(){return u})),n.d(t,"partial",(function(){return c})),n.d(t,"curry",(function(){return h})),n.d(t,"curryRight",(function(){return d})),n.d(t,"fastCall",(function(){return m}));var r=n("81ea"),i=n("7b9c");function s(e){return"function"===typeof e}function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=0;const r={lastCallThrottled:!0};let i=null;function s(){for(var s=arguments.length,o=new Array(s),a=0;a<s;a++)o[a]=arguments[a];const l=Date.now();let u=!1;r.lastCallThrottled=!0,n||(n=l,u=!0);const c=t-(l-n);return u?(r.lastCallThrottled=!1,e.apply(this,o)):(i&&clearTimeout(i),i=setTimeout(()=>{r.lastCallThrottled=!1,e.apply(this,o),n=0,i=void 0},c)),r}return s}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10;const r=o(e,t);let i=n;function s(){i=n}function a(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];return i?(i-=1,e.apply(this,n)):r.apply(this,n)}return a.clearHits=s,a}function l(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;function i(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];return r&&clearTimeout(r),r=setTimeout(()=>{t=e.apply(this,s)},n),t}return i}function u(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[i,...s]=t;return function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Object(r["arrayReduce"])(s,(e,t)=>t(e),i.apply(this,t))}}function c(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return e.apply(this,n.concat(r))}}function h(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s);let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function d(e){const t=e.length;function n(r){return function(){for(var i=arguments.length,s=new Array(i),o=0;o<i;o++)s[o]=arguments[o];const a=r.concat(s.reverse());let l;return l=a.length>=t?e.apply(this,a):n(a),l}}return n([])}function m(e,t,n,r,s,o,a,l){return Object(i["isDefined"])(l)?e.call(t,n,r,s,o,a,l):Object(i["isDefined"])(a)?e.call(t,n,r,s,o,a):Object(i["isDefined"])(o)?e.call(t,n,r,s,o):Object(i["isDefined"])(s)?e.call(t,n,r,s):Object(i["isDefined"])(r)?e.call(t,n,r):Object(i["isDefined"])(n)?e.call(t,n):e.call(t)}},"97dc":function(e,t,n){"use strict";var r=n("088f");e.exports=function(){var e=r(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},"98f6":function(e,t,n){"use strict";var r=n("fd18"),i=n("69ba"),s=SyntaxError,o=parseInt,a=String.fromCharCode,l=r("".charAt),u=r("".slice),c=r(/./.exec),h={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},d=/^[\da-f]{4}$/i,m=/^[\u0000-\u001F]$/;e.exports=function(e,t){var n=!0,r="";while(t<e.length){var f=l(e,t);if("\\"===f){var p=u(e,t,t+2);if(i(h,p))r+=h[p],t+=2;else{if("\\u"!==p)throw new s('Unknown escape sequence: "'+p+'"');t+=2;var g=u(e,t,t+4);if(!c(d,g))throw new s("Bad Unicode escape at: "+t);r+=a(o(g,16)),t+=4}}else{if('"'===f){n=!1,t++;break}if(c(m,f))throw new s("Bad control character in string literal at: "+t);r+=f,t++}}if(n)throw new s("Unterminated string at: "+t);return{value:r,end:t}}},"9aa6":function(e,t,n){"use strict";var r=n("8793"),i=n("a68d").get;e.exports=function(e){if(!r(e))return!1;var t=i(e);return!!t&&"RawJSON"===t.type}},"9acd":function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new Map;function i(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"common";r.has(e)||r.set(e,new Map);const t=r.get(e);function n(e,n){t.set(e,n)}function i(e){return t.get(e)}function s(e){return t.has(e)}function o(){return[...t.keys()]}function a(){return[...t.values()]}return{register:n,getItem:i,hasItem:s,getNames:o,getValues:a}}},"9c76":function(e,t,n){"use strict";var r=n("7b7f");e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"9e75":function(e,t,n){"use strict";var r=n("b2ae");e.exports=function(e){var t=+e;return t!==t||0===t?0:r(t)}},"9f10":function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n("1096"),i=n("e90f");class s extends r["a"]{insert(e,t){this.indexedValues=Object(i["a"])(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=Object(i["b"])(this.indexedValues,e),super.remove(e)}}},"9f26":function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,r=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,i=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i],s=e.defineLocale("fr",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:i,longMonthsParse:i,shortMonthsParse:i,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",w:"une semaine",ww:"%d semaines",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case"D":return e+(1===e?"er":"");default:case"M":case"Q":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}},week:{dow:1,doy:4}});return s}))},a309:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"g",(function(){return i})),n.d(t,"b",(function(){return s})),n.d(t,"f",(function(){return o})),n.d(t,"e",(function(){return a})),n.d(t,"h",(function(){return l})),n.d(t,"c",(function(){return u})),n.d(t,"d",(function(){return c}));const r="active-header",i="header",s="area",o="focus",a="fill",l="row",u="column",c="custom-selection"},a356:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5},n={s:["أقل من ثانية","ثانية واحدة",["ثانيتان","ثانيتين"],"%d ثوان","%d ثانية","%d ثانية"],m:["أقل من دقيقة","دقيقة واحدة",["دقيقتان","دقيقتين"],"%d دقائق","%d دقيقة","%d دقيقة"],h:["أقل من ساعة","ساعة واحدة",["ساعتان","ساعتين"],"%d ساعات","%d ساعة","%d ساعة"],d:["أقل من يوم","يوم واحد",["يومان","يومين"],"%d أيام","%d يومًا","%d يوم"],M:["أقل من شهر","شهر واحد",["شهران","شهرين"],"%d أشهر","%d شهرا","%d شهر"],y:["أقل من عام","عام واحد",["عامان","عامين"],"%d أعوام","%d عامًا","%d عام"]},r=function(e){return function(r,i,s,o){var a=t(r),l=n[e][t(r)];return 2===a&&(l=l[i?0:1]),l.replace(/%d/i,r)}},i=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"],s=e.defineLocale("ar-dz",{months:i,monthsShort:i,weekdays:"الأحد_الإثنين_الثلاثاء_الأربعاء_الخميس_الجمعة_السبت".split("_"),weekdaysShort:"أحد_إثنين_ثلاثاء_أربعاء_خميس_جمعة_سبت".split("_"),weekdaysMin:"ح_ن_ث_ر_خ_ج_س".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"D/M/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},meridiemParse:/ص|م/,isPM:function(e){return"م"===e},meridiem:function(e,t,n){return e<12?"ص":"م"},calendar:{sameDay:"[اليوم عند الساعة] LT",nextDay:"[غدًا عند الساعة] LT",nextWeek:"dddd [عند الساعة] LT",lastDay:"[أمس عند الساعة] LT",lastWeek:"dddd [عند الساعة] LT",sameElse:"L"},relativeTime:{future:"بعد %s",past:"منذ %s",s:r("s"),ss:r("s"),m:r("m"),mm:r("m"),h:r("h"),hh:r("h"),d:r("d"),dd:r("d"),M:r("M"),MM:r("M"),y:r("y"),yy:r("y")},postformat:function(e){return e.replace(/,/g,"،")},week:{dow:0,doy:4}});return s}))},a357c:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("d06e");var r=n("5d7f"),i=n("8828");const s="base";function o(e,t,n,s,o,a,l){const u=l.ariaTags,c=[],h=[],d=[],m=[];l.className&&Object(r["addClass"])(t,l.className),l.readOnly?(c.push(l.readOnlyCellClassName),u&&m.push(Object(i["z"])())):u&&d.push(Object(i["z"])()[0]),!1===l.valid&&l.invalidCellClassName?(c.push(l.invalidCellClassName),u&&m.push(Object(i["o"])())):(h.push(l.invalidCellClassName),u&&d.push(Object(i["o"])()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&c.push(l.noWordWrapClassName),!a&&l.placeholder&&c.push(l.placeholderCellClassName),Object(r["removeClass"])(t,h),Object(r["addClass"])(t,c),Object(r["removeAttribute"])(t,d),Object(r["setAttribute"])(t,m)}o.RENDERER_TYPE=s},a45f:function(e,t,n){"use strict";var r=n("2408");e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},a60d:function(e,t,n){"use strict";var r=n("d128"),i=n("d435"),s=n("2b75"),o=n("088f"),a=n("24d5"),l=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",m="writable";t.f=r?s?function(e,t,n){if(o(e),t=a(t),o(n),"function"===typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var r=c(e,t);r&&r[m]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:h in n?n[h]:r[h],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(o(e),t=a(t),o(n),i)try{return u(e,t,n)}catch(r){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},a68d:function(e,t,n){"use strict";var r,i,s,o=n("bbc8"),a=n("54adf"),l=n("8793"),u=n("2d2d"),c=n("69ba"),h=n("54d7"),d=n("ab25"),m=n("861e"),f="Object already initialized",p=a.TypeError,g=a.WeakMap,y=function(e){return s(e)?i(e):r(e,{})},w=function(e){return function(t){var n;if(!l(t)||(n=i(t)).type!==e)throw new p("Incompatible receiver, "+e+" required");return n}};if(o||h.state){var b=h.state||(h.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,r=function(e,t){if(b.has(e))throw new p(f);return t.facade=e,b.set(e,t),t},i=function(e){return b.get(e)||{}},s=function(e){return b.has(e)}}else{var v=d("state");m[v]=!0,r=function(e,t){if(c(e,v))throw new p(f);return t.facade=e,u(e,v,t),t},i=function(e){return c(e,v)?e[v]:{}},s=function(e){return c(e,v)}}e.exports={set:r,get:i,has:s,enforce:y,getterFor:w}},a73f:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return s}));var r=n("81ea");function i(e,t){return Object(r["arrayMap"])(e,e=>e-t.filter(t=>t<e).length)}function s(e,t){const n=t[0],i=t.length;return Object(r["arrayMap"])(e,e=>e>=n?e+i:e)}},a776:function(e,t,n){"use strict";n.r(t),n.d(t,"instanceToHTML",(function(){return a})),n.d(t,"_dataToHTML",(function(){return l})),n.d(t,"htmlToGridSettings",(function(){return u}));n("d06e"),n("70f9");var r=n("7b9c");const i={" ":" ","&":"&","<":"<",">":">"},s=new RegExp(Object.keys(i).map(e=>`(${e})`).join("|"),"gi");function o(e){return"TABLE"===(e&&e.nodeName||"")}function a(e){const t=e.hasColHeaders(),n=e.hasRowHeaders(),i=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],s=e.getData(...i),o=s.length,a=o>0?s[0].length:0,l=["<table>","</table>"],u=t?["<thead>","</thead>"]:[],c=["<tbody>","</tbody>"],h=n?1:0,d=t?1:0;for(let m=0;m<o;m+=1){const i=t&&0===m,o=[];for(let t=0;t<a;t+=1){const a=!i&&n&&0===t;let l="";if(i)l=`<th>${e.getColHeader(t-h)}</th>`;else if(a)l=`<th>${e.getRowHeader(m-d)}</th>`;else{const n=s[m][t],{hidden:i,rowspan:o,colspan:a}=e.getCellMeta(m-d,t-h);if(!i){const e=[];if(o&&e.push(`rowspan="${o}"`),a&&e.push(`colspan="${a}"`),Object(r["isEmpty"])(n))l=`<td ${e.join(" ")}></td>`;else{const t=n.toString().replace("<","<").replace(">",">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi," ").replace(/\t/gi,"	");l=`<td ${e.join(" ")}>${t}</td>`}}}o.push(l)}const l=["<tr>",...o,"</tr>"].join("");i?u.splice(1,0,l):c.splice(-1,0,l)}return l.splice(1,0,u.join(""),c.join("")),l.join("")}function l(e){const t=e.length,n=["<table>"];for(let i=0;i<t;i+=1){const s=e[i],o=s.length,a=[];0===i&&n.push("<tbody>");for(let e=0;e<o;e+=1){const t=s[e],n=Object(r["isEmpty"])(t)?"":t.toString().replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,e=>`<span style="mso-spacerun: yes">${" ".repeat(e.length-1)} </span>`).replace(/\t/gi,"	");a.push(`<td>${n}</td>`)}n.push("<tr>",...a,"</tr>"),i+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const n={},r=t.createDocumentFragment(),a=t.createElement("div");r.appendChild(a);let l=e;if("string"===typeof l){const e=l.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,e=>{const t=e.match(/<td\b[^>]*?>/g)[0],n=/<p.*?>/g,r=e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(n,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^ $/gm,""),i="</td>";return`${t}${r}${i}`});a.insertAdjacentHTML("afterbegin",""+e),l=a.querySelector("table")}if(!l||!o(l))return;const u=a.querySelector('meta[name$="enerator"]'),c=null!==l.querySelector("tbody th"),h=l.querySelector("tr"),d=h?Array.from(h.cells).reduce((e,t)=>e+t.colSpan,0)-(c?1:0):0,m=l.tFoot&&Array.from(l.tFoot.rows)||[],f=[];let p=!1,g=0,y=0;if(l.tHead){const e=Array.from(l.tHead.rows).filter(e=>{const t=null!==e.querySelector("td");return t&&f.push(e),!t});g=e.length,p=g>0,g>1?n.nestedHeaders=Array.from(e).reduce((e,t)=>{const n=Array.from(t.cells).reduce((e,t,n)=>{if(c&&0===n)return e;const{colSpan:r,innerHTML:i}=t,s=r>1?{label:i,colspan:r}:i;return e.push(s),e},[]);return e.push(n),e},[]):p&&(n.colHeaders=Array.from(e[0].children).reduce((e,t,n)=>(c&&0===n||e.push(t.innerHTML),e),[]))}f.length&&(n.fixedRowsTop=f.length),m.length&&(n.fixedRowsBottom=m.length);const w=[...f,...Array.from(l.tBodies).reduce((e,t)=>(e.push(...Array.from(t.rows)),e),[]),...m];y=w.length;const b=new Array(y);for(let i=0;i<y;i++)b[i]=new Array(d);const v=[],_=[];for(let o=0;o<y;o++){const e=w[o],t=Array.from(e.cells),n=t.length;for(let r=0;r<n;r++){const e=t[r],{nodeName:n,innerHTML:a,rowSpan:l,colSpan:c}=e,h=b[o].findIndex(e=>void 0===e);if("TD"===n){if(l>1||c>1){for(let e=o;e<o+l;e++)if(e<y)for(let t=h;t<h+c;t++)b[e][t]=null;const t=e.getAttribute("style"),n=t&&t.includes("mso-ignore:colspan");n||v.push({col:h,row:o,rowspan:l,colspan:c})}let t="";t=u&&/excel/gi.test(u.content)?a.replace(/[\r\n][\x20]{0,2}/g," ").replace(/<br(\s*|\/)>[\r\n]?[\x20]{0,3}/gim,"\r\n"):a.replace(/<br(\s*|\/)>[\r\n]?/gim,"\r\n"),b[o][h]=t.replace(s,e=>i[e])}else _.push(a)}}return v.length&&(n.mergeCells=v),_.length&&(n.rowHeaders=_),b.length&&(n.data=b),n}},a7fa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("bm",{months:"Zanwuyekalo_Fewuruyekalo_Marisikalo_Awirilikalo_Mɛkalo_Zuwɛnkalo_Zuluyekalo_Utikalo_Sɛtanburukalo_ɔkutɔburukalo_Nowanburukalo_Desanburukalo".split("_"),monthsShort:"Zan_Few_Mar_Awi_Mɛ_Zuw_Zul_Uti_Sɛt_ɔku_Now_Des".split("_"),weekdays:"Kari_Ntɛnɛn_Tarata_Araba_Alamisa_Juma_Sibiri".split("_"),weekdaysShort:"Kar_Ntɛ_Tar_Ara_Ala_Jum_Sib".split("_"),weekdaysMin:"Ka_Nt_Ta_Ar_Al_Ju_Si".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"MMMM [tile] D [san] YYYY",LLL:"MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm",LLLL:"dddd MMMM [tile] D [san] YYYY [lɛrɛ] HH:mm"},calendar:{sameDay:"[Bi lɛrɛ] LT",nextDay:"[Sini lɛrɛ] LT",nextWeek:"dddd [don lɛrɛ] LT",lastDay:"[Kunu lɛrɛ] LT",lastWeek:"dddd [tɛmɛnen lɛrɛ] LT",sameElse:"L"},relativeTime:{future:"%s kɔnɔ",past:"a bɛ %s bɔ",s:"sanga dama dama",ss:"sekondi %d",m:"miniti kelen",mm:"miniti %d",h:"lɛrɛ kelen",hh:"lɛrɛ %d",d:"tile kelen",dd:"tile %d",M:"kalo kelen",MM:"kalo %d",y:"san kelen",yy:"san %d"},week:{dow:1,doy:4}});return t}))},a952:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"c",(function(){return f})),n.d(t,"d",(function(){return p})),n.d(t,"e",(function(){return g})),n.d(t,"f",(function(){return y}));n("7a89"),n("d06e"),n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7");var r=n("d852"),i=n("81ea"),s=n("7b9c");const o=0,a=1,l=2,u=3,c=[u,l],h=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),m=Symbol("child");function f(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d;if(t!==d&&t!==m)throw new Error("The second argument is used internally only and cannot be overwritten.");const n=Array.isArray(e),i=t===d;let s=o;if(n){const t=e[0];if(0===e.length)s=a;else if(i&&t instanceof r["a"])s=u;else if(i&&Array.isArray(t))s=f(t,m);else if(e.length>=2&&e.length<=4){const t=!e.some((e,t)=>!h[t].includes(typeof e));t&&(s=l)}}return s}function p(e){let{createCellCoords:t,createCellRange:n,keepDirection:r=!1,propToCol:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!c.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(o){const a=e===u;let l=a?o.from.row:o[0],c=a?o.from.col:o[1],h=a?o.to.row:o[2],d=a?o.to.col:o[3];if("function"===typeof i&&("string"===typeof c&&(c=i(c)),"string"===typeof d&&(d=i(d))),Object(s["isUndefined"])(h)&&(h=l),Object(s["isUndefined"])(d)&&(d=c),!r){const e=l,t=c,n=h,r=d;l=Math.min(e,n),c=Math.min(t,r),h=Math.max(e,n),d=Math.max(t,r)}const m=t(l,c),f=t(h,d);return n(m,m,f)}}function g(e){const t=f(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.col,0),a=s.col-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}function y(e){const t=f(e.getSelected());if(t===o||t===a)return[];const n=p(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;Object(i["arrayEach"])(e.getSelected(),e=>{const{from:t,to:s}=n(e),o=Math.max(t.row,0),a=s.row-o+1;Object(i["arrayEach"])(Array.from(new Array(a),(e,t)=>o+t),e=>{r.has(e)||r.add(e)})});const s=Array.from(r).sort((e,t)=>e-t),l=Object(i["arrayReduce"])(s,(e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e),[]);return l}},aa44:function(e,t,n){"use strict";var r=n("fd18"),i=n("fc2d"),s=Math.floor,o=r("".charAt),a=r("".replace),l=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,c=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,h,d){var m=n+e.length,f=r.length,p=c;return void 0!==h&&(h=i(h),p=u),a(d,p,(function(i,a){var u;switch(o(a,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,m);case"<":u=h[l(a,1,-1)];break;default:var c=+a;if(0===c)return i;if(c>f){var d=s(c/10);return 0===d?i:d<=f?void 0===r[d-1]?o(a,1):r[d-1]+o(a,1):i}u=r[c-1]}return void 0===u?"":u}))}},aaf2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["थोडया सॅकंडांनी","थोडे सॅकंड"],ss:[e+" सॅकंडांनी",e+" सॅकंड"],m:["एका मिणटान","एक मिनूट"],mm:[e+" मिणटांनी",e+" मिणटां"],h:["एका वरान","एक वर"],hh:[e+" वरांनी",e+" वरां"],d:["एका दिसान","एक दीस"],dd:[e+" दिसांनी",e+" दीस"],M:["एका म्हयन्यान","एक म्हयनो"],MM:[e+" म्हयन्यानी",e+" म्हयने"],y:["एका वर्सान","एक वर्स"],yy:[e+" वर्सांनी",e+" वर्सां"]};return r?i[n][0]:i[n][1]}var n=e.defineLocale("gom-deva",{months:{standalone:"जानेवारी_फेब्रुवारी_मार्च_एप्रील_मे_जून_जुलय_ऑगस्ट_सप्टेंबर_ऑक्टोबर_नोव्हेंबर_डिसेंबर".split("_"),format:"जानेवारीच्या_फेब्रुवारीच्या_मार्चाच्या_एप्रीलाच्या_मेयाच्या_जूनाच्या_जुलयाच्या_ऑगस्टाच्या_सप्टेंबराच्या_ऑक्टोबराच्या_नोव्हेंबराच्या_डिसेंबराच्या".split("_"),isFormat:/MMMM(\s)+D[oD]?/},monthsShort:"जाने._फेब्रु._मार्च_एप्री._मे_जून_जुल._ऑग._सप्टें._ऑक्टो._नोव्हें._डिसें.".split("_"),monthsParseExact:!0,weekdays:"आयतार_सोमार_मंगळार_बुधवार_बिरेस्तार_सुक्रार_शेनवार".split("_"),weekdaysShort:"आयत._सोम._मंगळ._बुध._ब्रेस्त._सुक्र._शेन.".split("_"),weekdaysMin:"आ_सो_मं_बु_ब्रे_सु_शे".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"A h:mm [वाजतां]",LTS:"A h:mm:ss [वाजतां]",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY A h:mm [वाजतां]",LLLL:"dddd, MMMM Do, YYYY, A h:mm [वाजतां]",llll:"ddd, D MMM YYYY, A h:mm [वाजतां]"},calendar:{sameDay:"[आयज] LT",nextDay:"[फाल्यां] LT",nextWeek:"[फुडलो] dddd[,] LT",lastDay:"[काल] LT",lastWeek:"[फाटलो] dddd[,] LT",sameElse:"L"},relativeTime:{future:"%s",past:"%s आदीं",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:t,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}(वेर)/,ordinal:function(e,t){switch(t){case"D":return e+"वेर";default:case"M":case"Q":case"DDD":case"d":case"w":case"W":return e}},week:{dow:0,doy:3},meridiemParse:/राती|सकाळीं|दनपारां|सांजे/,meridiemHour:function(e,t){return 12===e&&(e=0),"राती"===t?e<4?e:e+12:"सकाळीं"===t?e:"दनपारां"===t?e>12?e:e+12:"सांजे"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"राती":e<12?"सकाळीं":e<16?"दनपारां":e<20?"सांजे":"राती"}});return n}))},ab25:function(e,t,n){"use strict";var r=n("de26"),i=n("592a"),s=r("keys");e.exports=function(e){return s[e]||(s[e]=i(e))}},ac4f:function(e,t,n){"use strict";var r=n("54adf"),i=n("485c").f,s=n("2d2d"),o=n("0e87"),a=n("3df8"),l=n("1d07"),u=n("0c0f");e.exports=function(e,t){var n,c,h,d,m,f,p=e.target,g=e.global,y=e.stat;if(c=g?r:y?r[p]||a(p,{}):r[p]&&r[p].prototype,c)for(h in t){if(m=t[h],e.dontCallGetSet?(f=i(c,h),d=f&&f.value):d=c[h],n=u(g?h:p+(y?".":"#")+h,e.forced),!n&&void 0!==d){if(typeof m==typeof d)continue;l(m,d)}(e.sham||d&&d.sham)&&s(m,"sham",!0),o(c,h,m,e)}}},ada2:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t){var n=e.split("_");return t%10===1&&t%100!==11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var i={ss:n?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:n?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:n?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"};return"m"===r?n?"хвилина":"хвилину":"h"===r?n?"година":"годину":e+" "+t(i[r],+e)}function r(e,t){var n,r={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?r["nominative"].slice(1,7).concat(r["nominative"].slice(0,1)):e?(n=/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative",r[n][e.day()]):r["nominative"]}function i(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}var s=e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:r,weekdaysShort:"нд_пн_вт_ср_чт_пт_сб".split("_"),weekdaysMin:"нд_пн_вт_ср_чт_пт_сб".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY р.",LLL:"D MMMM YYYY р., HH:mm",LLLL:"dddd, D MMMM YYYY р., HH:mm"},calendar:{sameDay:i("[Сьогодні "),nextDay:i("[Завтра "),lastDay:i("[Вчора "),nextWeek:i("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return i("[Минулої] dddd [").call(this);case 1:case 2:case 4:return i("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:n,m:n,mm:n,h:"годину",hh:n,d:"день",dd:n,M:"місяць",MM:n,y:"рік",yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?"ночі":e<12?"ранку":e<17?"дня":"вечора"},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case"M":case"d":case"DDD":case"w":case"W":return e+"-й";case"D":return e+"-го";default:return e}},week:{dow:1,doy:7}});return s}))},ae20:function(e,t,n){"use strict";var r=TypeError,i=9007199254740991;e.exports=function(e){if(e>i)throw r("Maximum allowed index exceeded");return e}},b29d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("lo",{months:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),monthsShort:"ມັງກອນ_ກຸມພາ_ມີນາ_ເມສາ_ພຶດສະພາ_ມິຖຸນາ_ກໍລະກົດ_ສິງຫາ_ກັນຍາ_ຕຸລາ_ພະຈິກ_ທັນວາ".split("_"),weekdays:"ອາທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysShort:"ທິດ_ຈັນ_ອັງຄານ_ພຸດ_ພະຫັດ_ສຸກ_ເສົາ".split("_"),weekdaysMin:"ທ_ຈ_ອຄ_ພ_ພຫ_ສກ_ສ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"ວັນdddd D MMMM YYYY HH:mm"},meridiemParse:/ຕອນເຊົ້າ|ຕອນແລງ/,isPM:function(e){return"ຕອນແລງ"===e},meridiem:function(e,t,n){return e<12?"ຕອນເຊົ້າ":"ຕອນແລງ"},calendar:{sameDay:"[ມື້ນີ້ເວລາ] LT",nextDay:"[ມື້ອື່ນເວລາ] LT",nextWeek:"[ວັນ]dddd[ໜ້າເວລາ] LT",lastDay:"[ມື້ວານນີ້ເວລາ] LT",lastWeek:"[ວັນ]dddd[ແລ້ວນີ້ເວລາ] LT",sameElse:"L"},relativeTime:{future:"ອີກ %s",past:"%sຜ່ານມາ",s:"ບໍ່ເທົ່າໃດວິນາທີ",ss:"%d ວິນາທີ",m:"1 ນາທີ",mm:"%d ນາທີ",h:"1 ຊົ່ວໂມງ",hh:"%d ຊົ່ວໂມງ",d:"1 ມື້",dd:"%d ມື້",M:"1 ເດືອນ",MM:"%d ເດືອນ",y:"1 ປີ",yy:"%d ປີ"},dayOfMonthOrdinalParse:/(ທີ່)\d{1,2}/,ordinal:function(e){return"ທີ່"+e}});return t}))},b2ae:function(e,t,n){"use strict";var r=Math.ceil,i=Math.floor;e.exports=Math.trunc||function(e){var t=+e;return(t>0?i:r)(t)}},b2c9:function(e,t,n){"use strict";var r=n("8793");e.exports=function(e){return r(e)||null===e}},b343:function(e,t,n){"use strict";e.exports=function(e){try{return!!e()}catch(t){return!0}}},b384:function(e,t,n){"use strict";var r=n("fd18"),i=n("b343"),s=n("73fa"),o=n("69ba"),a=n("d128"),l=n("0a73").CONFIGURABLE,u=n("f072"),c=n("a68d"),h=c.enforce,d=c.get,m=String,f=Object.defineProperty,p=r("".slice),g=r("".replace),y=r([].join),w=a&&!i((function(){return 8!==f((function(){}),"length",{value:8}).length})),b=String(String).split("String"),v=e.exports=function(e,t,n){"Symbol("===p(m(t),0,7)&&(t="["+g(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!o(e,"name")||l&&e.name!==t)&&(a?f(e,"name",{value:t,configurable:!0}):e.name=t),w&&n&&o(n,"arity")&&e.length!==n.arity&&f(e,"length",{value:n.arity});try{n&&o(n,"constructor")&&n.constructor?a&&f(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(i){}var r=h(e);return o(r,"source")||(r.source=y(b,"string"==typeof t?t:"")),e};Function.prototype.toString=v((function(){return s(this)&&d(this).source||u(this)}),"toString")},b3eb:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-at",{months:"Jänner_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jän._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b469:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So._Mo._Di._Mi._Do._Fr._Sa.".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},b4f5:function(e,t,n){"use strict";var r=n("c9a1");e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},b52d:function(e,t,n){"use strict";var r=n("87ed"),i=n("6f539"),s=r.Set,o=r.add;e.exports=function(e){var t=new s;return i(e,(function(e){o(t,e)})),t}},b53d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm-latn",{months:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),monthsShort:"innayr_brˤayrˤ_marˤsˤ_ibrir_mayyw_ywnyw_ywlywz_ɣwšt_šwtanbir_ktˤwbrˤ_nwwanbir_dwjnbir".split("_"),weekdays:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysShort:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),weekdaysMin:"asamas_aynas_asinas_akras_akwas_asimwas_asiḍyas".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[asdkh g] LT",nextDay:"[aska g] LT",nextWeek:"dddd [g] LT",lastDay:"[assant g] LT",lastWeek:"dddd [g] LT",sameElse:"L"},relativeTime:{future:"dadkh s yan %s",past:"yan %s",s:"imik",ss:"%d imik",m:"minuḍ",mm:"%d minuḍ",h:"saɛa",hh:"%d tassaɛin",d:"ass",dd:"%d ossan",M:"ayowr",MM:"%d iyyirn",y:"asgas",yy:"%d isgasn"},week:{dow:6,doy:12}});return t}))},b540a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("jv",{months:"Januari_Februari_Maret_April_Mei_Juni_Juli_Agustus_September_Oktober_Nopember_Desember".split("_"),monthsShort:"Jan_Feb_Mar_Apr_Mei_Jun_Jul_Ags_Sep_Okt_Nop_Des".split("_"),weekdays:"Minggu_Senen_Seloso_Rebu_Kemis_Jemuwah_Septu".split("_"),weekdaysShort:"Min_Sen_Sel_Reb_Kem_Jem_Sep".split("_"),weekdaysMin:"Mg_Sn_Sl_Rb_Km_Jm_Sp".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/enjing|siyang|sonten|ndalu/,meridiemHour:function(e,t){return 12===e&&(e=0),"enjing"===t?e:"siyang"===t?e>=11?e:e+12:"sonten"===t||"ndalu"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"enjing":e<15?"siyang":e<19?"sonten":"ndalu"},calendar:{sameDay:"[Dinten puniko pukul] LT",nextDay:"[Mbenjang pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kala wingi pukul] LT",lastWeek:"dddd [kepengker pukul] LT",sameElse:"L"},relativeTime:{future:"wonten ing %s",past:"%s ingkang kepengker",s:"sawetawis detik",ss:"%d detik",m:"setunggal menit",mm:"%d menit",h:"setunggal jam",hh:"%d jam",d:"sedinten",dd:"%d dinten",M:"sewulan",MM:"%d wulan",y:"setaun",yy:"%d taun"},week:{dow:1,doy:7}});return t}))},b5b7:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.".split("_"),n="ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic".split("_"),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],i=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,s=e.defineLocale("es-mx",{months:"enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"domingo_lunes_martes_miércoles_jueves_viernes_sábado".split("_"),weekdaysShort:"dom._lun._mar._mié._jue._vie._sáb.".split("_"),weekdaysMin:"do_lu_ma_mi_ju_vi_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY H:mm",LLLL:"dddd, D [de] MMMM [de] YYYY H:mm"},calendar:{sameDay:function(){return"[hoy a la"+(1!==this.hours()?"s":"")+"] LT"},nextDay:function(){return"[mañana a la"+(1!==this.hours()?"s":"")+"] LT"},nextWeek:function(){return"dddd [a la"+(1!==this.hours()?"s":"")+"] LT"},lastDay:function(){return"[ayer a la"+(1!==this.hours()?"s":"")+"] LT"},lastWeek:function(){return"[el] dddd [pasado a la"+(1!==this.hours()?"s":"")+"] LT"},sameElse:"L"},relativeTime:{future:"en %s",past:"hace %s",s:"unos segundos",ss:"%d segundos",m:"un minuto",mm:"%d minutos",h:"una hora",hh:"%d horas",d:"un día",dd:"%d días",w:"una semana",ww:"%d semanas",M:"un mes",MM:"%d meses",y:"un año",yy:"%d años"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:0,doy:4},invalidDate:"Fecha inválida"});return s}))},b622c:function(e,t,n){"use strict";var r,i,s=n("54adf"),o=n("c9a1"),a=s.process,l=s.Deno,u=a&&a.versions||l&&l.version,c=u&&u.v8;c&&(r=c.split("."),i=r[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&o&&(r=o.match(/Edge\/(\d+)/),(!r||r[1]>=74)&&(r=o.match(/Chrome\/(\d+)/),r&&(i=+r[1]))),e.exports=i},b7e9:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-sg",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},b84c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("nn",{months:"januar_februar_mars_april_mai_juni_juli_august_september_oktober_november_desember".split("_"),monthsShort:"jan._feb._mars_apr._mai_juni_juli_aug._sep._okt._nov._des.".split("_"),monthsParseExact:!0,weekdays:"sundag_måndag_tysdag_onsdag_torsdag_fredag_laurdag".split("_"),weekdaysShort:"su._må._ty._on._to._fr._lau.".split("_"),weekdaysMin:"su_må_ty_on_to_fr_la".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY [kl.] H:mm",LLLL:"dddd D. MMMM YYYY [kl.] HH:mm"},calendar:{sameDay:"[I dag klokka] LT",nextDay:"[I morgon klokka] LT",nextWeek:"dddd [klokka] LT",lastDay:"[I går klokka] LT",lastWeek:"[Føregåande] dddd [klokka] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"%s sidan",s:"nokre sekund",ss:"%d sekund",m:"eit minutt",mm:"%d minutt",h:"ein time",hh:"%d timar",d:"ein dag",dd:"%d dagar",w:"ei veke",ww:"%d veker",M:"ein månad",MM:"%d månader",y:"eit år",yy:"%d år"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},b879:function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("9e75"),a=n("f41c");r({target:"Array",proto:!0},{at:function(e){var t=i(this),n=s(t),r=o(e),a=r>=0?r:n+r;return a<0||a>=n?void 0:t[a]}}),a("at")},b97c:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={ss:"sekundes_sekundēm_sekunde_sekundes".split("_"),m:"minūtes_minūtēm_minūte_minūtes".split("_"),mm:"minūtes_minūtēm_minūte_minūtes".split("_"),h:"stundas_stundām_stunda_stundas".split("_"),hh:"stundas_stundām_stunda_stundas".split("_"),d:"dienas_dienām_diena_dienas".split("_"),dd:"dienas_dienām_diena_dienas".split("_"),M:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),MM:"mēneša_mēnešiem_mēnesis_mēneši".split("_"),y:"gada_gadiem_gads_gadi".split("_"),yy:"gada_gadiem_gads_gadi".split("_")};function n(e,t,n){return n?t%10===1&&t%100!==11?e[2]:e[3]:t%10===1&&t%100!==11?e[0]:e[1]}function r(e,r,i){return e+" "+n(t[i],e,r)}function i(e,r,i){return n(t[i],e,r)}function s(e,t){return t?"dažas sekundes":"dažām sekundēm"}var o=e.defineLocale("lv",{months:"janvāris_februāris_marts_aprīlis_maijs_jūnijs_jūlijs_augusts_septembris_oktobris_novembris_decembris".split("_"),monthsShort:"jan_feb_mar_apr_mai_jūn_jūl_aug_sep_okt_nov_dec".split("_"),weekdays:"svētdiena_pirmdiena_otrdiena_trešdiena_ceturtdiena_piektdiena_sestdiena".split("_"),weekdaysShort:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysMin:"Sv_P_O_T_C_Pk_S".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY.",LL:"YYYY. [gada] D. MMMM",LLL:"YYYY. [gada] D. MMMM, HH:mm",LLLL:"YYYY. [gada] D. MMMM, dddd, HH:mm"},calendar:{sameDay:"[Šodien pulksten] LT",nextDay:"[Rīt pulksten] LT",nextWeek:"dddd [pulksten] LT",lastDay:"[Vakar pulksten] LT",lastWeek:"[Pagājušā] dddd [pulksten] LT",sameElse:"L"},relativeTime:{future:"pēc %s",past:"pirms %s",s:s,ss:r,m:i,mm:r,h:i,hh:r,d:i,dd:r,M:i,MM:r,y:i,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},ba51:function(e,t,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,s=i&&!r.call({1:2},1);t.f=s?function(e){var t=i(this,e);return!!t&&t.enumerable}:r},bb2a:function(e,t,n){"use strict";var r=n("7b69"),i=n("2aac"),s=n("088f"),o=n("71ca"),a=n("9582"),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(i(n))return s(r(n,e));throw new l(o(e)+" is not iterable")}},bb71:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={m:["eine Minute","einer Minute"],h:["eine Stunde","einer Stunde"],d:["ein Tag","einem Tag"],dd:[e+" Tage",e+" Tagen"],w:["eine Woche","einer Woche"],M:["ein Monat","einem Monat"],MM:[e+" Monate",e+" Monaten"],y:["ein Jahr","einem Jahr"],yy:[e+" Jahre",e+" Jahren"]};return t?i[n][0]:i[n][1]}var n=e.defineLocale("de-ch",{months:"Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember".split("_"),monthsShort:"Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.".split("_"),monthsParseExact:!0,weekdays:"Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag".split("_"),weekdaysShort:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysMin:"So_Mo_Di_Mi_Do_Fr_Sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY HH:mm",LLLL:"dddd, D. MMMM YYYY HH:mm"},calendar:{sameDay:"[heute um] LT [Uhr]",sameElse:"L",nextDay:"[morgen um] LT [Uhr]",nextWeek:"dddd [um] LT [Uhr]",lastDay:"[gestern um] LT [Uhr]",lastWeek:"[letzten] dddd [um] LT [Uhr]"},relativeTime:{future:"in %s",past:"vor %s",s:"ein paar Sekunden",ss:"%d Sekunden",m:t,mm:"%d Minuten",h:t,hh:"%d Stunden",d:t,dd:t,w:t,ww:"%d Wochen",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},bbc8:function(e,t,n){"use strict";var r=n("54adf"),i=n("73fa"),s=r.WeakMap;e.exports=i(s)&&/native code/.test(String(s))},bd5e:function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"a",(function(){return s}));var r=n("7b9c");function i(){Object(r["isDefined"])(console)&&console.warn(...arguments)}function s(){Object(r["isDefined"])(console)&&console.error(...arguments)}},bdd7:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n("7a89");var r=n("3d57"),i=n("e90f");const s=new Map([["indexesSequence",{getListWithInsertedItems:r["a"],getListWithRemovedItems:r["b"]}],["physicallyIndexed",{getListWithInsertedItems:i["a"],getListWithRemovedItems:i["b"]}]]),o=e=>{if(!1===s.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return s.get(e)}},bdfe:function(e,t,n){"use strict";var r=n("939b");e.exports=Array.isArray||function(e){return"Array"===r(e)}},bef1:function(e,t,n){"use strict";var r=n("652d"),i=n("e1c6"),s=i.concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,s)}},bf78:function(e,t,n){"use strict";var r=n("022b"),i=TypeError;e.exports=function(e){if(r(e))throw new i("Can't call method on "+e);return e}},bf80:function(e,t,n){"use strict";var r=n("71ca"),i=TypeError;e.exports=function(e,t){if(!delete e[t])throw new i("Cannot delete property "+r(t)+" of "+r(e))}},bfa7:function(e,t,n){"use strict";var r=n("7b69");e.exports=function(e,t,n){var i,s,o=n?e:e.iterator,a=e.next;while(!(i=r(a,o)).done)if(s=t(i.value),void 0!==s)return s}},c041:function(e,t,n){"use strict";var r=n("652d"),i=n("e1c6");e.exports=Object.keys||function(e){return r(e,i)}},c0c4:function(e,t,n){
- /*! @license DOMPurify 2.5.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.5.8/LICENSE */
- (function(t,n){e.exports=n()})(0,(function(){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,n){return t=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},t(e,n)}function n(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function r(e,i,s){return r=n()?Reflect.construct:function(e,n,r){var i=[null];i.push.apply(i,n);var s=Function.bind.apply(e,i),o=new s;return r&&t(o,r.prototype),o},r.apply(null,arguments)}function i(e){return s(e)||o(e)||a(e)||u()}function s(e){if(Array.isArray(e))return l(e)}function o(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function a(e,t){if(e){if("string"===typeof e)return l(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function u(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var c=Object.hasOwnProperty,h=Object.setPrototypeOf,d=Object.isFrozen,m=Object.getPrototypeOf,f=Object.getOwnPropertyDescriptor,p=Object.freeze,g=Object.seal,y=Object.create,w="undefined"!==typeof Reflect&&Reflect,b=w.apply,v=w.construct;b||(b=function(e,t,n){return e.apply(t,n)}),p||(p=function(e){return e}),g||(g=function(e){return e}),v||(v=function(e,t){return r(e,i(t))});var _=I(Array.prototype.forEach),S=I(Array.prototype.pop),E=I(Array.prototype.push),C=I(String.prototype.toLowerCase),M=I(String.prototype.toString),T=I(String.prototype.match),R=I(String.prototype.replace),O=I(String.prototype.indexOf),N=I(String.prototype.trim),A=I(RegExp.prototype.test),L=k(TypeError);function I(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return b(e,t,r)}}function k(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return v(e,n)}}function x(e,t,n){var r;n=null!==(r=n)&&void 0!==r?r:C,h&&h(e,null);var i=t.length;while(i--){var s=t[i];if("string"===typeof s){var o=n(s);o!==s&&(d(t)||(t[i]=o),s=o)}e[s]=!0}return e}function D(e){var t,n=y(null);for(t in e)!0===b(c,e,[t])&&(n[t]=e[t]);return n}function H(e,t){while(null!==e){var n=f(e,t);if(n){if(n.get)return I(n.get);if("function"===typeof n.value)return I(n.value)}e=m(e)}function r(e){return console.warn("fallback value for",e),null}return r}var P=p(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),j=p(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),F=p(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Y=p(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),U=p(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),V=p(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),B=p(["#text"]),W=p(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),z=p(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),G=p(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),K=p(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),X=g(/\{\{[\w\W]*|[\w\W]*\}\}/gm),$=g(/<%[\w\W]*|[\w\W]*%>/gm),q=g(/\${[\w\W]*}/gm),J=g(/^data-[\-\w.\u00B7-\uFFFF]+$/),Q=g(/^aria-[\-\w]+$/),Z=g(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ee=g(/^(?:\w+script|data):/i),te=g(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ne=g(/^html$/i),re=g(/^[a-z][.\w]*(-[.\w]+)+$/i),ie=function(){return"undefined"===typeof window?null:window},se=function(t,n){if("object"!==e(t)||"function"!==typeof t.createPolicy)return null;var r=null,i="data-tt-policy-suffix";n.currentScript&&n.currentScript.hasAttribute(i)&&(r=n.currentScript.getAttribute(i));var s="dompurify"+(r?"#"+r:"");try{return t.createPolicy(s,{createHTML:function(e){return e},createScriptURL:function(e){return e}})}catch(o){return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function oe(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ie(),n=function(e){return oe(e)};if(n.version="2.5.8",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var r=t.document,s=t.document,o=t.DocumentFragment,a=t.HTMLTemplateElement,l=t.Node,u=t.Element,c=t.NodeFilter,h=t.NamedNodeMap,d=void 0===h?t.NamedNodeMap||t.MozNamedAttrMap:h,m=t.HTMLFormElement,f=t.DOMParser,g=t.trustedTypes,y=u.prototype,w=H(y,"cloneNode"),b=H(y,"nextSibling"),v=H(y,"childNodes"),I=H(y,"parentNode");if("function"===typeof a){var k=s.createElement("template");k.content&&k.content.ownerDocument&&(s=k.content.ownerDocument)}var ae=se(g,r),le=ae?ae.createHTML(""):"",ue=s,ce=ue.implementation,he=ue.createNodeIterator,de=ue.createDocumentFragment,me=ue.getElementsByTagName,fe=r.importNode,pe={};try{pe=D(s).documentMode?s.documentMode:{}}catch(Ht){}var ge={};n.isSupported="function"===typeof I&&ce&&void 0!==ce.createHTMLDocument&&9!==pe;var ye,we,be=X,ve=$,_e=q,Se=J,Ee=Q,Ce=ee,Me=te,Te=re,Re=Z,Oe=null,Ne=x({},[].concat(i(P),i(j),i(F),i(U),i(B))),Ae=null,Le=x({},[].concat(i(W),i(z),i(G),i(K))),Ie=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),ke=null,xe=null,De=!0,He=!0,Pe=!1,je=!0,Fe=!1,Ye=!0,Ue=!1,Ve=!1,Be=!1,We=!1,ze=!1,Ge=!1,Ke=!0,Xe=!1,$e="user-content-",qe=!0,Je=!1,Qe={},Ze=null,et=x({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),tt=null,nt=x({},["audio","video","img","source","image","track"]),rt=null,it=x({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),st="http://www.w3.org/1998/Math/MathML",ot="http://www.w3.org/2000/svg",at="http://www.w3.org/1999/xhtml",lt=at,ut=!1,ct=null,ht=x({},[st,ot,at],M),dt=["application/xhtml+xml","text/html"],mt="text/html",ft=null,pt=s.createElement("form"),gt=function(e){return e instanceof RegExp||e instanceof Function},yt=function(t){ft&&ft===t||(t&&"object"===e(t)||(t={}),t=D(t),ye=ye=-1===dt.indexOf(t.PARSER_MEDIA_TYPE)?mt:t.PARSER_MEDIA_TYPE,we="application/xhtml+xml"===ye?M:C,Oe="ALLOWED_TAGS"in t?x({},t.ALLOWED_TAGS,we):Ne,Ae="ALLOWED_ATTR"in t?x({},t.ALLOWED_ATTR,we):Le,ct="ALLOWED_NAMESPACES"in t?x({},t.ALLOWED_NAMESPACES,M):ht,rt="ADD_URI_SAFE_ATTR"in t?x(D(it),t.ADD_URI_SAFE_ATTR,we):it,tt="ADD_DATA_URI_TAGS"in t?x(D(nt),t.ADD_DATA_URI_TAGS,we):nt,Ze="FORBID_CONTENTS"in t?x({},t.FORBID_CONTENTS,we):et,ke="FORBID_TAGS"in t?x({},t.FORBID_TAGS,we):{},xe="FORBID_ATTR"in t?x({},t.FORBID_ATTR,we):{},Qe="USE_PROFILES"in t&&t.USE_PROFILES,De=!1!==t.ALLOW_ARIA_ATTR,He=!1!==t.ALLOW_DATA_ATTR,Pe=t.ALLOW_UNKNOWN_PROTOCOLS||!1,je=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,Fe=t.SAFE_FOR_TEMPLATES||!1,Ye=!1!==t.SAFE_FOR_XML,Ue=t.WHOLE_DOCUMENT||!1,We=t.RETURN_DOM||!1,ze=t.RETURN_DOM_FRAGMENT||!1,Ge=t.RETURN_TRUSTED_TYPE||!1,Be=t.FORCE_BODY||!1,Ke=!1!==t.SANITIZE_DOM,Xe=t.SANITIZE_NAMED_PROPS||!1,qe=!1!==t.KEEP_CONTENT,Je=t.IN_PLACE||!1,Re=t.ALLOWED_URI_REGEXP||Re,lt=t.NAMESPACE||at,Ie=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&>(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ie.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&>(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ie.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"===typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ie.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Fe&&(He=!1),ze&&(We=!0),Qe&&(Oe=x({},i(B)),Ae=[],!0===Qe.html&&(x(Oe,P),x(Ae,W)),!0===Qe.svg&&(x(Oe,j),x(Ae,z),x(Ae,K)),!0===Qe.svgFilters&&(x(Oe,F),x(Ae,z),x(Ae,K)),!0===Qe.mathMl&&(x(Oe,U),x(Ae,G),x(Ae,K))),t.ADD_TAGS&&(Oe===Ne&&(Oe=D(Oe)),x(Oe,t.ADD_TAGS,we)),t.ADD_ATTR&&(Ae===Le&&(Ae=D(Ae)),x(Ae,t.ADD_ATTR,we)),t.ADD_URI_SAFE_ATTR&&x(rt,t.ADD_URI_SAFE_ATTR,we),t.FORBID_CONTENTS&&(Ze===et&&(Ze=D(Ze)),x(Ze,t.FORBID_CONTENTS,we)),qe&&(Oe["#text"]=!0),Ue&&x(Oe,["html","head","body"]),Oe.table&&(x(Oe,["tbody"]),delete ke.tbody),p&&p(t),ft=t)},wt=x({},["mi","mo","mn","ms","mtext"]),bt=x({},["annotation-xml"]),vt=x({},["title","style","font","a","script"]),_t=x({},j);x(_t,F),x(_t,Y);var St=x({},U);x(St,V);var Et=function(e){var t=I(e);t&&t.tagName||(t={namespaceURI:lt,tagName:"template"});var n=C(e.tagName),r=C(t.tagName);return!!ct[e.namespaceURI]&&(e.namespaceURI===ot?t.namespaceURI===at?"svg"===n:t.namespaceURI===st?"svg"===n&&("annotation-xml"===r||wt[r]):Boolean(_t[n]):e.namespaceURI===st?t.namespaceURI===at?"math"===n:t.namespaceURI===ot?"math"===n&&bt[r]:Boolean(St[n]):e.namespaceURI===at?!(t.namespaceURI===ot&&!bt[r])&&(!(t.namespaceURI===st&&!wt[r])&&(!St[n]&&(vt[n]||!_t[n]))):!("application/xhtml+xml"!==ye||!ct[e.namespaceURI]))},Ct=function(e){E(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(Ht){try{e.outerHTML=le}catch(Ht){e.remove()}}},Mt=function(e,t){try{E(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(Ht){E(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!Ae[e])if(We||ze)try{Ct(t)}catch(Ht){}else try{t.setAttribute(e,"")}catch(Ht){}},Tt=function(e){var t,n;if(Be)e="<remove></remove>"+e;else{var r=T(e,/^[\r\n\t ]+/);n=r&&r[0]}"application/xhtml+xml"===ye&<===at&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var i=ae?ae.createHTML(e):e;if(lt===at)try{t=(new f).parseFromString(i,ye)}catch(Ht){}if(!t||!t.documentElement){t=ce.createDocument(lt,"template",null);try{t.documentElement.innerHTML=ut?le:i}catch(Ht){}}var o=t.body||t.documentElement;return e&&n&&o.insertBefore(s.createTextNode(n),o.childNodes[0]||null),lt===at?me.call(t,Ue?"html":"body")[0]:Ue?t.documentElement:o},Rt=function(e){return he.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null,!1)},Ot=function(e){return e instanceof m&&("string"!==typeof e.nodeName||"string"!==typeof e.textContent||"function"!==typeof e.removeChild||!(e.attributes instanceof d)||"function"!==typeof e.removeAttribute||"function"!==typeof e.setAttribute||"string"!==typeof e.namespaceURI||"function"!==typeof e.insertBefore||"function"!==typeof e.hasChildNodes)},Nt=function(t){return"object"===e(l)?t instanceof l:t&&"object"===e(t)&&"number"===typeof t.nodeType&&"string"===typeof t.nodeName},At=function(e,t,r){ge[e]&&_(ge[e],(function(e){e.call(n,t,r,ft)}))},Lt=function(e){var t;if(At("beforeSanitizeElements",e,null),Ot(e))return Ct(e),!0;if(A(/[\u0080-\uFFFF]/,e.nodeName))return Ct(e),!0;var r=we(e.nodeName);if(At("uponSanitizeElement",e,{tagName:r,allowedTags:Oe}),e.hasChildNodes()&&!Nt(e.firstElementChild)&&(!Nt(e.content)||!Nt(e.content.firstElementChild))&&A(/<[/\w]/g,e.innerHTML)&&A(/<[/\w]/g,e.textContent))return Ct(e),!0;if("select"===r&&A(/<template/i,e.innerHTML))return Ct(e),!0;if(7===e.nodeType)return Ct(e),!0;if(Ye&&8===e.nodeType&&A(/<[/\w]/g,e.data))return Ct(e),!0;if(!Oe[r]||ke[r]){if(!ke[r]&&kt(r)){if(Ie.tagNameCheck instanceof RegExp&&A(Ie.tagNameCheck,r))return!1;if(Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(r))return!1}if(qe&&!Ze[r]){var i=I(e)||e.parentNode,s=v(e)||e.childNodes;if(s&&i)for(var o=s.length,a=o-1;a>=0;--a){var l=w(s[a],!0);l.__removalCount=(e.__removalCount||0)+1,i.insertBefore(l,b(e))}}return Ct(e),!0}return e instanceof u&&!Et(e)?(Ct(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!A(/<\/no(script|embed|frames)/i,e.innerHTML)?(Fe&&3===e.nodeType&&(t=e.textContent,t=R(t,be," "),t=R(t,ve," "),t=R(t,_e," "),e.textContent!==t&&(E(n.removed,{element:e.cloneNode()}),e.textContent=t)),At("afterSanitizeElements",e,null),!1):(Ct(e),!0)},It=function(e,t,n){if(Ke&&("id"===t||"name"===t)&&(n in s||n in pt))return!1;if(He&&!xe[t]&&A(Se,t));else if(De&&A(Ee,t));else if(!Ae[t]||xe[t]){if(!(kt(e)&&(Ie.tagNameCheck instanceof RegExp&&A(Ie.tagNameCheck,e)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(e))&&(Ie.attributeNameCheck instanceof RegExp&&A(Ie.attributeNameCheck,t)||Ie.attributeNameCheck instanceof Function&&Ie.attributeNameCheck(t))||"is"===t&&Ie.allowCustomizedBuiltInElements&&(Ie.tagNameCheck instanceof RegExp&&A(Ie.tagNameCheck,n)||Ie.tagNameCheck instanceof Function&&Ie.tagNameCheck(n))))return!1}else if(rt[t]);else if(A(Re,R(n,Me,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==O(n,"data:")||!tt[e]){if(Pe&&!A(Ce,R(n,Me,"")));else if(n)return!1}else;return!0},kt=function(e){return"annotation-xml"!==e&&T(e,Te)},xt=function(t){var r,i,s,o;At("beforeSanitizeAttributes",t,null);var a=t.attributes;if(a&&!Ot(t)){var l={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ae};o=a.length;while(o--){r=a[o];var u=r,c=u.name,h=u.namespaceURI;if(i="value"===c?r.value:N(r.value),s=we(c),l.attrName=s,l.attrValue=i,l.keepAttr=!0,l.forceKeepAttr=void 0,At("uponSanitizeAttribute",t,l),i=l.attrValue,!l.forceKeepAttr&&(Mt(c,t),l.keepAttr))if(je||!A(/\/>/i,i)){Fe&&(i=R(i,be," "),i=R(i,ve," "),i=R(i,_e," "));var d=we(t.nodeName);if(It(d,s,i))if(!Xe||"id"!==s&&"name"!==s||(Mt(c,t),i=$e+i),Ye&&A(/((--!?|])>)|<\/(style|title)/i,i))Mt(c,t);else{if(ae&&"object"===e(g)&&"function"===typeof g.getAttributeType)if(h);else switch(g.getAttributeType(d,s)){case"TrustedHTML":i=ae.createHTML(i);break;case"TrustedScriptURL":i=ae.createScriptURL(i);break}try{h?t.setAttributeNS(h,c,i):t.setAttribute(c,i),Ot(t)?Ct(t):S(n.removed)}catch(Ht){}}}else Mt(c,t)}At("afterSanitizeAttributes",t,null)}},Dt=function e(t){var n,r=Rt(t);At("beforeSanitizeShadowDOM",t,null);while(n=r.nextNode())At("uponSanitizeShadowNode",n,null),Lt(n),xt(n),n.content instanceof o&&e(n.content);At("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(i){var s,a,u,c,h,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ut=!i,ut&&(i="\x3c!--\x3e"),"string"!==typeof i&&!Nt(i)){if("function"!==typeof i.toString)throw L("toString is not a function");if(i=i.toString(),"string"!==typeof i)throw L("dirty is not a string, aborting")}if(!n.isSupported){if("object"===e(t.toStaticHTML)||"function"===typeof t.toStaticHTML){if("string"===typeof i)return t.toStaticHTML(i);if(Nt(i))return t.toStaticHTML(i.outerHTML)}return i}if(Ve||yt(d),n.removed=[],"string"===typeof i&&(Je=!1),Je){if(i.nodeName){var m=we(i.nodeName);if(!Oe[m]||ke[m])throw L("root node is forbidden and cannot be sanitized in-place")}}else if(i instanceof l)s=Tt("\x3c!----\x3e"),a=s.ownerDocument.importNode(i,!0),1===a.nodeType&&"BODY"===a.nodeName||"HTML"===a.nodeName?s=a:s.appendChild(a);else{if(!We&&!Fe&&!Ue&&-1===i.indexOf("<"))return ae&&Ge?ae.createHTML(i):i;if(s=Tt(i),!s)return We?null:Ge?le:""}s&&Be&&Ct(s.firstChild);var f=Rt(Je?i:s);while(u=f.nextNode())3===u.nodeType&&u===c||(Lt(u),xt(u),u.content instanceof o&&Dt(u.content),c=u);if(c=null,Je)return i;if(We){if(ze){h=de.call(s.ownerDocument);while(s.firstChild)h.appendChild(s.firstChild)}else h=s;return(Ae.shadowroot||Ae.shadowrootmod)&&(h=fe.call(r,h,!0)),h}var p=Ue?s.outerHTML:s.innerHTML;return Ue&&Oe["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&A(ne,s.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+p),Fe&&(p=R(p,be," "),p=R(p,ve," "),p=R(p,_e," ")),ae&&Ge?ae.createHTML(p):p},n.setConfig=function(e){yt(e),Ve=!0},n.clearConfig=function(){ft=null,Ve=!1},n.isValidAttribute=function(e,t,n){ft||yt({});var r=we(e),i=we(t);return It(r,i,n)},n.addHook=function(e,t){"function"===typeof t&&(ge[e]=ge[e]||[],E(ge[e],t))},n.removeHook=function(e){if(ge[e])return S(ge[e])},n.removeHooks=function(e){ge[e]&&(ge[e]=[])},n.removeAllHooks=function(){ge={}},n}var ae=oe();return ae}))},c0d8:function(e,t,n){"use strict";n("7a89"),n("d06e"),n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7"),n("f4db");var r=n("5d7f"),i=n("97b9"),s=n("7b9c"),o=n("63d8"),a=n("f938"),l=n("de3b"),u=n("491c"),c=n("87d6");function h(e,t){d(e,t),t.add(e)}function d(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function m(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(e){var t=p(e,"string");return"symbol"==typeof t?t:t+""}function p(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function g(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var y=new WeakSet;class w{constructor(e,t,n){h(this,y),m(this,"hot",void 0),m(this,"tableMeta",void 0),m(this,"selection",void 0),m(this,"eventManager",void 0),m(this,"destroyed",!1),m(this,"activeEditor",void 0),m(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=n,this.eventManager=new c["a"](e),this.hot.addHook("afterDocumentKeyDown",e=>g(y,this,b).call(this,e)),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"compositionstart",e=>{!this.destroyed&&this.hot.isListening()&&this.openEditor("",e)}),this.hot.view._wt.update("onCellDblClick",(e,t,n)=>g(y,this,v).call(this,e,t,n))}getActiveEditor(){return this.activeEditor}prepareEditor(){var e;if(this.activeEditor&&this.activeEditor.isWaiting())return void this.closeEditor(!1,!1,e=>{e&&this.prepareEditor()});const t=null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight;if(!t||t.isHeader())return;const{row:n,col:r}=t,i=this.hot.runHooks("modifyGetCellCoords",n,r);let s=n,o=r;if(Array.isArray(i)&&([s,o]=i),this.cellProperties=this.hot.getCellMeta(s,o),!this.isCellEditable())return void this.clearActiveEditor();const a=this.hot.getCell(n,r,!0);if(a){const e=this.hot.getCellEditor(this.cellProperties),t=this.hot.colToProp(o),i=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(s),o);this.activeEditor=Object(u["b"])(e,this.hot),this.activeEditor.prepare(n,r,t,a,i,this.cellProperties)}}isEditorOpened(){return this.activeEditor&&this.activeEditor.isOpened()}openEditor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.isCellEditable())return void this.clearActiveEditor();const r=this.hot.getSelectedRangeLast();let i=this.hot.runHooks("beforeBeginEditing",r.highlight.row,r.highlight.col,e,t,n);t instanceof MouseEvent&&"boolean"!==typeof i&&(i=0===this.hot.selection.getLayerLevel()&&r.isSingle()),!1!==i?(this.activeEditor||(this.hot.scrollToFocusedCell(),this.prepareEditor()),this.activeEditor&&(n&&this.activeEditor.enableFullEditMode(),this.activeEditor.beginEditing(e,t))):this.clearActiveEditor()}closeEditor(e,t,n){this.activeEditor?this.activeEditor.finishEditing(e,t,n):n&&n(!1)}closeEditorAndSaveChanges(e){this.closeEditor(!1,e)}closeEditorAndRestoreOriginalValue(e){this.closeEditor(!0,e)}clearActiveEditor(){this.activeEditor=void 0}isCellEditable(){const e=this.hot.getSelectedRangeLast();if(!e)return!1;const t=this.hot.getCellEditor(this.cellProperties),{row:n,col:r}=e.highlight,{rowIndexMapper:i,columnIndexMapper:s}=this.hot,o=i.isHidden(this.hot.toPhysicalRow(n))||s.isHidden(this.hot.toPhysicalColumn(r));return!(this.cellProperties.readOnly||!t||o)}moveSelectionAfterEnter(e){const t={..."function"===typeof this.tableMeta.enterMoves?this.tableMeta.enterMoves(e):this.tableMeta.enterMoves};e.shiftKey&&(t.row=-t.row,t.col=-t.col),this.hot.selection.isMultiple()?this.selection.transformFocus(t.row,t.col):this.selection.transformStart(t.row,t.col,!0)}destroy(){this.destroyed=!0,this.eventManager.destroy()}}function b(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||Object(l["isImmediatePropagationStopped"])(e))return;const{keyCode:n}=e,r=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&(Object(a["isFunctionKey"])(n)||Object(a["isCtrlMetaKey"])(n)||r||this.isEditorOpened()||this.openEditor("",e))}function v(e,t){t.isCell()&&this.openEditor(null,e,!0)}const _=new WeakMap;w.getInstance=function(e,t,n){let r=_.get(e);return r||(r=new w(e,t,n),_.set(e,r)),r};var S=w,E=n("351d"),C=n("bd5e");function M(e,t){R(e,t),t.add(e)}function T(e,t,n){R(e,t),t.set(e,n)}function R(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function O(e,t){return e.get(A(e,t))}function N(e,t,n){return e.set(A(e,t),n),n}function A(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const L=Object.freeze({CELL:"cell",MIXED:"mixed"});var I=new WeakMap,k=new WeakMap,x=new WeakMap,D=new WeakMap,H=new WeakMap,P=new WeakSet;class j{constructor(e){var t=this;M(this,P),T(this,I,void 0),T(this,k,void 0),T(this,x,1),T(this,D,null),T(this,H,new Map);const n=e.getSettings();N(I,this,e),N(k,this,n.imeFastEdit?L.MIXED:L.CELL),O(I,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return A(P,t,V).call(t,...n)})),O(I,this).addHook("afterSelection",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return A(P,t,Y).call(t,...n)})),O(I,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return A(P,t,Y).call(t,...n)})),O(I,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return A(P,t,U).call(t,...n)}))}getFocusMode(){return O(k,this)}setFocusMode(e){Object.values(L).includes(e)?N(k,this,e):Object(C["b"])(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return O(x,this)}setRefocusDelay(e){N(x,this,e)}setRefocusElementGetter(e){N(D,this,e)}getRefocusElement(){return"function"===typeof O(D,this)?O(D,this).call(this):null===(e=O(I,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA;var e}focusOnHighlightedCell(e){const t=e=>{var t,n;const r=null===(t=O(I,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!r)return;let i=O(I,this).runHooks("modifyFocusedElement",r.row,r.col,e);i instanceof HTMLElement||(i=e),!i||null!==(n=O(I,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};e?t(e):A(P,this,F).call(this,e=>t(e))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:O(x,this);const n=this.getRefocusElement();!O(I,this).getSettings().imeFastEdit||null!==(e=O(I,this).getActiveEditor())&&void 0!==e&&e.isOpened()||!n||(O(H,this).has(t)||O(H,this).set(t,Object(i["debounce"])(()=>{n.select()},t)),O(H,this).get(t)())}}function F(e){var t;const n=null===(t=O(I,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n||!O(I,this).selection.isCellVisible(n))return void e(null);const r=O(I,this).getCell(n.row,n.col,!0);null===r?O(I,this).addHookOnce("afterScroll",()=>{e(O(I,this).getCell(n.row,n.col,!0))}):e(r)}function Y(){A(P,this,F).call(this,e=>{const{activeElement:t}=O(I,this).rootDocument;t&&Object(r["isOutsideInput"])(t)&&t.blur(),this.focusOnHighlightedCell(e)})}function U(){A(P,this,F).call(this,e=>{this.getFocusMode()===L.MIXED&&"TD"===e.nodeName&&this.refocusToEditorTextarea()})}function V(e){"boolean"===typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?L.MIXED:L.CELL)}var B=n("81ea"),W=n("a776"),z=n("24b5"),G=n("3d76"),K=n("169f"),X=n("29b0"),$=n("ffec"),q=n("7dd09");function J(e,t,n){Q(e,t),t.set(e,n)}function Q(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Z(e,t){return e.get(te(e,t))}function ee(e,t,n){return e.set(te(e,t),n),n}function te(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var ne=new WeakMap,re=new WeakMap,ie=new WeakMap,se=new WeakMap,oe=new WeakMap,ae=new WeakMap,le=new WeakMap,ue=new WeakMap,ce=new WeakMap,he=new WeakMap;class de{constructor(e,t,n,r,i,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;J(this,ne,void 0),J(this,re,void 0),J(this,ie,void 0),J(this,se,void 0),J(this,oe,void 0),J(this,ae,void 0),J(this,le,void 0),J(this,ue,void 0),J(this,ce,[null,null]),J(this,he,[null,null]),ee(ne,this,n),ee(re,this,t),ee(ie,this,i),ee(se,this,s),ee(oe,this,o),ee(ae,this,r),ee(le,this,e),this.registerEvents()}registerEvents(){Z(ae,this).addEventListener(Z(ie,this).holder,"contextmenu",e=>this.onContextMenu(e)),Z(ae,this).addEventListener(Z(ie,this).TABLE,"mouseover",e=>this.onMouseOver(e)),Z(ae,this).addEventListener(Z(ie,this).TABLE,"mouseout",e=>this.onMouseOut(e));const e=()=>{Z(ae,this).addEventListener(Z(ie,this).holder,"touchstart",e=>this.onTouchStart(e)),Z(ae,this).addEventListener(Z(ie,this).holder,"touchend",e=>this.onTouchEnd(e)),this.momentumScrolling||(this.momentumScrolling={}),Z(ae,this).addEventListener(Z(ie,this).holder,"scroll",()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||Z(ne,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout(()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,Z(ne,this).getSetting("onAfterMomentumScroll"))},200)})},t=()=>{Z(ae,this).addEventListener(Z(ie,this).holder,"mouseup",e=>this.onMouseUp(e)),Z(ae,this).addEventListener(Z(ie,this).holder,"mousedown",e=>this.onMouseDown(e))};Object(o["isMobileBrowser"])()?e():(Object(q["isTouchSupported"])()&&e(),t())}selectedCellWasTouched(e){const t=this.parentCell(e),n=t.coords;if(Z(ue,this)&&n){const[e,t]=[n.row,Z(ue,this).from.row],[r,i]=[n.col,Z(ue,this).from.col];return e===t&&r===i}return!1}parentCell(e){const t={},n=Z(ie,this).TABLE,i=Object(r["closestDown"])(e,["TD","TH"],n);return i?(t.coords=Z(ie,this).getCoords(i),t.TD=i):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"current")?(t.coords=Z(se,this).getFocusSelection().cellRange.highlight,t.TD=Z(ie,this).getCell(t.coords)):Object(r["hasClass"])(e,"wtBorder")&&Object(r["hasClass"])(e,"area")&&Z(se,this).getAreaSelection().cellRange&&(t.coords=Z(se,this).getAreaSelection().cellRange.to,t.TD=Z(ie,this).getCell(t.coords)),t}onMouseDown(e){const t=Z(re,this).rootDocument.activeElement,n=Object(i["partial"])(r["getParent"],e.target),s=e.target;if(!["TD","TH"].includes(t.nodeName)&&(s===t||n(0)===t||n(1)===t))return;const o=this.parentCell(s);Object(r["hasClass"])(s,"corner")?Z(ne,this).getSetting("onCellCornerMouseDown",e,s):o.TD&&Z(ne,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,o.coords,o.TD),(0===e.button||this.touchApplied)&&o.TD&&(Z(he,this)[0]=o.TD,clearTimeout(Z(ce,this)[0]),Z(ce,this)[0]=setTimeout(()=>{Z(he,this)[0]=null},1e3))}onContextMenu(e){if(Z(ne,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!Z(ne,this).has("onCellMouseOver"))return;const t=Z(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Z(oe,this)||this;n&&n!==i.lastMouseOver&&Object(r["isChildOf"])(n,t)&&(i.lastMouseOver=n,this.callListener("onCellMouseOver",e,Z(ie,this).getCoords(n),n))}onMouseOut(e){if(!Z(ne,this).has("onCellMouseOut"))return;const t=Z(ie,this).TABLE,n=Object(r["closestDown"])(e.target,["TD","TH"],t),i=Object(r["closestDown"])(e.relatedTarget,["TD","TH"],t),s=Z(oe,this)||this;n&&n!==i&&Object(r["isChildOf"])(n,t)&&(this.callListener("onCellMouseOut",e,Z(ie,this).getCoords(n),n),null===i&&(s.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&Z(ne,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===Z(he,this)[0]&&t.TD===Z(he,this)[1]?(Object(r["hasClass"])(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),Z(he,this)[0]=null,Z(he,this)[1]=null):t.TD===Z(he,this)[0]&&(Z(he,this)[1]=t.TD,clearTimeout(Z(ce,this)[1]),Z(ce,this)[1]=setTimeout(()=>{Z(he,this)[1]=null},500)))}onTouchStart(e){ee(ue,this,Z(se,this).getFocusSelection().cellRange),this.touchApplied=!0,this.onMouseDown(e)}onTouchEnd(e){var t;const n=e.target,r=null===(t=this.parentCell(n))||void 0===t?void 0:t.coords,i=Object(s["isDefined"])(r)&&r.row>=0&&r.col>=0,a=e.cancelable&&i&&Z(ne,this).getSetting("isDataViewInstance");if(a){const t=["A","BUTTON","INPUT"];Object(o["isIOS"])()&&(Object(o["isChromeWebKit"])()||Object(o["isFirefoxWebKit"])())&&this.selectedCellWasTouched(n)&&!t.includes(n.tagName)?e.preventDefault():this.selectedCellWasTouched(n)||e.preventDefault()}this.onMouseUp(e),this.touchApplied=!1}callListener(e,t,n,r){const i=Z(ne,this).getSettingPure(e);i&&i(t,n,r,Z(le,this).call(this))}destroy(){clearTimeout(Z(ce,this)[0]),clearTimeout(Z(ce,this)[1]),Z(ae,this).destroy()}}var me=de;function fe(e,t,n){return(t=pe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pe(e){var t=ge(e,"string");return"symbol"==typeof t?t:t+""}function ge(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ye{constructor(e,t,n){fe(this,"offset",void 0),fe(this,"total",void 0),fe(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleRowHeadedColumnToSourceColumn(e){return this.renderedToSource(this.offsettedTH(e))}sourceColumnToVisibleRowHeadedColumn(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var we=ye;function be(e,t,n){return(t=ve(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ve(e){var t=_e(e,"string");return"symbol"==typeof t?t:t+""}function _e(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Se{constructor(e,t,n){be(this,"offset",void 0),be(this,"total",void 0),be(this,"countTH",void 0),this.offset=e,this.total=t,this.countTH=n}offsetted(e){return e+this.offset}unOffsetted(e){return e-this.offset}renderedToSource(e){return this.offsetted(e)}sourceToRendered(e){return this.unOffsetted(e)}offsettedTH(e){return e-this.countTH}unOffsettedTH(e){return e+this.countTH}visibleColHeadedRowToSourceRow(e){return this.renderedToSource(this.offsettedTH(e))}sourceRowToVisibleColHeadedRow(e){return this.unOffsettedTH(this.sourceToRendered(e))}}var Ee=Se;const Ce=0,Me=1,Te=2;function Re(e,t,n){return(t=Oe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e){var t=Ne(e,"string");return"symbol"==typeof t?t:t+""}function Ne(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ae{constructor(){Re(this,"currentSize",0),Re(this,"nextSize",0),Re(this,"currentOffset",0),Re(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}function Le(e,t,n){return(t=Ie(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ie(e){var t=ke(e,"string");return"symbol"==typeof t?t:t+""}function ke(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class xe{constructor(){Le(this,"size",new Ae),Le(this,"workingSpace",Ce),Le(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return this.sharedSize instanceof Ae}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=Me,e.workingSpace=Te,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=Te,e.workingSpace=Me,this.sharedSize=e.getViewSize()}}function De(e,t,n){return(t=He(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function He(e){var t=Pe(e,"string");return"symbol"==typeof t?t:t+""}function Pe(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class je{constructor(e,t,n){De(this,"rootNode",void 0),De(this,"nodesPool",void 0),De(this,"sizeSet",new xe),De(this,"childNodeType",void 0),De(this,"visualIndex",0),De(this,"collectedNodes",[]),this.rootNode=e,this.nodesPool=t,this.childNodeType=n.toUpperCase()}setSize(e){return this.sizeSet.setSize(e),this}setOffset(e){return this.sizeSet.setOffset(e),this}isSharedViewSet(){return this.sizeSet.isShared()}getNode(e){return e<this.collectedNodes.length?this.collectedNodes[e]:null}getCurrentNode(){const e=this.collectedNodes.length;return e>0?this.collectedNodes[e-1]:null}getRenderedChildCount(){const{rootNode:e,sizeSet:t}=this;let n=0;if(this.isSharedViewSet()){let r=e.firstElementChild;while(r){if(r.tagName===this.childNodeType)n+=1;else if(t.isPlaceOn(Me))break;r=r.nextElementSibling}}else n=e.childElementCount;return n}start(){this.collectedNodes.length=0,this.visualIndex=0;const{rootNode:e,sizeSet:t}=this,n=this.isSharedViewSet(),{nextSize:r}=t.getViewSize();let i=this.getRenderedChildCount();while(i<r){const r=this.nodesPool();!n||n&&t.isPlaceOn(Te)?e.appendChild(r):e.insertBefore(r,e.firstChild),i+=1}const s=n&&t.isPlaceOn(Me);while(i>r)e.removeChild(s?e.firstChild:e.lastChild),i-=1}render(){const{rootNode:e,sizeSet:t}=this;let n=this.visualIndex;this.isSharedViewSet()&&t.isPlaceOn(Te)&&(n+=t.sharedSize.nextSize);let r=e.childNodes[n];if(r.tagName!==this.childNodeType){const t=this.nodesPool();e.replaceChild(t,r),r=t}this.collectedNodes.push(r),this.visualIndex+=1}end(){}}class Fe extends je{prependView(e){return this.sizeSet.prepend(e.sizeSet),e.sizeSet.append(this.sizeSet),this}appendView(e){return this.sizeSet.append(e.sizeSet),e.sizeSet.prepend(this.sizeSet),this}}function Ye(e,t,n){return(t=Ue(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ue(e){var t=Ve(e,"string");return"symbol"==typeof t?t:t+""}function Ve(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Be{constructor(e){Ye(this,"nodeType",void 0),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(){return this.rootDocument.createElement(this.nodeType)}}function We(e,t,n){return(t=ze(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ze(e){var t=Ge(e,"string");return"symbol"==typeof t?t:t+""}function Ge(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ke{constructor(e,t){We(this,"nodesPool",null),We(this,"nodeType",void 0),We(this,"rootNode",void 0),We(this,"table",null),We(this,"renderedNodes",0),this.nodesPool="string"===typeof e?new Be(e):null,this.nodeType=e,this.rootNode=t}setTable(e){this.nodesPool&&this.nodesPool.setRootDocument(e.rootDocument),this.table=e}adjust(){}render(){}}var Xe=n("8828");function $e(e,t,n){return(t=qe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qe(e){var t=Je(e,"string");return"symbol"==typeof t?t:t+""}function Je(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Qe extends Ke{constructor(){super("TH"),$e(this,"orderViews",new WeakMap),$e(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Fe(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:n,rows:i,cells:s}=this.table;for(let o=0;o<e;o++){const e=this.table.renderedRowToSource(o),a=i.getRenderedNode(o);this.sourceRowIndex=e;const l=this.obtainOrderView(a),u=s.obtainOrderView(a);l.appendView(u).setSize(n).setOffset(this.table.renderedColumnToSource(0)).start();for(let i=0;i<n;i++){l.render();const n=l.getCurrentNode();n.className="",n.removeAttribute("style"),Object(r["removeAttribute"])(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(n,[Object(Xe["E"])(),Object(Xe["H"])(),Object(Xe["f"])(i+1),Object(Xe["L"])(-1)]),t[i](e,n,i)}l.end()}}}class Ze extends Ke{constructor(e){super(null,e)}adjust(){const{columnHeadersCount:e,rowHeadersCount:t}=this.table;let n=this.rootNode.firstChild;if(e){const{columnsToRender:r}=this.table,i=r+t;for(let t=0,o=e;t<o;t++){n=this.rootNode.childNodes[t],n||(n=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(n)),this.renderedNodes=n.childNodes.length;while(this.renderedNodes<i)n.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;while(this.renderedNodes>i)n.removeChild(n.lastChild),this.renderedNodes-=1}const s=this.rootNode.childNodes.length;if(s>e)for(let t=e;t<s;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else n&&Object(r["empty"])(n)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Xe["D"])()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:n,rowHeadersCount:i}=this.table,s=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&Object(r["setAttribute"])(s,[Object(Xe["B"])(),Object(Xe["F"])(t+1)]);for(let o=-1*i;o<n;o+=1){const n=this.table.renderedColumnToSource(o),a=s.childNodes[o+i];a.className="",a.removeAttribute("style"),Object(r["removeAttribute"])(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&Object(r["setAttribute"])(a,[Object(Xe["f"])(o+1+this.table.rowHeadersCount),Object(Xe["L"])(-1),Object(Xe["g"])(),...o>=0?[Object(Xe["G"])()]:[Object(Xe["B"])()]]),e[t](n,a,t)}}}}var et=n("67a87");let tt=!1;class nt extends Ke{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,n=e+t;while(this.renderedNodes<n)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;while(this.renderedNodes>n)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!tt&&e>1e3&&(tt=!0,Object(C["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
- Consider limiting the number of rendered columns by specifying the table width and/or\x20
- turning off the "renderAllColumns" option.`));for(let r=0;r<t;r++){const e=this.table.renderedColumnToSource(r),t=this.table.columnUtils.getHeaderWidth(e);this.rootNode.childNodes[r].style.width=t+"px"}for(let r=0;r<e;r++){const e=this.table.renderedColumnToSource(r),n=this.table.columnUtils.getStretchedColumnWidth(e);this.rootNode.childNodes[r+t].style.width=n+"px"}const n=this.rootNode.firstChild;n&&Object(r["addClass"])(n,"rowHeader")}}function rt(e,t,n){return(t=it(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function it(e){var t=st(e,"string");return"symbol"==typeof t?t:t+""}function st(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const ot={rowEven:"ht__row_even",rowOdd:"ht__row_odd"};let at=!1;class lt extends Ke{constructor(e){super("TR",e),rt(this,"orderView",void 0),this.orderView=new je(e,e=>this.nodesPool.obtain(e),this.nodeType)}getRenderedNode(e){return this.orderView.getNode(e)}render(){const{rowsToRender:e}=this.table;!at&&e>1e3&&(at=!0,Object(C["b"])(et["a"]`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
- Consider limiting the number of rendered rows by specifying the table height and/or\x20
- turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&Object(r["setAttribute"])(this.rootNode,[Object(Xe["D"])()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let i=0;i<e;i++){this.orderView.render();const e=this.orderView.getCurrentNode(),s=this.table.renderedRowToSource(i);var t,n;if(this.table.isAriaEnabled())Object(r["setAttribute"])(e,[Object(Xe["B"])(),Object(Xe["F"])(s+(null!==(t=null===(n=this.table.rowUtils)||void 0===n||null===(n=n.dataAccessObject)||void 0===n?void 0:n.columnHeaders.length)&&void 0!==t?t:0)+1)]);Object(r["removeClass"])(e,[ot.rowEven,ot.rowOdd]),(s+1)%2===0?Object(r["addClass"])(e,ot.rowEven):Object(r["addClass"])(e,ot.rowOdd)}this.orderView.end()}}function ut(e,t,n){return(t=ct(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ct(e){var t=ht(e,"string");return"symbol"==typeof t?t:t+""}function ht(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class dt extends Ke{constructor(){super("TD"),ut(this,"orderViews",new WeakMap),ut(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new Fe(e,e=>this.nodesPool.obtain(this.sourceRowIndex,e),this.nodeType),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,columnsToRender:t,rows:n,rowHeaders:i}=this.table;for(let a=0;a<e;a++){const e=this.table.renderedRowToSource(a),l=n.getRenderedNode(a);this.sourceRowIndex=e;const u=this.obtainOrderView(l),c=i.obtainOrderView(l);u.prependView(c).setSize(t).setOffset(this.table.renderedColumnToSource(0)).start();for(let n=0;n<t;n++){u.render();const t=u.getCurrentNode(),i=this.table.renderedColumnToSource(n);var s,o;if(Object(r["hasClass"])(t,"hide")||(t.className=""),t.removeAttribute("style"),t.removeAttribute("dir"),Object(r["removeAttribute"])(t,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,i,t),this.table.isAriaEnabled())Object(r["setAttribute"])(t,[...t.hasAttribute("role")?[]:[Object(Xe["l"])()],Object(Xe["L"])(-1),Object(Xe["f"])(i+(null!==(s=null===(o=this.table.rowUtils)||void 0===o||null===(o=o.dataAccessObject)||void 0===o?void 0:o.rowHeaders.length)&&void 0!==s?s:0)+1)])}u.end()}}}function mt(e,t,n){return(t=ft(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ft(e){var t=pt(e,"string");return"symbol"==typeof t?t:t+""}function pt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class gt{constructor(e){let{cellRenderer:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};mt(this,"rootNode",void 0),mt(this,"rootDocument",void 0),mt(this,"rowHeaders",null),mt(this,"columnHeaders",null),mt(this,"colGroup",null),mt(this,"rows",null),mt(this,"cells",null),mt(this,"rowFilter",null),mt(this,"columnFilter",null),mt(this,"rowUtils",null),mt(this,"columnUtils",null),mt(this,"rowsToRender",0),mt(this,"columnsToRender",0),mt(this,"rowHeaderFunctions",[]),mt(this,"rowHeadersCount",0),mt(this,"columnHeaderFunctions",[]),mt(this,"columnHeadersCount",0),mt(this,"cellRenderer",void 0),mt(this,"activeOverlayName",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t}setActiveOverlayName(e){this.activeOverlayName=e}setAxisUtils(e,t){this.rowUtils=e,this.columnUtils=t}setViewportSize(e,t){this.rowsToRender=e,this.columnsToRender=t}setFilters(e,t){this.rowFilter=e,this.columnFilter=t}setHeaderContentRenderers(e,t){this.rowHeaderFunctions=e,this.rowHeadersCount=e.length,this.columnHeaderFunctions=t,this.columnHeadersCount=t.length}setRenderers(){let{rowHeaders:e,columnHeaders:t,colGroup:n,rows:r,cells:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),n.setTable(this),r.setTable(this),i.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=n,this.rows=r,this.cells=i}renderedRowToSource(e){return this.rowFilter.renderedToSource(e)}renderedColumnToSource(e){return this.columnFilter.renderedToSource(e)}isAriaEnabled(){return this.rowUtils.wtSettings.getSetting("ariaTags")}render(){this.colGroup.adjust(),this.columnHeaders.adjust(),this.rows.adjust(),this.rowHeaders.adjust(),this.columnHeaders.render(),this.rows.render(),this.rowHeaders.render(),this.cells.render(),this.columnUtils.calculateWidths(),this.colGroup.render();const{rowsToRender:e,rows:t}=this;for(let n=0;n<e;n++){const e=t.getRenderedNode(n);if(e.firstChild){const t=this.renderedRowToSource(n),r=this.rowUtils.getHeightByOverlayName(t,this.activeOverlayName);e.firstChild.style.height=r?r-1+"px":""}}}}class yt{constructor(){let{TABLE:e,THEAD:t,COLGROUP:n,TBODY:r,rowUtils:i,columnUtils:s,cellRenderer:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new gt(e,{cellRenderer:o}),this.renderer.setRenderers({rowHeaders:new Qe,columnHeaders:new Ze(t),colGroup:new nt(n),rows:new lt(r),cells:new dt}),this.renderer.setAxisUtils(i,s)}setActiveOverlayName(e){return this.renderer.setActiveOverlayName(e),this}setFilters(e,t){return this.renderer.setFilters(e,t),this}setViewportSize(e,t){return this.renderer.setViewportSize(e,t),this}setHeaderContentRenderers(e,t){return this.renderer.setHeaderContentRenderers(e,t),this}adjust(){this.renderer.adjust()}render(){this.renderer.render()}}var wt=n("861dd");function bt(e,t,n){vt(e,t),t.set(e,n)}function vt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _t(e,t,n){return(t=St(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function St(e){var t=Et(e,"string");return"symbol"==typeof t?t:t+""}function Et(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ct(e,t){return e.get(Tt(e,t))}function Mt(e,t,n){return e.set(Tt(e,t),n),n}function Tt(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Rt=new WeakMap,Ot=new WeakMap,Nt=new WeakMap,At=new WeakMap,Lt=new WeakMap;class It{constructor(e){let{totalColumns:t,stretchMode:n,stretchingColumnWidthFn:r,columnWidthFn:i}=e;_t(this,"stretchAllRatio",0),_t(this,"stretchLastWidth",0),_t(this,"stretchAllColumnsWidth",[]),bt(this,Rt,0),_t(this,"needVerifyLastColumnWidth",!0),bt(this,Ot,()=>0),bt(this,Nt,e=>e),bt(this,At,e=>e),bt(this,Lt,()=>"none"),Mt(Ot,this,t),Mt(Lt,this,n),Mt(Nt,this,null!==r&&void 0!==r?r:Ct(Nt,this)),Mt(At,this,null!==i&&void 0!==i?i:Ct(At,this))}refreshStretching(e){if("none"===Ct(Lt,this).call(this))return;this.stretchAllRatio=0,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0,this.stretchLastWidth=0,Mt(Rt,this,e);let t=0;for(let r=0;r<Ct(Ot,this).call(this);r++){const n=this._getColumnWidth(r),i=Ct(Nt,this).call(this,void 0,r);"number"===typeof i?e-=i:t+=n}const n=e-t;if("all"===Ct(Lt,this).call(this)&&n>0)this.stretchAllRatio=e/t,this.stretchAllColumnsWidth=[],this.needVerifyLastColumnWidth=!0;else if("last"===Ct(Lt,this).call(this)&&e!==1/0){const e=this._getColumnWidth(Ct(Ot,this).call(this)-1),t=n+e;this.stretchLastWidth=t>=0?t:e}}getStretchedColumnWidth(e,t){let n=null;return"all"===Ct(Lt,this).call(this)&&0!==this.stretchAllRatio?n=this._getStretchedAllColumnWidth(e,t):"last"===Ct(Lt,this).call(this)&&0!==this.stretchLastWidth&&(n=this._getStretchedLastColumnWidth(e)),n}_getStretchedAllColumnWidth(e,t){let n=0;if(!this.stretchAllColumnsWidth[e]){const n=Math.round(t*this.stretchAllRatio),r=Ct(Nt,this).call(this,n,e);this.stretchAllColumnsWidth[e]=void 0===r?n:isNaN(r)?this._getColumnWidth(e):r}if(this.stretchAllColumnsWidth.length===Ct(Ot,this).call(this)&&this.needVerifyLastColumnWidth){this.needVerifyLastColumnWidth=!1;for(let e=0;e<this.stretchAllColumnsWidth.length;e++)n+=this.stretchAllColumnsWidth[e];n!==Ct(Rt,this)&&(this.stretchAllColumnsWidth[this.stretchAllColumnsWidth.length-1]+=Ct(Rt,this)-n)}return this.stretchAllColumnsWidth[e]}_getStretchedLastColumnWidth(e){return e===Ct(Ot,this).call(this)-1?this.stretchLastWidth:null}_getColumnWidth(e){let t=Ct(At,this).call(this,e);return isNaN(t)&&(t=wt["a"]),t}}function kt(e,t,n){return(t=xt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xt(e){var t=Dt(e,"string");return"symbol"==typeof t?t:t+""}function Dt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ht{constructor(e,t){kt(this,"dataAccessObject",void 0),kt(this,"wtSettings",void 0),kt(this,"headerWidths",new Map),kt(this,"stretching",void 0),this.dataAccessObject=e,this.wtSettings=t,this.stretching=new It({totalColumns:()=>this.wtSettings.getSetting("totalColumns"),stretchMode:()=>this.wtSettings.getSetting("stretchH"),stretchingColumnWidthFn:(e,t)=>this.wtSettings.getSetting("onBeforeStretchingColumnWidth",e,t),columnWidthFn:e=>this.dataAccessObject.wtTable.getColumnWidth(e)})}getWidth(e){const t=this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth");return t}getStretchedColumnWidth(e){let t=this.getWidth(e);const n=this.stretching.getStretchedColumnWidth(e,t);return n&&(t=n),t}getHeaderHeight(e){let t=this.wtSettings.getSetting("defaultRowHeight");const n=this.dataAccessObject.wtViewport.oversizedColumnHeaders[e];return void 0!==n&&(t=t?Math.max(t,n):n),t}getHeaderWidth(e){return this.headerWidths.get(this.dataAccessObject.wtTable.columnFilter.sourceToRendered(e))}refreshStretching(){const{wtTable:e,wtViewport:t,cloneSource:n}=this.dataAccessObject,i=n?n.wtTable.holder:e.holder,s=i.offsetHeight<i.scrollHeight?Object(r["getScrollbarWidth"])():0;this.stretching.refreshStretching(t.getViewportWidth()-s)}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(this.refreshStretching(),t=e.getSetting("onModifyRowHeaderWidth",t),null!==t&&void 0!==t){const n=e.getSetting("rowHeaders").length,r=e.getSetting("defaultColumnWidth");for(let e=0;e<n;e++){let n=Array.isArray(t)?t[e]:t;n=null===n||void 0===n?r:n,this.headerWidths.set(e,n)}}}}function Pt(e,t,n){return(t=jt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e){var t=Ft(e,"string");return"symbol"==typeof t?t:t+""}function Ft(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Yt{constructor(e,t){Pt(this,"dataAccessObject",void 0),Pt(this,"wtSettings",void 0),this.dataAccessObject=e,this.wtSettings=t}getHeight(e){let t=this.wtSettings.getSetting("rowHeight",e);const n=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==n&&(t=void 0===t?n:Math.max(t,n)),t}getHeightByOverlayName(e,t){let n=this.wtSettings.getSetting("rowHeightByOverlayName",e,t);const r=this.dataAccessObject.wtViewport.oversizedRows[e];return void 0!==r&&(n=void 0===n?r:Math.max(n,r)),n}}const Ut="top",Vt="bottom",Bt="inline_start",Wt="top_inline_start_corner",zt="bottom_inline_start_corner",Gt=[Ut,Vt,Bt,Wt,zt],Kt=new Map([[Ut,"ht_clone_"+Ut],[Vt,"ht_clone_"+Vt],[Bt,`ht_clone_${Bt} ht_clone_left`],[Wt,`ht_clone_${Wt} ht_clone_top_left_corner`],[zt,`ht_clone_${zt} ht_clone_bottom_left_corner`]]);function Xt(e,t,n){return(t=$t(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $t(e){var t=qt(e,"string");return"symbol"==typeof t?t:t+""}function qt(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Jt{constructor(e,t,n,i,s){Xt(this,"wtSettings",null),Xt(this,"domBindings",void 0),Xt(this,"TBODY",null),Xt(this,"THEAD",null),Xt(this,"COLGROUP",null),Xt(this,"hasTableHeight",!0),Xt(this,"hasTableWidth",!0),Xt(this,"isTableVisible",!1),Xt(this,"tableOffset",0),Xt(this,"holderOffset",0),this.domBindings=n,this.isMaster="master"===s,this.name=s,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=i,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,Object(r["removeTextNodes"])(this.TABLE),this.spreader=this.createSpreader(this.TABLE),this.hider=this.createHider(this.spreader),this.holder=this.createHolder(this.hider),this.wtRootElement=this.holder.parentNode,this.isMaster&&this.alignOverlaysWithTrimmingContainer(),this.fixTableDomTree(),this.rowFilter=null,this.columnFilter=null,this.correctHeaderWidth=!1;const o=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",()=>this._modifyRowHeaderWidth(o)),this.rowUtils=new Yt(this.dataAccessObject,this.wtSettings),this.columnUtils=new Ht(this.dataAccessObject,this.wtSettings),this.tableRenderer=new yt({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer")})}is(e){return this.name===e}fixTableDomTree(){const e=this.domBindings.rootDocument;this.TBODY=this.TABLE.querySelector("tbody"),this.TBODY||(this.TBODY=e.createElement("tbody"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.querySelector("thead"),this.THEAD||(this.THEAD=e.createElement("thead"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.querySelector("colgroup"),this.COLGROUP||(this.COLGROUP=e.createElement("colgroup"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD))}createSpreader(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtSpreader",t&&t.insertBefore(n,e),n.appendChild(e)),n.style.position="relative",this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Xe["y"])()]),n}createHider(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Xe["y"])()]),n}createHolder(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&Object(r["hasClass"])(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.style.position="relative",n.className="wtHolder",t&&t.insertBefore(n,e),this.isMaster&&(n.parentNode.className+="ht_master handsontable",n.parentNode.setAttribute("dir",this.wtSettings.getSettingPure("rtlMode")?"rtl":"ltr"),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n.parentNode,[Object(Xe["y"])()])),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&Object(r["setAttribute"])(n,[Object(Xe["y"])()]),n}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:n,wtViewport:i}=this.dataAccessObject,s=t.getSetting("totalRows"),o=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),l=a.length,u=t.getSetting("columnHeaders"),c=u.length;let h=e;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=Object(r["offset"])(this.holder),h=i.createCalculators(h),l&&!t.getSetting("fixedColumnsStart"))){const e=n.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(h=!1)}if(h)this.isMaster&&n.refresh(!0);else{this.isMaster?this.tableOffset=Object(r["offset"])(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=s>0?this.getFirstRenderedRow():0,t=o>0?this.getFirstRenderedColumn():0;this.rowFilter=new Ee(e,s,c),this.columnFilter=new we(t,o,l);let h=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),h=!0!==e.skipRender}if(h){let e;if(this.tableRenderer.setHeaderContentRenderers(a,u),(this.is(Vt)||this.is(zt))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&(e=this.dataAccessObject.workspaceWidth,i.containerWidth=null,this.markOversizedColumnHeaders()),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(Vt))&&this.markOversizedRows(),this.isMaster){this.wtSettings.getSetting("externalRowCalculator")||i.createVisibleCalculators(),n.refresh(!1),n.applyToDOM();const t=Object(r["outerWidth"])(this.hider),s=Object(r["outerWidth"])(this.TABLE);0!==t&&s!==t&&(this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),e!==i.getWorkspaceWidth()&&(i.containerWidth=null,this.columnUtils.calculateWidths(),this.tableRenderer.renderer.colGroup.render()),this.wtSettings.getSetting("onDraw",!0)}else this.is(Vt)&&this.dataAccessObject.cloneSource.wtOverlays.adjustElementsSize()}}let d=!1;return this.isMaster&&(d=n.topOverlay.resetFixedPosition(),n.bottomOverlay.clone&&(d=n.bottomOverlay.resetFixedPosition()||d),d=n.inlineStartOverlay.resetFixedPosition()||d,n.topInlineStartCornerOverlay&&n.topInlineStartCornerOverlay.resetFixedPosition(),n.bottomInlineStartCornerOverlay&&n.bottomInlineStartCornerOverlay.clone&&n.bottomInlineStartCornerOverlay.resetFixedPosition()),d?(n.refreshAll(),n.adjustElementsSize()):this.dataAccessObject.selectionManager.setActiveOverlay(this.facadeGetter()).render(h),this.isMaster&&n.afterDraw(),this.dataAccessObject.drawn=!0,this}markIfOversizedColumnHeader(e){const t=this.columnFilter.renderedToSource(e);let n=this.wtSettings.getSetting("columnHeaders").length;const i=this.wtSettings.getSetting("defaultRowHeight");let s,o,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];while(n)n-=1,s=this.getColumnHeaderHeight(n),o=this.getColumnHeader(t,n),o&&(a=Object(r["innerHeight"])(o),(!s&&i<a||s<a)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=a),Array.isArray(l)?null!==l[n]&&void 0!==l[n]&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]):isNaN(l)||(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l),this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]<(l[n]||l)&&(this.dataAccessObject.wtViewport.oversizedColumnHeaders[n]=l[n]||l))}adjustColumnHeaderHeights(){const{wtSettings:e}=this,t=this.THEAD.childNodes,n=this.dataAccessObject.wtViewport.oversizedColumnHeaders,r=e.getSetting("columnHeaders");for(let i=0,s=r.length;i<s;i++)if(n[i]){if(!t[i]||0===t[i].childNodes.length)return;t[i].childNodes[0].style.height=n[i]+"px"}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(Vt))&&!e.getSetting("externalRowCalculator")){const e=this.getRenderedRowsCount();for(let n=0;n<e;n++){const e=this.rowFilter.renderedToSource(n);t.oversizedRows&&t.oversizedRows[e]&&(t.oversizedRows[e]=void 0)}}}getCell(e){let t=e.row,n=e.col;const r=this.wtSettings.getSetting("onModifyGetCellCoords",t,n);if(r&&Array.isArray(r)&&([t,n]=r),this.isRowBeforeRenderedRows(t))return-1;if(this.isRowAfterRenderedRows(t))return-2;if(this.isColumnBeforeRenderedColumns(n))return-3;if(this.isColumnAfterRenderedColumns(n))return-4;const i=this.getRow(t);if(!i&&t>=0)throw new Error("TR was expected to be rendered but is not");const s=i.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];if(!s&&n>=0)throw new Error("TD or TH was expected to be rendered but is not");return s}getRow(e){let t=null,n=null;var r,i;e<0?(t=null===(r=this.rowFilter)||void 0===r?void 0:r.sourceRowToVisibleColHeadedRow(e),n=this.THEAD):(t=null===(i=this.rowFilter)||void 0===i?void 0:i.sourceToRendered(e),n=this.TBODY);return void 0!==t&&void 0!==n&&(!(n.childNodes.length<t+1)&&n.childNodes[t])}getColumnHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.THEAD.childNodes[t];return null===n||void 0===n?void 0:n.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e)]}getColumnHeaders(e){const t=[],n=this.columnFilter.sourceColumnToVisibleRowHeadedColumn(e);return this.THEAD.childNodes.forEach(e=>{const r=e.childNodes[n];r&&t.push(r)}),t}getRowHeader(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;const n=this.wtSettings.getSetting("rowHeaders").length;if(t>=n)return;const r=this.rowFilter.sourceToRendered(e),i=r<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):r,s=r<0?this.THEAD:this.TBODY,o=s.childNodes[i];return null===o||void 0===o?void 0:o.childNodes[t]}getRowHeaders(e){const t=[],n=this.wtSettings.getSetting("rowHeaders").length;for(let r=0;r<n;r++){const n=this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)],i=null===n||void 0===n?void 0:n.childNodes[r];i&&t.push(i)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=Object(r["closest"])(t,["TD","TH"])),null===t)return null;const n=t.parentNode,i=n.parentNode;let s=Object(r["index"])(n),o=t.cellIndex;if(Object(r["overlayContainsElement"])(Wt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Ut,t,this.wtRootElement))"THEAD"===i.nodeName&&(s-=i.childNodes.length);else if(Object(r["overlayContainsElement"])(zt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Vt,t,this.wtRootElement)){const e=this.wtSettings.getSetting("totalRows");s=e-i.childNodes.length+s}else s=i===this.THEAD?this.rowFilter.visibleColHeadedRowToSourceRow(s):this.rowFilter.renderedToSource(s);return o=Object(r["overlayContainsElement"])(Wt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(Bt,t,this.wtRootElement)||Object(r["overlayContainsElement"])(zt,t,this.wtRootElement)?this.columnFilter.offsettedTH(o):this.columnFilter.visibleRowHeadedColumnToSourceColumn(o),this.wot.createCellCoords(s,o)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.wtSettings.getSetting("defaultRowHeight"),n=Object(r["innerHeight"])(this.TBODY)-1;let i,s,o,a,l;if(t!==n||this.wtSettings.getSetting("fixedRowsBottom"))while(e)e-=1,o=this.rowFilter.renderedToSource(e),i=this.getRowHeight(o),a=this.getTrForRow(o),l=a.querySelector("th"),s=l?Object(r["innerHeight"])(l):Object(r["innerHeight"])(a)-1,(!i&&this.wtSettings.getSetting("defaultRowHeight")<s||i<s)&&(s+=1,this.dataAccessObject.wtViewport.oversizedRows[o]=s)}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders"),n=t.length;return Math.abs(e)<=n}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders"),n=t.length;return Math.abs(e)<=n}isRowBeforeRenderedRows(e){const t=this.getFirstRenderedRow();return e<0&&t<=0?!this.isRowHeaderRendered(e):e<t}isRowAfterRenderedRows(e){return e>this.getLastRenderedRow()}isColumnBeforeRenderedColumns(e){const t=this.getFirstRenderedColumn();return e<0&&t<=0?!this.isColumnHeaderRendered(e):e<t}isColumnAfterRenderedColumns(e){return this.columnFilter&&e>this.getLastRenderedColumn()}isColumnAfterViewport(e){return this.columnFilter&&e>this.getLastVisibleColumn()}isRowAfterViewport(e){return this.rowFilter&&e>this.getLastVisibleRow()}isColumnBeforeViewport(e){return this.columnFilter&&this.columnFilter.sourceToRendered(e)<0&&e>=0}isLastRowFullyVisible(){return this.getLastVisibleRow()===this.getLastRenderedRow()}isLastColumnFullyVisible(){return this.getLastVisibleColumn()===this.getLastRenderedColumn()}allRowsInViewport(){return this.wtSettings.getSetting("totalRows")===this.getVisibleRowsCount()}allColumnsInViewport(){return this.wtSettings.getSetting("totalColumns")===this.getVisibleColumnsCount()}getRowHeight(e){return this.rowUtils.getHeight(e)}getColumnHeaderHeight(e){return this.columnUtils.getHeaderHeight(e)}getColumnWidth(e){return this.columnUtils.getWidth(e)}getStretchedColumnWidth(e){return this.columnUtils.getStretchedColumnWidth(e)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return Object(r["outerWidth"])(this.TABLE)}getHeight(){return Object(r["outerHeight"])(this.TABLE)}getTotalWidth(){const e=Object(r["outerWidth"])(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=Object(r["outerHeight"])(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return Object(r["isVisible"])(this.TABLE)}_modifyRowHeaderWidth(e){let t=Object(i["isFunction"])(e)?e():null;return Array.isArray(t)?(t=[...t],t[t.length-1]=this._correctRowHeaderWidth(t[t.length-1])):t=this._correctRowHeaderWidth(t),t}_correctRowHeaderWidth(e){let t=e;return"number"!==typeof e&&(t=this.wtSettings.getSetting("defaultColumnWidth")),this.correctHeaderWidth&&(t+=1),t}}var Qt=Jt;const Zt="stickyRowsTop",en={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows");return 0===e?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsTop"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(E["defineGetter"])(en,"MIXIN_NAME",Zt,{writable:!1,enumerable:!1});var tn=en;const nn="calculatedColumns",rn={getFirstRenderedColumn(){const e=this.dataAccessObject.startColumnRendered;return null===e?-1:e},getFirstVisibleColumn(){const e=this.dataAccessObject.startColumnVisible;return null===e?-1:e},getFirstPartiallyVisibleColumn(){const e=this.dataAccessObject.startColumnPartiallyVisible;return null===e?-1:e},getLastRenderedColumn(){const e=this.dataAccessObject.endColumnRendered;return null===e?-1:e},getLastVisibleColumn(){const e=this.dataAccessObject.endColumnVisible;return null===e?-1:e},getLastPartiallyVisibleColumn(){const e=this.dataAccessObject.endColumnPartiallyVisible;return null===e?-1:e},getRenderedColumnsCount(){return this.dataAccessObject.countColumnsRendered},getVisibleColumnsCount(){return this.dataAccessObject.countColumnsVisible},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(E["defineGetter"])(rn,"MIXIN_NAME",nn,{writable:!1,enumerable:!1});var sn=rn;class on extends Qt{constructor(e,t,n,r){super(e,t,n,r,Ut)}}Object(E["mixin"])(on,tn),Object(E["mixin"])(on,sn);var an=on;function ln(e,t){un(e,t),t.add(e)}function un(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cn(e,t,n){return(t=hn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hn(e){var t=dn(e,"string");return"symbol"==typeof t?t:t+""}function dn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function mn(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var fn=new WeakSet;class pn{constructor(e){ln(this,fn),cn(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,n,r,i){const s=this.scrollViewportHorizontally(e.col,n,i),o=this.scrollViewportVertically(e.row,t,r);return s||o}scrollViewportHorizontally(e,t,n){const{drawn:r,totalColumns:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedColumnsStart:o,inlineStartOverlay:a}=this.dataAccessObject;if(s&&e<o)return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e),!Number.isInteger(e)||e<0||e>i)return!1;const l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let c=!1;return(s&&(e<l||e>u)||!s)&&(c=a.scrollTo(e,s?e>=this.getLastPartiallyVisibleColumn():t)),c}scrollViewportVertically(e,t,n){const{drawn:r,totalRows:i}=this.dataAccessObject;if(!r||!Number.isInteger(e)||e<0||e>i)return!1;const s=void 0===t&&void 0===n,{fixedRowsBottom:o,fixedRowsTop:a,topOverlay:l}=this.dataAccessObject;if(s&&(e<a||e>i-o-1))return!1;if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e),!Number.isInteger(e)||e<0||e>i)return!1;const u=this.getFirstVisibleRow(),c=this.getLastVisibleRow();let h=!1;return(s&&(e<u||e>c)||!s)&&(h=l.scrollTo(e,s?e>=this.getLastPartiallyVisibleRow():n)),h}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return mn(fn,this,yn).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return mn(fn,this,yn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return mn(fn,this,gn).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return mn(fn,this,gn).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}}function gn(e){const{wtSettings:t,inlineStartOverlay:n,wtTable:i,wtViewport:s,totalColumns:o,rootWindow:a}=this.dataAccessObject;if(n.mainTableScrollableElement===a){const l=t.getSetting("rtlMode");let u=null;if(l){const e=i.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document,n=t.documentElement.offsetWidth;u=Math.abs(e.right-n)}else{const e=Object(r["offset"])(i.wtRootElement);u=e.left}const c=Math.abs(Object(r["getScrollLeft"])(a,a));if(u>c){const t=Object(r["innerWidth"])(a);let i=s.getRowHeaderWidth();for(let r=1;r<=o;r++)if(i+=n.sumCellSizes(r-1,r),u+i-c>=t){e=r-2;break}}}return e}function yn(e){const{topOverlay:t,wtTable:n,wtViewport:i,totalRows:s,rootWindow:o}=this.dataAccessObject;if(t.mainTableScrollableElement===o){const a=Object(r["offset"])(n.wtRootElement),l=Object(r["getScrollTop"])(o,o);if(a.top>l){const n=Object(r["innerHeight"])(o);let u=i.getColumnHeaderHeight();for(let r=1;r<=s;r++)if(u+=t.sumCellSizes(r-1,r),a.top+u-l>=n){e=r-2;break}}}return e}var wn=pn,bn=n("0716"),vn=n("d852");function _n(e,t,n){return(t=Sn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Sn(e){var t=En(e,"string");return"symbol"==typeof t?t:t+""}function En(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Cn{get eventManager(){return new c["a"](this)}constructor(e,t){_n(this,"wtTable",void 0),_n(this,"wtScroll",void 0),_n(this,"wtViewport",void 0),_n(this,"wtOverlays",void 0),_n(this,"selectionManager",void 0),_n(this,"wtEvent",void 0),_n(this,"guid","wt_"+Object(X["randomString"])()),_n(this,"drawInterrupted",!1),_n(this,"drawn",!1),_n(this,"domBindings",void 0),_n(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new wn(this.createScrollDao())}findOriginalHeaders(){const e=[];if(this.wtTable.THEAD.childNodes.length&&this.wtTable.THEAD.childNodes[0].childNodes.length){for(let t=0,n=this.wtTable.THEAD.childNodes[0].childNodes.length;t<n;t++)e.push(this.wtTable.THEAD.childNodes[0].childNodes[t].innerHTML);this.wtSettings.getSetting("columnHeaders").length||this.wtSettings.update("columnHeaders",[function(t,n){Object(r["fastInnerText"])(n,e[t])}])}}createCellCoords(e,t){return new bn["a"](e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,n){return new vn["a"](e,t,n,this.wtSettings.getSetting("rtlMode"))}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.drawInterrupted=!1,this.wtTable.isVisible()?this.wtTable.draw(e):this.drawInterrupted=!0,this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!t)return this.wtTable.getCell(e);const n=this.wtSettings.getSetting("totalRows"),r=this.wtSettings.getSetting("fixedRowsTop"),i=this.wtSettings.getSetting("fixedRowsBottom"),s=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<r&&e.col<s)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<r)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<s&&e.row>=n-i){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<s)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<n&&e.row>=n-i&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,n,r,i){return!(e.col<0||e.row<0)&&this.wtScroll.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return!(e<0)&&this.wtScroll.scrollViewportVertically(e,t,n)}getViewport(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]}destroy(){this.wtOverlays.destroy(),this.wtEvent.destroy()}createScrollDao(){const e=this;return{get drawn(){return e.drawn},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get wtTable(){return e.wtTable},get wtViewport(){return e.wtViewport},get wtSettings(){return e.wtSettings},get rootWindow(){return e.domBindings.rootWindow},get totalRows(){return e.wtSettings.getSetting("totalRows")},get totalColumns(){return e.wtSettings.getSetting("totalColumns")},get fixedRowsTop(){return e.wtSettings.getSetting("fixedRowsTop")},get fixedRowsBottom(){return e.wtSettings.getSetting("fixedRowsBottom")},get fixedColumnsStart(){return e.wtSettings.getSetting("fixedColumnsStart")}}}getTableDao(){const e=this;return{get wot(){return e},get parentTableOffset(){return e.cloneSource.wtTable.tableOffset},get cloneSource(){return e.cloneSource},get workspaceWidth(){return e.wtViewport.getWorkspaceWidth()},get wtViewport(){return e.wtViewport},get wtOverlays(){return e.wtOverlays},get selectionManager(){return e.selectionManager},get drawn(){return e.drawn},set drawn(t){e.drawn=t},get wtTable(){return e.wtTable},get startColumnRendered(){return e.wtViewport.columnsRenderCalculator.startColumn},get startColumnVisible(){return e.wtViewport.columnsVisibleCalculator.startColumn},get startColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.startColumn},get endColumnRendered(){return e.wtViewport.columnsRenderCalculator.endColumn},get endColumnVisible(){return e.wtViewport.columnsVisibleCalculator.endColumn},get endColumnPartiallyVisible(){return e.wtViewport.columnsPartiallyVisibleCalculator.endColumn},get countColumnsRendered(){return e.wtViewport.columnsRenderCalculator.count},get countColumnsVisible(){return e.wtViewport.columnsVisibleCalculator.count},get startRowRendered(){return e.wtViewport.rowsRenderCalculator.startRow},get startRowVisible(){return e.wtViewport.rowsVisibleCalculator.startRow},get startRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.startRow},get endRowRendered(){return e.wtViewport.rowsRenderCalculator.endRow},get endRowVisible(){return e.wtViewport.rowsVisibleCalculator.endRow},get endRowPartiallyVisible(){return e.wtViewport.rowsPartiallyVisibleCalculator.endRow},get countRowsRendered(){return e.wtViewport.rowsRenderCalculator.count},get countRowsVisible(){return e.wtViewport.rowsVisibleCalculator.count},get columnHeaders(){return e.wtSettings.getSetting("columnHeaders")},get rowHeaders(){return e.wtSettings.getSetting("rowHeaders")}}}}function Mn(e,t,n){return(t=Tn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tn(e){var t=Rn(e,"string");return"symbol"==typeof t?t:t+""}function Rn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class On extends Cn{constructor(e,t,n){super(e,t),Mn(this,"cloneSource",void 0),Mn(this,"cloneOverlay",void 0);const r=this.wtSettings.getSetting("facade",this);this.cloneSource=n.source,this.cloneOverlay=n.overlay,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=n.viewport,this.selectionManager=n.selectionManager,this.wtEvent=new me(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}function Nn(e,t,n){return(t=An(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function An(e){var t=Ln(e,"string");return"symbol"==typeof t?t:t+""}function Ln(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class In{constructor(e,t,n,i,s){Nn(this,"wtSettings",null),Object(E["defineGetter"])(this,"wot",e,{writable:!1}),this.domBindings=s,this.facadeGetter=t,this.wtSettings=i;const{TABLE:o,hider:a,spreader:l,holder:u,wtRootElement:c}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=o,this.hider=a,this.spreader=l,this.holder=u,this.wtRootElement=c,this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode),this.needFullRender=this.shouldBeRendered(),this.clone=this.makeClone()}hasRenderingStateChanged(){return this.needFullRender!==this.shouldBeRendered()}updateStateOfRendering(e){"before"===e&&this.shouldBeRendered()?this.needFullRender=!0:"after"!==e||this.shouldBeRendered()||(this.needFullRender=!1)}shouldBeRendered(){return!0}updateTrimmingContainer(){this.trimmingContainer=Object(r["getTrimmingContainer"])(this.hider.parentNode.parentNode)}updateMainScrollableElement(){const{wtTable:e}=this.wot,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.mainTableScrollableElement=this.wot.wtTable.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE)}getRelativeCellPosition(e,t,n){if(!1===this.clone.wtTable.holder.contains(e))return void Object(C["b"])(`The provided element is not a child of the ${this.type} overlay`);const r=this.mainTableScrollableElement===this.domBindings.rootWindow,i=n<this.wtSettings.getSetting("fixedColumnsStart"),s=t<this.wtSettings.getSetting("fixedRowsTop"),o=t>=this.wtSettings.getSetting("totalRows")-this.wtSettings.getSetting("fixedRowsBottom"),a=this.clone.wtTable.spreader,l={start:this.getRelativeStartPosition(a),top:a.offsetTop},u={start:this.getRelativeStartPosition(e),top:e.offsetTop};let c=null;return c=r?this.getRelativeCellPositionWithinWindow(s,i,u,l):this.getRelativeCellPositionWithinHolder(s,o,i,u,l),c}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,n,i){const s=this.wot.wtTable.wtRootElement.getBoundingClientRect();let o=0,a=0;if(t){let e=s.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(s.left+s.width+Object(r["getScrollbarWidth"])())),o=e<=0?-1*e:0}else o=i.start;if(e){const e=this.clone.wtTable.TABLE.getBoundingClientRect();a=e.top-s.top}else a=i.top;return{start:n.start+o,top:n.top+a}}getRelativeCellPositionWithinHolder(e,t,n,r,i){const s={horizontal:this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),vertical:this.wot.wtOverlays.topOverlay.getScrollPosition()};let o=0,a=0;if(n||(o=s.horizontal-i.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect(),t=this.clone.wtTable.TABLE.getBoundingClientRect();a=-1*t.top+e.top}else e||(a=s.vertical-i.top);return{start:r.start-o,top:r.top-a}}makeClone(){if(-1===Gt.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=n.createElement("div"),o=n.createElement("table"),a=e.wtRootElement.parentNode;s.className=Kt.get(this.type)+" handsontable",s.setAttribute("dir",this.isRtl()?"rtl":"ltr"),s.style.position="absolute",s.style.top=0,s.style.overflow="visible",this.isRtl()?s.style.right=0:s.style.left=0,t.getSetting("ariaTags")&&Object(r["setAttribute"])(s,[Object(Xe["y"])()]),o.className=e.TABLE.className;const l=e.TABLE.getAttribute("role");l&&o.setAttribute("role",e.TABLE.getAttribute("role")),s.appendChild(o),a.appendChild(s);const u=this.wtSettings.getSetting("preventOverflow");return!0===u||"horizontal"===u&&this.type===Ut||"vertical"===u&&this.type===Bt?this.mainTableScrollableElement=i:"hidden"===i.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=Object(r["getScrollableElement"])(e.TABLE),new On(o,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.needFullRender&&this.clone.draw(e)}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider,n=e.style,r=t.style,i=e.parentNode.style;[n,r,i].forEach(e=>{e.width="",e.height=""})}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const kn=Object.freeze({width:"6px",height:"6px",borderWidth:"1px",borderStyle:"solid",borderColor:"#FFF"});function xn(e,t,n){return(t=Dn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dn(e){var t=Hn(e,"string");return"symbol"==typeof t?t:t+""}function Hn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Pn extends In{constructor(e,t,n,r){super(e,t,Ut,n,r),xn(this,"cachedFixedRowsTop",-1),this.cachedFixedRowsTop=this.wtSettings.getSetting("fixedRowsTop")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new an(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode,{rootWindow:t}=this.domBindings,n=this.wtSettings.getSetting("preventOverflow");let i=0,s=!1;if(this.trimmingContainer!==t||n&&"vertical"===n)i=this.getScrollPosition(),Object(r["resetCssTransform"])(e);else{const{wtTable:t}=this.wot,n=t.hider.getBoundingClientRect(),o=Math.ceil(n.bottom),a=e.offsetHeight;s=o===a,i=this.getOverlayOffset(),Object(r["setOverlayPosition"])(e,"0px",i+"px")}const o=this.adjustHeaderBordersPosition(i,s);return this.adjustElementsSize(),o}setScrollPosition(e){const t=this.domBindings.rootWindow;let n=!1;return this.mainTableScrollableElement===t&&t.scrollY!==e?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultRowHeight");let r=e,i=0;while(r<t){const e=this.wot.wtTable.getRowHeight(r);i+=void 0===e?n:e,r+=1}return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"horizontal"===a){let t=this.wot.wtViewport.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(t-=i),t=Math.min(t,e.wtRootElement.scrollWidth),o.width=t+"px"}else o.width="";this.clone.wtTable.holder.style.width=o.width;let l=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(l=0),o.height=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(kn.height,10)/2:0;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=parseInt(e.parentNode.style.height,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){const{wot:n,wtSettings:i}=this,s=n.cloneSource?n.cloneSource:n,o=s.wtTable.holder,a=i.getSetting("columnHeaders"),l=i.getSetting("fixedRowsTop"),u=0===l&&a.length>0&&!Object(r["hasClass"])(o.parentNode,"innerBorderTop")?1:0;let c=this.getTableParentOffset(),h=0;if(t){const n=this.wot.wtTable.getRowHeight(e),r=this.wot.wtViewport.getViewportHeight();n>r&&(t=!1)}if(t&&o.offsetHeight!==o.clientHeight&&(h=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t){const t=i.getSetting("fixedRowsBottom"),r=i.getSetting("totalRows");c+=this.sumCellSizes(0,e+1),c-=n.wtViewport.getViewportHeight()-this.sumCellSizes(r-t,r),c+=1,c+=u}else c+=this.sumCellSizes(i.getSetting("fixedRowsTop"),e);return c+=h,Object(r["getMaximumScrollTop"])(this.mainTableScrollableElement)===c-u&&u>0&&this.wot.wtOverlays.expandHiderVerticallyBy(u),this.setScrollPosition(c)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t;n=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:n}=this,i=this.wot.wtTable.holder.parentNode,s=n.getSetting("totalColumns"),o="horizontal"===n.getSetting("preventOverflow");s?Object(r["removeClass"])(i,"emptyColumns"):Object(r["addClass"])(i,"emptyColumns");let a=!1;if(!t&&!o){const t=n.getSetting("fixedRowsTop"),s=this.cachedFixedRowsTop!==t,o=n.getSetting("columnHeaders");if((s||0===t)&&o.length>0){const t=Object(r["hasClass"])(i,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),e||0===n.getSetting("totalRows")?(Object(r["addClass"])(i,"innerBorderTop"),a=!t):(Object(r["removeClass"])(i,"innerBorderTop"),a=t)}}return a}}const jn="stickyRowsBottom",Fn={getFirstRenderedRow(){const e=this.wtSettings.getSetting("totalRows"),t=this.wtSettings.getSetting("fixedRowsBottom"),n=e-t;return 0===e||0===t?-1:n<0?0:n},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){const e=this.wtSettings.getSetting("totalRows");return Math.min(this.wtSettings.getSetting("fixedRowsBottom"),e)},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return 0}};Object(E["defineGetter"])(Fn,"MIXIN_NAME",jn,{writable:!1,enumerable:!1});var Yn=Fn;class Un extends Qt{constructor(e,t,n,r){super(e,t,n,r,Vt)}}Object(E["mixin"])(Un,Yn),Object(E["mixin"])(Un,sn);var Vn=Un;function Bn(e,t,n){return(t=Wn(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(e){var t=zn(e,"string");return"symbol"==typeof t?t:t+""}function zn(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Gn extends In{constructor(e,t,n,r){super(e,t,Vt,n,r),Bn(this,"cachedFixedRowsBottom",-1),this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom")}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Vn(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")}resetFixedPosition(){if(!this.needFullRender||!this.shouldBeRendered()||!this.wot.wtTable.holder.parentNode)return!1;const{rootWindow:e}=this.domBindings,t=this.clone.wtTable.holder.parentNode;t.style.top="";let n=0;const r=this.wtSettings.getSetting("preventOverflow");this.trimmingContainer!==e||r&&"vertical"===r?(n=this.getScrollPosition(),this.repositionOverlay()):(n=this.getOverlayOffset(),t.style.bottom=n+"px");const i=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),i}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.mainTableScrollableElement===t?(t.scrollTo(Object(r["getWindowScrollLeft"])(t),e),n=!0):this.mainTableScrollableElement.scrollTop!==e&&(this.mainTableScrollableElement.scrollTop=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:n,wtSettings:r}=this.wot,i=r.getSetting("defaultRowHeight");let s=e,o=0;while(s<t){const e=n.getRowHeight(s);o+=void 0===e?i:e,s+=1}return o}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:i}=this.domBindings,s=Object(r["getScrollbarWidth"])(n),o=this.clone.wtTable.holder.parentNode,a=o.style,l=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==i||"horizontal"===l){let n=t.getWorkspaceWidth();this.wot.wtOverlays.hasScrollbarRight&&(n-=s),n=Math.min(n,e.wtRootElement.scrollWidth),a.width=n+"px"}else a.width="";this.clone.wtTable.holder.style.width=a.width;let u=Object(r["outerHeight"])(this.clone.wtTable.TABLE);this.wot.wtTable.hasDefinedSize()||(u=0),a.height=u+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable;this.clone.wtTable.hider.style.width=this.hider.style.width,e.style.width=e.parentNode.style.width,e.style.height=e.parentNode.style.height}applyToDOM(){const e=this.wtSettings.getSetting("totalRows");if("number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition)this.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the rowsRenderCalculator");this.spreader.style.top="0"}this.spreader.style.bottom="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){const e=this.isRtl()?"right":"left",{spreader:t}=this.clone.wtTable;"number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition?t.style[e]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px":t.style[e]=""}scrollTo(e,t){let n=this.getTableParentOffset();const i=this.wot.cloneSource?this.wot.cloneSource:this.wot,s=i.wtTable.holder;let o=0;t&&s.offsetHeight!==s.clientHeight&&(o=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(n+=this.sumCellSizes(0,e+1),n-=this.wot.wtViewport.getViewportHeight(),n+=1):n+=this.sumCellSizes(this.wtSettings.getSetting("fixedRowsBottom"),e),n+=o,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return Object(r["getScrollTop"])(this.mainTableScrollableElement,this.domBindings.rootWindow)}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"vertical"!==t)){const e=this.wot.wtTable.getTotalHeight(),t=this.clone.wtTable.getTotalHeight(),r=e-t,i=this.domBindings.rootDocument.documentElement.clientHeight;n=Math.max(this.getTableParentOffset()-this.getScrollPosition()-i+e,0),n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),n=this.cachedFixedRowsBottom!==t,i=this.wtSettings.getSetting("columnHeaders");let s=!1;if((n||0===t)&&i.length>0){const t=this.wot.wtTable.holder.parentNode,n=Object(r["hasClass"])(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?(Object(r["addClass"])(t,"innerBorderBottom"),s=!n):(Object(r["removeClass"])(t,"innerBorderBottom"),s=n)}return s}}const Kn="calculatedRows",Xn={getFirstRenderedRow(){const e=this.dataAccessObject.startRowRendered;return null===e?-1:e},getFirstVisibleRow(){const e=this.dataAccessObject.startRowVisible;return null===e?-1:e},getFirstPartiallyVisibleRow(){const e=this.dataAccessObject.startRowPartiallyVisible;return null===e?-1:e},getLastRenderedRow(){const e=this.dataAccessObject.endRowRendered;return null===e?-1:e},getLastVisibleRow(){const e=this.dataAccessObject.endRowVisible;return null===e?-1:e},getLastPartiallyVisibleRow(){const e=this.dataAccessObject.endRowPartiallyVisible;return null===e?-1:e},getRenderedRowsCount(){return this.dataAccessObject.countRowsRendered},getVisibleRowsCount(){return this.dataAccessObject.countRowsVisible},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};Object(E["defineGetter"])(Xn,"MIXIN_NAME",Kn,{writable:!1,enumerable:!1});var $n=Xn;const qn="stickyColumnsStart",Jn={getFirstRenderedColumn(){const e=this.wtSettings.getSetting("totalColumns");return 0===e?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){const e=this.wtSettings.getSetting("totalColumns");return Math.min(this.wtSettings.getSetting("fixedColumnsStart"),e)},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};Object(E["defineGetter"])(Jn,"MIXIN_NAME",qn,{writable:!1,enumerable:!1});var Qn=Jn;class Zn extends Qt{constructor(e,t,n,r){super(e,t,n,r,Bt)}}Object(E["mixin"])(Zn,$n),Object(E["mixin"])(Zn,Qn);var er=Zn;class tr extends In{constructor(e,t,n,r){super(e,t,Bt,n,r)}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new er(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wtTable:e}=this.wot;if(!this.needFullRender||!this.shouldBeRendered()||!e.holder.parentNode)return!1;const{rootWindow:t}=this.domBindings,n=this.clone.wtTable.holder.parentNode,i=this.wtSettings.getSetting("preventOverflow");let s=0;this.trimmingContainer!==t||i&&"horizontal"===i?(s=this.getScrollPosition(),Object(r["resetCssTransform"])(n)):(s=this.getOverlayOffset()*(this.isRtl()?-1:1),Object(r["setOverlayPosition"])(n,s+"px","0px"));const o=this.adjustHeaderBordersPosition(s);return this.adjustElementsSize(),o}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;return this.isRtl()&&(e=-e),this.mainTableScrollableElement===t&&t.scrollX!==e?(t.scrollTo(e,Object(r["getWindowScrollTop"])(t)),n=!0):this.mainTableScrollableElement.scrollLeft!==e&&(this.mainTableScrollableElement.scrollLeft=e,n=!0),n}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultColumnWidth");let r=e,i=0;while(r<t)i+=this.wot.wtTable.getStretchedColumnWidth(r)||n,r+=1;return i}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e}=this.wot,{rootDocument:t,rootWindow:n}=this.domBindings,i=Object(r["getScrollbarWidth"])(t),s=this.clone.wtTable.holder.parentNode,o=s.style,a=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==n||"vertical"===a){let t=this.wot.wtViewport.getWorkspaceHeight();this.wot.wtOverlays.hasScrollbarBottom&&(t-=i),t=Math.min(t,e.wtRootElement.scrollHeight),o.height=t+"px"}else o.height="";this.clone.wtTable.holder.style.height=o.height;const l=Object(r["outerWidth"])(this.clone.wtTable.TABLE);o.width=l+"px"}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=this.wot.selectionManager.getFocusSelection()?parseInt(kn.width,10)/2:0;this.clone.wtTable.hider.style.height=this.hider.style.height,e.style.height=e.parentNode.style.height,e.style.width=parseInt(e.parentNode.style.width,10)+t+"px"}applyToDOM(){const e=this.wtSettings.getSetting("totalColumns"),t=this.isRtl()?"right":"left";if("number"===typeof this.wot.wtViewport.columnsRenderCalculator.startPosition)this.spreader.style[t]=this.wot.wtViewport.columnsRenderCalculator.startPosition+"px";else{if(0!==e)throw new Error("Incorrect value of the columnsRenderCalculator");this.spreader.style[t]="0"}this.isRtl()?this.spreader.style.left="":this.spreader.style.right="",this.needFullRender&&this.syncOverlayOffset()}syncOverlayOffset(){"number"===typeof this.wot.wtViewport.rowsRenderCalculator.startPosition?this.clone.wtTable.spreader.style.top=this.wot.wtViewport.rowsRenderCalculator.startPosition+"px":this.clone.wtTable.spreader.style.top=""}scrollTo(e,t){const{wtSettings:n}=this,i=n.getSetting("rowHeaders"),s=n.getSetting("fixedColumnsStart"),o=this.wot.cloneSource?this.wot.cloneSource:this.wot,a=o.wtTable.holder,l=0===s&&i.length>0&&!Object(r["hasClass"])(a.parentNode,"innerBorderInlineStart")?1:0;let u=this.getTableParentOffset(),c=0;if(t){const n=this.wot.wtTable.getColumnWidth(e),r=this.wot.wtViewport.getViewportWidth();n>r&&(t=!1)}return t&&a.offsetWidth!==a.clientWidth&&(c=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),t?(u+=this.sumCellSizes(0,e+1),u-=this.wot.wtViewport.getViewportWidth(),u+=l):u+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),u+=c,Object(r["getMaximumScrollLeft"])(this.mainTableScrollableElement)===u-l&&l>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(l),this.setScrollPosition(u)}getTableParentOffset(){const e=this.wtSettings.getSetting("preventOverflow");let t=0;return e||this.trimmingContainer!==this.domBindings.rootWindow||(t=this.wot.wtTable.holderOffset.left),t}getScrollPosition(){return Math.abs(Object(r["getScrollLeft"])(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;if(this.trimmingContainer===e&&(!t||"horizontal"!==t)){n=this.isRtl()?Math.abs(Math.min(this.getTableParentOffset()-this.getScrollPosition(),0)):Math.max(this.getScrollPosition()-this.getTableParentOffset(),0);const e=this.wot.wtTable.getTotalWidth(),t=this.clone.wtTable.getTotalWidth(),r=e-t;n>r&&(n=0)}return n}adjustHeaderBordersPosition(e){const{wtSettings:t}=this,n=this.wot.wtTable.holder.parentNode,i=t.getSetting("rowHeaders"),s=t.getSetting("fixedColumnsStart"),o=t.getSetting("totalRows"),a="vertical"===t.getSetting("preventOverflow");o?Object(r["removeClass"])(n,"emptyRows"):Object(r["addClass"])(n,"emptyRows");let l=!1;if(!a)if(s&&!i.length)Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart");else if(!s&&i.length){const t=Object(r["hasClass"])(n,"innerBorderInlineStart");e?(Object(r["addClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=!t):(Object(r["removeClass"])(n,"innerBorderLeft innerBorderInlineStart"),l=t)}return l}}class nr extends Qt{constructor(e,t,n,r){super(e,t,n,r,Wt)}}Object(E["mixin"])(nr,tn),Object(E["mixin"])(nr,Qn);var rr=nr;function ir(e,t,n){return(t=sr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sr(e){var t=or(e,"string");return"symbol"==typeof t?t:t+""}function or(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ar extends In{constructor(e,t,n,r,i,s){super(e,t,Wt,n,r),ir(this,"topOverlay",void 0),ir(this,"inlineStartOverlay",void 0),this.topOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new rr(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderTopOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){if(this.updateTrimmingContainer(),!this.wot.wtTable.holder.parentNode)return!1;const e=this.clone.wtTable.holder.parentNode;if(this.trimmingContainer===this.domBindings.rootWindow){const t=this.inlineStartOverlay.getOverlayOffset()*(this.isRtl()?-1:1),n=this.topOverlay.getOverlayOffset();Object(r["setOverlayPosition"])(e,t+"px",n+"px")}else Object(r["resetCssTransform"])(e);let t=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const n=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=t+"px",e.style.width=n+"px",!1}}class lr extends Qt{constructor(e,t,n,r){super(e,t,n,r,zt)}}Object(E["mixin"])(lr,Yn),Object(E["mixin"])(lr,Qn);var ur=lr;class cr extends In{constructor(e,t,n,r,i,s){super(e,t,zt,n,r),this.bottomOverlay=i,this.inlineStartOverlay=s}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new ur(...t)}shouldBeRendered(){return this.wtSettings.getSetting("shouldRenderBottomOverlay")&&this.wtSettings.getSetting("shouldRenderInlineStartOverlay")}resetFixedPosition(){const{wot:e}=this;if(this.updateTrimmingContainer(),!e.wtTable.holder.parentNode)return!1;const t=this.clone.wtTable.holder.parentNode;if(t.style.top="",this.trimmingContainer===this.domBindings.rootWindow){const e=this.inlineStartOverlay.getOverlayOffset(),n=this.bottomOverlay.getOverlayOffset();t.style[this.isRtl()?"right":"left"]=e+"px",t.style.bottom=n+"px"}else Object(r["resetCssTransform"])(t),this.repositionOverlay();let n=Object(r["outerHeight"])(this.clone.wtTable.TABLE);const i=Object(r["outerWidth"])(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(n=0),t.style.height=n+"px",t.style.width=i+"px",!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,i=this.clone.wtTable.holder.parentNode;let s=0;t.hasVerticalScroll()||(s+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(s+=Object(r["getScrollbarWidth"])(n)),i.style.bottom=s+"px"}}function hr(e,t,n){dr(e,t),t.set(e,n)}function dr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function mr(e,t,n){return(t=fr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fr(e){var t=pr(e,"string");return"symbol"==typeof t?t:t+""}function pr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function gr(e,t,n){return e.set(wr(e,t),n),n}function yr(e,t){return e.get(wr(e,t))}function wr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var br=new WeakMap,vr=new WeakMap,_r=new WeakMap,Sr=new WeakMap;class Er{constructor(e,t,n,i,s,o){mr(this,"wot",null),hr(this,br,[]),mr(this,"topOverlay",null),mr(this,"bottomOverlay",null),mr(this,"inlineStartOverlay",null),mr(this,"topInlineStartCornerOverlay",null),mr(this,"bottomInlineStartCornerOverlay",null),mr(this,"browserLineHeight",void 0),mr(this,"wtSettings",null),hr(this,vr,!1),hr(this,_r,0),hr(this,Sr,null),mr(this,"resizeObserver",new ResizeObserver(e=>{Object(q["requestAnimationFrame"])(()=>{Array.isArray(e)&&e.length&&(gr(_r,this,yr(_r,this)+1),100===yr(_r,this)&&(Object(C["b"])("The ResizeObserver callback was fired too many times in direct succession.\nThis may be due to an infinite loop caused by setting a dynamic height/width (for example, with the `dvh` units) to a Handsontable container's parent. \nThe observer will be disconnected."),this.resizeObserver.disconnect()),null!==yr(Sr,this)&&clearTimeout(yr(Sr,this)),gr(Sr,this,setTimeout(()=>{gr(_r,this,0)},100)),this.wtSettings.getSetting("onContainerElementResize"))})})),this.wot=e,this.wtSettings=i,this.domBindings=n,this.facadeGetter=t,this.wtTable=o;const{rootDocument:a,rootWindow:l}=this.domBindings;this.instance=this.wot,this.eventManager=s,this.scrollbarSize=Object(r["getScrollbarWidth"])(a);const u="hidden"===l.getComputedStyle(o.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=u?o.holder:Object(r["getScrollableElement"])(o.TABLE),this.initOverlays(),this.hasScrollbarBottom=!1,this.hasScrollbarRight=!1,this.destroyed=!1,this.keyPressed=!1,this.spreaderLastSize={width:null,height:null},this.verticalScrolling=!1,this.horizontalScrolling=!1,this.initBrowserLineHeight(),this.registerListeners(),this.lastScrollX=l.scrollX,this.lastScrollY=l.scrollY}getOverlays(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=[...yr(br,this)];return e&&t.push(this.wtTable),t}initBrowserLineHeight(){const{rootWindow:e,rootDocument:t}=this.domBindings,n=e.getComputedStyle(t.body),r=parseInt(n.lineHeight,10),i=1.2*parseInt(n.fontSize,10);this.browserLineHeight=r||i}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new Pn(...e),this.bottomOverlay=new Gn(...e),this.inlineStartOverlay=new tr(...e),this.topInlineStartCornerOverlay=new ar(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new cr(...e,this.bottomOverlay,this.inlineStartOverlay),gr(br,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){gr(vr,this,yr(br,this).reduce((e,t)=>t.hasRenderingStateChanged()||e,!1)),yr(br,this).forEach(e=>e.updateStateOfRendering("before"))}afterDraw(){this.syncScrollWithMaster(),yr(br,this).forEach(e=>{const t=e.hasRenderingStateChanged();e.updateStateOfRendering("after"),t&&!e.needFullRender&&e.reset()})}refreshAll(){this.wot.drawn&&(this.wtTable.holder.parentNode?(this.wot.draw(!0),this.verticalScrolling&&this.inlineStartOverlay.onScroll(),this.horizontalScrolling&&this.topOverlay.onScroll(),this.verticalScrolling=!1,this.horizontalScrolling=!1):this.destroy())}registerListeners(){const{rootDocument:e,rootWindow:t}=this.domBindings,{mainTableScrollableElement:n}=this.topOverlay,{mainTableScrollableElement:r}=this.inlineStartOverlay;this.eventManager.addEventListener(e.documentElement,"keydown",e=>this.onKeyDown(e)),this.eventManager.addEventListener(e.documentElement,"keyup",()=>this.onKeyUp()),this.eventManager.addEventListener(e,"visibilitychange",()=>this.onKeyUp()),this.eventManager.addEventListener(n,"scroll",e=>this.onTableScroll(e),{passive:!0}),n!==r&&this.eventManager.addEventListener(r,"scroll",e=>this.onTableScroll(e),{passive:!0});const i=t.devicePixelRatio&&t.devicePixelRatio>1,s=this.scrollableElement===t,a=this.wtSettings.getSetting("preventWheel"),l={passive:s};(a||i||!Object(o["isChrome"])())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",e=>this.onCloneWheel(e,a),l);const u=[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let c;u.forEach(e=>{if(e&&e.needFullRender){const{holder:t}=e.clone.wtTable;this.eventManager.addEventListener(t,"wheel",e=>this.onCloneWheel(e,a),l)}}),this.eventManager.addEventListener(t,"resize",()=>{clearTimeout(c),c=setTimeout(()=>{this.wtSettings.getSetting("onWindowResize"),gr(_r,this,0)},200)}),s||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}deregisterListeners(){this.eventManager.clearEvents(!0)}onTableScroll(e){const t=this.domBindings.rootWindow,n=this.inlineStartOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,i=e.target;this.keyPressed&&(r!==t&&i!==t&&!e.target.contains(r)||n!==t&&i!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:n}=this.domBindings,r=this.inlineStartOverlay.mainTableScrollableElement,i=this.topOverlay.mainTableScrollableElement,s=e.target,o=i!==n&&s!==n&&!s.contains(i),a=r!==n&&s!==n&&!s.contains(r);if(this.keyPressed&&(o||a)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=Object(a["isKey"])(e.keyCode,"ARROW_UP|ARROW_RIGHT|ARROW_DOWN|ARROW_LEFT")}onKeyUp(){this.keyPressed=!1}translateMouseWheelToScroll(e){let t=isNaN(e.deltaY)?-1*e.wheelDeltaY:e.deltaY,n=isNaN(e.deltaX)?-1*e.wheelDeltaX:e.deltaX;1===e.deltaMode&&(n+=n*this.browserLineHeight,t+=t*this.browserLineHeight);const r=this.scrollVertically(t),i=this.scrollHorizontally(n);return r||i}scrollVertically(e){const t=this.scrollableElement.scrollTop;return this.scrollableElement.scrollTop+=e,t!==this.scrollableElement.scrollTop}scrollHorizontally(e){const t=this.scrollableElement.scrollLeft;return this.scrollableElement.scrollLeft+=e,t!==this.scrollableElement.scrollLeft}syncScrollPositions(){if(this.destroyed)return;const{rootWindow:e}=this.domBindings,t=this.topOverlay.clone.wtTable.holder,n=this.inlineStartOverlay.clone.wtTable.holder,[r,i]=[this.scrollableElement.scrollLeft,this.scrollableElement.scrollTop];if(this.horizontalScrolling=t.scrollLeft!==r||this.lastScrollX!==e.scrollX,this.verticalScrolling=n.scrollTop!==i||this.lastScrollY!==e.scrollY,this.lastScrollX=e.scrollX,this.lastScrollY=e.scrollY,this.horizontalScrolling){t.scrollLeft=r;const e=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;e&&(e.scrollLeft=r)}this.verticalScrolling&&(n.scrollTop=i),this.refreshAll()}syncScrollWithMaster(){if(!yr(vr,this))return;const e=this.topOverlay.mainTableScrollableElement,{scrollLeft:t,scrollTop:n}=e;this.topOverlay.needFullRender&&(this.topOverlay.clone.wtTable.holder.scrollLeft=t),this.bottomOverlay.needFullRender&&(this.bottomOverlay.clone.wtTable.holder.scrollLeft=t),this.inlineStartOverlay.needFullRender&&(this.inlineStartOverlay.clone.wtTable.holder.scrollTop=n),gr(vr,this,!1)}updateMainScrollableElements(){this.deregisterListeners(),this.inlineStartOverlay.updateMainScrollableElement(),this.topOverlay.updateMainScrollableElement(),this.bottomOverlay.needFullRender&&this.bottomOverlay.updateMainScrollableElement();const{wtTable:e}=this,{rootWindow:t}=this.domBindings;"hidden"===t.getComputedStyle(e.wtRootElement.parentNode).getPropertyValue("overflow")?this.scrollableElement=e.holder:this.scrollableElement=Object(r["getScrollableElement"])(e.TABLE),this.registerListeners()}destroy(){this.resizeObserver.disconnect(),this.eventManager.destroy(),this.topOverlay.destroy(),this.bottomOverlay.clone&&this.bottomOverlay.destroy(),this.inlineStartOverlay.destroy(),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.destroy(),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.destroy(),this.destroyed=!0}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.updateLastSpreaderSize();t&&this.adjustElementsSize(),this.bottomOverlay.clone&&this.bottomOverlay.refresh(e),this.inlineStartOverlay.refresh(e),this.topOverlay.refresh(e),this.topInlineStartCornerOverlay&&this.topInlineStartCornerOverlay.refresh(e),this.bottomInlineStartCornerOverlay&&this.bottomInlineStartCornerOverlay.clone&&this.bottomInlineStartCornerOverlay.refresh(e)}updateLastSpreaderSize(){const e=this.wtTable.spreader,t=e.clientWidth,n=e.clientHeight,r=t!==this.spreaderLastSize.width||n!==this.spreaderLastSize.height;return r&&(this.spreaderLastSize.width=t,this.spreaderLastSize.height=n),r}adjustElementsSize(){const{wtViewport:e}=this.wot,{wtTable:t}=this,{rootWindow:n}=this.domBindings,r=this.scrollableElement===n,i=this.wtSettings.getSetting("totalColumns"),s=this.wtSettings.getSetting("totalRows"),o=e.getRowHeaderWidth(),a=e.getColumnHeaderHeight(),l=a+this.topOverlay.sumCellSizes(0,s)+1,u=o+this.inlineStartOverlay.sumCellSizes(0,i),c=t.hider,h=c.style,d=()=>!r&&this.scrollableElement.scrollTop>Math.max(0,l-t.holder.clientHeight),m=()=>!r&&this.scrollableElement.scrollLeft>Math.max(0,u-t.holder.clientWidth),f=d()?1:0,p=m()?1:0;if(h.width=u+p+"px",h.height=l+f+"px",this.scrollbarSize>0){const{scrollHeight:e,scrollWidth:n}=t.wtRootElement,{scrollHeight:r,scrollWidth:i}=t.holder;this.hasScrollbarRight=e<r,this.hasScrollbarBottom=n<i,this.hasScrollbarRight&&t.hider.scrollWidth+this.scrollbarSize>n?this.hasScrollbarBottom=!0:this.hasScrollbarBottom&&t.hider.scrollHeight+this.scrollbarSize>e&&(this.hasScrollbarRight=!0)}this.topOverlay.adjustElementsSize(),this.inlineStartOverlay.adjustElementsSize(),this.bottomOverlay.adjustElementsSize()}expandHiderVerticallyBy(e){const{wtTable:t}=this;t.hider.style.height=parseInt(t.hider.style.height,10)+e+"px"}expandHiderHorizontallyBy(e){const{wtTable:t}=this;t.hider.style.width=parseInt(t.hider.style.width,10)+e+"px"}applyToDOM(){this.wtTable.isVisible()&&(this.topOverlay.applyToDOM(),this.bottomOverlay.clone&&this.bottomOverlay.applyToDOM(),this.inlineStartOverlay.applyToDOM())}getParentOverlay(e){if(!e)return null;const t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];let n=null;return Object(B["arrayEach"])(t,t=>{t&&t.clone&&t.clone.wtTable.TABLE.contains(e)&&(n=t.clone)}),n}syncOverlayTableClassNames(){const e=this.wtTable.TABLE,t=[this.topOverlay,this.inlineStartOverlay,this.bottomOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay];Object(B["arrayEach"])(t,t=>{t&&(t.clone.wtTable.TABLE.className=e.className)})}}var Cr=Er;function Mr(e,t,n){return(t=Tr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tr(e){var t=Rr(e,"string");return"symbol"==typeof t?t:t+""}function Rr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Or{constructor(e){Mr(this,"settings",{}),Mr(this,"defaults",Object.freeze(this.getDefaults())),Object(E["objectEach"])(this.defaults,(t,n)=>{if(void 0!==e[n])this.settings[n]=e[n];else{if(void 0===t)throw new Error(`A required setting "${n}" was not provided`);this.settings[n]=t}})}getDefaults(){return{facade:void 0,table:void 0,isDataViewInstance:!0,externalRowCalculator:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,preventOverflow(){return!1},preventWheel:!1,data:void 0,freezeOverlays:!1,fixedColumnsStart:0,fixedRowsTop:0,fixedRowsBottom:0,shouldRenderInlineStartOverlay:()=>this.getSetting("fixedColumnsStart")>0||this.getSetting("rowHeaders").length>0,shouldRenderTopOverlay:()=>this.getSetting("fixedRowsTop")>0||this.getSetting("columnHeaders").length>0,shouldRenderBottomOverlay:()=>this.getSetting("fixedRowsBottom")>0,minSpareRows:0,rowHeaders(){return[]},columnHeaders(){return[]},totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,n)=>{const i=this.getSetting("data",e,t);Object(r["fastInnerText"])(n,void 0===i||null===i?"":i)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultRowHeight:23,defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,onCellMouseDown:null,onCellContextMenu:null,onCellMouseOver:null,onCellMouseOut:null,onCellMouseUp:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeRemoveCellClassNames:null,onAfterDrawSelection:null,onBeforeDrawBorders:null,onBeforeViewportScrollHorizontally:e=>e,onBeforeViewportScrollVertically:e=>e,onScrollHorizontally:null,onScrollVertically:null,onBeforeTouchScroll:null,onAfterMomentumScroll:null,onBeforeStretchingColumnWidth:e=>e,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onBeforeHighlightingRowHeader:e=>e,onBeforeHighlightingColumnHeader:e=>e,onWindowResize:null,onContainerElementResize:null,renderAllColumns:!1,renderAllRows:!1,groups:!1,rowHeaderWidth:null,columnHeaderHeight:null,headerClassName:null,rtlMode:!1,ariaTags:!0}}update(e,t){return void 0===t?Object(E["objectEach"])(e,(e,t)=>{this.settings[t]=e}):this.settings[e]=t,this}getSetting(e,t,n,r,i){return"function"===typeof this.settings[e]?this.settings[e](t,n,r,i):void 0!==t&&Array.isArray(this.settings[e])?this.settings[e][t]:this.settings[e]}getSettingPure(e){return this.settings[e]}has(e){return!!this.settings[e]}}class Nr extends Qt{constructor(e,t,n,r){super(e,t,n,r,"master")}alignOverlaysWithTrimmingContainer(){const e=Object(r["getTrimmingContainer"])(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t){const e=this.wtSettings.getSetting("preventOverflow");e||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible")}else{const n=e.parentElement,i=Object(r["getStyle"])(e,"height",t),s=Object(r["getStyle"])(e,"overflow",t),o=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,c=e.offsetHeight;const h=["auto","hidden","scroll"];if(n&&h.includes(s)){const i=e.cloneNode(!1);i.style.overflow="auto",i.style.position="absolute",e.nextElementSibling?n.insertBefore(i,e.nextElementSibling):n.appendChild(i);const s=parseInt(Object(r["getComputedStyle"])(i,t).height,10);n.removeChild(i),0===s&&(c=0)}c=Math.min(c,l),o.height="auto"===i?"auto":c+"px",u=Math.min(u,a),o.width=u+"px",o.overflow="",this.hasTableHeight="auto"===o.height||c>0,this.hasTableWidth=u>0}this.isTableVisible=Object(r["isVisible"])(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,n="master",r=e.getSetting("columnHeaders"),i=r.length;if(i&&!t.hasOversizedColumnHeadersMarked[n]){const r=e.getSetting("rowHeaders"),s=r.length,o=this.getRenderedColumnsCount();for(let e=0;e<i;e++)for(let t=-1*s;t<o;t++)this.markIfOversizedColumnHeader(t);t.hasOversizedColumnHeadersMarked[n]=!0}}}Object(E["mixin"])(Nr,$n),Object(E["mixin"])(Nr,sn);var Ar=Nr;function Lr(e,t,n){return(t=Ir(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ir(e){var t=kr(e,"string");return"symbol"==typeof t?t:t+""}function kr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class xr{constructor(){Lr(this,"count",0),Lr(this,"startRow",0),Lr(this,"endRow",0),Lr(this,"startPosition",0),Lr(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalRows:t}=e;this.count=t,this.endRow=this.count-1}process(){}finalize(){}}n("b879"),n("dce9");function Dr(e,t,n){return(t=Hr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Hr(e){var t=Pr(e,"string");return"symbol"==typeof t?t:t+""}function Pr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class jr{constructor(){Dr(this,"count",0),Dr(this,"startRow",null),Dr(this,"endRow",null),Dr(this,"startPosition",null),Dr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i}=t;n<=r&&(this.startRow=e),n>=r&&n<=i&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const u=n+r-i;u<0||n>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}class Fr extends jr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalRows:r,startPositions:i}=e;null!==this.startRow&&"function"===typeof n&&n(this),this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=i[this.startRow])&&void 0!==t?t:null,r<this.endRow&&(this.endRow=r-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Yr(e,t,n){return(t=Ur(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ur(e){var t=Vr(e,"string");return"symbol"==typeof t?t:t+""}function Vr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Br{constructor(){Yr(this,"count",0),Yr(this,"startRow",null),Yr(this,"endRow",null),Yr(this,"startPosition",null),Yr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:i,rowHeight:s}=t;n>=r&&n+s<=i&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:i,totalRows:s,needReverse:o,startPositions:a,rowHeight:l}=e;if(this.endRow===s-1&&o){this.startRow=this.endRow;while(this.startRow>0){const e=a[this.endRow]+l-a[this.startRow-1];if(e<=r-i&&(this.startRow-=1),e>=r-i)break}}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null;const u=n+r-i,c=null===this.startRow?0:e.getRowHeight(this.startRow);u<c||n>a.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endRow&&(this.endRow=s-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function Wr(e,t,n){return(t=zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zr(e){var t=Gr(e,"string");return"symbol"==typeof t?t:t+""}function Gr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Kr{constructor(){Wr(this,"count",0),Wr(this,"startColumn",0),Wr(this,"endColumn",0),Wr(this,"startPosition",0),Wr(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalColumns:t}=e;this.count=t,this.endColumn=this.count-1}process(){}finalize(){}}function Xr(e,t,n){return(t=$r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $r(e){var t=qr(e,"string");return"symbol"==typeof t?t:t+""}function qr(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Jr{constructor(){Xr(this,"count",0),Xr(this,"startColumn",null),Xr(this,"endColumn",null),Xr(this,"startPosition",null),Xr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i}=t;n<=r&&(this.startColumn=e);const s=r>0?i+1:i;n>=r&&n<=r+s&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e)),this.endColumn=e}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+u-l[this.startColumn-1];if(this.startColumn-=1,e>r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const c=s>0?r+1:r,h=n+r-c;h<-1*i||n>l.at(-1)+u||-1*n-r>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}class Qr extends Jr{finalize(e){var t;super.finalize(e);const{overrideFn:n,totalColumns:r,startPositions:i}=e;null!==this.startColumn&&"function"===typeof n&&n(this),this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=i[this.startColumn])&&void 0!==t?t:null,r<this.endColumn&&(this.endColumn=r-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function Zr(e,t,n){return(t=ei(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ei(e){var t=ti(e,"string");return"symbol"==typeof t?t:t+""}function ti(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ni{constructor(){Zr(this,"count",0),Zr(this,"startColumn",null),Zr(this,"endColumn",null),Zr(this,"startPosition",null),Zr(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:i,columnWidth:s}=t,o=r>0?i+1:i;n>=r&&n+s<=r+o&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e),this.endColumn=e)}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:i,zeroBasedScrollOffset:s,totalColumns:o,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===o-1&&a){this.startColumn=this.endColumn;while(this.startColumn>0){const e=l[this.endColumn]+u-l[this.startColumn-1];if(e<=r&&(this.startColumn-=1),e>=r)break}}this.startPosition=null!==(t=l[this.startColumn])&&void 0!==t?t:null;const c=s>0?r+1:r,h=n+r-c,d=null===this.startColumn?0:e.getColumnWidth(this.startColumn);h<-1*i||n>l.at(-1)||-1*n-r>-1*d?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,o<this.endColumn&&(this.endColumn=o-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}var ri=n("eb36");class ii{constructor(e,t,n,r,i){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=n,this.wtTable=i,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.containerWidth=NaN,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new xr:new Fr],["fullyVisible",()=>new Br],["partiallyVisible",()=>new jr]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new Kr:new Qr],["fullyVisible",()=>new ni],["partiallyVisible",()=>new Jr]]),this.eventManager=r,this.eventManager.addEventListener(this.domBindings.rootWindow,"resize",()=>{this.clientHeight=this.getWorkspaceHeight()})}getWorkspaceHeight(){const e=this.domBindings.rootDocument,t=this.dataAccessObject.topOverlayTrimmingContainer;let n=0;if(t===this.domBindings.rootWindow)n=e.documentElement.clientHeight;else{const e=Object(r["outerHeight"])(t);n=e>0&&t.clientHeight>0?t.clientHeight:1/0}return n}getWorkspaceWidth(){const{wtSettings:e}=this,{rootDocument:t,rootWindow:n}=this.domBindings,i=this.dataAccessObject.inlineStartOverlayTrimmingContainer,s=t.documentElement.offsetWidth,o=e.getSetting("totalColumns"),a=e.getSetting("preventOverflow"),l=e.getSetting("rtlMode"),u=this.wtTable.TABLE.getBoundingClientRect(),c=l?u.right-s:u.left,h=s-c;let d,m;if(a)return Object(r["outerWidth"])(this.wtTable.wtRootElement);if(d=e.getSetting("freezeOverlays")?Math.min(h,s):Math.min(this.getContainerFillWidth(),h,s),i===n&&o>0&&this.sumColumnWidths(0,o-1)>d)return t.documentElement.clientWidth;if(i!==n&&(m=Object(r["getStyle"])(this.dataAccessObject.inlineStartOverlayTrimmingContainer,"overflow",n),"scroll"===m||"hidden"===m||"auto"===m))return Math.max(d,i.clientWidth);const f=e.getSetting("stretchH");return"none"!==f&&f?d:Math.max(d,Object(r["outerWidth"])(this.wtTable.TABLE))}hasVerticalScroll(){return this.wtTable.hider.offsetHeight>this.getWorkspaceHeight()}hasHorizontalScroll(){return this.wtTable.hider.offsetWidth>this.getWorkspaceWidth()}sumColumnWidths(e,t){let n=0,r=e;while(r<t)n+=this.wtTable.getColumnWidth(r),r+=1;return n}getContainerFillWidth(){if(this.containerWidth)return this.containerWidth;const e=this.wtTable.holder,t=this.domBindings.rootDocument.createElement("div");t.style.width="100%",t.style.height="1px",e.appendChild(t);const n=t.offsetWidth;return this.containerWidth=n,e.removeChild(t),n}getWorkspaceOffset(){return Object(r["offset"])(this.wtTable.TABLE)}getColumnHeaderHeight(){const e=this.wtSettings.getSetting("columnHeaders");return e.length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=Object(r["outerHeight"])(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getRowHeaderWidth(){const e=this.wtSettings.getSetting("rowHeaderWidth"),t=this.wtSettings.getSetting("rowHeaders");if(e){this.rowHeaderWidth=0;for(let n=0,r=t.length;n<r;n++)this.rowHeaderWidth+=e[n]||e}if(isNaN(this.rowHeaderWidth))if(t.length){let e=this.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(let n=0,i=t.length;n<i;n++)e?(this.rowHeaderWidth+=Object(r["outerWidth"])(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let i,s,o=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),c=t.getSetting("totalRows");return l&&a>=0&&(s=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=s,o-=s),u&&this.dataAccessObject.bottomOverlay.clone&&(s=this.dataAccessObject.bottomOverlay.sumCellSizes(c-u,c),o-=s),i=n.holder.clientHeight===n.holder.offsetHeight?0:Object(r["getScrollbarWidth"])(this.domBindings.rootDocument),new ri["b"]({calculationTypes:e.map(e=>[e,this.rowsCalculatorTypes.get(e)()]),viewportHeight:o,scrollOffset:a,totalRows:t.getSetting("totalRows"),rowHeightFn:e=>n.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:i})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let i=this.getViewportWidth(),s=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const o=t.getSetting("fixedColumnsStart");if(o&&s>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,o);s+=e,i-=e}return n.holder.clientWidth!==n.holder.offsetWidth&&(i-=Object(r["getScrollbarWidth"])(this.domBindings.rootDocument)),new wt["b"]({calculationTypes:e.map(e=>[e,this.columnsCalculatorTypes.get(e)()]),viewportWidth:i,scrollOffset:s,totalColumns:t.getSetting("totalColumns"),columnWidthFn:e=>n.getColumnWidth(e),overrideFn:t.getSettingPure("viewportColumnCalculatorOverride"),inlineStartOffset:this.dataAccessObject.inlineStartParentOffset})}createCalculators(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,n=this.createRowsCalculator(),r=this.createColumnsCalculator();if(e&&!t.getSetting("renderAllRows")){const t=n.getResultsFor("fullyVisible");e=this.areAllProposedVisibleRowsAlreadyRendered(t)}if(e&&!t.getSetting("renderAllColumns")){const t=r.getResultsFor("fullyVisible");e=this.areAllProposedVisibleColumnsAlreadyRendered(t)}return e||(this.rowsRenderCalculator=n.getResultsFor("rendered"),this.columnsRenderCalculator=r.getResultsFor("rendered")),this.rowsVisibleCalculator=n.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=r.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=n.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=r.getResultsFor("partiallyVisible"),e}createVisibleCalculators(){const e=this.createRowsCalculator(["fullyVisible","partiallyVisible"]),t=this.createColumnsCalculator(["fullyVisible","partiallyVisible"]);this.rowsVisibleCalculator=e.getResultsFor("fullyVisible"),this.columnsVisibleCalculator=t.getResultsFor("fullyVisible"),this.rowsPartiallyVisibleCalculator=e.getResultsFor("partiallyVisible"),this.columnsPartiallyVisibleCalculator=t.getResultsFor("partiallyVisible")}areAllProposedVisibleRowsAlreadyRendered(e){if(!this.rowsVisibleCalculator)return!1;let{startRow:t,endRow:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.rowsPartiallyVisibleCalculator.startRow,n=this.rowsPartiallyVisibleCalculator.endRow}const{startRow:r,endRow:i}=this.rowsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalRows")-1)}areAllProposedVisibleColumnsAlreadyRendered(e){if(!this.columnsVisibleCalculator)return!1;let{startColumn:t,endColumn:n}=e;if(null===t&&null===n){if(!e.isVisibleInTrimmingContainer)return!0;t=this.columnsPartiallyVisibleCalculator.startColumn,n=this.columnsPartiallyVisibleCalculator.endColumn}const{startColumn:r,endColumn:i}=this.columnsRenderCalculator;return!(t<r||t===r&&t>0)&&!(n>i||n===i&&n<this.wtSettings.getSetting("totalColumns")-1)}resetHasOversizedColumnHeadersMarked(){Object(E["objectEach"])(this.hasOversizedColumnHeadersMarked,(e,t,n)=>{n[t]=void 0})}}var si=ii;n("24b9e");function oi(e,t){li(e,t),t.add(e)}function ai(e,t,n){li(e,t),t.set(e,n)}function li(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ui(e,t){return e.get(hi(e,t))}function ci(e,t,n){return e.set(hi(e,t),n),n}function hi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var di=new WeakMap,mi=new WeakMap,fi=new WeakSet;class pi{constructor(){oi(this,fi),ai(this,di,void 0),ai(this,mi,void 0)}setActiveOverlay(e){return ci(mi,this,e),this}setActiveSelection(e){return ci(di,this,e),this}scan(){const e=ui(di,this).settings.selectionType,t=new Set;return"active-header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"area"===e?this.scanCellsRange(e=>t.add(e)):"focus"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e)),this.scanCellsRange(e=>t.add(e))):"fill"===e?this.scanCellsRange(e=>t.add(e)):"header"===e?(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanRowsInHeadersRange(e=>t.add(e))):"row"===e?(this.scanRowsInHeadersRange(e=>t.add(e)),this.scanRowsInCellsRange(e=>t.add(e))):"column"===e&&(this.scanColumnsInHeadersRange(e=>t.add(e)),this.scanColumnsInCellsRange(e=>t.add(e))),t}scanColumnsInHeadersRange(e){const[t,n,r,i]=ui(di,this).getCorners(),{wtTable:s}=ui(mi,this),o=s.getRenderedColumnsCount(),a=s.getColumnHeadersCount();let l=0;for(let u=-s.getRowHeadersCount();u<o;u++){const o=s.columnFilter.renderedToSource(u);if(!(o<n||o>i)){for(let u=-a;u<0;u++){if(u<t||u>r)continue;const c=u+a;let h=s.getColumnHeader(o,c);const d=ui(mi,this).getSetting("onBeforeHighlightingColumnHeader",o,c,{selectionType:ui(di,this).settings.selectionType,columnCursor:l,selectionWidth:i-n+1});null!==d&&(d!==o&&(h=s.getColumnHeader(d,c)),e(h))}l+=1}}}scanRowsInHeadersRange(e){const[t,n,r,i]=ui(di,this).getCorners(),{wtTable:s}=ui(mi,this),o=s.getRenderedRowsCount(),a=s.getRowHeadersCount();let l=0;for(let u=-s.getColumnHeadersCount();u<o;u++){const o=s.rowFilter.renderedToSource(u);if(!(o<t||o>r)){for(let u=-a;u<0;u++){if(u<n||u>i)continue;const c=u+a;let h=s.getRowHeader(o,c);const d=ui(mi,this).getSetting("onBeforeHighlightingRowHeader",o,c,{selectionType:ui(di,this).settings.selectionType,rowCursor:l,selectionHeight:r-t+1});null!==d&&(d!==o&&(h=s.getRowHeader(d,c)),e(h))}l+=1}}}scanCellsRange(e){const[t,n,i,s]=ui(di,this).getCorners(),{wtTable:o}=ui(mi,this);hi(fi,this,gi).call(this,(a,l)=>{if(a>=t&&a<=i&&l>=n&&l<=s){const t=o.getCell(ui(mi,this).createCellCoords(a,l)),n=ui(mi,this).getSetting("onAfterDrawSelection",a,l,ui(di,this).settings.layerLevel);"string"===typeof n&&Object(r["addClass"])(t,n),e(t)}})}scanRowsInCellsRange(e){const[t,,n]=ui(di,this).getCorners(),{wtTable:r}=ui(mi,this);hi(fi,this,gi).call(this,(i,s)=>{if(i>=t&&i<=n){const t=r.getCell(ui(mi,this).createCellCoords(i,s));e(t)}})}scanColumnsInCellsRange(e){const[,t,,n]=ui(di,this).getCorners(),{wtTable:r}=ui(mi,this);hi(fi,this,gi).call(this,(i,s)=>{if(s>=t&&s<=n){const t=r.getCell(ui(mi,this).createCellCoords(i,s));e(t)}})}}function gi(e){const{wtTable:t}=ui(mi,this),n=t.getRenderedRowsCount(),r=t.getRenderedColumnsCount();for(let i=0;i<n;i+=1){const n=t.rowFilter.renderedToSource(i);for(let i=0;i<r;i+=1)e(n,t.columnFilter.renderedToSource(i))}}class yi{constructor(e,t){t&&(this.eventManager=e.eventManager,this.instance=e,this.wot=e,this.settings=t,this.mouseDown=!1,this.main=null,this.top=null,this.bottom=null,this.start=null,this.end=null,this.topStyle=null,this.bottomStyle=null,this.startStyle=null,this.endStyle=null,this.cornerDefaultStyle=kn,this.cornerCenterPointOffset=-parseInt(this.cornerDefaultStyle.width,10)/2,this.corner=null,this.cornerStyle=null,this.createBorders(t),this.registerListeners())}registerListeners(){const e=this.wot.rootDocument.body;this.eventManager.addEventListener(e,"mousedown",()=>this.onMouseDown()),this.eventManager.addEventListener(e,"mouseup",()=>this.onMouseUp());for(let t=0,n=this.main.childNodes.length;t<n;t++){const e=this.main.childNodes[t];this.eventManager.addEventListener(e,"mouseenter",e=>this.onMouseEnter(e,this.main.childNodes[t]))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),Object(l["stopImmediatePropagation"])(e);const n=this,r=this.wot.rootDocument.body,i=t.getBoundingClientRect();function s(e){return e.clientY<Math.floor(i.top)||(e.clientY>Math.ceil(i.top+i.height)||(e.clientX<Math.floor(i.left)||(e.clientX>Math.ceil(i.left+i.width)||void 0)))}function o(e){s(e)&&(n.eventManager.removeEventListener(r,"mousemove",o),t.style.display="block")}t.style.display="none",this.eventManager.addEventListener(r,"mousemove",o)}createBorders(e){const{rootDocument:t}=this.wot;this.main=t.createElement("div");const n=["top","start","bottom","end","corner"];let r=this.main.style;r.position="absolute",r.top=0,r.left=0;for(let o=0;o<5;o++){const i=n[o],s=t.createElement("div");s.className="wtBorder "+(this.settings.className||""),this.settings[i]&&this.settings[i].hide&&(s.className+=" hidden"),r=s.style,r.backgroundColor=this.settings[i]&&this.settings[i].color?this.settings[i].color:e.border.color,r.height=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",r.width=this.settings[i]&&this.settings[i].width?this.settings[i].width+"px":e.border.width+"px",this.main.appendChild(s)}this.top=this.main.childNodes[0],this.start=this.main.childNodes[1],this.bottom=this.main.childNodes[2],this.end=this.main.childNodes[3],this.topStyle=this.top.style,this.startStyle=this.start.style,this.bottomStyle=this.bottom.style,this.endStyle=this.end.style,this.corner=this.main.childNodes[4],this.corner.className+=" corner",this.cornerStyle=this.corner.style,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.height=this.cornerDefaultStyle.height,this.cornerStyle.border=[this.cornerDefaultStyle.borderWidth,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:i}=this.wot;let s=i.bordersHolder;s||(s=t.createElement("div"),s.className="htBorders",i.bordersHolder=s,i.spreader.appendChild(s)),s.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e}=this.wot;this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")};const t=10,n=40;this.selectionHandles.top.className="topSelectionHandle topLeftSelectionHandle",this.selectionHandles.topHitArea.className="topSelectionHandle-HitArea topLeftSelectionHandle-HitArea",this.selectionHandles.bottom.className="bottomSelectionHandle bottomRightSelectionHandle",this.selectionHandles.bottomHitArea.className="bottomSelectionHandle-HitArea bottomRightSelectionHandle-HitArea",this.selectionHandles.styles={top:this.selectionHandles.top.style,topHitArea:this.selectionHandles.topHitArea.style,bottom:this.selectionHandles.bottom.style,bottomHitArea:this.selectionHandles.bottomHitArea.style};const r={position:"absolute",height:n+"px",width:n+"px","border-radius":parseInt(n/1.5,10)+"px"};Object(E["objectEach"])(r,(e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e});const i={position:"absolute",height:t+"px",width:t+"px","border-radius":parseInt(t/1.5,10)+"px",background:"#F5F5FF",border:"1px solid #4285c8"};Object(E["objectEach"])(i,(e,t)=>{this.selectionHandles.styles.bottom[t]=e,this.selectionHandles.styles.top[t]=e}),this.main.appendChild(this.selectionHandles.top),this.main.appendChild(this.selectionHandles.bottom),this.main.appendChild(this.selectionHandles.topHitArea),this.main.appendChild(this.selectionHandles.bottomHitArea)}isPartRange(e,t){const n=this.wot.selectionManager.getAreaSelection();return!(!n.cellRange||e===n.cellRange.to.row&&t===n.cellRange.to.col)}updateMultipleSelectionHandlesPosition(e,t,n,r,i,s){const o=this.wot.wtSettings.getSetting("rtlMode"),a=o?"right":"left",{top:l,topHitArea:u,bottom:c,bottomHitArea:h}=this.selectionHandles.styles,d=parseInt(l.borderWidth,10),m=parseInt(l.width,10),f=parseInt(u.width,10),p=this.wot.wtTable.getWidth(),g=this.wot.wtTable.getHeight();l.top=parseInt(n-m-1,10)+"px",l[a]=parseInt(r-m-1,10)+"px",u.top=parseInt(n-f/4*3,10)+"px",u[a]=parseInt(r-f/4*3,10)+"px";const y=Math.min(parseInt(r+i,10),p-m-2*d),w=Math.min(parseInt(r+i-f/4,10),p-f-2*d);c[a]=y+"px",h[a]=w+"px";const b=Math.min(parseInt(n+s,10),g-m-2*d),v=Math.min(parseInt(n+s-f/4,10),g-f-2*d);c.top=b+"px",h.top=v+"px",this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(l.display="block",u.display="block",this.isPartRange(e,t)?(c.display="none",h.display="none"):(c.display="block",h.display="block")):(l.display="none",c.display="none",u.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(l.zIndex="9999",u.zIndex="9999"):(l.zIndex="",u.zIndex="")}appear(e){if(this.disabled)return;const{wtTable:t,rootDocument:n,rootWindow:i}=this.wot;let s,a,l,u,c,h;const d=t.getRenderedRowsCount();for(let r=0;r<d;r+=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){s=n,c=e[0];break}}for(let r=d-1;r>=0;r-=1){const n=t.rowFilter.renderedToSource(r);if(n>=e[0]&&n<=e[2]){a=n;break}}const m=t.getRenderedColumnsCount();for(let r=0;r<m;r+=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){l=n,h=e[1];break}}for(let r=m-1;r>=0;r-=1){const n=t.columnFilter.renderedToSource(r);if(n>=e[1]&&n<=e[3]){u=n;break}}if(void 0===s||void 0===l)return void this.disappear();let f=t.getCell(this.wot.createCellCoords(s,l));const p=s!==a||l!==u,g=p?t.getCell(this.wot.createCellCoords(a,u)):f,y=Object(r["offset"])(f),w=p?Object(r["offset"])(g):y,b=Object(r["offset"])(t.TABLE),v=Object(r["outerWidth"])(t.TABLE),_=y.top,S=y.left,E=this.wot.wtSettings.getSetting("rtlMode");let C=0,M=0;if(E){const e=Object(r["outerWidth"])(f),t=i.innerWidth-b.left-v;M=S+e-w.left,C=i.innerWidth-S-e-t-1}else M=w.left+Object(r["outerWidth"])(g)-S,C=S-b.left-1;if(this.isEntireColumnSelected(s,a)){const e=this.getDimensionsFromHeader("columns",l,u,c,b);let t=null;e&&([t,C,M]=e),t&&(f=t)}let T=_-b.top-1,R=w.top+Object(r["outerHeight"])(g)-_;if(this.isEntireRowSelected(l,u)){const e=this.getDimensionsFromHeader("rows",s,a,h,b);let t=null;e&&([t,T,R]=e),t&&(f=t)}const O=Object(r["getComputedStyle"])(f,i);parseInt(O.borderTopWidth,10)>0&&(T+=1,R=R>0?R-1:0),parseInt(O[E?"borderRightWidth":"borderLeftWidth"],10)>0&&(C+=1,M=M>0?M-1:0);const N=E?"right":"left";this.topStyle.top=T+"px",this.topStyle[N]=C+"px",this.topStyle.width=M+"px",this.topStyle.display="block",this.startStyle.top=T+"px",this.startStyle[N]=C+"px",this.startStyle.height=R+"px",this.startStyle.display="block";const A=Math.floor(this.settings.border.width/2);this.bottomStyle.top=T+R-A+"px",this.bottomStyle[N]=C+"px",this.bottomStyle.width=M+"px",this.bottomStyle.display="block",this.endStyle.top=T+"px",this.endStyle[N]=C+M-A+"px",this.endStyle.height=R+1+"px",this.endStyle.display="block";let L=this.settings.border.cornerVisible;L="function"===typeof L?L(this.settings.layerLevel):L;const I=this.wot.getSetting("onModifyGetCellCoords",a,u);let[k,x]=[a,u];if(I&&Array.isArray(I)&&([,,k,x]=I),Object(o["isMobileBrowser"])()||!L||this.isPartRange(k,x))this.cornerStyle.display="none";else{this.cornerStyle.top=T+R+this.cornerCenterPointOffset-1+"px",this.cornerStyle[N]=C+M+this.cornerCenterPointOffset-1+"px",this.cornerStyle.borderRightWidth=this.cornerDefaultStyle.borderWidth,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=Object(r["getTrimmingContainer"])(t.TABLE);const s=e===i;s&&(e=n.documentElement);const o=parseInt(this.cornerDefaultStyle.width,10)/2,l=parseInt(this.cornerDefaultStyle.height,10)/2;if(u===this.wot.getSetting("totalColumns")-1){const t=s?g.getBoundingClientRect().left:g.offsetLeft;let n=!1,i=0;E?(i=t-parseInt(this.cornerDefaultStyle.width,10)/2,n=i<0):(i=t+Object(r["outerWidth"])(g)+parseInt(this.cornerDefaultStyle.width,10)/2,n=i>=Object(r["innerWidth"])(e)),n&&(this.cornerStyle[N]=Math.floor(C+M+this.cornerCenterPointOffset-o)+"px",this.cornerStyle[E?"borderLeftWidth":"borderRightWidth"]=0)}if(a===this.wot.getSetting("totalRows")-1){const t=s?g.getBoundingClientRect().top:g.offsetTop,n=t+Object(r["outerHeight"])(g)+parseInt(this.cornerDefaultStyle.height,10)/2,i=n>=Object(r["innerHeight"])(e);i&&(this.cornerStyle.top=Math.floor(T+R+this.cornerCenterPointOffset-l)+"px",this.cornerStyle.borderBottomWidth=0)}this.cornerStyle.display="block"}Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(a,u,T,C,M,R)}isEntireColumnSelected(e,t){return e===this.wot.wtTable.getFirstRenderedRow()&&t===this.wot.wtTable.getLastRenderedRow()}isEntireRowSelected(e,t){return e===this.wot.wtTable.getFirstRenderedColumn()&&t===this.wot.wtTable.getLastRenderedColumn()}getDimensionsFromHeader(e,t,n,i,s){const{wtTable:o}=this.wot,a=o.wtRootElement.parentNode;let l=null,u=null,c=null,h=null,d=null,m=null,f=null,p=null;switch(e){case"rows":l=function(){return o.getRowHeader(...arguments)},u=function(){return Object(r["outerHeight"])(...arguments)},c="ht__selection--rows",m="top";break;case"columns":l=function(){return o.getColumnHeader(...arguments)},u=function(){return Object(r["outerWidth"])(...arguments)},c="ht__selection--columns",m="left";break;default:}if(a.classList.contains(c)){const e=this.wot.getSetting("columnHeaders").length;if(f=l(t,e-i),p=l(n,e-i),!f||!p)return!1;const o=Object(r["offset"])(f),a=Object(r["offset"])(p);return f&&p&&(h=o[m]-s[m]-1,d=a[m]+u(p)-o[m]),[f,h,d]}return!1}changeBorderStyle(e,t){const n=this[e].style,i=t[e];!i||i.hide?Object(r["addClass"])(this[e],"hidden"):(Object(r["hasClass"])(this[e],"hidden")&&Object(r["removeClass"])(this[e],"hidden"),n.backgroundColor=i.color,"top"!==e&&"bottom"!==e||(n.height=i.width+"px"),"start"!==e&&"end"!==e||(n.width=i.width+"px"))}changeBorderToDefaultStyle(e){const t={width:1,color:"#000"},n=this[e].style;n.backgroundColor=t.color,n.width=t.width+"px",n.height=t.width+"px"}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?Object(r["addClass"])(this[e],"hidden"):Object(r["removeClass"])(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",Object(o["isMobileBrowser"])()&&this.instance.getSetting("isDataViewInstance")&&(this.selectionHandles.styles.top.display="none",this.selectionHandles.styles.topHitArea.display="none",this.selectionHandles.styles.bottom.display="none",this.selectionHandles.styles.bottomHitArea.display="none")}destroy(){this.eventManager.destroyWithOwnEventsOnly(),this.main.parentNode.removeChild(this.main)}}var wi=yi;function bi(e,t){_i(e,t),t.add(e)}function vi(e,t,n){_i(e,t),t.set(e,n)}function _i(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Si(e,t){return e.get(Ci(e,t))}function Ei(e,t,n){return e.set(Ci(e,t),n),n}function Ci(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Mi=new WeakMap,Ti=new WeakMap,Ri=new WeakMap,Oi=new WeakMap,Ni=new WeakMap,Ai=new WeakMap,Li=new WeakSet;class Ii{constructor(e){bi(this,Li),vi(this,Mi,void 0),vi(this,Ti,void 0),vi(this,Ri,new pi),vi(this,Oi,new WeakMap),vi(this,Ni,new WeakSet),vi(this,Ai,new Map),Ei(Ti,this,e)}setActiveOverlay(e){return Ei(Mi,this,e),Si(Ri,this).setActiveOverlay(Si(Mi,this)),Si(Oi,this).has(Si(Mi,this))||Si(Oi,this).set(Si(Mi,this),new Set),this}getFocusSelection(){return null!==Si(Ti,this)?Si(Ti,this).getFocus():null}getAreaSelection(){return null!==Si(Ti,this)?Si(Ti,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(Si(Ai,this).has(e)){const t=Si(Ai,this).get(e);if(t.has(Si(Mi,this)))return t.get(Si(Mi,this));const n=new wi(Si(Mi,this),e.settings);return t.set(Si(Mi,this),n),n}const t=new wi(Si(Mi,this),e.settings);return Si(Ai,this).set(e,new Map([[Si(Mi,this),t]])),t}getBorderInstances(e){var t,n;return Array.from(null!==(t=null===(n=Si(Ai,this).get(e))||void 0===n?void 0:n.values())&&void 0!==t?t:[])}destroyBorders(e){Si(Ai,this).get(e).forEach(e=>e.destroy()),Si(Ai,this).delete(e)}render(e){if(null===Si(Ti,this))return;e&&Ci(Li,this,ki).call(this);const t=Array.from(Si(Ti,this)),n=new Map,i=new Map;for(let r=0;r<t.length;r++){const e=t[r],{className:s,headerAttributes:o,createLayers:a,selectionType:l}=e.settings;Si(Ni,this).has(e)||(Si(Ni,this).add(e),e.addLocalHook("destroy",()=>this.destroyBorders(e)));const u=this.getBorderInstance(e);if(e.isEmpty()){null===u||void 0===u||u.disappear();continue}if(s){const t=Si(Ri,this).setActiveSelection(e).scan();t.forEach(e=>{if(n.has(e)){const t=n.get(e);t.has(s)&&!0===a?t.set(s,t.get(s)+1):t.set(s,1)}else n.set(e,new Map([[s,1]]));o&&(i.has(e)||i.set(e,[]),"TH"===e.nodeName&&i.get(e).push(...o))})}const c=e.getCorners();Si(Mi,this).getSetting("onBeforeDrawBorders",c,l),null===u||void 0===u||u.appear(c)}n.forEach((e,t)=>{var n;const i=Array.from(e).map(e=>{let[t,n]=e;return 1===n?t:[t,...Array.from({length:n-1},(e,n)=>`${t}-${n+1}`)]}).flat();i.forEach(e=>Si(Oi,this).get(Si(Mi,this)).add(e)),Object(r["addClass"])(t,i),"TD"===t.nodeName&&Array.isArray(null===(n=Si(Ti,this).options)||void 0===n?void 0:n.cellAttributes)&&Object(r["setAttribute"])(t,Si(Ti,this).options.cellAttributes)}),Array.from(i.keys()).forEach(e=>{Object(r["setAttribute"])(e,[...i.get(e)])})}}function ki(){const e=Si(Oi,this).get(Si(Mi,this)),t=Si(Mi,this).wtSettings.getSetting("onBeforeRemoveCellClassNames");if(Array.isArray(t))for(let n=0;n<t.length;n++)e.add(t[n]);e.forEach(e=>{var t,n;const i=Si(Mi,this).wtTable.TABLE.querySelectorAll("."+e);let s=[];Array.isArray(null===(t=Si(Ti,this).options)||void 0===t?void 0:t.cellAttributes)&&(s=Si(Ti,this).options.cellAttributes.map(e=>e[0])),Array.isArray(null===(n=Si(Ti,this).options)||void 0===n?void 0:n.headerAttributes)&&(s=[...s,...Si(Ti,this).options.headerAttributes.map(e=>e[0])]);for(let o=0,a=i.length;o<a;o++)Object(r["removeClass"])(i[o],e),Object(r["removeAttribute"])(i[o],s)}),e.clear()}class xi extends Cn{constructor(e,t){super(e,new Or(t));const n=this.wtSettings.getSetting("facade",this);this.wtTable=new Ar(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new si(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new Ii(this.wtSettings.getSetting("selections")),this.wtEvent=new me(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new Cr(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e={rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},t=[],n=[];Object(E["objectEach"])(e,(e,r)=>{this.wtSettings.getSetting(r).length&&n.push(e),t.push(e)}),Object(r["removeClass"])(this.wtTable.wtRootElement.parentNode,t),Object(r["addClass"])(this.wtTable.wtRootElement.parentNode,n)}getOverlayByName(e){var t;if(!Gt.includes(e))return null;const n=e.replace(/_([a-z])/g,e=>e[1].toUpperCase());return null!==(t=this.wtOverlays[n+"Overlay"])&&void 0!==t?t:null}getViewportDao(){const e=this;return{get wot(){return e},get topOverlayTrimmingContainer(){return e.wtOverlays.topOverlay.trimmingContainer},get inlineStartOverlayTrimmingContainer(){return e.wtOverlays.inlineStartOverlay.trimmingContainer},get topScrollPosition(){return e.wtOverlays.topOverlay.getScrollPosition()},get topParentOffset(){return e.wtOverlays.topOverlay.getTableParentOffset()},get inlineStartScrollPosition(){return e.wtOverlays.inlineStartOverlay.getScrollPosition()},get inlineStartParentOffset(){return e.wtOverlays.inlineStartOverlay.getTableParentOffset()},get topOverlay(){return e.wtOverlays.topOverlay},get inlineStartOverlay(){return e.wtOverlays.inlineStartOverlay},get bottomOverlay(){return e.wtOverlays.bottomOverlay}}}}class Di{constructor(e){e instanceof Cn?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new Di(e);return()=>t},this._wot=new xi(e.table,e)}get guid(){return this._wot.guid}get rootDocument(){return this._wot.domBindings.rootDocument}get rootWindow(){return this._wot.domBindings.rootWindow}get wtSettings(){return this._wot.wtSettings}get cloneSource(){return this._wot.cloneSource}get cloneOverlay(){return this._wot.cloneOverlay}get selectionManager(){return this._wot.selectionManager}get wtViewport(){return this._wot.wtViewport}get wtOverlays(){return this._wot.wtOverlays}get wtTable(){return this._wot.wtTable}get wtEvent(){return this._wot.wtEvent}get wtScroll(){return this._wot.wtScroll}get drawn(){return this._wot.drawn}set drawn(e){this._wot.drawn=e}get drawInterrupted(){return this._wot.drawInterrupted}set drawInterrupted(e){this._wot.drawInterrupted=e}get lastMouseOver(){return this._wot.lastMouseOver}set lastMouseOver(e){this._wot.lastMouseOver=e}get momentumScrolling(){return this._wot.momentumScrolling}set momentumScrolling(e){this._wot.momentumScrolling=e}get touchApplied(){return this._wot.touchApplied}set touchApplied(e){this._wot.touchApplied=e}get domBindings(){return this._wot.domBindings}get eventListeners(){return this._wot.eventListeners}set eventListeners(e){this._wot.eventListeners=e}get eventManager(){return this._wot.eventManager}createCellCoords(e,t){return this._wot.createCellCoords(e,t)}createCellRange(e,t,n){return this._wot.createCellRange(e,t,n)}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this._wot.draw(e),this}getCell(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this._wot.getCell(e,t)}scrollViewport(e,t,n,r,i){return this._wot.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wot.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wot.scrollViewportVertically(e,t,n)}getViewport(){return this._wot.getViewport()}getOverlayName(){return this._wot.cloneOverlay?this._wot.cloneOverlay.type:"master"}getOverlayByName(e){return this._wot.getOverlayByName(e)}exportSettingsAsClassNames(){return this._wot.exportSettingsAsClassNames()}update(e,t){return this._wot.wtSettings.update(e,t),this}getSetting(e,t,n,r,i){return this._wot.wtSettings.getSetting(e,t,n,r,i)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}function Hi(e){let{isShiftKey:t,isLeftClick:n,isRightClick:r,coords:i,selection:s,controller:o,cellCoordsFactory:a}=e;const l=s.isSelected()?s.getSelectedRange().current():null,u=s.isSelectedByCorner(),c=s.isSelectedByRowHeader();if(s.markSource("mouse"),t&&l)i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(i):(u||c)&&i.row>=0&&i.col>=0&&!o.cell?s.setRangeEnd(a(i.row,i.col)):u&&i.row<0&&!o.column?s.setRangeEnd(a(l.to.row,i.col)):c&&i.col<0&&!o.row?s.setRangeEnd(a(i.row,l.to.col)):(!u&&!c&&i.col<0||u&&i.col<0)&&!o.row?s.selectRows(Math.max(l.from.row,0),i.row,i.col):(!u&&!c&&i.row<0||c&&i.row<0)&&!o.column&&s.selectColumns(Math.max(l.from.col,0),i.col,i.row);else{const e=!s.inInSelection(i),t=n||r&&e;i.row<0&&i.col>=0&&!o.column?t&&s.selectColumns(i.col,i.col,i.row):i.col<0&&i.row>=0&&!o.row?t&&s.selectRows(i.row,i.row,i.col):i.col>=0&&i.row>=0&&!o.cell?t&&s.setRangeStart(i):i.col<0&&i.row<0&&s.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}s.markEndSource()}function Pi(e){let{isLeftClick:t,coords:n,selection:r,controller:i,cellCoordsFactory:s}=e;if(!t)return;const o=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),u=r.tableProps.countRows();r.markSource("mouse"),a&&!i.column?r.setRangeEnd(s(u-1,n.col)):o&&!i.row?r.setRangeEnd(s(n.row,l-1)):i.cell||r.setRangeEnd(n),r.markEndSource()}const ji=new Map([["mousedown",Hi],["mouseover",Pi],["touchstart",Hi]]);function Fi(e,t){let{coords:n,selection:r,controller:i,cellCoordsFactory:s}=t;ji.get(e.type)({coords:n,selection:r,controller:i,cellCoordsFactory:s,isShiftKey:e.shiftKey,isLeftClick:Object(l["isLeftClick"])(e)||"touchstart"===e.type,isRightClick:Object(l["isRightClick"])(e)})}const Yi=new WeakMap,Ui=Symbol("rootInstance");function Vi(e){Yi.set(e,!0)}function Bi(e){return e===Ui}function Wi(e){return Yi.has(e)}function zi(e,t){Ki(e,t),t.add(e)}function Gi(e,t,n){Ki(e,t),t.set(e,n)}function Ki(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xi(e,t,n){return(t=$i(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $i(e){var t=qi(e,"string");return"symbol"==typeof t?t:t+""}function qi(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ji(e,t){return e.get(Zi(e,t))}function Qi(e,t,n){return e.set(Zi(e,t),n),n}function Zi(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var es=new WeakMap,ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakMap,as=new WeakSet;class ls{constructor(e){zi(this,as),Xi(this,"hot",void 0),Xi(this,"eventManager",void 0),Xi(this,"settings",void 0),Xi(this,"THEAD",void 0),Xi(this,"TBODY",void 0),Xi(this,"_wt",void 0),Xi(this,"activeWt",void 0),Gi(this,es,0),Gi(this,ts,0),Xi(this,"postponedAdjustElementsSize",!1),Gi(this,ns,!1),Gi(this,rs,void 0),Gi(this,is,void 0),Gi(this,ss,0),Gi(this,os,0),this.hot=e,this.eventManager=new c["a"](this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){this.hot.isRenderSuspended()||(this.hot.runHooks("beforeRender",this.hot.forceFullRender),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize(!0)),this._wt.draw(!this.hot.forceFullRender),this.hot.runHooks("afterRender",this.hot.forceFullRender),this.hot.forceFullRender=!1,this.hot.renderCall=!1)}adjustElementsSize(){this.hot.isRenderSuspended()?this.postponedAdjustElementsSize=!0:this._wt.wtOverlays.adjustElementsSize()}getCellAtCoords(e,t){const n=this._wt.getCell(e,t);return n<0?null:n}scrollViewport(e,t,n,r,i){return this._wt.scrollViewport(e,t,n,r,i)}scrollViewportHorizontally(e,t,n){return this._wt.scrollViewportHorizontally(e,t,n)}scrollViewportVertically(e,t,n){return this._wt.scrollViewportVertically(e,t,n)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,n=e.getAttribute("style");n&&e.setAttribute("data-originalstyle",n),Object(r["addClass"])(e,"handsontable"),Qi(is,this,t.createElement("TABLE")),Object(r["addClass"])(Ji(is,this),"htCore"),this.hot.getSettings().tableClassName&&Object(r["addClass"])(Ji(is,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&(Object(r["setAttribute"])(Ji(is,this),[Object(Xe["y"])()]),Object(r["setAttribute"])(e,[Object(Xe["N"])(),Object(Xe["C"])(-1),Object(Xe["e"])(this.hot.countCols()),Object(Xe["v"])()])),this.THEAD=t.createElement("THEAD"),Ji(is,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),Ji(is,this).appendChild(this.TBODY),this.hot.table=Ji(is,this),this.hot.container.insertBefore(Ji(is,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:n,rootWindow:i}=this.hot,s=t.documentElement;this.eventManager.addEventListener(e,"mousedown",e=>{Qi(ns,this,!0),this.isTextSelectionAllowed(e.target)||(Object(r["clearTextSelection"])(i),e.preventDefault(),i.focus())}),this.eventManager.addEventListener(e,"mouseup",()=>{Qi(ns,this,!1)}),this.eventManager.addEventListener(e,"mousemove",e=>{Ji(ns,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&Object(r["clearTextSelection"])(i),e.preventDefault())}),this.eventManager.addEventListener(s,"keyup",e=>{n.isInProgress()&&!e.shiftKey&&n.finish()}),this.eventManager.addEventListener(s,"mouseup",i=>{n.isInProgress()&&Object(l["isLeftClick"])(i)&&n.finish(),Qi(rs,this,!1);const s=Object(r["isOutsideInput"])(t.activeElement);Object(r["isInput"])(t.activeElement)&&!s||!s&&(n.isSelected()||n.isSelectedByAnyHeader()||e.contains(i.target)||Object(l["isRightClick"])(i))||this.hot.unlisten()}),this.eventManager.addEventListener(s,"contextmenu",e=>{n.isInProgress()&&Object(l["isRightClick"])(e)&&(n.finish(),Qi(rs,this,!1))}),this.eventManager.addEventListener(s,"touchend",()=>{n.isInProgress()&&n.finish(),Qi(rs,this,!1)}),this.eventManager.addEventListener(s,"mousedown",n=>{const i=n.target,o=n.x||n.clientX,a=n.y||n.clientY;let l=n.target;if(Ji(rs,this)||!e||!this.hot.view)return;const{holder:u}=this._wt.wtTable;if(l===u){const e=Object(r["getScrollbarWidth"])(t);if(t.elementFromPoint(o+e,a)!==u||t.elementFromPoint(o,a+e)!==u)return}else while(l!==s){if(null===l){if(n.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}const c="function"===typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(i):this.settings.outsideClickDeselects;c?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)});let o=Object(r["getParentWindow"])(i);while(null!==o)this.eventManager.addEventListener(o.document.documentElement,"click",()=>{this.hot.unlisten()}),o=Object(r["getParentWindow"])(o);this.eventManager.addEventListener(Ji(is,this),"selectstart",e=>{this.settings.fragmentSelection||Object(r["isInput"])(e.target)||e.preventDefault()})}translateFromRenderableToVisualCoords(e){let{row:t,col:n}=e;return this.hot._createCellCoords(...this.translateFromRenderableToVisualIndex(t,n))}translateFromRenderableToVisualIndex(e,t){let n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e,r=t>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(t):t;return null===n&&(n=e),null===r&&(r=t),[n,r]}countRenderableIndexes(e,t){const n=Math.min(e.getNotTrimmedIndexesLength(),t),r=e.getNearestNotHiddenIndex(n-1,-1);return null===r?0:e.getRenderableFromVisualIndex(r)+1}countRenderableColumns(){return this.countRenderableIndexes(this.hot.columnIndexMapper,this.settings.maxCols)}countRenderableRows(){return this.countRenderableIndexes(this.hot.rowIndexMapper,this.settings.maxRows)}countNotHiddenRowIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.rowIndexMapper,this.countRenderableRows())}countNotHiddenColumnIndexes(e,t){return this.countNotHiddenIndexes(e,t,this.hot.columnIndexMapper,this.countRenderableColumns())}countNotHiddenIndexes(e,t,n,r){if(isNaN(e)||e<0)return 0;const i=n.getNearestNotHiddenIndex(e,t),s=n.getRenderableFromVisualIndex(i);if(!Number.isInteger(s))return 0;let o=0;return t<0?o=s+1:t>0&&(o=r-s),o}countNotHiddenFixedColumnsStart(){const e=this.hot.countCols(),t=Math.min(parseInt(this.settings.fixedColumnsStart,10),e)-1;return this.countNotHiddenColumnIndexes(t,-1)}countNotHiddenFixedRowsTop(){const e=this.hot.countRows(),t=Math.min(parseInt(this.settings.fixedRowsTop,10),e)-1;return this.countNotHiddenRowIndexes(t,-1)}countNotHiddenFixedRowsBottom(){const e=this.hot.countRows(),t=Math.max(e-parseInt(this.settings.fixedRowsBottom,10),0);return this.countNotHiddenRowIndexes(t,1)}countRenderableColumnsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.columnIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}countRenderableRowsInRange(e,t){let n=0;for(let r=e;r<=t;r++)null!==this.hot.rowIndexMapper.getRenderableFromVisualIndex(r)&&(n+=1);return n}isMainTableNotFullyCoveredByOverlays(){const e=this.countNotHiddenFixedRowsTop()+this.countNotHiddenFixedRowsBottom(),t=this.countNotHiddenFixedColumnsStart();return this.hot.countRenderedRows()>e&&this.hot.countRenderedCols()>t}initializeWalkontable(){const e={ariaTags:this.settings.ariaTags,rtlMode:this.hot.isRtl(),externalRowCalculator:this.hot.getPlugin("autoRowSize")&&this.hot.getPlugin("autoRowSize").isEnabled(),table:Ji(is,this),isDataViewInstance:()=>Wi(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,stretchH:()=>this.settings.stretchH,data:(e,t)=>this.hot.getDataAtCell(...this.translateFromRenderableToVisualIndex(e,t)),totalRows:()=>this.countRenderableRows(),totalColumns:()=>this.countRenderableColumns(),fixedColumnsStart:()=>this.countNotHiddenFixedColumnsStart(),fixedRowsTop:()=>this.countNotHiddenFixedRowsTop(),fixedRowsBottom:()=>this.countNotHiddenFixedRowsBottom(),shouldRenderInlineStartOverlay:()=>this.settings.fixedColumnsStart>0||e.rowHeaders().length>0,shouldRenderTopOverlay:()=>this.settings.fixedRowsTop>0||e.columnHeaders().length>0,shouldRenderBottomOverlay:()=>this.settings.fixedRowsBottom>0,minSpareRows:()=>this.settings.minSpareRows,renderAllRows:this.settings.renderAllRows,renderAllColumns:this.settings.renderAllColumns,rowHeaders:()=>{const e=[];return this.hot.hasRowHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.rowIndexMapper.getVisualFromRenderableIndex(e):e;this.appendRowHeader(n,t)}),this.hot.runHooks("afterGetRowHeaderRenderers",e),Qi(ts,this,e.length),this.hot.getSettings().ariaTags&&Zi(as,this,us).call(this)===this.hot.countCols()&&Zi(as,this,cs).call(this,Ji(ts,this)),e},columnHeaders:()=>{const e=[];return this.hot.hasColHeaders()&&e.push((e,t)=>{const n=e>=0?this.hot.columnIndexMapper.getVisualFromRenderableIndex(e):e;this.appendColHeader(n,t)}),this.hot.runHooks("afterGetColumnHeaderRenderers",e),Qi(es,this,e.length),e},columnWidth:e=>{const t=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getColWidth(null===t?e:t)},rowHeight:e=>{const t=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e);return this.hot.getRowHeight(null===t?e:t)},rowHeightByOverlayName:(e,t)=>{const n=this.hot.rowIndexMapper.getVisualFromRenderableIndex(e),r=null===n?e:n;return this.hot.runHooks("modifyRowHeightByOverlayName",this.hot.getRowHeight(r),r,t)},cellRenderer:(e,t,n)=>{const[r,i]=this.translateFromRenderableToVisualIndex(e,t),s=this.hot.runHooks("modifyGetCellCoords",r,i);let o=r,a=i;Array.isArray(s)&&([o,a]=s);const l=this.hot.getCellMeta(o,a),u=this.hot.colToProp(a);let c=this.hot.getDataAtRowProp(o,u);this.hot.hasHook("beforeValueRender")&&(c=this.hot.runHooks("beforeValueRender",c,l)),this.hot.runHooks("beforeRenderer",n,r,i,u,c,l),this.hot.getCellRenderer(l)(this.hot,n,r,i,u,c,l),this.hot.runHooks("afterRenderer",n,r,i,u,c,l)},selections:this.hot.selection.highlight,hideBorderOnMouseDownOver:()=>this.settings.fragmentSelection,onWindowResize:()=>{this.hot&&!this.hot.isDestroyed&&this.hot.refreshDimensions()},onContainerElementResize:()=>{this.hot&&!this.hot.isDestroyed&&Object(r["isVisible"])(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=r,Qi(rs,this,!0),this.hot.runHooks("beforeOnCellMouseDown",e,i,n,s),Object(l["isImmediatePropagationStopped"])(e)||(Fi(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,i,n),this.activeWt=this._wt)},onCellContextMenu:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,Qi(rs,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellContextMenu",e,i,n),this.activeWt=this._wt)},onCellMouseOut:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOut",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||(this.hot.runHooks("afterOnCellMouseOut",e,i,n),this.activeWt=this._wt)},onCellMouseOver:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t),s={row:!1,column:!1,cell:!1};this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOver",e,i,n,s),Object(l["isImmediatePropagationStopped"])(e)||(Ji(rs,this)&&Fi(e,{coords:i,selection:this.hot.selection,controller:s,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,i,n),this.activeWt=this._wt)},onCellMouseUp:(e,t,n,r)=>{const i=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseUp",e,i,n),Object(l["isImmediatePropagationStopped"])(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,i,n),this.activeWt=this._wt)},onCellCornerMouseDown:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerMouseDown",e)},onCellCornerDblClick:e=>{e.preventDefault(),this.hot.runHooks("afterOnCellCornerDblClick",e)},beforeDraw:(e,t)=>this.beforeRender(e,t),onDraw:e=>this.afterRender(e),onBeforeViewportScrollVertically:e=>{const t=this.hot.rowIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollVertically",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onBeforeViewportScrollHorizontally:e=>{const t=this.hot.columnIndexMapper,n=e<0;let r=e;return n||(r=t.getVisualFromRenderableIndex(e),null!==r)?(r=this.hot.runHooks("beforeViewportScrollHorizontally",r),this.hot.runHooks("beforeViewportScroll"),n?r:t.getRenderableFromVisualIndex(r)):e},onScrollVertically:()=>{this.hot.runHooks("afterScrollVertically"),this.hot.runHooks("afterScroll")},onScrollHorizontally:()=>{this.hot.runHooks("afterScrollHorizontally"),this.hot.runHooks("afterScroll")},onBeforeRemoveCellClassNames:()=>this.hot.runHooks("beforeRemoveCellClassNames"),onBeforeHighlightingRowHeader:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingRowHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onBeforeHighlightingColumnHeader:(e,t,n)=>{const r=this.hot.columnIndexMapper,i=e<0;let s=e;i||(s=r.getVisualFromRenderableIndex(e));const o=this.hot.runHooks("beforeHighlightingColumnHeader",s,t,n);return i?o:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(o,1))},onAfterDrawSelection:(e,t,n)=>{let r;const[i,s]=this.translateFromRenderableToVisualIndex(e,t),o=this.hot.selection.getSelectedRange(),a=o.size();if(a>0){const e=o.peekByIndex(null!==n&&void 0!==n?n:0);r=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",i,s,r,n)},onBeforeDrawBorders:(e,t)=>{const[n,r,i,s]=e,o=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),this.hot.rowIndexMapper.getVisualFromRenderableIndex(i),this.hot.columnIndexMapper.getVisualFromRenderableIndex(s)];return this.hot.runHooks("beforeDrawBorders",o,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onBeforeStretchingColumnWidth:(e,t)=>{const n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(t);return this.hot.runHooks("beforeStretchingColumnWidth",e,n)},onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,n)=>{const r=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,s=t>=0?i.getVisualFromRenderableIndex(t):t,o=e>=0?r.getVisualFromRenderableIndex(e):e,a=this.hot.runHooks("modifyGetCellCoords",o,s,n);if(Array.isArray(a)){const[e,t,n,s]=a;return[e>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,n>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(n,-1)):n,s>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(s,-1)):s]}},viewportRowCalculatorOverride:e=>{let t=this.settings.viewportRowRenderingOffset;if("auto"===t&&this.settings.fixedRowsTop&&(t=10),t>0||"auto"===t){const n=this.countRenderableRows(),r=e.startRow,i=e.endRow;if("number"===typeof t)e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1);else if("auto"===t){const t=Math.ceil(i/n*12);e.startRow=Math.max(r-t,0),e.endRow=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportRowCalculatorOverride",e)},viewportColumnCalculatorOverride:e=>{let t=this.settings.viewportColumnRenderingOffset;if("auto"===t&&this.settings.fixedColumnsStart&&(t=10),t>0||"auto"===t){const n=this.countRenderableColumns(),r=e.startColumn,i=e.endColumn;if("number"===typeof t&&(e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)),"auto"===t){const t=Math.ceil(i/n*6);e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(i+t,n-1)}}this.hot.runHooks("afterViewportColumnCalculatorOverride",e)},rowHeaderWidth:()=>this.settings.rowHeaderWidth,columnHeaderHeight:()=>{const e=this.hot.runHooks("modifyColumnHeaderHeight");return this.settings.columnHeaderHeight||e}};this.hot.runHooks("beforeInitWalkontable",e),this._wt=new Di(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:n,height:i}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(n,i),this.eventManager.addEventListener(t,"mousedown",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(t,"contextmenu",e=>{e.target===t&&3===e.which&&e.stopPropagation()}),this.eventManager.addEventListener(this.hot.rootDocument.documentElement,"click",()=>{this.settings.observeDOMVisibility&&this._wt.drawInterrupted&&(this.hot.forceFullRender=!0,this.render())})}isTextSelectionAllowed(e){if(Object(r["isInput"])(e))return!0;const t=Object(r["isChildOf"])(e,this._wt.wtTable.spreader);return!(!0!==this.settings.fragmentSelection||!t)||(!("cell"!==this.settings.fragmentSelection||!this.isSelectedOnlyCell()||!t)||!(this.settings.fragmentSelection||!this.isCellEdited()||!this.isSelectedOnlyCell()))}isMouseDown(){return Ji(rs,this)}isSelectedOnlyCell(){var e,t;return null!==(e=null===(t=this.hot.getSelectedRangeLast())||void 0===t?void 0:t.isSingleCell())&&void 0!==e&&e}isCellEdited(){const e=this.hot.getActiveEditor();return e&&e.isOpened()}beforeRender(e,t){e&&this.hot.runHooks("beforeViewRender",this.hot.forceFullRender,t)}afterRender(e){e&&this.hot.runHooks("afterViewRender",this.hot.forceFullRender)}appendRowHeader(e,t){if(t.firstChild){const n=t.firstChild;if(!Object(r["hasClass"])(n,"relative"))return Object(r["empty"])(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:n,getRowHeader:r}=this.hot,i=n.createElement("div"),s=n.createElement("span");i.className="relative",s.className="rowHeader",this.updateCellHeader(s,e,r),i.appendChild(s),t.appendChild(i)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const s=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const o=t.firstChild;Object(r["hasClass"])(o,"relative")?(this.updateCellHeader(o.querySelector(".colHeader"),e,n,i),o.className="",Object(r["addClass"])(o,["relative",...s()])):(Object(r["empty"])(t),this.appendColHeader(e,t,n,i))}else{const{rootDocument:o}=this.hot,a=o.createElement("div"),l=o.createElement("span"),u=s();a.classList.add("relative",...u),l.className="colHeader",this.settings.ariaTags&&(Object(r["setAttribute"])(a,...Object(Xe["y"])()),Object(r["setAttribute"])(l,...Object(Xe["y"])())),this.updateCellHeader(l,e,n,i),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,i)}updateCellHeader(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,s=t;const o=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&(Object(r["hasClass"])(e,"colHeader")?s=o.wtTable.columnFilter.sourceToRendered(t):Object(r["hasClass"])(e,"rowHeader")&&(s=o.wtTable.rowFilter.sourceToRendered(t))),s>-1?Object(r["fastInnerHTML"])(e,n(t,i)):(Object(r["fastInnerText"])(e,String.fromCharCode(160)),Object(r["addClass"])(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth(),n=t-e;return n>0?n:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight(),n=t-e;return n>0?n:0}setLastSize(e,t){Qi(ss,this,e),Qi(os,this,t)}getLastSize(){return{width:Ji(ss,this),height:Ji(os,this)}}getFirstRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedRow(),1):null}getLastRenderedVisibleRow(){return this._wt.wtViewport.rowsRenderCalculator?this.hot.rowIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedRow(),-1):null}getFirstRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getFirstRenderedColumn(),1):null}getLastRenderedVisibleColumn(){return this._wt.wtViewport.columnsRenderCalculator?this.hot.columnIndexMapper.getNearestNotHiddenIndex(this._wt.wtTable.getLastRenderedColumn(),-1):null}getFirstFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleRow())}getLastFullyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleRow())}getFirstFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstVisibleColumn())}getLastFullyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastVisibleColumn())}getFirstPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleRow())}getLastPartiallyVisibleRow(){return this.hot.rowIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleRow())}getFirstPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getFirstPartiallyVisibleColumn())}getLastPartiallyVisibleColumn(){return this.hot.columnIndexMapper.getVisualFromRenderableIndex(this._wt.wtScroll.getLastPartiallyVisibleColumn())}getColumnHeadersCount(){return Ji(es,this)}getRowHeadersCount(){return Ji(ts,this)}getViewportWidth(){return this._wt.wtViewport.getViewportWidth()}getWorkspaceWidth(){return this._wt.wtViewport.getWorkspaceWidth()}getViewportHeight(){return this._wt.wtViewport.getViewportHeight()}getWorkspaceHeight(){return this._wt.wtViewport.getWorkspaceHeight()}getElementOverlayName(e){var t;return(null!==(t=this._wt.wtOverlays.getParentOverlay(e))&&void 0!==t?t:this._wt).wtTable.name}getOverlayByName(e){return this._wt.getOverlayByName(e)}isVisible(){return this._wt.wtTable.isVisible()}destroy(){this._wt.destroy(),this.eventManager.destroy()}}function us(){return parseInt(this.hot.rootElement.getAttribute(Object(Xe["e"])()[0]),10)}function cs(e){const t=Zi(as,this,us).call(this)+e;Object(r["setAttribute"])(this.hot.rootElement,...Object(Xe["e"])(t))}var hs=ls,ds=n("480c");function ms(e,t,n){return(t=fs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fs(e){var t=ps(e,"string");return"symbol"==typeof t?t:t+""}function ps(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class gs{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];ms(this,"hot",void 0),ms(this,"data",void 0),ms(this,"dataType","array"),ms(this,"colToProp",()=>{}),ms(this,"propToCol",()=>{}),this.hot=e,this.data=t}modifyRowData(e){let t;return this.hot.hasHook("modifyRowData")&&(t=this.hot.runHooks("modifyRowData",e)),void 0===t||Number.isInteger(t)?this.data[e]:t}getData(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.data&&0!==this.data.length?this.getByRange(null,null,e):this.data}setData(e){this.data=e}getAtColumn(e){const t=[];return Object(B["arrayEach"])(this.data,(n,r)=>{const i=this.getAtCell(r,e);t.push(i)}),t}getAtRow(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s=void 0===t&&void 0===n,{dataDotNotation:o}=this.hot.getSettings();let a=null,l=null;if(a=this.modifyRowData(e),Array.isArray(a))l=[],s?a.forEach((t,n)=>{l[n]=this.getAtPhysicalCell(e,n,a)}):Object($["rangeEach"])(t,n,n=>{l[n-t]=this.getAtPhysicalCell(e,n,a)});else if(Object(E["isObject"])(a)||Object(i["isFunction"])(a))if(l=r?[]:{},!s||r){const i=0,s=this.countFirstRowKeys()-1;Object($["rangeEach"])(i,s,u=>{const c=this.colToProp(u);if(u>=(t||i)&&u<=(n||s)&&!Number.isInteger(c)){const t=this.getAtPhysicalCell(e,c,a);r?l.push(t):o?Object(E["setProperty"])(l,c,t):l[c]=t}})}else Object(E["objectEach"])(a,(t,n)=>{const r=this.getAtPhysicalCell(e,n,a);o?Object(E["setProperty"])(l,n,r):l[n]=r});return l}setAtCell(e,t,n){if(!(e>=this.countRows()||t>=this.countFirstRowKeys())){if(this.hot.hasHook("modifySourceData")){const r=Object(E["createObjectPropListener"])(n);this.hot.runHooks("modifySourceData",e,t,r,"set"),r.isTouched()&&(n=r.value)}Number.isInteger(t)?this.data[e][t]=n:Object(E["setProperty"])(this.data[e],t,n)}}getAtPhysicalCell(e,t,n){let r=null;if(n)if("string"===typeof t){const{dataDotNotation:e}=this.hot.getSettings();r=e?Object(E["getProperty"])(n,t):n[t]}else r="function"===typeof t?t(n):n[t];if(this.hot.hasHook("modifySourceData")){const n=Object(E["createObjectPropListener"])(r);this.hot.runHooks("modifySourceData",e,t,n,"get"),n.isTouched()&&(r=n.value)}return r}getAtCell(e,t){const n=this.modifyRowData(e);return this.getAtPhysicalCell(e,this.colToProp(t),n)}getByRange(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!1,i=null,s=null,o=null,a=null;null===e||null===t?(r=!0,i=0,o=this.countRows()-1):(i=Math.min(e.row,t.row),s=Math.min(e.col,t.col),o=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const l=[];return Object($["rangeEach"])(i,o,e=>{l.push(r?this.getAtRow(e,void 0,void 0,n):this.getAtRow(e,s,a,n))}),l}countRows(){if(this.hot.hasHook("modifySourceLength")){const e=this.hot.runHooks("modifySourceLength");if(Number.isInteger(e))return e}return this.data.length}countFirstRowKeys(){return Object(ds["countFirstRowKeys"])(this.data)}destroy(){this.data=null,this.hot=null}}var ys=gs,ws=n("1b1a"),bs=n("cef7"),vs=n("1096"),_s=n("9056"),Ss=n("9f10"),Es=n("00fd");const Cs=new Map([["hiding",bs["a"]],["index",vs["a"]],["linkedPhysicalIndexToValue",_s["a"]],["physicalIndexToValue",Ss["a"]],["trimming",Es["a"]]]);function Ms(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Cs.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(Cs.get(e))(t)}var Ts=n("3d57"),Rs=n("c5cd");function Os(e,t,n){return(t=Ns(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ns(e){var t=As(e,"string");return"symbol"==typeof t?t:t+""}function As(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ls extends Rs["a"]{constructor(e,t){super(),Os(this,"mergedValuesCache",[]),Os(this,"aggregationFunction",void 0),Os(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.mergedValuesCache;if(0===this.getLength())return[];const t=Object(B["arrayMap"])(this.get(),e=>e.getValues()),n=[],r=Object(s["isDefined"])(t[0])&&t[0].length||0;for(let i=0;i<r;i+=1){const e=[];for(let n=0;n<this.getLength();n+=1)e.push(t[n][i]);n.push(e)}return Object(B["arrayMap"])(n,this.aggregationFunction)}getMergedValueAtIndex(e,t){const n=this.getMergedValues(t)[e];return Object(s["isDefined"])(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}var Is=n("7ae0");function ks(e,t,n){xs(e,t),t.set(e,n)}function xs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ds(e,t,n){return e.set(Ps(e,t),n),n}function Hs(e,t){return e.get(Ps(e,t))}function Ps(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var js=new WeakMap;class Fs{constructor(){ks(this,js,[])}subscribe(e){return this.addLocalHook("change",e),this._write(Hs(js,this)),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){Ds(js,this,e)}}function Ys(e,t){const n=[];let r=0,i=0;for(;r<e.length&&i<t.length;r++,i++)e[r]!==t[i]&&n.push({op:"replace",index:i,oldValue:e[r],newValue:t[i]});for(;r<t.length;r++)n.push({op:"insert",index:r,oldValue:void 0,newValue:t[r]});for(;i<e.length;i++)n.push({op:"remove",index:i,oldValue:e[i],newValue:void 0});return n}function Us(e,t,n){Vs(e,t),t.set(e,n)}function Vs(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Bs(e,t){return e.get(zs(e,t))}function Ws(e,t,n){return e.set(zs(e,t),n),n}function zs(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}Object(E["mixin"])(Fs,Is["a"]);var Gs=new WeakMap,Ks=new WeakMap,Xs=new WeakMap,$s=new WeakMap,qs=new WeakMap;class Js{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Us(this,Gs,new Set),Us(this,Ks,[]),Us(this,Xs,[]),Us(this,$s,!1),Us(this,qs,!1),Ws(qs,this,null!==e&&void 0!==e&&e)}createObserver(){const e=new Fs;return Bs(Gs,this).add(e),e.addLocalHook("unsubscribe",()=>{Bs(Gs,this).delete(e)}),e._writeInitialChanges(Ys(Bs(Ks,this),Bs(Xs,this))),e}emit(e){let t=Bs(Xs,this);Bs($s,this)&&Bs(Ks,this).length===e.length||(0===e.length?e=new Array(t.length).fill(Bs(qs,this)):Ws(Ks,this,new Array(e.length).fill(Bs(qs,this))),Bs($s,this)||(Ws($s,this,!0),t=Bs(Ks,this)));const n=Ys(t,e);Bs(Gs,this).forEach(e=>e._write(n)),Ws(Xs,this,e)}}function Qs(e,t,n){return(t=Zs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zs(e){var t=eo(e,"string");return"symbol"==typeof t?t:t+""}function eo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}new Set;class to{constructor(){Qs(this,"indexesSequence",new ws["a"]),Qs(this,"trimmingMapsCollection",new Ls(e=>e.some(e=>!0===e),!1)),Qs(this,"hidingMapsCollection",new Ls(e=>e.some(e=>!0===e),!1)),Qs(this,"variousMapsCollection",new Rs["a"]),Qs(this,"hidingChangesObservable",new Js({initialIndexValue:!1})),Qs(this,"notTrimmedIndexesCache",[]),Qs(this,"notHiddenIndexesCache",[]),Qs(this,"isBatched",!1),Qs(this,"indexesSequenceChanged",!1),Qs(this,"indexesChangeSource",void 0),Qs(this,"trimmedIndexesChanged",!1),Qs(this,"hiddenIndexesChanged",!1),Qs(this,"renderablePhysicalIndexesCache",[]),Qs(this,"fromPhysicalToVisualIndexesCache",new Map),Qs(this,"fromVisualToRenderableIndexesCache",new Map),this.indexesSequence.addLocalHook("change",()=>{this.indexesSequenceChanged=!0,this.updateCache(),this.runLocalHooks("indexesSequenceChange",this.indexesChangeSource),this.runLocalHooks("change",this.indexesSequence,null)}),this.trimmingMapsCollection.addLocalHook("change",e=>{this.trimmedIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.trimmingMapsCollection)}),this.hidingMapsCollection.addLocalHook("change",e=>{this.hiddenIndexesChanged=!0,this.updateCache(),this.runLocalHooks("change",e,this.hidingMapsCollection)}),this.variousMapsCollection.addLocalHook("change",e=>{this.runLocalHooks("change",e,this.variousMapsCollection)})}suspendOperations(){this.isBatched=!0}resumeOperations(){this.isBatched=!1,this.updateCache()}createChangesObserver(e){if("hiding"!==e)throw new Error(`Unsupported index map type "${e}".`);return this.hidingChangesObservable.createObserver()}createAndRegisterIndexMap(e,t,n){return this.registerMap(e,Ms(t,n))}registerMap(e,t){if(this.trimmingMapsCollection.get(e)||this.hidingMapsCollection.get(e)||this.variousMapsCollection.get(e))throw Error(`Map with name "${e}" has been already registered.`);t instanceof Es["a"]?this.trimmingMapsCollection.register(e,t):t instanceof bs["a"]?this.hidingMapsCollection.register(e,t):this.variousMapsCollection.register(e,t);const n=this.getNumberOfIndexes();return n>0&&t.init(n),t}unregisterMap(e){this.trimmingMapsCollection.unregister(e),this.hidingMapsCollection.unregister(e),this.variousMapsCollection.unregister(e)}unregisterAll(){this.trimmingMapsCollection.unregisterAll(),this.hidingMapsCollection.unregisterAll(),this.variousMapsCollection.unregisterAll()}getPhysicalFromVisualIndex(e){const t=this.notTrimmedIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return Object(s["isDefined"])(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return Object(s["isDefined"])(t)?t:null}getNearestNotHiddenIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this.getPhysicalFromVisualIndex(e);if(null===r)return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const i=Array.from(this.fromVisualToRenderableIndexesCache.keys());let s=-1;return s=t>0?i.findIndex(t=>t>e):i.reverse().findIndex(t=>t<e),-1===s?n?this.getNearestNotHiddenIndex(e,-t,!1):null:i[s]}initToLength(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getNumberOfIndexes();this.notTrimmedIndexesCache=[...new Array(e).keys()],this.notHiddenIndexesCache=[...new Array(e).keys()],this.suspendOperations(),this.indexesChangeSource="init",this.indexesSequence.init(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.initEvery(e),this.resumeOperations(),this.suspendOperations(),this.hidingMapsCollection.initEvery(e),this.variousMapsCollection.initEvery(e),this.resumeOperations(),this.runLocalHooks("init")}fitToLength(e){const t=this.getNumberOfIndexes();if(e<t){const t=[...Array(this.getNumberOfIndexes()-e).keys()].map(t=>t+e);this.removeIndexes(t)}else this.insertIndexes(t,e-t)}getIndexesSequence(){return this.indexesSequence.getValues()}setIndexesSequence(e){void 0===this.indexesChangeSource&&(this.indexesChangeSource="update"),this.indexesSequence.setValues(e),"update"===this.indexesChangeSource&&(this.indexesChangeSource=void 0)}getNotTrimmedIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notTrimmedIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isTrimmed(e))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.notHiddenIndexesCache;const t=this.getIndexesSequence();return t.filter(e=>!1===this.isHidden(e))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(!0===e)return this.renderablePhysicalIndexesCache;const t=this.getNotTrimmedIndexes();return t.filter(e=>!1===this.isHidden(e))}getRenderableIndexesLength(){return this.getRenderableIndexes().length}getNumberOfIndexes(){return this.getIndexesSequence().length}moveIndexes(e,t){"number"===typeof e&&(e=[e]);const n=Object(B["arrayMap"])(e,e=>this.getPhysicalFromVisualIndex(e)),r=this.getNotTrimmedIndexesLength(),i=e.length,s=Object(Ts["b"])(this.getIndexesSequence(),n),o=s.filter(e=>!1===this.isTrimmed(e));let a=s.indexOf(o[o.length-1])+1;if(t+i<r){const e=o[t];a=s.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence(Object(Ts["a"])(s,a,n)),this.indexesChangeSource=void 0}isTrimmed(e){return this.trimmingMapsCollection.getMergedValueAtIndex(e)}isHidden(e){return this.hidingMapsCollection.getMergedValueAtIndex(e)}insertIndexes(e,t){const n=this.getNotTrimmedIndexes()[e],r=Object(s["isDefined"])(n)?n:this.getNumberOfIndexes(),i=this.getIndexesSequence().includes(n)?this.getIndexesSequence().indexOf(n):this.getNumberOfIndexes(),o=Object(B["arrayMap"])(new Array(t).fill(r),(e,t)=>e+t);this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(i,o),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(i,o),this.hidingMapsCollection.insertToEvery(i,o),this.variousMapsCollection.insertToEvery(i,o),this.resumeOperations()}removeIndexes(e){this.suspendOperations(),this.indexesChangeSource="remove",this.indexesSequence.remove(e),this.indexesChangeSource=void 0,this.trimmingMapsCollection.removeFromEvery(e),this.hidingMapsCollection.removeFromEvery(e),this.variousMapsCollection.removeFromEvery(e),this.resumeOperations()}updateCache(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.indexesSequenceChanged||this.trimmedIndexesChanged||this.hiddenIndexesChanged;(!0===e||!1===this.isBatched&&!0===t)&&(this.trimmingMapsCollection.updateCache(),this.hidingMapsCollection.updateCache(),this.notTrimmedIndexesCache=this.getNotTrimmedIndexes(!1),this.notHiddenIndexesCache=this.getNotHiddenIndexes(!1),this.renderablePhysicalIndexesCache=this.getRenderableIndexes(!1),this.cacheFromPhysicalToVisualIndexes(),this.cacheFromVisualToRenderableIndexes(),this.hiddenIndexesChanged&&this.hidingChangesObservable.emit(this.hidingMapsCollection.getMergedValues()),this.runLocalHooks("cacheUpdated",{indexesSequenceChanged:this.indexesSequenceChanged,trimmedIndexesChanged:this.trimmedIndexesChanged,hiddenIndexesChanged:this.hiddenIndexesChanged}),this.indexesSequenceChanged=!1,this.trimmedIndexesChanged=!1,this.hiddenIndexesChanged=!1)}cacheFromPhysicalToVisualIndexes(){const e=this.getNotTrimmedIndexesLength();this.fromPhysicalToVisualIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromVisualIndex(t);this.fromPhysicalToVisualIndexesCache.set(e,t)}}cacheFromVisualToRenderableIndexes(){const e=this.getRenderableIndexesLength();this.fromVisualToRenderableIndexesCache.clear();for(let t=0;t<e;t+=1){const e=this.getPhysicalFromRenderableIndex(t),n=this.getVisualFromPhysicalIndex(e);this.fromVisualToRenderableIndexesCache.set(n,t)}}}Object(E["mixin"])(to,Is["a"]);var no=n("1004");function ro(e,t){return Object(E["objectEach"])(t,(t,n)=>{Object(s["isUndefined"])(e[n])&&(e[n]=t)}),e}function io(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/,n=t.exec(e);return n?`${n[1].toLowerCase()}-${n[2].toUpperCase()}`:e}function so(e){Object(s["isDefined"])(e)&&Object(C["a"])(et["a"]`Language with code "${e}" was not found. You should register particular language\x20
- before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var oo=n("9acd");function ao(e,t){const n=Array.isArray(e)&&Number.isInteger(t);return n?e[t]:e}const{register:lo,getValues:uo}=Object(oo["a"])("phraseFormatters");function co(e,t){lo(e,t)}function ho(){return uo()}co("pluralize",ao);var mo=n("0283");
- /**
- * @preserve
- * Authors: Handsoncode
- * Last updated: Nov 15, 2017
- *
- * Description: Definition file for English - United States language-country.
- */const fo={languageCode:"en-US",[mo["CONTEXTMENU_ITEMS_NO_ITEMS"]]:"No available options",[mo["CONTEXTMENU_ITEMS_ROW_ABOVE"]]:"Insert row above",[mo["CONTEXTMENU_ITEMS_ROW_BELOW"]]:"Insert row below",[mo["CONTEXTMENU_ITEMS_INSERT_LEFT"]]:"Insert column left",[mo["CONTEXTMENU_ITEMS_INSERT_RIGHT"]]:"Insert column right",[mo["CONTEXTMENU_ITEMS_REMOVE_ROW"]]:["Remove row","Remove rows"],[mo["CONTEXTMENU_ITEMS_REMOVE_COLUMN"]]:["Remove column","Remove columns"],[mo["CONTEXTMENU_ITEMS_UNDO"]]:"Undo",[mo["CONTEXTMENU_ITEMS_REDO"]]:"Redo",[mo["CONTEXTMENU_ITEMS_READ_ONLY"]]:"Read only",[mo["CONTEXTMENU_ITEMS_CLEAR_COLUMN"]]:"Clear column",[mo["CONTEXTMENU_ITEMS_ALIGNMENT"]]:"Alignment",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_CENTER"]]:"Center",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY"]]:"Justify",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE"]]:"Middle",[mo["CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_FREEZE_COLUMN"]]:"Freeze column",[mo["CONTEXTMENU_ITEMS_UNFREEZE_COLUMN"]]:"Unfreeze column",[mo["CONTEXTMENU_ITEMS_BORDERS"]]:"Borders",[mo["CONTEXTMENU_ITEMS_BORDERS_TOP"]]:"Top",[mo["CONTEXTMENU_ITEMS_BORDERS_RIGHT"]]:"Right",[mo["CONTEXTMENU_ITEMS_BORDERS_BOTTOM"]]:"Bottom",[mo["CONTEXTMENU_ITEMS_BORDERS_LEFT"]]:"Left",[mo["CONTEXTMENU_ITEMS_REMOVE_BORDERS"]]:"Remove border(s)",[mo["CONTEXTMENU_ITEMS_ADD_COMMENT"]]:"Add comment",[mo["CONTEXTMENU_ITEMS_EDIT_COMMENT"]]:"Edit comment",[mo["CONTEXTMENU_ITEMS_REMOVE_COMMENT"]]:"Delete comment",[mo["CONTEXTMENU_ITEMS_READ_ONLY_COMMENT"]]:"Read-only comment",[mo["CONTEXTMENU_ITEMS_MERGE_CELLS"]]:"Merge cells",[mo["CONTEXTMENU_ITEMS_UNMERGE_CELLS"]]:"Unmerge cells",[mo["CONTEXTMENU_ITEMS_COPY"]]:"Copy",[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS"]]:["Copy with header","Copy with headers"],[mo["CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS"]]:["Copy with group header","Copy with group headers"],[mo["CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY"]]:["Copy header only","Copy headers only"],[mo["CONTEXTMENU_ITEMS_CUT"]]:"Cut",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD"]]:"Insert child row",[mo["CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD"]]:"Detach from parent",[mo["CONTEXTMENU_ITEMS_HIDE_COLUMN"]]:["Hide column","Hide columns"],[mo["CONTEXTMENU_ITEMS_SHOW_COLUMN"]]:["Show column","Show columns"],[mo["CONTEXTMENU_ITEMS_HIDE_ROW"]]:["Hide row","Hide rows"],[mo["CONTEXTMENU_ITEMS_SHOW_ROW"]]:["Show row","Show rows"],[mo["FILTERS_CONDITIONS_NONE"]]:"None",[mo["FILTERS_CONDITIONS_EMPTY"]]:"Is empty",[mo["FILTERS_CONDITIONS_NOT_EMPTY"]]:"Is not empty",[mo["FILTERS_CONDITIONS_EQUAL"]]:"Is equal to",[mo["FILTERS_CONDITIONS_NOT_EQUAL"]]:"Is not equal to",[mo["FILTERS_CONDITIONS_BEGINS_WITH"]]:"Begins with",[mo["FILTERS_CONDITIONS_ENDS_WITH"]]:"Ends with",[mo["FILTERS_CONDITIONS_CONTAINS"]]:"Contains",[mo["FILTERS_CONDITIONS_NOT_CONTAIN"]]:"Does not contain",[mo["FILTERS_CONDITIONS_GREATER_THAN"]]:"Greater than",[mo["FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL"]]:"Greater than or equal to",[mo["FILTERS_CONDITIONS_LESS_THAN"]]:"Less than",[mo["FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL"]]:"Less than or equal to",[mo["FILTERS_CONDITIONS_BETWEEN"]]:"Is between",[mo["FILTERS_CONDITIONS_NOT_BETWEEN"]]:"Is not between",[mo["FILTERS_CONDITIONS_AFTER"]]:"After",[mo["FILTERS_CONDITIONS_BEFORE"]]:"Before",[mo["FILTERS_CONDITIONS_TODAY"]]:"Today",[mo["FILTERS_CONDITIONS_TOMORROW"]]:"Tomorrow",[mo["FILTERS_CONDITIONS_YESTERDAY"]]:"Yesterday",[mo["FILTERS_VALUES_BLANK_CELLS"]]:"Blank cells",[mo["FILTERS_DIVS_FILTER_BY_CONDITION"]]:"Filter by condition",[mo["FILTERS_DIVS_FILTER_BY_VALUE"]]:"Filter by value",[mo["FILTERS_LABELS_CONJUNCTION"]]:"And",[mo["FILTERS_LABELS_DISJUNCTION"]]:"Or",[mo["FILTERS_BUTTONS_SELECT_ALL"]]:"Select all",[mo["FILTERS_BUTTONS_CLEAR"]]:"Clear",[mo["FILTERS_BUTTONS_OK"]]:"OK",[mo["FILTERS_BUTTONS_CANCEL"]]:"Cancel",[mo["FILTERS_BUTTONS_PLACEHOLDER_SEARCH"]]:"Search",[mo["FILTERS_BUTTONS_PLACEHOLDER_VALUE"]]:"Value",[mo["FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE"]]:"Second value",[mo["CHECKBOX_CHECKED"]]:"Checked",[mo["CHECKBOX_UNCHECKED"]]:"Unchecked"};var po=fo;const go=mo,yo=po.languageCode,{register:wo,getItem:bo,hasItem:vo,getValues:_o}=Object(oo["a"])("languagesDictionaries");function So(e,t){let n=e,r=t;return Object(E["isObject"])(e)&&(r=e,n=r.languageCode),Eo(n,r),wo(n,Object(E["deepClone"])(r)),Object(E["deepClone"])(r)}function Eo(e,t){e!==yo&&ro(t,bo(yo))}function Co(e){return Mo(e)?Object(E["deepClone"])(bo(e)):null}function Mo(e){return vo(e)}function To(){return _o()}function Ro(e,t,n){const r=Co(e);if(null===r)return null;const i=r[t];if(Object(s["isUndefined"])(i))return null;const o=Oo(i,n);return Array.isArray(o)?o[0]:o}function Oo(e,t){let n=e;return Object(B["arrayEach"])(ho(),r=>{n=r(e,t)}),n}function No(e){let t=io(e);return Mo(t)||(t=yo,so(e)),t}So(po);var Ao=n("a309");class Lo{constructor(e,t){this.settings=e,this.cellRange=t||null}isEmpty(){return null===this.cellRange}add(e){return this.isEmpty()?this.cellRange=this.settings.createCellRange(e):this.cellRange.expand(e),this}replace(e,t){if(!this.isEmpty()){if(this.cellRange.from.isEqual(e))return this.cellRange.from=t,!0;if(this.cellRange.to.isEqual(e))return this.cellRange.to=t,!0}return!1}clear(){return this.cellRange=null,this}getCorners(){const e=this.cellRange.getOuterTopStartCorner(),t=this.cellRange.getOuterBottomEndCorner();return[e.row,e.col,t.row,t.col]}destroy(){this.runLocalHooks("destroy")}}Object(E["mixin"])(Lo,Is["a"]);var Io=Lo;function ko(e,t,n){return(t=xo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xo(e){var t=Do(e,"string");return"symbol"==typeof t?t:t+""}function Do(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Ho extends Io{constructor(e,t){super(e,null),ko(this,"visualCellRange",null),this.visualCellRange=t||null,this.commit()}add(e){return null===this.visualCellRange?this.visualCellRange=this.settings.createCellRange(e):this.visualCellRange.expand(e),this}clear(){return this.visualCellRange=null,super.clear()}trimToVisibleCellsRangeOnly(e){let{from:t,to:n}=e,r=this.getNearestNotHiddenCoords(t,1),i=this.getNearestNotHiddenCoords(n,-1);return null===r||null===i?null:((r.row>i.row||r.col>i.col)&&(r=t,i=n),this.settings.createCellRange(r,r,i))}getNearestNotHiddenCoords(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t;const r=this.getNearestNotHiddenIndex(this.settings.rowIndexMapper,e.row,t);if(null===r)return null;const i=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,n);return null===i?null:this.settings.createCellCoords(r,i)}getNearestNotHiddenIndex(e,t,n){return t<0?t:e.getNearestNotHiddenIndex(t,n)}commit(){if(null===this.visualCellRange)return this;const e=this.trimToVisibleCellsRangeOnly(this.visualCellRange);return this.cellRange=null===e?null:this.createRenderableCellRange(e.from,e.to),this}syncWith(e){const t=e.from.clone().normalize(),n="N-S"===e.getVerticalDirection()?1:-1,r="W-E"===e.getHorizontalDirection()?1:-1,i=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let s=null;if(null!==i&&null!==i.col&&null!==i.row||(s=this.getNearestNotHiddenCoords(t,n,r)),null!==s&&e.overlaps(s)){const t=e.highlight.clone();if(t.row>=0&&(t.row=s.row),t.col>=0&&(t.col=s.col),null===this.cellRange){const e=this.settings.visualToRenderableCoords(t);this.cellRange=this.settings.createCellRange(e)}e.setHighlight(t)}return"focus"===this.settings.selectionType&&null!==i&&null===s&&e.setHighlight(this.visualCellRange.highlight),this}getCorners(){const{from:e,to:t}=this.cellRange;return[Math.min(e.row,t.row),Math.min(e.col,t.col),Math.max(e.row,t.row),Math.max(e.col,t.col)]}getVisualCorners(){const e=this.settings.renderableToVisualCoords(this.cellRange.getTopStartCorner()),t=this.settings.renderableToVisualCoords(this.cellRange.getBottomEndCorner());return[e.row,e.col,t.row,t.col]}createRenderableCellRange(e,t){const n=this.settings.visualToRenderableCoords(e),r=this.settings.visualToRenderableCoords(t);return null===n.row||null===n.col||null===r.row||null===r.col?null:this.settings.createCellRange(n,n,r)}}var Po=Ho;function jo(e){let{activeHeaderClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Ao["a"]})}function Fo(e){let{areaCornerVisible:t,...n}=e;return new Po({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...n,selectionType:Ao["b"]})}function Yo(e){let{...t}=e;return new Po({className:"highlight",...t,selectionType:Ao["b"]})}function Uo(e){let{columnClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Ao["c"]})}function Vo(e){let{cellCornerVisible:t,...n}=e;return new Po({className:"current",headerAttributes:[Object(Xe["I"])()],border:{width:2,color:"#4b89ff",cornerVisible:t},...n,selectionType:Ao["f"]})}function Bo(e){let{border:t,visualCellRange:n,...r}=e;return new Po({...t,...r,selectionType:Ao["d"]},n)}function Wo(e){let{...t}=e;return new Po({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:Ao["e"]})}function zo(e){let{headerClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Ao["g"]})}function Go(e){let{rowClassName:t,...n}=e;return new Po({className:t,...n,selectionType:Ao["h"]})}function Ko(e,t){Xo(e,t),t.add(e)}function Xo(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function $o(e,t,n){return(t=qo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qo(e){var t=Jo(e,"string");return"symbol"==typeof t?t:t+""}function Jo(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Qo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Zo=new WeakSet;class ea{constructor(e){Ko(this,Zo),$o(this,"options",void 0),$o(this,"layerLevel",0),$o(this,"focus",void 0),$o(this,"fill",void 0),$o(this,"layeredAreas",new Map),$o(this,"areas",new Map),$o(this,"rowHeaders",new Map),$o(this,"columnHeaders",new Map),$o(this,"activeRowHeaders",new Map),$o(this,"activeColumnHeaders",new Map),$o(this,"activeCornerHeaders",new Map),$o(this,"rowHighlights",new Map),$o(this,"columnHighlights",new Map),$o(this,"customSelections",[]),this.options=e,this.focus=Vo(e),this.fill=Wo(e)}isEnabledFor(e,t){let n=e;e===Ao["f"]&&(n="current");let r=this.options.disabledCellSelection(t.row,t.col);return"string"===typeof r&&(r=[r]),!1===r||Array.isArray(r)&&!r.includes(n)}useLayerLevel(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.layerLevel=e,this}getFocus(){return this.focus}getFill(){return this.fill}createLayeredArea(){return Qo(Zo,this,ta).call(this,this.layeredAreas,Fo)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return Qo(Zo,this,ta).call(this,this.areas,Yo)}getAreas(){return[...this.areas.values()]}createRowHeader(){return Qo(Zo,this,ta).call(this,this.rowHeaders,zo)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return Qo(Zo,this,ta).call(this,this.columnHeaders,zo)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return Qo(Zo,this,ta).call(this,this.activeRowHeaders,jo)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return Qo(Zo,this,ta).call(this,this.activeColumnHeaders,jo)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return Qo(Zo,this,ta).call(this,this.activeCornerHeaders,jo)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return Qo(Zo,this,ta).call(this,this.rowHighlights,Go)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return Qo(Zo,this,ta).call(this,this.columnHighlights,Uo)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(Bo({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),Object(B["arrayEach"])(this.areas.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.layeredAreas.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.rowHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.columnHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeRowHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeColumnHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.activeCornerHeaders.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.rowHighlights.values(),e=>{e.clear()}),Object(B["arrayEach"])(this.columnHighlights.values(),e=>{e.clear()})}[Symbol.iterator](){return[this.focus,this.fill,...this.areas.values(),...this.layeredAreas.values(),...this.rowHeaders.values(),...this.columnHeaders.values(),...this.activeRowHeaders.values(),...this.activeColumnHeaders.values(),...this.activeCornerHeaders.values(),...this.rowHighlights.values(),...this.columnHighlights.values(),...this.customSelections][Symbol.iterator]()}}function ta(e,t){const n=this.layerLevel;if(e.has(n))return e.get(n);const r=t({layerLevel:n,...this.options});return e.set(n,r),r}var na=ea;function ra(e,t,n){return(t=ia(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ia(e){var t=sa(e,"string");return"symbol"==typeof t?t:t+""}function sa(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class oa{constructor(e){ra(this,"ranges",[]),ra(this,"createCellRange",void 0),this.createCellRange=e}isEmpty(){return 0===this.size()}set(e){return this.clear(),this.ranges.push(this.createCellRange(e)),this}add(e){return this.ranges.push(this.createCellRange(e)),this}pop(){return this.ranges.pop(),this}current(){return this.peekByIndex(this.size()-1)}previous(){return this.peekByIndex(this.size()-2)}includes(e){return this.ranges.some(t=>t.includes(e))}clear(){return this.ranges.length=0,this}size(){return this.ranges.length}peekByIndex(){let e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t>=0&&t<this.size()&&(e=this.ranges[t]),e}[Symbol.iterator](){return this.ranges[Symbol.iterator]()}}var aa=oa;function la(e,t){ca(e,t),t.add(e)}function ua(e,t,n){ca(e,t),t.set(e,n)}function ca(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ha(e,t){return e.get(ma(e,t))}function da(e,t,n){return e.set(ma(e,t),n),n}function ma(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var fa=new WeakMap,pa=new WeakMap,ga=new WeakMap,ya=new WeakSet;class wa{constructor(e,t){la(this,ya),ua(this,fa,void 0),ua(this,pa,void 0),ua(this,ga,{x:0,y:0}),da(fa,this,e),da(pa,this,t)}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=ha(pa,this).createCellCoords(e,t);let i=ha(fa,this).current().highlight;const s=ha(pa,this).visualToRenderableCoords(i);let o=0,a=0;if(this.runLocalHooks("beforeTransformStart",r),null!==s.row&&null!==s.col){const{width:e,height:t}=ma(ya,this,va).call(this),{row:s,col:l}=ma(ya,this,Ea).call(this,i),u=ha(pa,this).fixedRowsBottom(),c=ha(pa,this).minSpareRows(),h=ha(pa,this).minSpareCols(),d=ha(pa,this).autoWrapRow(),m=ha(pa,this).autoWrapCol(),f=ha(pa,this).createCellCoords(s+r.row,l+r.col);if(f.row>=t){const r=Object(E["createObjectPropListener"])(n&&c>0&&0===u),i=f.col+1,s=ha(pa,this).createCellCoords(f.row-t,i>=e?i-e:i);this.runLocalHooks("beforeColumnWrap",r,ma(ya,this,Ca).call(this,s),i>=e),r.value?this.runLocalHooks("insertRowRequire",ha(pa,this).countRenderableRows()):m&&f.assign(s)}else if(f.row<0){const n=Object(E["createObjectPropListener"])(m),r=f.col-1,i=ha(pa,this).createCellCoords(t+f.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",n,ma(ya,this,Ca).call(this,i),r<0),m&&f.assign(i)}if(f.col>=e){const r=Object(E["createObjectPropListener"])(n&&h>0),i=f.row+1,s=ha(pa,this).createCellCoords(i>=t?i-t:i,f.col-e);this.runLocalHooks("beforeRowWrap",r,ma(ya,this,Ca).call(this,s),i>=t),r.value?this.runLocalHooks("insertColRequire",ha(pa,this).countRenderableColumns()):d&&f.assign(s)}else if(f.col<0){const n=Object(E["createObjectPropListener"])(d),r=f.row-1,i=ha(pa,this).createCellCoords(r<0?t+r:r,e+f.col);this.runLocalHooks("beforeRowWrap",n,ma(ya,this,Ca).call(this,i),r<0),d&&f.assign(i)}const{rowDir:p,colDir:g}=ma(ya,this,ba).call(this,f);o=p,a=g,i=ma(ya,this,Ca).call(this,f)}return this.runLocalHooks("afterTransformStart",i,o,a),i}transformEnd(e,t){const n=ha(pa,this).createCellCoords(e,t),r=ha(fa,this).current(),i=ha(pa,this).visualToRenderableCoords(r.highlight),s=ma(ya,this,_a).call(this,r.to.row,r.from.row),o=ma(ya,this,Sa).call(this,r.to.col,r.from.col),a=r.to.clone();let l=0,u=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==i.row&&null!==i.col&&null!==s&&null!==o){const{row:e,col:t}=ma(ya,this,Ea).call(this,r.highlight),i=ha(pa,this).createCellCoords(s+n.row,o+n.col),c=r.getTopStartCorner(),h=r.getTopEndCorner(),d=r.getBottomEndCorner();if(n.col<0&&o>=t&&i.col<t){const e=i.col-t;i.col=ma(ya,this,Sa).call(this,c.col,h.col)+e}else if(n.col>0&&o<=t&&i.col>t){const e=ma(ya,this,Sa).call(this,h.col,c.col),t=Math.max(i.col-e,1);i.col=e+t}if(n.row<0&&s>=e&&i.row<e){const t=i.row-e;i.row=ma(ya,this,_a).call(this,c.row,d.row)+t}else if(n.row>0&&s<=e&&i.row>e){const e=ma(ya,this,_a).call(this,d.row,c.row),t=Math.max(i.row-e,1);i.row=e+t}const{rowDir:m,colDir:f}=ma(ya,this,ba).call(this,i);l=m,u=f;const p=ma(ya,this,Ca).call(this,i);0===n.row&&0!==n.col?a.col=p.col:0!==n.row&&0===n.col?a.row=p.row:(a.row=p.row,a.col=p.col)}return this.runLocalHooks("afterTransformEnd",a,l,u),a}setOffsetSize(e){let{x:t,y:n}=e;da(ga,this,{x:t,y:n})}resetOffsetSize(){da(ga,this,{x:0,y:0})}}function ba(e){const{width:t,height:n}=ma(ya,this,va).call(this);let r=0,i=0;return e.row<0?(r=-1,e.row=0):e.row>0&&e.row>=n&&(r=1,e.row=n-1),e.col<0?(i=-1,e.col=0):e.col>0&&e.col>=t&&(i=1,e.col=t-1),{rowDir:r,colDir:i}}function va(){return{width:ha(ga,this).x+ha(pa,this).countRenderableColumns(),height:ha(ga,this).y+ha(pa,this).countRenderableRows()}}function _a(e,t){const n=ha(pa,this).findFirstNonHiddenRenderableRow(e,t);return null===n?null:ha(ga,this).y+n}function Sa(e,t){const n=ha(pa,this).findFirstNonHiddenRenderableColumn(e,t);return null===n?null:ha(ga,this).x+n}function Ea(e){const{row:t,col:n}=ha(pa,this).visualToRenderableCoords(e);if(null===t||null===n)throw new Error("Renderable coords are not visible.");return ha(pa,this).createCellCoords(ha(ga,this).y+t,ha(ga,this).x+n)}function Ca(e){const t=e.clone();return t.col=e.col-ha(ga,this).x,t.row=e.row-ha(ga,this).y,ha(pa,this).renderableToVisualCoords(t)}Object(E["mixin"])(wa,Is["a"]);var Ma=wa,Ta=n("a952");function Ra(e,t,n){Oa(e,t),t.set(e,n)}function Oa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Na(e,t,n){return(t=Aa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Aa(e){var t=La(e,"string");return"symbol"==typeof t?t:t+""}function La(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Ia(e,t){return e.get(xa(e,t))}function ka(e,t,n){return e.set(xa(e,t),n),n}function xa(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Da=new WeakMap,Ha=new WeakMap,Pa=new WeakMap,ja=new WeakMap,Fa=new WeakMap,Ya=new WeakMap;class Ua{constructor(e,t){var n=this;Na(this,"settings",void 0),Na(this,"tableProps",void 0),Na(this,"inProgress",!1),Na(this,"selectedRange",new aa((e,t,n)=>this.tableProps.createCellRange(e,t,n))),Na(this,"highlight",void 0),Ra(this,Da,void 0),Ra(this,Ha,void 0),Na(this,"selectedByRowHeader",new Set),Na(this,"selectedByColumnHeader",new Set),Ra(this,Pa,!1),Ra(this,ja,!1),Ra(this,Fa,"unknown"),Ra(this,Ya,-1),this.settings=e,this.tableProps=t,this.highlight=new na({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[Object(Xe["I"])()],rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,disabledCellSelection:(e,t)=>this.tableProps.isDisabledCellSelection(e,t),cellCornerVisible:function(){return n.isCellCornerVisible(...arguments)},areaCornerVisible:function(){return n.isAreaCornerVisible(...arguments)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),createCellRange:(e,t,n)=>this.tableProps.createCellRange(e,t,n)}),ka(Da,this,new Ma(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>this.tableProps.countRenderableRows(),countRenderableColumns:()=>this.tableProps.countRenderableColumns(),visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>e.fixedRowsBottom,minSpareRows:()=>e.minSpareRows,minSpareCols:()=>e.minSpareCols,autoWrapRow:()=>e.autoWrapRow,autoWrapCol:()=>e.autoWrapCol})),ka(Ha,this,new Ma(this.selectedRange,{rowIndexMapper:this.tableProps.rowIndexMapper,columnIndexMapper:this.tableProps.columnIndexMapper,countRenderableRows:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableRowsInRange(0,e.getOuterBottomEndCorner().row)},countRenderableColumns:()=>{const e=this.selectedRange.current();return this.tableProps.countRenderableColumnsInRange(0,e.getOuterBottomEndCorner().col)},visualToRenderableCoords:e=>this.tableProps.visualToRenderableCoords(e),renderableToVisualCoords:e=>this.tableProps.renderableToVisualCoords(e),findFirstNonHiddenRenderableRow:function(){return n.tableProps.findFirstNonHiddenRenderableRow(...arguments)},findFirstNonHiddenRenderableColumn:function(){return n.tableProps.findFirstNonHiddenRenderableColumn(...arguments)},createCellCoords:(e,t)=>this.tableProps.createCellCoords(e,t),fixedRowsBottom:()=>0,minSpareRows:()=>0,minSpareCols:()=>0,autoWrapRow:()=>!0,autoWrapCol:()=>!0})),Ia(Da,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformStart",...t)})),Ia(Da,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformStart",...t)})),Ia(Da,this).addLocalHook("beforeTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformEnd",...t)})),Ia(Da,this).addLocalHook("afterTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformEnd",...t)})),Ia(Da,this).addLocalHook("insertRowRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertRowRequire",...t)})),Ia(Da,this).addLocalHook("insertColRequire",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("insertColRequire",...t)})),Ia(Da,this).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeRowWrap",...t)})),Ia(Da,this).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeColumnWrap",...t)})),Ia(Ha,this).addLocalHook("beforeTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("beforeModifyTransformFocus",...t)})),Ia(Ha,this).addLocalHook("afterTransformStart",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return n.runLocalHooks("afterModifyTransformFocus",...t)}))}getSelectedRange(){return this.selectedRange}markSource(e){ka(Fa,this,e)}markEndSource(){ka(Fa,this,"unknown")}getSelectionSource(){return Ia(Fa,this)}setExpectedLayers(e){ka(Ya,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,ka(Ya,this,-1)}isInProgress(){return this.inProgress}setRangeStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:e;const i="multiple"===this.settings.selectionMode,o=Object(s["isUndefined"])(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,a=e.clone();ka(Pa,this,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),a),(!i||i&&!o&&Object(s["isUndefined"])(t))&&this.selectedRange.clear(),this.selectedRange.add(a).current().setHighlight(r.clone()),0===this.getLayerLevel()&&(this.selectedByRowHeader.clear(),this.selectedByColumnHeader.clear()),n||this.setRangeEnd(e)}setRangeStartOnly(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;this.setRangeStart(e,t,!0,n)}setRangeEnd(e){if(this.selectedRange.isEmpty())return;const t=e.clone(),n=this.tableProps.countRows(),r=this.tableProps.countCols(),i=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((n>0||r>0)&&(0===n&&t.col<0&&!i||0===r&&t.row<0&&!i))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const s=this.selectedRange.current();if(this.settings.navigableHeaders||s.highlight.normalize(),"single"===this.settings.selectionMode)s.setFrom(s.highlight),s.setTo(s.highlight);else{const e=s.getHorizontalDirection(),n=s.getVerticalDirection(),r=this.isMultiple();s.setTo(t),r&&(e!==s.getHorizontalDirection()||1===s.getWidth()&&!s.includes(s.highlight))&&s.from.assign({col:s.highlight.col}),r&&(n!==s.getVerticalDirection()||1===s.getHeight()&&!s.includes(s.highlight))&&s.from.assign({row:s.highlight.row})}n>0&&r>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!s.isSingleHeader())&&s.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight),this.applyAndCommit();const o=-1===Ia(Ya,this)||this.selectedRange.size()===Ia(Ya,this);this.runLocalHooks("afterSetRangeEnd",e,o)}applyAndCommit(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.selectedRange.current(),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getLayerLevel();const n=this.tableProps.countRows(),r=this.tableProps.countCols();t<this.highlight.layerLevel&&(Object(B["arrayEach"])(this.highlight.getAreas(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getLayeredAreas(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getRowHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getColumnHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveRowHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveColumnHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getActiveCornerHeaders(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getRowHighlights(),e=>{e.clear()}),Object(B["arrayEach"])(this.highlight.getColumnHighlights(),e=>{e.clear()})),this.highlight.useLayerLevel(t);const i=this.highlight.createArea(),s=this.highlight.createLayeredArea(),o=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),l=this.highlight.createActiveRowHeader(),u=this.highlight.createActiveColumnHeader(),c=this.highlight.createActiveCornerHeader(),h=this.highlight.createRowHighlight(),d=this.highlight.createColumnHighlight();if(i.clear(),s.clear(),o.clear(),a.clear(),l.clear(),u.clear(),c.clear(),h.clear(),d.clear(),this.highlight.isEnabledFor(Ao["b"],e.highlight)&&(this.isMultiple()||t>=1)&&(i.add(e.from).add(e.to).commit(),s.add(e.from).add(e.to).commit(),1===t)){const e=this.selectedRange.previous();this.highlight.useLayerLevel(t-1),this.highlight.createArea().add(e.from).commit().syncWith(e),this.highlight.createLayeredArea().add(e.from).commit().syncWith(e),this.highlight.useLayerLevel(t)}if(this.highlight.isEnabledFor(Ao["g"],e.highlight)){if(!e.isSingleHeader()){const t=this.tableProps.createCellCoords(Math.max(e.from.row,0),-1),n=this.tableProps.createCellCoords(e.to.row,-1),r=this.tableProps.createCellCoords(-1,Math.max(e.from.col,0)),i=this.tableProps.createCellCoords(-1,e.to.col);"single"===this.settings.selectionMode?(o.add(t).commit(),a.add(r).commit(),h.add(t).commit(),d.add(r).commit()):(o.add(t).add(n).commit(),a.add(r).add(i).commit(),h.add(t).add(n).commit(),d.add(r).add(i).commit())}const t=!Ia(ja,this)&&this.isEntireRowSelected()&&(r>0&&r===e.getWidth()||0===r&&this.isSelectedByRowHeader()),i=!Ia(ja,this)&&this.isEntireColumnSelected()&&(n>0&&n===e.getHeight()||0===n&&this.isSelectedByColumnHeader());t&&l.add(this.tableProps.createCellCoords(Math.max(e.from.row,0),Math.min(-this.tableProps.countRowHeaders(),-1))).add(this.tableProps.createCellCoords(Math.max(e.to.row,0),-1)).commit(),i&&u.add(this.tableProps.createCellCoords(Math.min(-this.tableProps.countColHeaders(),-1),Math.max(e.from.col,0))).add(this.tableProps.createCellCoords(-1,Math.max(e.to.col,0))).commit(),t&&i&&c.add(this.tableProps.createCellCoords(-this.tableProps.countColHeaders(),-this.tableProps.countRowHeaders())).add(this.tableProps.createCellCoords(-1,-1)).commit()}}setRangeFocus(e){if(this.selectedRange.isEmpty())return;const t=this.selectedRange.current();this.inProgress||this.runLocalHooks("beforeSetFocus",e);const n=this.highlight.getFocus();n.clear(),t.setHighlight(e),this.inProgress||this.runLocalHooks("beforeHighlightSet"),this.highlight.isEnabledFor(Ao["f"],t.highlight)&&n.add(t.highlight).commit().syncWith(t),this.inProgress||(ka(Pa,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?Ia(Da,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ia(Da,this).resetOffsetSize(),this.setRangeStart(Ia(Da,this).transformStart(e,t,n))}transformEnd(e,t){this.settings.navigableHeaders?Ia(Da,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ia(Da,this).resetOffsetSize(),this.setRangeEnd(Ia(Da,this).transformEnd(e,t))}transformFocus(e,t){const n=this.selectedRange.current(),{row:r,col:i}=n.getOuterTopStartCorner(),s=this.tableProps.countRenderableColumnsInRange(0,i-1),o=this.tableProps.countRenderableRowsInRange(0,r-1);n.highlight.isHeader()?Ia(Ha,this).setOffsetSize({x:i<0?Math.abs(i):-s,y:r<0?Math.abs(r):-o}):Ia(Ha,this).setOffsetSize({x:i<0?0:-s,y:r<0?0:-o});const a=Ia(Ha,this).transformStart(e,t);this.setRangeFocus(a.normalize())}shiftRows(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByColumnHeader()||n.getOuterTopStartCorner().row>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countRows(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=l?-1:0,c=l?0:t;this.getSelectedRange().pop();const h=this.tableProps.createCellCoords(Object($["clamp"])(r.row+c,u,o-1),r.col),d=this.tableProps.createCellCoords(Object($["clamp"])(i.row+t,u,o-1),i.col);this.markSource("shift"),s.row>=e?this.setRangeStartOnly(h,!0,this.tableProps.createCellCoords(Object($["clamp"])(s.row+t,0,o-1),s.col)):this.setRangeStartOnly(h,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}shiftColumns(e,t){if(!this.isSelected())return;const n=this.selectedRange.current();if(this.isSelectedByCorner())this.selectAll(!0,!0,{disableHeadersHighlight:!0});else if(this.isSelectedByRowHeader()||n.getOuterTopStartCorner().col>=e){const{from:r,to:i,highlight:s}=n,o=this.tableProps.countCols(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=a?-1:0,c=a?0:t;this.getSelectedRange().pop();const h=this.tableProps.createCellCoords(r.row,Object($["clamp"])(r.col+c,u,o-1)),d=this.tableProps.createCellCoords(i.row,Object($["clamp"])(i.col+t,u,o-1));this.markSource("shift"),s.col>=e?this.setRangeStartOnly(h,!0,this.tableProps.createCellCoords(s.row,Object($["clamp"])(s.col+t,0,o-1))):this.setRangeStartOnly(h,!0),a&&this.selectedByRowHeader.add(this.getLayerLevel()),l&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.markEndSource()}}getLayerLevel(){return this.selectedRange.size()-1}isSelected(){return!this.selectedRange.isEmpty()}isMultiple(){if(!this.isSelected())return!1;const e=Object(E["createObjectPropListener"])(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&Ia(Pa,this)}isSelectedByRowHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner(e)&&(-1===e?this.selectedByRowHeader.size>0:this.selectedByRowHeader.has(e))}isEntireRowSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{col:t}=e.getOuterTopStartCorner(),n=this.tableProps.countRowHeaders(),r=this.tableProps.countCols();return(n>0&&t<0||0===n)&&e.getWidth()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByColumnHeader(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();return!this.isSelectedByCorner()&&(-1===e?this.selectedByColumnHeader.size>0:this.selectedByColumnHeader.has(e))}isEntireColumnSelected(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getLayerLevel();const t=e=>{const{row:t}=e.getOuterTopStartCorner(),n=this.tableProps.countColHeaders(),r=this.tableProps.countRows();return(n>0&&t<0||0===n)&&e.getHeight()===r};if(-1===e)return Array.from(this.selectedRange).some(e=>t(e));const n=this.selectedRange.peekByIndex(e);return!!n&&t(n)}isSelectedByAnyHeader(){return this.isSelectedByRowHeader(-1)||this.isSelectedByColumnHeader(-1)||this.isSelectedByCorner()}isSelectedByCorner(){return this.selectedByColumnHeader.has(this.getLayerLevel())&&this.selectedByRowHeader.has(this.getLayerLevel())}inInSelection(e){return this.selectedRange.includes(e)}isCellCornerVisible(){return this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&!this.isMultiple()}isCellVisible(e){const t=this.tableProps.visualToRenderableCoords(e);return null!==t.row&&null!==t.col}isAreaCornerVisible(e){return(!Number.isInteger(e)||e===this.getLayerLevel())&&(this.settings.fillHandle&&!this.tableProps.isEditorOpened()&&this.isMultiple())}clear(){this.selectedRange.clear(),this.highlight.clear()}deselect(){this.isSelected()&&(this.inProgress=!1,this.clear(),this.runLocalHooks("afterDeselect"))}selectAll(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{focusPosition:!1,disableHeadersHighlight:!1};const i=this.tableProps.countRows(),s=this.tableProps.countCols(),o=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=n?-a:0,u=t?-o:0;if(0===l&&0===u&&(0===i||0===s))return;let c=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:h,disableHeadersHighlight:d}=r;ka(ja,this,d),h&&Number.isInteger(null===h||void 0===h?void 0:h.row)&&Number.isInteger(null===h||void 0===h?void 0:h.col)&&(c=this.tableProps.createCellCoords(Object($["clamp"])(h.row,l,i-1),Object($["clamp"])(h.col,u,s-1)));const m=this.tableProps.createCellCoords(l,u),f=this.tableProps.createCellCoords(i-1,s-1);this.clear(),this.setRangeStartOnly(m,void 0,c),u<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(f),this.finish(),ka(ja,this,!1)}selectCells(e){var t=this;const n=Object(Ta["c"])(e);if(n===Ta["a"])return!1;if(n===Ta["b"])throw new Error(et["a"]`Unsupported format of the selection ranges was passed. To select cells pass\x20
- the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
- columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=Object(Ta["d"])(n,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),i=this.settings.navigableHeaders,s={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:i?this.tableProps.countRowHeaders():0,countColHeaders:i?this.tableProps.countColHeaders():0},o=!e.some(e=>{const t=r(e),n=t.isValid(s);return!(n&&!t.containsHeaders()||n&&t.containsHeaders()&&t.isSingleHeader())});return o&&(this.clear(),this.setExpectedLayers(e.length),Object(B["arrayEach"])(e,e=>{const{from:t,to:n}=r(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(n.clone())}),this.finish()),o}selectColumns(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r="string"===typeof e?this.tableProps.propToCol(e):e,i="string"===typeof t?this.tableProps.propToCol(t):t,s=this.tableProps.countRows(),o=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,u=this.tableProps.createCellCoords(l,r),c=this.tableProps.createCellCoords(s-1,i),h=this.tableProps.createCellRange(u,u,c).isValid({countRows:s,countCols:o,countRowHeaders:0,countColHeaders:a});if(h){let e=0,t=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(e=Object($["clamp"])(n.row,l,s-1),t=Object($["clamp"])(n.col,Math.min(r,i),Math.max(r,i))):(e=Object($["clamp"])(n,l,s-1),t=r);const o=this.tableProps.createCellCoords(e,t),u=0===a?0:Object($["clamp"])(o.row,l,-1),c=s-1,h=this.tableProps.createCellCoords(u,r),d=this.tableProps.createCellCoords(c,i);this.runLocalHooks("beforeSelectColumns",h,d,o),h.row=u,d.row=c,this.setRangeStartOnly(h,void 0,o),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectColumns",h,d,o),this.finish()}return h}selectRows(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;const r=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),o=0===s?0:-s,a=this.tableProps.createCellCoords(e,o),l=this.tableProps.createCellCoords(t,i-1),u=this.tableProps.createCellRange(a,a,l).isValid({countRows:r,countCols:i,countRowHeaders:s,countColHeaders:0});if(u){let r=0,a=0;Number.isInteger(null===n||void 0===n?void 0:n.row)&&Number.isInteger(null===n||void 0===n?void 0:n.col)?(r=Object($["clamp"])(n.row,Math.min(e,t),Math.max(e,t)),a=Object($["clamp"])(n.col,o,i-1)):(r=e,a=Object($["clamp"])(n,o,i-1));const l=this.tableProps.createCellCoords(r,a),u=0===s?0:Object($["clamp"])(l.col,o,-1),c=i-1,h=this.tableProps.createCellCoords(e,u),d=this.tableProps.createCellCoords(t,c);this.runLocalHooks("beforeSelectRows",h,d,l),h.col=u,d.col=c,this.setRangeStartOnly(h,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectRows",h,d,l),this.finish()}return u}refresh(){if(!this.isSelected())return;const e=this.tableProps.countRows(),t=this.tableProps.countCols();if(0===e||0===t)return void this.deselect();const n=this.selectedRange.peekByIndex(this.selectedRange.size()-1),{from:r,to:i,highlight:s}=n;this.clear(),s.assign({row:Object($["clamp"])(s.row,-1/0,e-1),col:Object($["clamp"])(s.col,-1/0,t-1)}),r.assign({row:Object($["clamp"])(r.row,-1/0,e-1),col:Object($["clamp"])(r.col,-1/0,t-1)}),i.assign({row:Object($["clamp"])(i.row,0,e-1),col:Object($["clamp"])(i.col,0,t-1)}),this.selectedRange.ranges.push(n),this.highlight.getFocus().add(s).commit().syncWith(n),this.applyAndCommit(n)}commit(){const e=this.highlight.getCustomSelections();if(e.forEach(e=>{e.commit()}),!this.isSelected())return;const t=this.highlight.getFocus(),n=this.getLayerLevel();t.commit().syncWith(this.selectedRange.current());for(let r=0;r<this.selectedRange.size();r+=1){this.highlight.useLayerLevel(r);const e=this.highlight.createArea(),t=this.highlight.createLayeredArea(),n=this.highlight.createRowHeader(),i=this.highlight.createColumnHeader(),s=this.highlight.createActiveRowHeader(),o=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();e.commit(),t.commit(),n.commit(),i.commit(),s.commit(),o.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(n)}}Object(E["mixin"])(Ua,Is["a"]);var Va=Ua,Ba=n("76ab");function Wa(e,t){var n;return"CELL_TYPE"!==e&&((null===(n=t._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(e))||!Object(E["hasOwnProperty"])(t,e))}function za(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"===typeof t.type?Object(Ba["a"])(t.type):t.type;if(e._automaticallyAssignedMetaProps&&Object(E["objectEach"])(t,(t,n)=>{e._automaticallyAssignedMetaProps.delete(n)}),!Object(E["isObject"])(r))return;n!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const i={};Object(E["objectEach"])(r,(t,r)=>{var s;Wa(r,n)&&(i[r]=t,null===(s=e._automaticallyAssignedMetaProps)||void 0===s||s.add(r))}),Object(E["extend"])(e,i)}function Ga(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}Object(E["inherit"])(n,e);for(let r=0;r<t.length;r++)n.prototype[t[r]]=void 0;return n}function Ka(e){return Number.isInteger(e)&&e>=0}function Xa(e,t){if(!e())throw new Error("Assertion failed: "+t)}function $a(e){return null===e||void 0===e}var qa=()=>({_automaticallyAssignedMetaProps:void 0,activeHeaderClassName:"ht__active_highlight",allowEmpty:!0,allowHtml:!1,allowInsertColumn:!0,allowInsertRow:!0,allowInvalid:!0,allowRemoveColumn:!0,allowRemoveRow:!0,ariaTags:!0,autoColumnSize:void 0,autoRowSize:void 0,autoWrapCol:!1,autoWrapRow:!1,bindRowsWithHeaders:void 0,cell:[],cells:void 0,checkedTemplate:void 0,className:void 0,colHeaders:null,collapsibleColumns:void 0,columnHeaderHeight:void 0,columns:void 0,columnSorting:void 0,columnSummary:void 0,colWidths:void 0,commentedCellClassName:"htCommentCell",comments:!1,contextMenu:void 0,copyable:!0,copyPaste:!0,correctFormat:!1,currentColClassName:void 0,currentHeaderClassName:"ht__highlight",currentRowClassName:void 0,customBorders:!1,data:void 0,dataDotNotation:!0,dataSchema:void 0,dateFormat:"DD/MM/YYYY",timeFormat:"h:mm:ss a",datePickerConfig:void 0,defaultDate:void 0,disableVisualSelection:!1,dragToScroll:!0,dropdownMenu:void 0,editor:void 0,enterBeginsEditing:!0,enterMoves:{col:0,row:1},fillHandle:{autoInsertRow:!1},filter:!0,filteringCaseSensitive:!1,filters:void 0,fixedColumnsLeft:0,fixedColumnsStart:0,fixedRowsBottom:0,fixedRowsTop:0,formulas:void 0,fragmentSelection:!1,headerClassName:void 0,height:void 0,hiddenColumns:void 0,hiddenRows:void 0,invalidCellClassName:"htInvalid",imeFastEdit:!1,isEmptyCol(e){let t,n,r;for(t=0,n=this.countRows();t<n;t++)if(r=this.getDataAtCell(t,e),!1===Object(s["isEmpty"])(r))return!1;return!0},isEmptyRow(e){let t,n,r,i;for(t=0,n=this.countCols();t<n;t++)if(r=this.getDataAtCell(e,t),!1===Object(s["isEmpty"])(r))return"object"===typeof r&&(i=this.getCellMeta(e,t),Object(E["isObjectEqual"])(this.getSchema()[i.prop],r));return!0},label:void 0,language:"en-US",layoutDirection:"inherit",licenseKey:void 0,locale:"en-US",manualColumnFreeze:void 0,manualColumnMove:void 0,manualColumnResize:void 0,manualRowMove:void 0,manualRowResize:void 0,maxCols:1/0,maxRows:1/0,mergeCells:!1,minCols:0,minRows:0,minSpareCols:0,minSpareRows:0,multiColumnSorting:void 0,navigableHeaders:!1,tabNavigation:!0,nestedHeaders:void 0,nestedRows:void 0,noWordWrapClassName:"htNoWrap",numericFormat:void 0,observeDOMVisibility:!0,outsideClickDeselects:!0,persistentState:void 0,placeholder:void 0,placeholderCellClassName:"htPlaceholder",preventOverflow:!1,preventWheel:!1,readOnly:!1,readOnlyCellClassName:"htDimmed",renderAllRows:!1,renderAllColumns:!1,renderer:void 0,rowHeaders:void 0,rowHeaderWidth:void 0,rowHeights:void 0,search:!1,selectionMode:"multiple",selectOptions:void 0,skipColumnOnPaste:!1,skipRowOnPaste:!1,sortByRelevance:!0,source:void 0,startCols:5,startRows:5,stretchH:"none",strict:void 0,tableClassName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:void 0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",visibleRows:10,width:void 0,wordWrap:!0});function Ja(e,t,n){return(t=Qa(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Qa(e){var t=Za(e,"string");return"symbol"==typeof t?t:t+""}function Za(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function el(){return class{}}class tl{constructor(e){Ja(this,"metaCtor",el()),Ja(this,"meta",void 0),this.meta=this.metaCtor.prototype,Object(E["extend"])(this.meta,qa()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;Object(E["extend"])(this.meta,e),za(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}function nl(e,t,n){return(t=rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rl(e){var t=il(e,"string");return"symbol"==typeof t?t:t+""}function il(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class sl{constructor(e){nl(this,"meta",void 0);const t=e.getMetaConstructor();this.meta=new t}getMeta(){return this.meta}updateMeta(e){Object(E["extend"])(this.meta,e),za(this.meta,e,e)}}function ol(e,t,n){return(t=al(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function al(e){var t=ll(e,"string");return"symbol"==typeof t?t:t+""}function ll(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class ul{constructor(e){ol(this,"valueFactory",void 0),ol(this,"data",[]),ol(this,"index",[]),ol(this,"holes",new Set),this.valueFactory=e}obtain(e){Xa(()=>Ka(e),"Expecting an unsigned number.");const t=this._getStorageIndexByKey(e);let n;if(t>=0)n=this.data[t],void 0===n&&(n=this.valueFactory(e),this.data[t]=n);else if(n=this.valueFactory(e),this.holes.size>0){const t=this.holes.values().next().value;this.holes.delete(t),this.data[t]=n,this.index[e]=t}else this.data.push(n),this.index[e]=this.data.length-1;return n}insert(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Xa(()=>Ka(e)||$a(e),"Expecting an unsigned number or null/undefined argument.");const n=[],r=this.data.length;for(let s=0;s<t;s++)n.push(r+s),this.data.push(void 0);const i=$a(e)?this.index.length:e;this.index=[...this.index.slice(0,i),...n,...this.index.slice(i)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Xa(()=>Ka(e)||$a(e),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice($a(e)?this.index.length-t:e,t);for(let r=0;r<n.length;r++){const e=n[r];"number"===typeof e&&this.holes.add(e)}}size(){return this.data.length-this.holes.size}values(){return Object(B["arrayFilter"])(this.data,(e,t)=>!this.holes.has(t))[Symbol.iterator]()}entries(){const e=[];for(let n=0;n<this.data.length;n++){const t=this._getKeyByStorageIndex(n);-1!==t&&e.push([t,this.data[n]])}let t=0;return{next:()=>{if(t<e.length){const n=e[t];return t+=1,{value:n,done:!1}}return{done:!0}}}}clear(){this.data=[],this.index=[],this.holes.clear()}_getStorageIndexByKey(e){return this.index.length>e?this.index[e]:-1}_getKeyByStorageIndex(e){return this.index.indexOf(e)}[Symbol.iterator](){return this.entries()}}function cl(e,t,n){return(t=hl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hl(e){var t=dl(e,"string");return"symbol"==typeof t?t:t+""}function dl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const ml=["data","width"];class fl{constructor(e){cl(this,"globalMeta",void 0),cl(this,"metas",new ul(()=>this._createMeta())),this.globalMeta=e,this.metas=new ul(()=>this._createMeta())}updateMeta(e,t){const n=this.getMeta(e);Object(E["extend"])(n,t),za(n,t)}createColumn(e,t){this.metas.insert(e,t)}removeColumn(e,t){this.metas.remove(e,t)}getMeta(e){return this.metas.obtain(e)}getMetaConstructor(e){return this.metas.obtain(e).constructor}clearCache(){this.metas.clear()}_createMeta(){return Ga(this.globalMeta.getMetaConstructor(),ml).prototype}}function pl(e,t,n){return(t=gl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gl(e){var t=yl(e,"string");return"symbol"==typeof t?t:t+""}function yl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class wl{constructor(e){pl(this,"columnMeta",void 0),pl(this,"metas",new ul(()=>this._createRow())),this.columnMeta=e}updateMeta(e,t,n){const r=this.getMeta(e,t);Object(E["extend"])(r,n),za(r,n)}createRow(e,t){this.metas.insert(e,t)}createColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).insert(e,t)}removeRow(e,t){this.metas.remove(e,t)}removeColumn(e,t){for(let n=0;n<this.metas.size();n++)this.metas.obtain(n).remove(e,t)}getMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);return void 0===n?r:r[n]}setMeta(e,t,n,r){var i;const s=this.metas.obtain(e).obtain(t);null===(i=s._automaticallyAssignedMetaProps)||void 0===i||i.delete(n),s[n]=r}removeMeta(e,t,n){const r=this.metas.obtain(e).obtain(t);delete r[n]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let n=0;n<t.length;n++)Object(s["isDefined"])(t[n])&&e.push(...t[n].values());return e}getMetasAtRow(e){Xa(()=>Ka(e),"Expecting an unsigned number.");const t=new Map(this.metas);return t.has(e)?Array.from(t.get(e).values()):[]}clearCache(){this.metas.clear()}_createRow(){return new ul(e=>this._createMeta(e))}_createMeta(e){const t=this.columnMeta.getMetaConstructor(e);return new t}}class bl{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];this.hot=e,this.globalMeta=new tl(e),this.tableMeta=new sl(this.globalMeta),this.columnMeta=new fl(this.globalMeta),this.cellMeta=new wl(this.columnMeta),n.forEach(e=>new e(this)),this.globalMeta.updateMeta(t)}getGlobalMeta(){return this.globalMeta.getMeta()}updateGlobalMeta(e){this.globalMeta.updateMeta(e)}getTableMeta(){return this.tableMeta.getMeta()}updateTableMeta(e){this.tableMeta.updateMeta(e)}getColumnMeta(e){return this.columnMeta.getMeta(e)}updateColumnMeta(e,t){this.columnMeta.updateMeta(e,t)}getCellMeta(e,t,n){let{visualRow:r,visualColumn:i}=n;const s=this.cellMeta.getMeta(e,t);return s.visualRow=r,s.visualCol=i,s.row=e,s.col=t,this.runLocalHooks("afterGetCellMeta",s),s}getCellMetaKeyValue(e,t,n){if("string"!==typeof n)throw new Error("The passed cell meta object key is not a string");return this.cellMeta.getMeta(e,t,n)}setCellMeta(e,t,n,r){this.cellMeta.setMeta(e,t,n,r)}updateCellMeta(e,t,n){this.cellMeta.updateMeta(e,t,n)}removeCellMeta(e,t,n){this.cellMeta.removeMeta(e,t,n)}getCellsMeta(){return this.cellMeta.getMetas()}getCellsMetaAtRow(e){return this.cellMeta.getMetasAtRow(e)}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createRow(e,t)}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeRow(e,t)}createColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.createColumn(e,t),this.columnMeta.createColumn(e,t)}removeColumn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.cellMeta.removeColumn(e,t),this.columnMeta.removeColumn(e,t)}clearCellsCache(){this.cellMeta.clearCache()}clearCache(){this.cellMeta.clearCache(),this.columnMeta.clearCache()}}function vl(e,t,n){return(t=_l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _l(e){var t=Sl(e,"string");return"symbol"==typeof t?t:t+""}function Sl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}Object(E["mixin"])(bl,Is["a"]);class El{constructor(e){vl(this,"metaManager",void 0),vl(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",e=>this.extendCellMeta(e)),no["a"].getSingleton().add("beforeRender",e=>{e&&this.metaSyncMemo.clear()},this.metaManager.hot)}extendCellMeta(e){var t;const{row:n,col:r}=e;if(null!==(t=this.metaSyncMemo.get(n))&&void 0!==t&&t.has(r))return;const{visualRow:s,visualCol:o}=e,a=this.metaManager.hot,l=a.colToProp(o);e.prop=l,a.runHooks("beforeGetCellMeta",s,o,e);const u=Object(E["hasOwnProperty"])(e,"type")?e.type:null;let c=Object(i["isFunction"])(e.cells)?e.cells(n,r,l):null;var h;u&&(c?c.type=null!==(h=c.type)&&void 0!==h?h:u:c={type:u});c&&this.metaManager.updateCellMeta(n,r,c),a.runHooks("afterGetCellMeta",s,o,e),this.metaSyncMemo.has(n)||this.metaSyncMemo.set(n,new Set),this.metaSyncMemo.get(n).add(r)}}function Cl(e,t,n){Ml(e,t),t.set(e,n)}function Ml(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Tl(e,t,n){return(t=Rl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Rl(e){var t=Ol(e,"string");return"symbol"==typeof t?t:t+""}function Ol(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function Nl(e,t){return e.get(Al(e,t))}function Al(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var Ll=new WeakMap;class Il{constructor(e){Tl(this,"metaManager",void 0),Tl(this,"usageTracker",new Set),Tl(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){const t=this.metaManager.hot.isRtl();if(t&&"fixedColumnsLeft"===e)throw new Error("The `fixedColumnsLeft` is not supported for RTL. Please use option `fixedColumnsStart`.");if(this.usageTracker.has("fixedColumnsLeft")&&this.usageTracker.has("fixedColumnsStart"))throw new Error("The `fixedColumnsLeft` and `fixedColumnsStart` should not be used together. Please use only the option `fixedColumnsStart`.")}}],["layoutDirection",{initOnly:!0}],["renderAllColumns",{initOnly:!0}],["renderAllRows",{initOnly:!0}]])),Cl(this,Ll,(e,t,n)=>{if(!n)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)}),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach((e,t)=>{const{initOnly:n,target:r,onChange:i}=e,s="string"===typeof r,o=s?r:t,a="_"+o;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[o],i?(this.installPropWatcher(t,a,i),s&&this.installPropWatcher(r,a,i)):n&&(this.installPropWatcher(t,a,Nl(Ll,this)),this.metaManager.globalMeta.meta._initOnlySettings||(this.metaManager.globalMeta.meta._initOnlySettings=[]),this.metaManager.globalMeta.meta._initOnlySettings.push(t))})}installPropWatcher(e,t,n){const r=this;Object.defineProperty(this.metaManager.globalMeta.meta,e,{get(){return this[t]},set(i){const s=!r.usageTracker.has(e);r.usageTracker.add(e),n.call(r,e,i,s),this[t]=i},enumerable:!0,configurable:!0})}}var kl=n("3bc4");function xl(e,t,n){return(t=Dl(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dl(e){var t=Hl(e,"string");return"symbol"==typeof t?t:t+""}function Hl(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}class Pl{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,n){xl(this,"hot",void 0),xl(this,"metaManager",void 0),xl(this,"tableMeta",void 0),xl(this,"dataSource",void 0),xl(this,"duckSchema",void 0),xl(this,"colToPropCache",void 0),xl(this,"propToColCache",void 0),this.hot=e,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=t,this.duckSchema=this.createDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if("undefined"===typeof e)throw new Error("trying to create `columns` definition but you didn't provide `schema` nor `data`");const t=this.tableMeta.columns;let n;if(this.colToPropCache=[],this.propToColCache=new Map,t){let r=0,i=0,s=!1;if("function"===typeof t){const t=Object(E["deepObjectSize"])(e);r=t>0?t:this.countFirstRowKeys(),s=!0}else{const e=this.tableMeta.maxCols;r=Math.min(e,t.length)}for(n=0;n<r;n++){const e=s?t(n):t[n];if(Object(E["isObject"])(e)){if("undefined"!==typeof e.data){const t=s?i:n;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}i+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return Object(ds["countFirstRowKeys"])(this.dataSource)}recursiveDuckColumns(e,t,n){let r,i=t,s=n;return"undefined"===typeof i&&(i=0,s=""),"object"!==typeof e||Array.isArray(e)||Object(E["objectEach"])(e,(e,t)=>{null===e?(r=s+t,this.colToPropCache.push(r),this.propToColCache.set(r,i),i+=1):i=this.recursiveDuckColumns(e,i,t+".")}),i}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&Object(s["isDefined"])(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if(Object(s["isDefined"])(t))return this.hot.toVisualColumn(t);const n=this.hot.toVisualColumn(e);return null===n?e:n}getSchema(){const e=this.tableMeta.dataSchema;return e?"function"===typeof e?e():e:this.duckSchema}createDuckSchema(){return this.dataSource&&this.dataSource[0]?Object(E["duckSchema"])(this.dataSource[0]):{}}refreshDuckSchema(){this.duckSchema=this.createDuckSchema()}createRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="above"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=this.hot.countSourceRows();let s=i,o=0,a=e;("number"!==typeof a||a>=i)&&(a=i),a<this.hot.countRows()&&(s=this.hot.toPhysicalRow(a));const l=this.hot.runHooks("beforeCreateRow",a,t,n);if(!1===l||null===s)return{delta:0};const u=this.tableMeta.maxRows,c=this.getSchema().length,h=[];while(o<t&&i+o<u){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=Object(E["deepClone"])(this.getSchema()):(e=[],Object($["rangeEach"])(c-1,()=>e.push(null))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+o):(e={},Object(E["deepExtend"])(e,this.getSchema())),h.push(e),o+=1}this.hot.rowIndexMapper.insertIndexes(a,o),"below"===r&&(s=Math.min(s+1,i)),this.spliceData(s,0,h);const d=this.hot.toVisualRow(s);return this.hot.countSourceRows()===h.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),o>0&&(void 0===e||null===e?this.metaManager.createRow(null,o):"auto"!==n&&this.metaManager.createRow(s,t)),this.hot.runHooks("afterCreateRow",d,o,n),this.hot.forceFullRender=!0,{delta:o,startPhysicalIndex:s}}createCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,{source:n,mode:r="start"}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.hot.isColumnModificationAllowed())throw new Error("Cannot create new column. When data source in an object, you can only have as much columns as defined in first data row, data schema or in the 'columns' setting.If you want to be able to add new columns, you have to use array datasource.");const i=this.dataSource,s=this.tableMeta.maxCols,o=this.hot.countSourceCols();let a=e;("number"!==typeof a||a>=o)&&(a=o);const l=this.hot.runHooks("beforeCreateCol",a,t,n);if(!1===l)return{delta:0};let u=o;a<this.hot.countCols()&&(u=this.hot.toPhysicalColumn(a));const c=this.hot.countSourceRows();let h=this.hot.countCols(),d=0,m=u;"end"===r&&(m=Math.min(m+1,o));const f=m;while(d<t&&h<s){if("number"!==typeof a||a>=h)if(c>0)for(let e=0;e<c;e+=1)"undefined"===typeof i[e]&&(i[e]=[]),i[e].push(null);else i.push([null]);else for(let e=0;e<c;e++)i[e].splice(m,0,null);d+=1,m+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,d),d>0&&(void 0===e||null===e?this.metaManager.createColumn(null,d):"auto"!==n&&this.metaManager.createColumn(f,t));const p=this.hot.toVisualColumn(f);return this.hot.runHooks("afterCreateCol",p,d,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),{delta:d,startPhysicalIndex:f}}removeRow(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0,r=Number.isInteger(e)?e:-t;const i=this.visualRowsToPhysical(r,t),o=this.hot.countSourceRows();r=(o+r)%o;const a=this.hot.runHooks("beforeRemoveRow",r,i.length,i,n);if(!1===a)return!1;const l=i.length;if(this.filterData(r,l,i),r<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(i);const e=Object(s["isDefined"])(this.tableMeta.columns)||Object(s["isDefined"])(this.tableMeta.dataSchema);0===this.hot.rowIndexMapper.getNotTrimmedIndexesLength()&&!1===e&&this.hot.columnIndexMapper.setIndexesSequence([])}const u=i.slice(0).sort((e,t)=>t-e);return u.forEach(e=>{this.metaManager.removeRow(e,1)}),this.hot.runHooks("afterRemoveRow",r,l,i,n),this.hot.forceFullRender=!0,!0}removeCol(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2?arguments[2]:void 0;if("object"===this.hot.dataType||this.tableMeta.columns)throw new Error("cannot remove column with object data source or columns option specified");let r="number"!==typeof e?-t:e;r=(this.hot.countCols()+r)%this.hot.countCols();const i=this.visualColumnsToPhysical(r,t),s=i.slice(0).sort((e,t)=>t-e),o=this.hot.runHooks("beforeRemoveCol",r,t,i,n);if(!1===o)return!1;let a=!0;const l=s.length,u=this.dataSource;for(let c=0;c<l;c++)a&&i[0]!==i[c]-c&&(a=!1);if(a)for(let c=0,h=this.hot.countSourceRows();c<h;c++)u[c].splice(i[0],t),0===c&&this.metaManager.removeColumn(i[0],t);else for(let c=0,h=this.hot.countSourceRows();c<h;c++)for(let e=0;e<l;e++)u[c].splice(s[e],1),0===c&&this.metaManager.removeColumn(s[e],1);return r<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(i),0===this.hot.columnIndexMapper.getNotTrimmedIndexesLength()&&this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",r,t,i,n),this.hot.forceFullRender=!0,this.refreshDuckSchema(),!0}spliceCol(e,t,n){const r=this.hot.getDataAtCol(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(B["extendArray"])(a,s);let u=0;while(u<n)a.push(null),u+=1;return Object(B["to2dArray"])(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),i}spliceRow(e,t,n){const r=this.hot.getSourceDataAtRow(e),i=r.slice(t,t+n),s=r.slice(t+n);for(var o=arguments.length,a=new Array(o>3?o-3:0),l=3;l<o;l++)a[l-3]=arguments[l];Object(B["extendArray"])(a,s);let u=0;while(u<n)a.push(null),u+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),i}spliceData(e,t,n){const r=this.hot.runHooks("beforeDataSplice",e,t,n);if(!1!==r){const t=[...this.dataSource.slice(0,e),...n,...this.dataSource.slice(e)];this.dataSource.length=0,t.forEach(e=>this.dataSource.push(e))}}filterData(e,t,n){let r=this.hot.runHooks("filterData",e,t,n);!1===Array.isArray(r)&&(r=this.dataSource.filter((e,t)=>-1===n.indexOf(t))),this.dataSource.length=0,Array.prototype.push.apply(this.dataSource,r)}get(e,t){const n=this.hot.toPhysicalRow(e);let r=this.dataSource[n];const i=this.hot.runHooks("modifyRowData",n);r=isNaN(i)?i:r;const{dataDotNotation:s}=this.hot.getSettings();let o=null;if(r&&r.hasOwnProperty&&Object(E["hasOwnProperty"])(r,t))o=r[t];else if(s&&"string"===typeof t&&t.indexOf(".")>-1){let e=r;if(!e)return null;const n=t.split(".");for(let t=0,r=n.length;t<r;t++)if(e=e[n[t]],"undefined"===typeof e)return null;o=e}else"function"===typeof t&&(o=t(this.dataSource.slice(n,n+1)[0]));if(this.hot.hasHook("modifyData")){const e=Object(E["createObjectPropListener"])(o);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"get"),e.isTouched()&&(o=e.value)}return o}getCopyable(e,t){return this.hot.getCellMeta(e,this.propToCol(t)).copyable?this.get(e,t):""}set(e,t,n){const r=this.hot.toPhysicalRow(e);let i=n,s=this.dataSource[r];const o=this.hot.runHooks("modifyRowData",r);if(s=isNaN(o)?o:s,this.hot.hasHook("modifyData")){const e=Object(E["createObjectPropListener"])(i);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"set"),e.isTouched()&&(i=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(s&&s.hasOwnProperty&&Object(E["hasOwnProperty"])(s,t))s[t]=i;else if(a&&"string"===typeof t&&t.indexOf(".")>-1){let e,n=s,r=0;const o=t.split(".");for(r=0,e=o.length-1;r<e;r++)"undefined"===typeof n[o[r]]&&(n[o[r]]={}),n=n[o[r]];n[o[r]]=i}else"function"===typeof t?t(this.dataSource.slice(r,r+1)[0],i):s[t]=i}visualRowsToPhysical(e,t){const n=this.hot.countSourceRows(),r=[];let i,s=(n+e)%n,o=t;while(s<n&&o)i=this.hot.toPhysicalRow(s),r.push(i),o-=1,s+=1;return r}visualColumnsToPhysical(e,t){const n=this.hot.countCols(),r=[];let i=(n+e)%n,s=t;while(i<n&&s){const e=this.hot.toPhysicalColumn(i);r.push(e),s-=1,i+=1}return r}clear(){for(let e=0;e<this.hot.countSourceRows();e++)for(let t=0;t<this.hot.countCols();t++)this.set(e,this.colToProp(t),"")}getLength(){const e=this.tableMeta.maxRows;let t;t=e<0||0===e?0:e||1/0;const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength();return Math.min(n,t)}getAll(){const e={row:0,col:0},t={row:Math.max(this.hot.countRows()-1,0),col:Math.max(this.hot.countCols()-1,0)};return e.row-t.row!==0||this.hot.countSourceRows()?this.getRange(e,t,Pl.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,n){const r=[];let i,s,o;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=n===Pl.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,c=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),h=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(i=Math.min(e.row,t.row);i<=c;i++){o=[];const n=i>=0?this.hot.toPhysicalRow(i):i;for(s=Math.min(e.col,t.col);s<=h;s++){if(null===n)break;o.push(u.call(this,i,this.colToProp(s)))}null!==n&&r.push(o)}return r}getText(e,t){return Object(kl["b"])(this.getRange(e,t,Pl.DESTINATION_RENDERER))}getCopyableText(e,t){return Object(kl["b"])(this.getRange(e,t,Pl.DESTINATION_CLIPBOARD_GENERATOR))}destroy(){this.hot=null,this.metaManager=null,this.dataSource=null,this.duckSchema=null,this.colToPropCache.length=0,this.propToColCache.clear(),this.propToColCache=void 0}}var jl=Pl;function Fl(e,t,n,s){const{hotInstance:o,dataMap:a,dataSource:l,internalSource:u,source:c,metaManager:h,firstRun:d}=s,m=Object(X["toUpperCaseFirst"])(u),f=o.getSettings();Array.isArray(f.dataSchema)?o.dataType="array":Object(i["isFunction"])(f.dataSchema)?o.dataType="function":o.dataType="object",a&&a.destroy(),e=o.runHooks("before"+m,e,d,c);const p=new jl(o,e,h);if(t(p),"object"===typeof e&&null!==e)e.push&&e.splice||(e=[e]);else{if(null!==e)throw new Error(`${u} only accepts array of objects or array of arrays (${typeof e} given)`);{const t=p.getSchema();let n;e=[];let r=0,i=0;for(r=0,i=f.startRows;r<i;r++)if("object"!==o.dataType&&"function"!==o.dataType||!f.dataSchema)if("array"===o.dataType)n=Object(E["deepClone"])(t[0]),e.push(n);else{n=[];for(let e=0,t=f.startCols;e<t;e++)n.push(null);e.push(n)}else n=Object(E["deepClone"])(t),e.push(n)}}Array.isArray(e[0])&&(o.dataType="array"),f.data=e,p.dataSource=e,l.data=e,l.dataType=o.dataType,l.colToProp=p.colToProp.bind(p),l.propToCol=p.propToCol.bind(p),l.countCachedColumns=p.countCachedColumns.bind(p),n(p),o.runHooks("after"+m,e,d,c),d||(o.runHooks("afterChange",null,u),o.render()),o.getSettings().ariaTags&&Object(r["setAttribute"])(o.rootElement,[Object(Xe["C"])(-1),Object(Xe["e"])(o.countCols()+(o.view?o.countRowHeaders():0))])}function Yl(e){return t=>{let{col:n}=t;e.scrollViewportTo({col:n})}}function Ul(){return()=>{}}function Vl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Bl(e){return t=>{e.scrollViewportTo(t.toObject())}}function Wl(e){return t=>{e.scrollViewportTo(t.toObject())}}function zl(e){return t=>{let{row:n}=t;e.scrollViewportTo({row:n})}}function Gl(e){return t=>{const n=e.selection.getSelectionSource(),{row:r,col:i}=t;if(r<0&&i>=0)e.scrollViewportTo({col:i});else if(i<0&&r>=0)e.scrollViewportTo({row:r});else{if("mouse"===n&&(i===e.view.getLastPartiallyVisibleColumn()||r===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:r,col:i})}}}function Kl(e){const{selection:t}=e;let n=!1,r=!1;return{resume(){r=!1},suspend(){r=!0},skipNextScrollCycle(){n=!0},scrollTo(i){var s;if(n||r)return void(n=!1);let o;t.isFocusSelectionChanged()?o=Vl(e):t.isSelectedByCorner()?o=Ul(e):t.isSelectedByRowHeader()?o=zl(e):t.isSelectedByColumnHeader()?o=Yl(e):1===t.getSelectedRange().size()&&t.isMultiple()?o=Bl(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(o=Wl(e)):o=Gl(e),null===(s=o)||void 0===s||s(i)}}}var Xl=n("c4fa");function $l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.rootElement,r=ql(e),i=ql(e);return r.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromTop()),i.addEventListener("focus",()=>null===t||void 0===t?void 0:t.onFocusFromBottom()),n.firstChild.before(r),n.lastChild.after(i),{activate(){e._registerTimeout(()=>{r.tabIndex=0,i.tabIndex=0},10)},deactivate(){e._registerTimeout(()=>{r.tabIndex=-1,i.tabIndex=-1},10)}}}function ql(e){const t=e.rootDocument,n=t.createElement("input");return n.type="text",n.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&Object(r["setAttribute"])(n,[Object(Xe["y"])(),Object(Xe["n"])()]),n}function Jl(e){const t=eu(e);let n;const{activate:r,deactivate:i}=$l(e,{onFocusFromTop(){var r;const i=null!==(r=t(n))&&void 0!==r?r:Ql(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_above",i),e.selectCell(i.row,i.col)),e.listen()},onFocusFromBottom(){var r;const i=null!==(r=t(n))&&void 0!==r?r:Zl(e);i&&(e.runHooks("modifyFocusOnTabNavigation","from_below",i),e.selectCell(i.row,i.col)),e.listen()}}),s={wrapped:!1,flipped:!1};let o=!0,a=!1,l=!1;function u(){s.wrapped=!1,s.flipped=!1,e.deselectCell(),e.unlisten()}e.addHook("afterListen",()=>i()),e.addHook("afterUnlisten",()=>r()),e.addHook("afterSelection",(t,r,i,u,c)=>{var h;(a&&(s.wrapped&&s.flipped||l)&&(l=!1,c.value=!0),o)&&(n=null===(h=e.getSelectedRangeLast())||void 0===h?void 0:h.highlight)}),e.addHook("beforeRowWrap",(e,t,n)=>{s.wrapped=!0,s.flipped=n});const c={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:Xl["b"],group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...c,callback:()=>{const{tabNavigation:t}=e.getSettings();a=!0,e.getSelectedRangeLast()&&!t&&(o=!1),t||(l=!0)},position:"before"},{...c,callback:t=>{const{tabNavigation:r,autoWrapRow:i}=e.getSettings();if(a=!1,o=!0,!r||!e.selection.isSelected()||i&&s.wrapped&&s.flipped||!i&&s.wrapped)return i&&s.wrapped&&s.flipped&&(n=t.shiftKey?Ql(e):Zl(e)),u(),!1;t.preventDefault()},position:"after"}])}function Ql(e){const{rowIndexMapper:t,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let i=r&&e.countColHeaders()>0?-e.countColHeaders():0,s=r&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===i&&(i=t.getVisualFromRenderableIndex(i)),0===s&&(s=n.getVisualFromRenderableIndex(s)),null===i||null===s?null:e._createCellCoords(i,s)}function Zl(e){var t,n;const{rowIndexMapper:r,columnIndexMapper:i}=e,{navigableHeaders:s}=e.getSettings();let o=r.getRenderableIndexesLength()-1,a=i.getRenderableIndexesLength()-1;if(o<0){if(!s||0===e.countColHeaders())return null;o=-1}if(a<0){if(!s||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=r.getVisualFromRenderableIndex(o))&&void 0!==t?t:o,null!==(n=i.getVisualFromRenderableIndex(a))&&void 0!==n?n:a)}function eu(e){return t=>{if(!t)return null;const n=Ql(e),r=Zl(e);return t.col<n.col&&(t.col=n.col),t.col>r.col&&(t.col=r.col),t.row<n.row&&(t.row=n.row),t.row>r.row&&(t.row=r.row),t}}var tu=n("6906");const nu=new Map([[" ","space"],["spacebar","space"],["scroll","scrolllock"],["del","delete"],["esc","escape"],["medianexttrack","mediatracknext"],["mediaprevioustrack","mediatrackprevious"],["volumeup","audiovolumeup"],["volumedown","audiovolumedown"],["volumemute","audiovolumemute"],["multiply","*"],["add","+"],["divide","/"],["subtract","-"],["left","arrowleft"],["right","arrowright"],["up","arrowup"],["down","arrowdown"]]),ru=e=>e.map(e=>{const t=e.toLowerCase();return nu.has(t)?nu.get(t):t}).sort().join("+"),iu=e=>e.split("+"),su=new Map([[96,"numpad0"],[97,"numpad1"],[98,"numpad2"],[99,"numpad3"],[100,"numpad4"],[101,"numpad5"],[102,"numpad6"],[103,"numpad7"],[104,"numpad8"],[105,"numpad9"],[106,"multiply"],[107,"add"],[108,"decimal"],[109,"subtract"],[110,"decimal"],[111,"divide"],[112,"f1"],[113,"f2"],[114,"f3"],[115,"f4"],[116,"f5"],[117,"f6"],[118,"f7"],[119,"f8"],[120,"f9"],[121,"f10"],[122,"f11"],[123,"f12"],[186,"semicolon"],[187,"equal"],[188,"comma"],[189,"minus"],[190,"period"],[191,"slash"],[192,"backquote"],[219,"bracketleft"],[220,"backslash"],[221,"bracketright"],[222,"quote"]]),ou=e=>{let{which:t,key:n}=e;if(su.has(t))return su.get(t);const r=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(r)?r:n.toLowerCase()},au=Symbol("shortcut-context");function lu(e){return Object(E["isObject"])(e)&&e.__kindOf===au}const uu=e=>{const t=Object(tu["a"])({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:n,group:r,runOnlyIf:o=(()=>!0),captureCtrl:a=!1,preventDefault:l=!0,stopPropagation:u=!1,relativeToGroup:c,position:h,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Object(s["isUndefined"])(r))throw new Error("You need to define the shortcut's group.");if(!1===Object(i["isFunction"])(n))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(et["a"]`Pass the shortcut\'s keys as an array of arrays,\x20
- using the KeyboardEvent.key properties:\x20
- https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:n,group:r,runOnlyIf:o,captureCtrl:a,preventDefault:l,stopPropagation:u};Object(s["isDefined"])(c)&&(m.relativeToGroup=c,m.position=h),lu(d)&&(m.forwardToContext=d),e.forEach(e=>{const n=ru(e),r=t.hasItem(n);if(r){const e=t.getItem(n);let r=e.findIndex(e=>e.group===c);-1!==r?"before"===h?r-=1:r+=1:r=e.length,e.splice(r,0,m)}else t.addItem(n,[m])})},r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach(e=>{Object(E["objectEach"])(t,(n,r)=>{!1===Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t[r])}),n(e)})},o=e=>{const n=ru(e);t.removeItem(n)},a=e=>{const n=t.getItems();n.forEach(t=>{let[n,r]=t;const i=r.filter(t=>t.group!==e);0===i.length?o(iu(n)):(r.length=0,r.push(...i))})},l=e=>{const n=ru(e),r=t.getItem(n);return Object(s["isDefined"])(r)?r.slice():[]},u=e=>{const n=ru(e);return t.hasItem(n)};return{__kindOf:au,addShortcut:n,addShortcuts:r,getShortcuts:l,hasShortcut:u,removeShortcutsByKeys:o,removeShortcutsByGroup:a}};function cu(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed(t){return e.has(t)}}}const hu=["meta","alt","shift","control"],du=cu(),mu=[];let fu=0;function pu(e,t,n,i,s){const a=e=>hu.includes(e),u=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=[];return e.altKey&&n.push("alt"),t&&(e.ctrlKey||e.metaKey)?n.push("control/meta"):(e.ctrlKey&&n.push("control"),e.metaKey&&n.push("meta")),e.shiftKey&&n.push("shift"),n},c=e=>{if(!1===t(e))return;const r=n(e);if(229===e.keyCode||!1===r||Object(l["isImmediatePropagationStopped"])(e))return;const c=ou(e);let h=[];a(c)||(h=u(e));const d=[c].concat(h),m=s(e,d);!m&&(Object(o["isMacOS"])()&&h.includes("meta")||!Object(o["isMacOS"])()&&h.includes("control"))&&s(e,[c].concat(u(e,!0))),i(e)},h=e=>{if(e.key){const t=ou(e);a(t)&&du.press(t)}},d=e=>{if(e.key){const t=ou(e);a(t)&&du.release(t)}},m=()=>{du.releaseAll()},f=()=>{let t=e;fu+=1;while(t)1===fu&&(t.document.documentElement.addEventListener("keydown",h),mu.push({event:"keydown",listener:h}),t.document.documentElement.addEventListener("keyup",d),mu.push({event:"keyup",listener:d})),t.document.documentElement.addEventListener("keydown",c),t.document.documentElement.addEventListener("blur",m),t=Object(r["getParentWindow"])(t)},p=()=>{let t=e;fu-=1;while(t){if(0===fu){for(let e=0;e<mu.length;e++){const{event:n,listener:r}=mu[e];t.document.documentElement.removeEventListener(n,r)}mu.length=0}t.document.documentElement.removeEventListener("keydown",c),t.document.documentElement.removeEventListener("blur",m),t=Object(r["getParentWindow"])(t)}};return{mount:f,unmount:p,isPressed:e=>du.isPressed(e),releasePressedKeys:()=>du.releaseAll()}}const gu=e=>{let{ownerWindow:t,handleEvent:n,beforeKeyDown:r,afterKeyDown:i}=e;const s=Object(tu["a"])({errorIdExists:e=>`The "${e}" context name is already registered.`});let o="grid";const a=e=>{const t=uu(e);return s.addItem(e,t),t},u=()=>o,c=e=>s.getItem(e),h=e=>{if(!s.hasItem(e))throw new Error(et["a"]`You've tried to activate the "${e}" shortcut context\x20
- that does not exist. Before activation, register the context using the "addContext" method.`);o=e};let d=!1;const m=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u();const r=lu(n)?n:c(n);let i=!1;if(!r.hasShortcut(t))return i;const s=r.getShortcuts(t);for(let o=0;o<s.length;o++){const{callback:n,runOnlyIf:r,preventDefault:a,stopPropagation:u,captureCtrl:c,forwardToContext:h}=s[o];if(!0===r(e)){if(d=c,i=!1===n(e,t),d=!1,a&&e.preventDefault(),u&&(Object(l["stopImmediatePropagation"])(e),e.stopPropagation()),i)break;h&&m(e,t,h)}}return i},f=pu(t,n,r,i,m);return f.mount(),{addContext:a,getActiveContextName:u,getContext:c,setActiveContextName:h,isCtrlPressed:()=>!d&&(f.isPressed("control")||f.isPressed("meta")),releasePressedKeys:()=>f.releasePressedKeys(),destroy:()=>f.unmount()}};var yu=n("1e8c");let wu=null;const bu=new Map;new Set;function vu(e,t){var n,a=this;let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],h=this;const d=new c["a"](h);let m,f,p,g,y,w,b=!0;Bi(l)&&Vi(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const v=null!==(n=null===t||void 0===t?void 0:t.layoutDirection)&&void 0!==n?n:"inherit",_=["rtl","ltr"].includes(v)?v:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",_),this.isRtl=function(){return"rtl"===_},this.isLtr=function(){return!h.isRtl()},this.getDirectionFactor=function(){return h.isLtr()?1:-1},t.language=No(t.language);const C=new bl(h,t,[El,Il]),M=C.getTableMeta(),T=C.getGlobalMeta(),R=Object(tu["a"])();this.container=this.rootDocument.createElement("div"),this.renderCall=!1,e.insertBefore(this.container,e.firstChild),Wi(this)&&Object(s["_injectProductInfo"])(t.licenseKey,e),this.guid="ht_"+Object(X["randomString"])(),bu.set(this.guid,this),this.columnIndexMapper=new to,this.rowIndexMapper=new to,this.columnIndexMapper.addLocalHook("indexesSequenceChange",e=>{h.runHooks("afterColumnSequenceChange",e)}),this.rowIndexMapper.addLocalHook("indexesSequenceChange",e=>{h.runHooks("afterRowSequenceChange",e)}),f=new ys(h),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);const O=e=>{const{row:t,col:n}=e;return h._createCellCoords(t>=0?h.rowIndexMapper.getRenderableFromVisualIndex(t):t,n>=0?h.columnIndexMapper.getRenderableFromVisualIndex(n):n)},N=e=>{const{row:t,col:n}=e;return h._createCellCoords(t>=0?h.rowIndexMapper.getVisualFromRenderableIndex(t):t,n>=0?h.columnIndexMapper.getVisualFromRenderableIndex(n):n)},A=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=h.rowIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?h.rowIndexMapper.getRenderableFromVisualIndex(s):s},L=(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),i=Math.max(e,t),s=h.columnIndexMapper.getNearestNotHiddenIndex(e,n);return null===s||1===n&&s>i||-1===n&&s<r?null:s>=0?h.columnIndexMapper.getRenderableFromVisualIndex(s):s};let I=new Va(M,{rowIndexMapper:h.rowIndexMapper,columnIndexMapper:h.columnIndexMapper,countCols:()=>h.countCols(),countRows:()=>h.countRows(),propToCol:e=>m.propToCol(e),isEditorOpened:()=>!!h.getActiveEditor()&&h.getActiveEditor().isOpened(),countRenderableColumns:()=>this.view.countRenderableColumns(),countRenderableRows:()=>this.view.countRenderableRows(),countRowHeaders:()=>this.countRowHeaders(),countColHeaders:()=>this.countColHeaders(),countRenderableRowsInRange:function(){return a.view.countRenderableRowsInRange(...arguments)},countRenderableColumnsInRange:function(){return a.view.countRenderableColumnsInRange(...arguments)},getShortcutManager:()=>h.getShortcutManager(),createCellCoords:(e,t)=>h._createCellCoords(e,t),createCellRange:(e,t,n)=>h._createCellRange(e,t,n),visualToRenderableCoords:O,renderableToVisualCoords:N,findFirstNonHiddenRenderableRow:A,findFirstNonHiddenRenderableColumn:L,isDisabledCellSelection:(e,t)=>e<0||t<0?h.getSettings().disableVisualSelection:h.getCellMeta(e,t).disableVisualSelection});this.selection=I;const k=e=>{let{hiddenIndexesChanged:t}=e;t&&this.selection.commit()};function x(e){const t=io(e);Mo(t)?(h.runHooks("beforeLanguageChange",t),T.language=t,h.runHooks("afterLanguageChange",t)):so(e)}function D(e,t){const n="className"===e?h.rootElement:h.table;if(b)Object(r["addClass"])(n,t);else{let i=[],s=[];T[e]&&(i=Array.isArray(T[e])?T[e]:Object(B["stringToArray"])(T[e])),t&&(s=Array.isArray(t)?t:Object(B["stringToArray"])(t));const o=Object(B["getDifferenceOfArrays"])(i,s),a=Object(B["getDifferenceOfArrays"])(s,i);o.length&&Object(r["removeClass"])(n,o),a.length&&Object(r["addClass"])(n,a)}T[e]=t}function H(){let e=!1;return{validatorsInQueue:0,valid:!0,addValidatorToQueue(){this.validatorsInQueue+=1,e=!1},removeValidatorFormQueue(){this.validatorsInQueue=this.validatorsInQueue-1<0?0:this.validatorsInQueue-1,this.checkIfQueueIsEmpty()},onQueueEmpty(){},checkIfQueueIsEmpty(){0===this.validatorsInQueue&&!1===e&&(e=!0,this.onQueueEmpty(this.valid))}}}function P(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function F(e,t,n){if(!e.length)return void n();const r=h.getActiveEditor(),i=new H;let s=!0;i.onQueueEmpty=()=>{r&&s&&r.cancelChanges(),n()};for(let o=e.length-1;o>=0;o--){const[n,r,,a]=e[o],l=m.propToCol(r);let u;u=Number.isInteger(l)?h.getCellMeta(n,l):{...Object.getPrototypeOf(M),...M},"numeric"===u.type&&"string"===typeof a&&Object($["isNumericLike"])(a)&&(e[o][3]=P(a)),h.getCellValidator(u)&&(i.addValidatorToQueue(),h.validateCell(e[o][3],u,function(t,n){return function(r){if("boolean"!==typeof r)throw new Error("Validation error: result is not boolean");!1===r&&!1===n.allowInvalid&&(s=!1,e.splice(t,1),n.valid=!0),i.removeValidatorFormQueue()}}(o,u),t))}i.checkIfQueueIsEmpty()}function Y(e,t){for(let r=e.length-1;r>=0;r--){let n=!1;if(null!==e[r]){if(null!==e[r][2]&&void 0!==e[r][2]||null!==e[r][3]&&void 0!==e[r][3]){if(M.allowInsertRow)while(e[r][0]>h.countRows()-1){const{delta:e}=m.createRow(void 0,void 0,{source:t});if(0===e){n=!0;break}}if("array"===h.dataType&&(!M.columns||0===M.columns.length)&&M.allowInsertColumn)while(m.propToCol(e[r][1])>h.countCols()-1){const{delta:e}=m.createCol(void 0,void 0,{source:t});if(0===e){n=!0;break}}n||m.set(e[r][0],e[r][1],e[r][3])}}else e.splice(r,1)}const n=e.length>0;if(h.forceFullRender=!0,n){p.adjustRowsAndCols(),h.runHooks("beforeChangeRender",e,t),g.closeEditor(),h.view.render(),g.prepareEditor(),h.view.adjustElementsSize(),h.runHooks("afterChange",e,t||"edit");const n=h.getActiveEditor();n&&Object(s["isDefined"])(n.refreshValue)&&n.refreshValue()}else h.view.render()}function U(e,t,n){return Array.isArray(e)?e:[[e,t,n]]}function V(e,t){const n=h.getActiveEditor(),r=h.runHooks("beforeChange",e,t||"edit"),i=e.filter(e=>null!==e);return!1===r||0===i.length?(n&&n.cancelChanges(),[]):i}this.columnIndexMapper.addLocalHook("cacheUpdated",k),this.rowIndexMapper.addLocalHook("cacheUpdated",k),this.selection.addLocalHook("afterSetRangeEnd",(e,t)=>{const n=Object(E["createObjectPropListener"])(!1),i=this.selection.getSelectedRange(),{from:s,to:o}=i.current(),a=i.size()-1;this.runHooks("afterSelection",s.row,s.col,o.row,o.col,n,a),this.runHooks("afterSelectionByProp",s.row,h.colToProp(s.col),o.row,h.colToProp(o.col),n,a),t&&(!n.isTouched()||n.isTouched()&&!n.value)&&w.scrollTo(e);const l=I.isSelectedByRowHeader(),u=I.isSelectedByColumnHeader();l&&u?Object(r["addClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?(Object(r["removeClass"])(this.rootElement,"ht__selection--columns"),Object(r["addClass"])(this.rootElement,"ht__selection--rows")):u?(Object(r["removeClass"])(this.rootElement,"ht__selection--rows"),Object(r["addClass"])(this.rootElement,"ht__selection--columns")):Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==I.getSelectionSource()&&g.closeEditor(null),h.view.render(),g.prepareEditor()}),this.selection.addLocalHook("beforeSetFocus",e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)}),this.selection.addLocalHook("afterSetFocus",e=>{const t=Object(E["createObjectPropListener"])(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&w.scrollTo(e),g.closeEditor(),h.view.render(),g.prepareEditor()}),this.selection.addLocalHook("afterSelectionFinished",e=>{const t=e.length-1,{from:n,to:r}=e[t];this.runHooks("afterSelectionEnd",n.row,n.col,r.row,r.col,t),this.runHooks("afterSelectionEndByProp",n.row,h.colToProp(n.col),r.row,h.colToProp(r.col),t)}),this.selection.addLocalHook("afterIsMultipleSelection",e=>{const t=this.runHooks("afterIsMultipleSelection",e.value);e.value&&(e.value=t)}),this.selection.addLocalHook("afterDeselect",()=>{g.closeEditor(),h.view.render(),Object(r["removeClass"])(this.rootElement,["ht__selection--rows","ht__selection--columns"]),this.runHooks("afterDeselect")}),this.selection.addLocalHook("beforeHighlightSet",()=>this.runHooks("beforeSelectionHighlightSet")).addLocalHook("beforeSetRangeStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeStart",...t)})).addLocalHook("beforeSetRangeStartOnly",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeStartOnly",...t)})).addLocalHook("beforeSetRangeEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSetRangeEnd",...t)})).addLocalHook("beforeSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSelectColumns",...t)})).addLocalHook("afterSelectColumns",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterSelectColumns",...t)})).addLocalHook("beforeSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeSelectRows",...t)})).addLocalHook("afterSelectRows",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterSelectRows",...t)})).addLocalHook("beforeModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformStart",...t)})).addLocalHook("afterModifyTransformStart",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformStart",...t)})).addLocalHook("beforeModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformFocus",...t)})).addLocalHook("afterModifyTransformFocus",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformFocus",...t)})).addLocalHook("beforeModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("modifyTransformEnd",...t)})).addLocalHook("afterModifyTransformEnd",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("afterModifyTransformEnd",...t)})).addLocalHook("beforeRowWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeRowWrap",...t)})).addLocalHook("beforeColumnWrap",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return a.runHooks("beforeColumnWrap",...t)})).addLocalHook("insertRowRequire",e=>this.alter("insert_row_above",e,1,"auto")).addLocalHook("insertColRequire",e=>this.alter("insert_col_start",e,1,"auto")),p={alter(e,t){var n,r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;const l=e=>{if(0===e.length)return[];const t=[...e];t.sort((e,t)=>{let[n]=e,[r]=t;return n===r?0:n>r?1:-1});const n=Object(B["arrayReduce"])(t,(e,t)=>{let[n,r]=t;const i=e[e.length-1],[s,o]=i,a=s+o;if(n<=a){const e=Math.max(r-(a-n),0);i[1]+=e}else e.push([n,r]);return e},[t[0]]);return n};switch(e){case"insert_row_below":case"insert_row_above":const a=h.countSourceRows();if(M.maxRows===a)return;const u="insert_row_below"===e?"below":"above";t=null!==(n=t)&&void 0!==n?n:"below"===u?a:0;const{delta:c,startPhysicalIndex:d}=m.createRow(t,i,{source:o,mode:u});I.shiftRows(h.toVisualRow(d),c);break;case"insert_col_start":case"insert_col_end":const f="insert_col_end"===e?"end":"start";t=null!==(r=t)&&void 0!==r?r:"end"===f?h.countSourceCols():0;const{delta:p,startPhysicalIndex:y}=m.createCol(t,i,{source:o,mode:f});if(p){if(Array.isArray(M.colHeaders)){const e=[h.toVisualColumn(y),0];e.length+=p,Array.prototype.splice.apply(M.colHeaders,e)}I.shiftColumns(h.toVisualColumn(y),p)}break;case"remove_row":const w=e=>{let t=0;Object(B["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?h.countRows()-1:Math.max(n-t,0);Number.isInteger(n)&&(n=Math.max(n-t,0));const a=m.removeRow(n,r,o);if(!a)return;if(I.isSelected()){const{row:e}=h.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&g.closeEditor(!0)}const l=h.countRows();0===l?I.deselect():"ContextMenu.removeRow"===o?I.refresh():I.shiftRows(n,-r);const u=M.fixedRowsTop;u>=i+1&&(M.fixedRowsTop-=Math.min(r,u-i));const c=M.fixedRowsBottom;c&&i>=l-c&&(M.fixedRowsBottom-=Math.min(r,c)),t+=r})};Array.isArray(t)?w(l(t)):w([[t,i]]);break;case"remove_col":const b=e=>{let t=0;Object(B["arrayEach"])(e,e=>{let[n,r]=e;const i=Object(s["isEmpty"])(n)?h.countCols()-1:Math.max(n-t,0);let a=h.toPhysicalColumn(i);Number.isInteger(n)&&(n=Math.max(n-t,0));const l=m.removeCol(n,r,o);if(!l)return;if(I.isSelected()){const{col:e}=h.getSelectedRangeLast().highlight;e>=n&&e<=n+r-1&&g.closeEditor(!0)}const u=h.countCols();0===u?I.deselect():"ContextMenu.removeColumn"===o?I.refresh():I.shiftColumns(n,-r);const c=M.fixedColumnsStart;c>=i+1&&(M.fixedColumnsStart-=Math.min(r,c-i)),Array.isArray(M.colHeaders)&&("undefined"===typeof a&&(a=-1),M.colHeaders.splice(a,r)),t+=r})};Array.isArray(t)?b(l(t)):b([[t,i]]);break;default:throw new Error(`There is no such action "${e}"`)}h.view.render(),a||p.adjustRowsAndCols()},adjustRowsAndCols(){const e=M.minRows,t=M.minSpareRows,n=M.minCols,r=M.minSpareCols;if(e){const t=h.countRows();t<e&&m.createRow(t,e-t,{source:"auto"})}if(t){const e=h.countEmptyRows(!0);if(e<t){const n=t-e,r=Math.min(n,M.maxRows-h.countSourceRows());m.createRow(h.countRows(),r,{source:"auto"})}}{let e;(n||r)&&(e=h.countEmptyCols(!0));let t=h.countCols();if(n&&!M.columns&&t<n){const r=n-t;e+=r,m.createCol(t,r,{source:"auto"})}if(r&&!M.columns&&"array"===h.dataType&&e<r){t=h.countCols();const n=r-e,i=Math.min(n,M.maxCols-t);m.createCol(t,i,{source:"auto"})}}h.view&&h.view.adjustElementsSize()},populateFromArray(e,t,n,r,i){let s,o,a,l;const u=[],c={},d=[],m=e.row,f=e.col;if(o=t.length,0===o)return!1;let p=0,g=0;switch(Object(E["isObject"])(n)&&(p=n.col-f+1,g=n.row-m+1),i){case"shift_down":const i=Object(B["pivot"])(t),y=i.length,w=Math.max(y,p),b=h.getData().slice(m),v=Object(B["pivot"])(b).slice(f,f+w);for(a=0;a<w;a+=1)if(a<y){for(s=0,o=i[a].length;s<g-o;s+=1)i[a].push(i[a][s%o]);a<v.length?d.push(i[a].concat(v[a])):d.push(i[a].concat(new Array(b.length).fill(null)))}else d.push(i[a%y].concat(v[a]));h.populateFromArray(m,f,Object(B["pivot"])(d));break;case"shift_right":const _=t.length,S=Math.max(_,g),C=h.getData().slice(m).map(e=>e.slice(f));for(s=0;s<S;s+=1)if(s<_){for(a=0,l=t[s].length;a<p-l;a+=1)t[s].push(t[s][a%l]);if(s<C.length)for(let e=0;e<C[s].length;e+=1)t[s].push(C[s][e]);else t[s].push(...new Array(C[0].length).fill(null))}else t.push(t[s%o].slice(0,S).concat(C[s]));h.populateFromArray(m,f,t);break;case"overwrite":default:c.row=e.row,c.col=e.col;let T,R=0,O=0,N=!0;const A=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const r=t[e%t.length];return null!==n?r[n%r.length]:r},L=t.length,I=n?n.row-e.row+1:0;for(o=n?I:Math.max(L,I),s=0;s<o;s++){if(n&&c.row>n.row&&I>L||!M.allowInsertRow&&c.row>h.countRows()-1||c.row>=M.maxRows)break;const t=s-R,i=A(t).length,d=n?n.col-e.col+1:0;if(l=n?d:Math.max(i,d),c.col=e.col,T=h.getCellMeta(c.row,c.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!T.skipRowOnPaste){for(O=0,a=0;a<l;a++){if(n&&c.col>n.col&&d>i||!M.allowInsertColumn&&c.col>h.countCols()-1||c.col>=M.maxCols)break;if(T=h.getCellMeta(c.row,c.col),("CopyPaste.paste"===r||"Autofill.fill"===r)&&T.skipColumnOnPaste){O+=1,c.col+=1,l+=1;continue}if(T.readOnly&&"UndoRedo.undo"!==r){c.col+=1;continue}const e=a-O;let s=A(t,e),o=h.getDataAtCell(c.row,c.col);if(null!==s&&"object"===typeof s)if(Array.isArray(s)&&null===o&&(o=[]),null===o||"object"!==typeof o)N=!1;else{const e=Object(E["duckSchema"])(Array.isArray(o)?o:o[0]||o),t=Object(E["duckSchema"])(Array.isArray(s)?s:s[0]||s);Object(E["isObjectEqual"])(e,t)||Array.isArray(e)&&Array.isArray(t)?s=Object(E["deepClone"])(s):N=!1}else null!==o&&"object"===typeof o&&(N=!1);N&&u.push([c.row,c.col,s]),N=!0,c.col+=1}c.row+=1}else R+=1,c.row+=1,o+=1}h.setDataAtCell(u,null,null,r||"populateFromArray");break}}},this.init=function(){f.setData(M.data),h.runHooks("beforeInit"),(Object(o["isMobileBrowser"])()||Object(o["isIpadOS"])())&&Object(r["addClass"])(h.rootElement,"mobile"),this.updateSettings(M,!0),this.view=new hs(this),g=S.getInstance(h,M,I),w=Kl(h),y=new j(h),Wi(this)&&Jl(h),h.runHooks("init"),this.forceFullRender=!0,this.view.render(),b&&null===h.rootElement.offsetParent&&Object(r["observeVisibilityChangeOnce"])(h.rootElement,()=>{h.view._wt.wtOverlays.updateLastSpreaderSize(),h.render(),h.view.adjustElementsSize()}),"object"===typeof b&&(h.runHooks("afterChange",b[0],b[1]),b=!1),h.runHooks("afterInit")},this._createCellCoords=function(e,t){return h.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,n){return h.view._wt.createCellRange(e,t,n)},this.validateCell=function(e,t,n,r){let o=h.getCellValidator(t);function a(e){let r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!r||!0===t.hidden)return void n(e);const i=t.visualCol,s=t.visualRow,o=h.getCell(s,i,!0);if(o&&"TH"!==o.nodeName){const e=h.rowIndexMapper.getRenderableFromVisualIndex(s),t=h.columnIndexMapper.getRenderableFromVisualIndex(i);h.view._wt.getSetting("cellRenderer",e,t,o)}n(e)}Object(s["isRegExp"])(o)&&(o=function(e){return function(t,n){n(e.test(t))}}(o)),Object(i["isFunction"])(o)?(e=h.runHooks("beforeValidate",e,t.visualRow,t.prop,r),h._registerImmediate(()=>{o.call(t,e,n=>{h&&(n=h.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),h.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))})})):h._registerImmediate(()=>{t.valid=!0,a(t.valid,!1)})},this.setDataAtCell=function(e,t,n,r){const i=U(e,t,n),s=[];let o,a,l,u=r;for(o=0,a=i.length;o<a;o++){if("object"!==typeof i[o])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!==typeof i[o][1])throw new Error("Method `setDataAtCell` accepts row and column number as its parameters. If you want to use object property name, use method `setDataAtRowProp`");l=i[o][1]>=this.countCols()?i[o][1]:m.colToProp(i[o][1]),s.push([i[o][0],l,f.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]])}u||"object"!==typeof e||(u=t);const c=V(s,r);h.runHooks("afterSetDataAtCell",c,u),F(c,u,()=>{Y(c,u)})},this.setDataAtRowProp=function(e,t,n,r){const i=U(e,t,n),s=[];let o,a,l=r;for(o=0,a=i.length;o<a;o++)s.push([i[o][0],i[o][1],f.getAtCell(this.toPhysicalRow(i[o][0]),i[o][1]),i[o][2]]);l||"object"!==typeof e||(l=t);const u=V(s,r);h.runHooks("afterSetDataAtRowProp",u,l),F(u,l,()=>{Y(u,l)})},this.listen=function(){h&&!h.isListening()&&(bu.forEach(e=>{h!==e&&e.unlisten()}),wu=h.guid,h.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(wu=null,h.runHooks("afterUnlisten"))},this.isListening=function(){return wu===h.guid},this.destroyEditor=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];g.closeEditor(e),h.view.render(),t&&I.isSelected()&&g.prepareEditor()},this.populateFromArray=function(e,t,n,r,i,s,o){if("object"!==typeof n||"object"!==typeof n[0])throw new Error("populateFromArray parameter `input` must be an array of arrays");const a="number"===typeof r?h._createCellCoords(r,i):null;return p.populateFromArray(h._createCellCoords(e,t),n,a,s,o)},this.spliceCol=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return m.spliceCol(e,t,n,...i)},this.spliceRow=function(e,t,n){for(var r=arguments.length,i=new Array(r>3?r-3:0),s=3;s<r;s++)i[s-3]=arguments[s];return m.spliceRow(e,t,n,...i)},this.getSelected=function(){if(I.isSelected())return Object(B["arrayMap"])(I.getSelectedRange(),e=>{let{from:t,to:n}=e;return[t.row,t.col,n.row,n.col]})},this.getSelectedLast=function(){const e=this.getSelected();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.getSelectedRange=function(){if(I.isSelected())return Array.from(I.getSelectedRange())},this.getSelectedRangeLast=function(){const e=this.getSelectedRange();let t;return e&&e.length>0&&(t=e[e.length-1]),t},this.emptySelectedCells=function(e){if(!I.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];Object(B["arrayEach"])(I.getSelectedRange(),e=>{if(e.isSingleHeader())return;const n=e.getTopStartCorner(),r=e.getBottomEndCorner();Object($["rangeEach"])(n.row,r.row,e=>{Object($["rangeEach"])(n.col,r.col,n=>{this.getCellMeta(e,n).readOnly||t.push([e,n,null])})})}),t.length>0&&this.setDataAtCell(t,e)},this.isRenderSuspended=function(){return this.renderSuspendedCounter>0},this.suspendRender=function(){this.renderSuspendedCounter+=1},this.resumeRender=function(){const e=this.renderSuspendedCounter-1;this.renderSuspendedCounter=Math.max(e,0),this.isRenderSuspended()||e!==this.renderSuspendedCounter||(this.renderCall?this.render():h.view.render())},this.render=function(){this.view&&(this.renderCall=!0,this.forceFullRender=!0,this.isRenderSuspended()||h.view.render())},this.batchRender=function(e){this.suspendRender();const t=e();return this.resumeRender(),t},this.isExecutionSuspended=function(){return this.executionSuspendedCounter>0},this.suspendExecution=function(){this.executionSuspendedCounter+=1,this.columnIndexMapper.suspendOperations(),this.rowIndexMapper.suspendOperations()},this.resumeExecution=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=this.executionSuspendedCounter-1;this.executionSuspendedCounter=Math.max(t,0),(!this.isExecutionSuspended()&&t===this.executionSuspendedCounter||e)&&(this.columnIndexMapper.resumeOperations(),this.rowIndexMapper.resumeOperations())},this.batchExecution=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.suspendExecution();const n=e();return this.resumeExecution(t),n},this.batch=function(e){this.suspendRender(),this.suspendExecution();const t=e();return this.resumeExecution(),this.resumeRender(),t},this.refreshDimensions=function(){if(!h.view)return;const{width:e,height:t}=h.view.getLastSize(),{width:n,height:r}=h.rootElement.getBoundingClientRect(),i=n!==e||r!==t,s=!1===h.runHooks("beforeRefreshDimensions",{width:e,height:t},{width:n,height:r},i);s||((i||h.view._wt.wtOverlays.scrollableElement===h.rootWindow)&&(h.view.setLastSize(n,r),h.render()),h.runHooks("afterRefreshDimensions",{width:e,height:t},{width:n,height:r},i))},this.updateData=function(e,t){Fl(e,e=>{m=e},e=>{m=e,h.columnIndexMapper.fitToLength(this.getInitialColumnCount()),h.rowIndexMapper.fitToLength(this.countSourceRows()),p.adjustRowsAndCols(),I.refresh()},{hotInstance:h,dataMap:m,dataSource:f,internalSource:"updateData",source:t,metaManager:C,firstRun:b})},this.loadData=function(e,t){Fl(e,e=>{m=e},()=>{C.clearCellsCache(),h.initIndexMappers(),p.adjustRowsAndCols(),I.refresh(),b&&(b=[null,"loadData"])},{hotInstance:h,dataMap:m,dataSource:f,internalSource:"loadData",source:t,metaManager:C,firstRun:b})},this.getInitialColumnCount=function(){const e=M.columns;let t=0;if(Array.isArray(e))t=e.length;else if(Object(i["isFunction"])(e))if("array"===h.dataType){const n=this.countSourceCols();for(let r=0;r<n;r+=1)e(r)&&(t+=1)}else"object"!==h.dataType&&"function"!==h.dataType||(t=m.colToPropCache.length);else if(Object(s["isDefined"])(M.dataSchema)){const e=m.getSchema();t=Array.isArray(e)?e.length:Object(E["deepObjectSize"])(e)}else t=this.countSourceCols();return t},this.initIndexMappers=function(){this.columnIndexMapper.initToLength(this.getInitialColumnCount()),this.rowIndexMapper.initToLength(this.countSourceRows())},this.getData=function(e,t,n,r){return Object(s["isUndefined"])(e)?m.getAll():m.getRange(h._createCellCoords(e,t),h._createCellCoords(n,r),m.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return m.getCopyableText(h._createCellCoords(e,t),h._createCellCoords(n,r))},this.getCopyableData=function(e,t){return m.getCopyable(e,m.colToProp(t))},this.getSchema=function(){return m.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(b?h.loadData:h.updateData).bind(this);let r,o,a=!1;if(Object(s["isDefined"])(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if(Object(s["isDefined"])(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if(Object(s["isDefined"])(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(r in e)"data"===r||("language"===r?x(e.language):"className"===r?D("className",e.className):"tableClassName"===r&&h.table?(D("tableClassName",e.tableClassName),h.view._wt.wtOverlays.syncOverlayTableClassNames()):no["a"].getSingleton().isRegistered(r)||no["a"].getSingleton().isDeprecated(r)?(Object(i["isFunction"])(e[r])||Array.isArray(e[r]))&&(e[r].initialHook=!0,h.addHook(r,e[r])):!t&&Object(E["hasOwnProperty"])(e,r)&&(T[r]=e[r]));void 0===e.data&&void 0===M.data?n(null,"updateSettings"):void 0!==e.data?n(e.data,"updateSettings"):void 0!==e.columns&&(m.createMap(),h.initIndexMappers());const l=h.countCols(),u=M.columns;if(u&&Object(i["isFunction"])(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||C.clearCache(),l>0)for(r=0,o=0;r<l;r++){if(u){const e=a?u(r):u[o];e&&C.updateColumnMeta(o,e)}o+=1}Object(s["isDefined"])(e.cell)&&Object(E["objectEach"])(e.cell,e=>{h.setCellMetaObject(e.row,e.col,e)}),h.runHooks("afterCellMetaReset");let c=h.rootElement.style.height;""!==c&&(c=parseInt(h.rootElement.style.height,10));let d=e.height;if(Object(i["isFunction"])(d)&&(d=d()),t){const e=h.rootElement.getAttribute("style");e&&h.rootElement.setAttribute("data-initialstyle",h.rootElement.getAttribute("style"))}if(null===d){const e=h.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?h.rootElement.setAttribute("style",e):(h.rootElement.style.height="",h.rootElement.style.overflow="")}else void 0!==d&&(h.rootElement.style.height=isNaN(d)?""+d:d+"px",h.rootElement.style.overflow="hidden");if("undefined"!==typeof e.width){let t=e.width;Object(i["isFunction"])(t)&&(t=t()),h.rootElement.style.width=isNaN(t)?""+t:t+"px"}t||(h.view&&(h.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),h.view._wt.exportSettingsAsClassNames()),h.runHooks("afterUpdateSettings",e)),p.adjustRowsAndCols(),h.view&&!b&&(h.forceFullRender=!0,h.view.render(),h.view._wt.wtOverlays.adjustElementsSize()),t||!h.view||""!==c&&""!==d&&void 0!==d||c===d||h.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=h.getSelectedLast();if(M.getValue){if(Object(i["isFunction"])(M.getValue))return M.getValue.call(h);if(e)return h.getData()[e[0][0]][M.getValue]}else if(e)return h.getDataAtCell(e[0],e[1])},this.getSettings=function(){return M},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,i){p.alter(e,t,n,r,i)},this.getCell=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,i=e;if(t>=0){if(this.columnIndexMapper.isHidden(this.toPhysicalColumn(t)))return null;r=this.columnIndexMapper.getRenderableFromVisualIndex(t)}if(e>=0){if(this.rowIndexMapper.isHidden(this.toPhysicalRow(e)))return null;i=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===i||null===r||void 0===i||void 0===r?null:h.view.getCellAtCoords(h._createCellCoords(i,r),n)},this.getCoords=function(e){const t=this.view._wt.wtTable.getCoords(e);if(null===t)return null;const{row:n,col:r}=t;let i=n,s=r;return n>=0&&(i=this.rowIndexMapper.getVisualFromRenderableIndex(n)),r>=0&&(s=this.columnIndexMapper.getVisualFromRenderableIndex(r)),h._createCellCoords(i,s)},this.colToProp=function(e){return m.colToProp(e)},this.propToCol=function(e){return m.propToCol(e)},this.toVisualRow=e=>this.rowIndexMapper.getVisualFromPhysicalIndex(e),this.toVisualColumn=e=>this.columnIndexMapper.getVisualFromPhysicalIndex(e),this.toPhysicalRow=e=>this.rowIndexMapper.getPhysicalFromVisualIndex(e),this.toPhysicalColumn=e=>this.columnIndexMapper.getPhysicalFromVisualIndex(e),this.getDataAtCell=function(e,t){return m.get(e,m.colToProp(t))},this.getDataAtRowProp=function(e,t){return m.get(e,t)},this.getDataAtCol=function(e){const t=[],n=m.getRange(h._createCellCoords(0,e),h._createCellCoords(M.data.length-1,e),m.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getDataAtProp=function(e){const t=[],n=m.getRange(h._createCellCoords(0,m.propToCol(e)),h._createCellCoords(M.data.length-1,m.propToCol(e)),m.DESTINATION_RENDERER);for(let r=0;r<n.length;r+=1)for(let e=0;e<n[r].length;e+=1)t.push(n[r][e]);return t},this.getSourceData=function(e,t,n,r){let i;return i=void 0===e?f.getData():f.getByRange(h._createCellCoords(e,t),h._createCellCoords(n,r)),i},this.getSourceDataArray=function(e,t,n,r){let i;return i=void 0===e?f.getData(!0):f.getByRange(h._createCellCoords(e,t),h._createCellCoords(n,r),!0),i},this.getSourceDataAtCol=function(e){return f.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,n,r){const i=U(e,t,n),o=this.hasHook("afterSetSourceDataAtCell"),a=[];o&&Object(B["arrayEach"])(i,e=>{let[t,n,r]=e;a.push([t,n,f.getAtCell(t,n),r])}),Object(B["arrayEach"])(i,e=>{let[t,n,r]=e;f.setAtCell(t,n,r)}),o&&this.runHooks("afterSetSourceDataAtCell",a,r),this.render();const l=h.getActiveEditor();l&&Object(s["isDefined"])(l.refreshValue)&&l.refreshValue()},this.getSourceDataAtRow=function(e){return f.getAtRow(e)},this.getSourceDataAtCell=function(e,t){return f.getAtCell(e,t)},this.getDataAtRow=function(e){const t=m.getRange(h._createCellCoords(e,0),h._createCellCoords(e,this.countCols()-1),m.DESTINATION_RENDERER);return t[0]||[]},this.getDataType=function(e,t,n,r){const i=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],[s,o]=i;let[,,a,l]=i,u=null,c=null;void 0===a&&(a=s),void 0===l&&(l=o);let h="mixed";return Object($["rangeEach"])(Math.max(Math.min(s,a),0),Math.max(s,a),e=>{let t=!0;return Object($["rangeEach"])(Math.max(Math.min(o,l),0),Math.max(o,l),n=>{const r=this.getCellMeta(e,n);return c=r.type,u?t=u===c:u=c,t}),h=t?c:"mixed",t}),h},this.removeCellMeta=function(e,t,n){const[r,i]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let s=C.getCellMetaKeyValue(r,i,n);const o=h.runHooks("beforeRemoveCellMeta",e,t,n,s);!1!==o&&(C.removeCellMeta(r,i,n),h.runHooks("afterRemoveCellMeta",e,t,n,s)),s=null},this.spliceCellsMeta=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];if(r.length>0&&!Array.isArray(r[0]))throw new Error("The 3rd argument (cellMetaRows) has to be passed as an array of cell meta objects array.");t>0&&C.removeRow(this.toPhysicalRow(e),t),r.length>0&&Object(B["arrayEach"])(r.reverse(),t=>{C.createRow(this.toPhysicalRow(e)),Object(B["arrayEach"])(t,(t,n)=>this.setCellMetaObject(e,n,t))}),h.render()},this.setCellMetaObject=function(e,t,n){"object"===typeof n&&Object(E["objectEach"])(n,(n,r)=>{this.setCellMeta(e,t,r,n)})},this.setCellMeta=function(e,t,n,r){const i=h.runHooks("beforeSetCellMeta",e,t,n,r);if(!1===i)return;let s=e,o=t;e<this.countRows()&&(s=this.toPhysicalRow(e)),t<this.countCols()&&(o=this.toPhysicalColumn(t)),C.setCellMeta(s,o,n,r),h.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return C.getCellsMeta()},this.getCellMeta=function(e,t){let n=this.toPhysicalRow(e),r=this.toPhysicalColumn(t);return null===n&&(n=e),null===r&&(r=t),C.getCellMeta(n,r,{visualRow:e,visualColumn:t})},this.getColumnMeta=function(e){return C.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return C.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===h.dataType||M.columns)},this.getCellRenderer=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).renderer:e.renderer;return"string"===typeof n?Object(G["b"])(n):Object(s["isUndefined"])(n)?Object(G["b"])("text"):n},this.getCellEditor=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).editor:e.editor;return"string"===typeof n?Object(u["a"])(n):Object(s["isUndefined"])(n)?Object(u["a"])("text"):n},this.getCellValidator=function(e,t){const n="number"===typeof e?h.getCellMeta(e,t).validator:e.validator;return"string"===typeof n?Object(K["b"])(n):n},this.validateCells=function(e){this._validateCells(e)},this.validateRows=function(e,t){if(!Array.isArray(e))throw new Error("validateRows parameter `rows` must be an array");this._validateCells(t,e)},this.validateColumns=function(e,t){if(!Array.isArray(e))throw new Error("validateColumns parameter `columns` must be an array");this._validateCells(t,void 0,e)},this._validateCells=function(e,t,n){const r=new H;e&&(r.onQueueEmpty=e);let i=h.countRows()-1;while(i>=0){if(void 0!==t&&-1===t.indexOf(i)){i-=1;continue}let e=h.countCols()-1;while(e>=0)void 0===n||-1!==n.indexOf(e)?(r.addValidatorToQueue(),h.validateCell(h.getDataAtCell(i,e),h.getCellMeta(i,e),e=>{if("boolean"!==typeof e)throw new Error("Validation error: result is not boolean");!1===e&&(r.valid=!1),r.removeValidatorFormQueue()},"validateCells"),e-=1):e-=1;i-=1}r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=M.rowHeaders,n=e;return void 0!==n&&(n=h.runHooks("modifyRowHeader",n)),void 0===n?(t=[],Object($["rangeEach"])(h.countRows()-1,e=>{t.push(h.getRowHeader(e))})):Array.isArray(t)&&void 0!==t[n]?t=t[n]:Object(i["isFunction"])(t)?t=t(n):t&&"string"!==typeof t&&"number"!==typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!M.rowHeaders},this.hasColHeaders=function(){if(void 0!==M.colHeaders&&null!==M.colHeaders)return!!M.colHeaders;for(let e=0,t=h.countCols();e<t;e++)if(h.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=h.runHooks("modifyColHeader",e);if(void 0===n){const e=[],t=h.countCols();for(let n=0;n<t;n++)e.push(h.getColHeader(n));return e}let r=M.colHeaders;const s=function(e){const t=[],n=h.countCols();let r=0;for(;r<n;r++)Object(i["isFunction"])(M.columns)&&M.columns(r)&&t.push(r);return t[e]},o=h.toPhysicalColumn(n),a=s(o);return!1===M.colHeaders?r=null:M.columns&&Object(i["isFunction"])(M.columns)&&M.columns(a)&&M.columns(a).title?r=M.columns(a).title:M.columns&&M.columns[o]&&M.columns[o].title?r=M.columns[o].title:Array.isArray(M.colHeaders)&&void 0!==M.colHeaders[o]?r=M.colHeaders[o]:Object(i["isFunction"])(M.colHeaders)?r=M.colHeaders(o):M.colHeaders&&"string"!==typeof M.colHeaders&&"number"!==typeof M.colHeaders&&(r=Object(ds["spreadsheetColumnLabel"])(n)),r=h.runHooks("modifyColumnHeaderValue",r,e,t),r},this._getColWidthFromSettings=function(e){let t;if(e>=0){const n=h.getCellMeta(0,e);t=n.width}if(void 0!==t&&t!==M.width||(t=M.colWidths),void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e){let t=h._getColWidthFromSettings(e);return t=h.runHooks("modifyColWidth",t,e),void 0===t&&(t=wt["a"]),t},this._getRowHeightFromSettings=function(e){let t=M.rowHeights;if(void 0!==t&&null!==t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e);break;default:break}"string"===typeof t&&(t=parseInt(t,10))}return t},this.getRowHeight=function(e){let t=h._getRowHeightFromSettings(e);return t=h.runHooks("modifyRowHeight",t,e),t},this.countSourceRows=function(){return f.countRows()},this.countSourceCols=function(){return f.countFirstRowKeys()},this.countRows=function(){return m.getLength()},this.countCols=function(){const e=M.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return h.view._wt.drawn?h.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return h.view._wt.drawn?h.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return h.view._wt.drawn?h.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return h.view._wt.drawn?h.view._wt.wtTable.getVisibleColumnsCount():-1},this.countRowHeaders=function(){return this.view.getRowHeadersCount()},this.countColHeaders=function(){return this.view.getColumnHeadersCount()},this.countEmptyRows=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object($["rangeEachReverse"])(h.countRows()-1,n=>{if(h.isEmptyRow(n))t+=1;else if(!0===e)return!1}),t},this.countEmptyCols=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=0;return Object($["rangeEachReverse"])(h.countCols()-1,n=>{if(h.isEmptyCol(n))t+=1;else if(!0===e)return!1}),t},this.isEmptyRow=function(e){return M.isEmptyRow.call(h,e)},this.isEmptyCol=function(e){return M.isEmptyCol.call(h,e)},this.selectCell=function(e,t,n,r){let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!Object(s["isUndefined"])(e)&&!Object(s["isUndefined"])(t)&&this.selectCells([[e,t,n,r]],i,o)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===t&&w.suspend();const r=I.selectCells(e);return r&&n&&h.listen(),w.resume(),r},this.selectColumns=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return I.selectColumns(e,t,n)},this.selectRows=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;return I.selectRows(e,t,n)},this.deselectCell=function(){I.deselect()},this.selectAll=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;w.skipNextScrollCycle(),I.selectAll(e,t,n)};const q=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);function J(e){return()=>{throw new Error(`The "${e}" method cannot be called because this Handsontable instance has been destroyed`)}}this.scrollViewportTo=function(e){var t,n;"number"===typeof e&&(e={row:arguments[0],col:arguments[1],verticalSnap:arguments[2]?"bottom":"top",horizontalSnap:arguments[3]?"end":"start",considerHiddenIndexes:null===(n=arguments[4])||void 0===n||n});const{row:r,col:i,verticalSnap:s,horizontalSnap:o,considerHiddenIndexes:a}=null!==(t=e)&&void 0!==t?t:{};let l,u,c,d;void 0!==s&&(l="top"===s,u=!l),void 0!==o&&(c="start"===o,d=!c);let m=r,f=i;if(void 0===a||a){const e=Number.isInteger(r)&&r>=0,t=Number.isInteger(i)&&i>=0,n=e?q(this.rowIndexMapper,r):void 0,s=t?q(this.columnIndexMapper,i):void 0;if(null===n||null===s)return!1;m=e?h.rowIndexMapper.getRenderableFromVisualIndex(n):r,f=t?h.columnIndexMapper.getRenderableFromVisualIndex(s):i}const p=Number.isInteger(m),g=Number.isInteger(f);return p&&m>=0&&g&&f>=0?h.view.scrollViewport(h._createCellCoords(m,f),l,d,u,c):p&&m>=0&&(g&&f<0||!g)?h.view.scrollViewportVertically(m,l,u):!!(g&&f>=0&&(p&&m<0||!p))&&h.view.scrollViewportHorizontally(f,d,c)},this.scrollToFocusedCell=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{};if(!this.selection.isSelected())return;this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),n=this.scrollViewportTo(t.toObject());n?this.view.render():(this.removeHook("afterScroll",e),this._registerImmediate(()=>e()))},this.destroy=function(){if(h._clearTimeouts(),h._clearImmediates(),h.view&&h.view.destroy(),f&&f.destroy(),f=null,this.getShortcutManager().destroy(),C.clearCache(),bu.delete(this.guid),Wi(h)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}Object(r["empty"])(h.rootElement),d.destroy(),g&&g.destroy(),h.batchExecution(()=>{h.rowIndexMapper.unregisterAll(),h.columnIndexMapper.unregisterAll(),R.getItems().forEach(e=>{let[,t]=e;t.destroy()}),R.clear(),h.runHooks("afterDestroy")},!0),no["a"].getSingleton().destroy(h),Object(E["objectEach"])(h,(e,t,n)=>{Object(i["isFunction"])(e)?n[t]=J(t):"guid"!==t&&(n[t]=null)}),h.isDestroyed=!0,m&&m.destroy(),m=null,p=null,I=null,g=null,h=null},this.getActiveEditor=function(){return g.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return h.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return h.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return h.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return h.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return h.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return h.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return h.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return h.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return h.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return h.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return h.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return h.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){const t=Object(X["toUpperCaseFirst"])(e);return"UndoRedo"===t?this.undoRedo:R.getItem(t)},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:R.getId(e)},this.getInstance=function(){return h},this.addHook=function(e,t,n){no["a"].getSingleton().add(e,t,h,n)},this.hasHook=function(e){return no["a"].getSingleton().has(e,h)||no["a"].getSingleton().has(e)},this.addHookOnce=function(e,t,n){no["a"].getSingleton().once(e,t,h,n)},this.removeHook=function(e,t){no["a"].getSingleton().remove(e,t,h)},this.runHooks=function(e,t,n,r,i,s,o){return no["a"].getSingleton().run(h,e,t,n,r,i,s,o)},this.getTranslatedPhrase=function(e,t){return Ro(M.language,e,t)},this.toHTML=()=>Object(W["instanceToHTML"])(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",Object(W["instanceToHTML"])(this)),e.firstElementChild},this.timeouts=[],this._registerTimeout=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e;"function"===typeof n&&(n=setTimeout(n,t)),this.timeouts.push(n)},this._clearTimeouts=function(){Object(B["arrayEach"])(this.timeouts,e=>{clearTimeout(e)})},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){Object(B["arrayEach"])(this.immediates,e=>{clearImmediate(e)})},this._getEditorManager=function(){return g},this.isRtl=function(){return"rtl"===h.rootWindow.getComputedStyle(h.rootElement).direction},this.isLtr=function(){return!h.isRtl()},this.getDirectionFactor=function(){return h.isLtr()?1:-1};const Q=gu({handleEvent(){return h.isListening()},beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||h.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});this.addHook("beforeOnCellMouseDown",e=>{!1===e.ctrlKey&&!1===e.metaKey&&Q.releasePressedKeys()}),this.getShortcutManager=function(){return Q},this.getFocusManager=function(){return y},Object(z["b"])().forEach(e=>{const t=Object(z["a"])(e);R.addItem(e,new t(this))}),Object(yu["a"])(h),Q.setActiveContextName("grid"),no["a"].getSingleton().run(h,"construct")}var _u=n("ef07"),Su=n("13e1");function Eu(e,t){const n=new vu(e,t||{},Ui);return n.init(),n}Object(Ba["d"])(_u["a"]),Eu.editors={BaseEditor:Su["a"]},Eu.Core=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new vu(e,t,Ui)},Eu.DefaultSettings=qa(),Eu.hooks=no["a"].getSingleton(),Eu.CellCoords=bn["a"],Eu.CellRange=vn["a"],Eu.packageName="handsontable",Eu.buildDate="07/02/2025 16:13:23",Eu.version="14.6.2",Eu.languages={dictionaryKeys:go,getLanguageDictionary:Co,getLanguagesDictionaries:To,registerLanguageDictionary:So,getTranslatedPhrase:Ro};t["a"]=Eu},c0e2:function(e,t){function n(){}n.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;for(r;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var s=0,o=r.length;s<o;s++)r[s].fn!==t&&r[s].fn._!==t&&i.push(r[s]);return i.length?n[e]=i:delete n[e],this}},e.exports=n,e.exports.TinyEmitter=n},c109:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzm",{months:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),monthsShort:"ⵉⵏⵏⴰⵢⵔ_ⴱⵕⴰⵢⵕ_ⵎⴰⵕⵚ_ⵉⴱⵔⵉⵔ_ⵎⴰⵢⵢⵓ_ⵢⵓⵏⵢⵓ_ⵢⵓⵍⵢⵓⵣ_ⵖⵓⵛⵜ_ⵛⵓⵜⴰⵏⴱⵉⵔ_ⴽⵟⵓⴱⵕ_ⵏⵓⵡⴰⵏⴱⵉⵔ_ⴷⵓⵊⵏⴱⵉⵔ".split("_"),weekdays:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysShort:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),weekdaysMin:"ⴰⵙⴰⵎⴰⵙ_ⴰⵢⵏⴰⵙ_ⴰⵙⵉⵏⴰⵙ_ⴰⴽⵔⴰⵙ_ⴰⴽⵡⴰⵙ_ⴰⵙⵉⵎⵡⴰⵙ_ⴰⵙⵉⴹⵢⴰⵙ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[ⴰⵙⴷⵅ ⴴ] LT",nextDay:"[ⴰⵙⴽⴰ ⴴ] LT",nextWeek:"dddd [ⴴ] LT",lastDay:"[ⴰⵚⴰⵏⵜ ⴴ] LT",lastWeek:"dddd [ⴴ] LT",sameElse:"L"},relativeTime:{future:"ⴷⴰⴷⵅ ⵙ ⵢⴰⵏ %s",past:"ⵢⴰⵏ %s",s:"ⵉⵎⵉⴽ",ss:"%d ⵉⵎⵉⴽ",m:"ⵎⵉⵏⵓⴺ",mm:"%d ⵎⵉⵏⵓⴺ",h:"ⵙⴰⵄⴰ",hh:"%d ⵜⴰⵙⵙⴰⵄⵉⵏ",d:"ⴰⵙⵙ",dd:"%d oⵙⵙⴰⵏ",M:"ⴰⵢoⵓⵔ",MM:"%d ⵉⵢⵢⵉⵔⵏ",y:"ⴰⵙⴳⴰⵙ",yy:"%d ⵉⵙⴳⴰⵙⵏ"},week:{dow:6,doy:12}});return t}))},c1cf:function(e,t,n){"use strict";var r=n("e437");
- /**
- * @preserve
- * Authors: soakit, HChenZi
- * Last updated: Mar 09, 2023
- *
- * Description: Definition file for Chinese - China language-country.
- */const i=r["a"].languages.dictionaryKeys,s={languageCode:"zh-CN",[i.CONTEXTMENU_ITEMS_ROW_ABOVE]:"上方插入行",[i.CONTEXTMENU_ITEMS_ROW_BELOW]:"下方插入行",[i.CONTEXTMENU_ITEMS_INSERT_LEFT]:"左方插入列",[i.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"右方插入列",[i.CONTEXTMENU_ITEMS_REMOVE_ROW]:["移除该行","移除多行"],[i.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["移除该列","移除多列"],[i.CONTEXTMENU_ITEMS_UNDO]:"撤销",[i.CONTEXTMENU_ITEMS_REDO]:"恢复",[i.CONTEXTMENU_ITEMS_READ_ONLY]:"只读",[i.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"清空该列",[i.CONTEXTMENU_ITEMS_ALIGNMENT]:"对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"左对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"水平居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"右对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"两端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"顶端对齐",[i.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"垂直居中",[i.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"底端对齐",[i.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"冻结该列",[i.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"取消冻结",[i.CONTEXTMENU_ITEMS_BORDERS]:"边框",[i.CONTEXTMENU_ITEMS_BORDERS_TOP]:"上",[i.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"右",[i.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"下",[i.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"左",[i.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"移除边框",[i.CONTEXTMENU_ITEMS_ADD_COMMENT]:"插入批注",[i.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"编辑批注",[i.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"删除批注",[i.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"只读批注",[i.CONTEXTMENU_ITEMS_MERGE_CELLS]:"合并",[i.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"取消合并",[i.CONTEXTMENU_ITEMS_COPY]:"复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:"带标题的复制",[i.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:"带标题组的复制",[i.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:"仅复制标题",[i.CONTEXTMENU_ITEMS_CUT]:"剪切",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"插入子行",[i.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"与母行分离",[i.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["隐藏该列","隐藏多列"],[i.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["显示该列","显示多列"],[i.CONTEXTMENU_ITEMS_HIDE_ROW]:["隐藏该行","隐藏多行"],[i.CONTEXTMENU_ITEMS_SHOW_ROW]:["显示该行","显示多行"],[i.FILTERS_CONDITIONS_NONE]:"无",[i.FILTERS_CONDITIONS_EMPTY]:"为空",[i.FILTERS_CONDITIONS_NOT_EMPTY]:"不为空",[i.FILTERS_CONDITIONS_EQUAL]:"等于",[i.FILTERS_CONDITIONS_NOT_EQUAL]:"不等于",[i.FILTERS_CONDITIONS_BEGINS_WITH]:"开头是",[i.FILTERS_CONDITIONS_ENDS_WITH]:"结尾是",[i.FILTERS_CONDITIONS_CONTAINS]:"包含",[i.FILTERS_CONDITIONS_NOT_CONTAIN]:"不包含",[i.FILTERS_CONDITIONS_GREATER_THAN]:"大于",[i.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"大于或等于",[i.FILTERS_CONDITIONS_LESS_THAN]:"小于",[i.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"小于或等于",[i.FILTERS_CONDITIONS_BETWEEN]:"在此范围",[i.FILTERS_CONDITIONS_NOT_BETWEEN]:"不在此范围",[i.FILTERS_CONDITIONS_AFTER]:"之后",[i.FILTERS_CONDITIONS_BEFORE]:"之前",[i.FILTERS_CONDITIONS_TODAY]:"今天",[i.FILTERS_CONDITIONS_TOMORROW]:"明天",[i.FILTERS_CONDITIONS_YESTERDAY]:"昨天",[i.FILTERS_VALUES_BLANK_CELLS]:"空白单元格",[i.FILTERS_DIVS_FILTER_BY_CONDITION]:"按条件过滤",[i.FILTERS_DIVS_FILTER_BY_VALUE]:"按值过滤",[i.FILTERS_LABELS_CONJUNCTION]:"且",[i.FILTERS_LABELS_DISJUNCTION]:"或",[i.FILTERS_BUTTONS_SELECT_ALL]:"全选",[i.FILTERS_BUTTONS_CLEAR]:"清除",[i.FILTERS_BUTTONS_OK]:"确认",[i.FILTERS_BUTTONS_CANCEL]:"取消",[i.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"搜索",[i.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"值",[i.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"第二值"};r["a"].languages.registerLanguageDictionary(s)},c1df:function(e,t,n){(function(e){var t;//! moment.js
- //! version : 2.30.1
- //! authors : Tim Wood, Iskren Chernev, Moment.js contributors
- //! license : MIT
- //! momentjs.com
- (function(t,n){e.exports=n()})(0,(function(){"use strict";var r,i;function s(){return r.apply(null,arguments)}function o(e){r=e}function a(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function l(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function u(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function c(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(u(e,t))return!1;return!0}function h(e){return void 0===e}function d(e){return"number"===typeof e||"[object Number]"===Object.prototype.toString.call(e)}function m(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function f(e,t){var n,r=[],i=e.length;for(n=0;n<i;++n)r.push(t(e[n],n));return r}function p(e,t){for(var n in t)u(t,n)&&(e[n]=t[n]);return u(t,"toString")&&(e.toString=t.toString),u(t,"valueOf")&&(e.valueOf=t.valueOf),e}function g(e,t,n,r){return qn(e,t,n,r,!0).utc()}function y(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function w(e){return null==e._pf&&(e._pf=y()),e._pf}function b(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());return r&&(t=w(e),n=i.call(t.parsedDateParts,(function(e){return null!=e})),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?r:(e._isValid=r,e._isValid)}function v(e){var t=g(NaN);return null!=e?p(w(t),e):w(t).userInvalidated=!0,t}i=Array.prototype.some?Array.prototype.some:function(e){var t,n=Object(this),r=n.length>>>0;for(t=0;t<r;t++)if(t in n&&e.call(this,n[t],t,n))return!0;return!1};var _=s.momentProperties=[],S=!1;function E(e,t){var n,r,i,s=_.length;if(h(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),h(t._i)||(e._i=t._i),h(t._f)||(e._f=t._f),h(t._l)||(e._l=t._l),h(t._strict)||(e._strict=t._strict),h(t._tzm)||(e._tzm=t._tzm),h(t._isUTC)||(e._isUTC=t._isUTC),h(t._offset)||(e._offset=t._offset),h(t._pf)||(e._pf=w(t)),h(t._locale)||(e._locale=t._locale),s>0)for(n=0;n<s;n++)r=_[n],i=t[r],h(i)||(e[r]=i);return e}function C(e){E(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===S&&(S=!0,s.updateOffset(this),S=!1)}function M(e){return e instanceof C||null!=e&&null!=e._isAMomentObject}function T(e){!1===s.suppressDeprecationWarnings&&"undefined"!==typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function R(e,t){var n=!0;return p((function(){if(null!=s.deprecationHandler&&s.deprecationHandler(null,e),n){var r,i,o,a=[],l=arguments.length;for(i=0;i<l;i++){if(r="","object"===typeof arguments[i]){for(o in r+="\n["+i+"] ",arguments[0])u(arguments[0],o)&&(r+=o+": "+arguments[0][o]+", ");r=r.slice(0,-2)}else r=arguments[i];a.push(r)}T(e+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var O,N={};function A(e,t){null!=s.deprecationHandler&&s.deprecationHandler(e,t),N[e]||(T(t),N[e]=!0)}function L(e){return"undefined"!==typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function I(e){var t,n;for(n in e)u(e,n)&&(t=e[n],L(t)?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function k(e,t){var n,r=p({},e);for(n in t)u(t,n)&&(l(e[n])&&l(t[n])?(r[n]={},p(r[n],e[n]),p(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)u(e,n)&&!u(t,n)&&l(e[n])&&(r[n]=p({},r[n]));return r}function x(e){null!=e&&this.set(e)}s.suppressDeprecationWarnings=!1,s.deprecationHandler=null,O=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)u(e,t)&&n.push(t);return n};var D={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function H(e,t,n){var r=this._calendar[e]||this._calendar["sameElse"];return L(r)?r.call(t,n):r}function P(e,t,n){var r=""+Math.abs(e),i=t-r.length,s=e>=0;return(s?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var j=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,F=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},U={};function V(e,t,n,r){var i=r;"string"===typeof r&&(i=function(){return this[r]()}),e&&(U[e]=i),t&&(U[t[0]]=function(){return P(i.apply(this,arguments),t[1],t[2])}),n&&(U[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function B(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function W(e){var t,n,r=e.match(j);for(t=0,n=r.length;t<n;t++)U[r[t]]?r[t]=U[r[t]]:r[t]=B(r[t]);return function(t){var i,s="";for(i=0;i<n;i++)s+=L(r[i])?r[i].call(t,e):r[i];return s}}function z(e,t){return e.isValid()?(t=G(t,e.localeData()),Y[t]=Y[t]||W(t),Y[t](e)):e.localeData().invalidDate()}function G(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}F.lastIndex=0;while(n>=0&&F.test(e))e=e.replace(F,r),F.lastIndex=0,n-=1;return e}var K={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function X(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(j).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])}var $="Invalid date";function q(){return this._invalidDate}var J="%d",Q=/\d{1,2}/;function Z(e){return this._ordinal.replace("%d",e)}var ee={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function te(e,t,n,r){var i=this._relativeTime[n];return L(i)?i(e,t,n,r):i.replace(/%d/i,e)}function ne(e,t){var n=this._relativeTime[e>0?"future":"past"];return L(n)?n(t):n.replace(/%s/i,t)}var re={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function ie(e){return"string"===typeof e?re[e]||re[e.toLowerCase()]:void 0}function se(e){var t,n,r={};for(n in e)u(e,n)&&(t=ie(n),t&&(r[t]=e[n]));return r}var oe={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function ae(e){var t,n=[];for(t in e)u(e,t)&&n.push({unit:t,priority:oe[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}var le,ue=/\d/,ce=/\d\d/,he=/\d{3}/,de=/\d{4}/,me=/[+-]?\d{6}/,fe=/\d\d?/,pe=/\d\d\d\d?/,ge=/\d\d\d\d\d\d?/,ye=/\d{1,3}/,we=/\d{1,4}/,be=/[+-]?\d{1,6}/,ve=/\d+/,_e=/[+-]?\d+/,Se=/Z|[+-]\d\d:?\d\d/gi,Ee=/Z|[+-]\d\d(?::?\d\d)?/gi,Ce=/[+-]?\d+(\.\d{1,3})?/,Me=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Te=/^[1-9]\d?/,Re=/^([1-9]\d|\d)/;function Oe(e,t,n){le[e]=L(t)?t:function(e,r){return e&&n?n:t}}function Ne(e,t){return u(le,e)?le[e](t._strict,t._locale):new RegExp(Ae(e))}function Ae(e){return Le(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,i){return t||n||r||i})))}function Le(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Ie(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function ke(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=Ie(t)),n}le={};var xe={};function De(e,t){var n,r,i=t;for("string"===typeof e&&(e=[e]),d(t)&&(i=function(e,n){n[t]=ke(e)}),r=e.length,n=0;n<r;n++)xe[e[n]]=i}function He(e,t){De(e,(function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)}))}function Pe(e,t,n){null!=t&&u(xe,e)&&xe[e](t,n._a,n,e)}function je(e){return e%4===0&&e%100!==0||e%400===0}var Fe=0,Ye=1,Ue=2,Ve=3,Be=4,We=5,ze=6,Ge=7,Ke=8;function Xe(e){return je(e)?366:365}V("Y",0,0,(function(){var e=this.year();return e<=9999?P(e,4):"+"+e})),V(0,["YY",2],0,(function(){return this.year()%100})),V(0,["YYYY",4],0,"year"),V(0,["YYYYY",5],0,"year"),V(0,["YYYYYY",6,!0],0,"year"),Oe("Y",_e),Oe("YY",fe,ce),Oe("YYYY",we,de),Oe("YYYYY",be,me),Oe("YYYYYY",be,me),De(["YYYYY","YYYYYY"],Fe),De("YYYY",(function(e,t){t[Fe]=2===e.length?s.parseTwoDigitYear(e):ke(e)})),De("YY",(function(e,t){t[Fe]=s.parseTwoDigitYear(e)})),De("Y",(function(e,t){t[Fe]=parseInt(e,10)})),s.parseTwoDigitYear=function(e){return ke(e)+(ke(e)>68?1900:2e3)};var $e,qe=Qe("FullYear",!0);function Je(){return je(this.year())}function Qe(e,t){return function(n){return null!=n?(et(this,e,n),s.updateOffset(this,t),this):Ze(this,e)}}function Ze(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case"Milliseconds":return r?n.getUTCMilliseconds():n.getMilliseconds();case"Seconds":return r?n.getUTCSeconds():n.getSeconds();case"Minutes":return r?n.getUTCMinutes():n.getMinutes();case"Hours":return r?n.getUTCHours():n.getHours();case"Date":return r?n.getUTCDate():n.getDate();case"Day":return r?n.getUTCDay():n.getDay();case"Month":return r?n.getUTCMonth():n.getMonth();case"FullYear":return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function et(e,t,n){var r,i,s,o,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,i=e._isUTC,t){case"Milliseconds":return void(i?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(i?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(i?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(i?r.setUTCHours(n):r.setHours(n));case"Date":return void(i?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}s=n,o=e.month(),a=e.date(),a=29!==a||1!==o||je(s)?a:28,i?r.setUTCFullYear(s,o,a):r.setFullYear(s,o,a)}}function tt(e){return e=ie(e),L(this[e])?this[e]():this}function nt(e,t){if("object"===typeof e){e=se(e);var n,r=ae(e),i=r.length;for(n=0;n<i;n++)this[r[n].unit](e[r[n].unit])}else if(e=ie(e),L(this[e]))return this[e](t);return this}function rt(e,t){return(e%t+t)%t}function it(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=rt(t,12);return e+=(t-n)/12,1===n?je(e)?29:28:31-n%7%2}$e=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},V("M",["MM",2],"Mo",(function(){return this.month()+1})),V("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),V("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),Oe("M",fe,Te),Oe("MM",fe,ce),Oe("MMM",(function(e,t){return t.monthsShortRegex(e)})),Oe("MMMM",(function(e,t){return t.monthsRegex(e)})),De(["M","MM"],(function(e,t){t[Ye]=ke(e)-1})),De(["MMM","MMMM"],(function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Ye]=i:w(n).invalidMonth=e}));var st="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ot="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),at=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,lt=Me,ut=Me;function ct(e,t){return e?a(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||at).test(t)?"format":"standalone"][e.month()]:a(this._months)?this._months:this._months["standalone"]}function ht(e,t){return e?a(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[at.test(t)?"format":"standalone"][e.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort["standalone"]}function dt(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)s=g([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(s,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(s,"").toLocaleLowerCase();return n?"MMM"===t?(i=$e.call(this._shortMonthsParse,o),-1!==i?i:null):(i=$e.call(this._longMonthsParse,o),-1!==i?i:null):"MMM"===t?(i=$e.call(this._shortMonthsParse,o),-1!==i?i:(i=$e.call(this._longMonthsParse,o),-1!==i?i:null)):(i=$e.call(this._longMonthsParse,o),-1!==i?i:(i=$e.call(this._shortMonthsParse,o),-1!==i?i:null))}function mt(e,t,n){var r,i,s;if(this._monthsParseExact)return dt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=g([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(s="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(s.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}}function ft(e,t){if(!e.isValid())return e;if("string"===typeof t)if(/^\d+$/.test(t))t=ke(t);else if(t=e.localeData().monthsParse(t),!d(t))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,it(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function pt(e){return null!=e?(ft(this,e),s.updateOffset(this,!0),this):Ze(this,"Month")}function gt(){return it(this.year(),this.month())}function yt(e){return this._monthsParseExact?(u(this,"_monthsRegex")||bt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(u(this,"_monthsShortRegex")||(this._monthsShortRegex=lt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function wt(e){return this._monthsParseExact?(u(this,"_monthsRegex")||bt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(u(this,"_monthsRegex")||(this._monthsRegex=ut),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function bt(){function e(e,t){return t.length-e.length}var t,n,r,i,s=[],o=[],a=[];for(t=0;t<12;t++)n=g([2e3,t]),r=Le(this.monthsShort(n,"")),i=Le(this.months(n,"")),s.push(r),o.push(i),a.push(i),a.push(r);s.sort(e),o.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+s.join("|")+")","i")}function vt(e,t,n,r,i,s,o){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,i,s,o),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,i,s,o),a}function _t(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function St(e,t,n){var r=7+t-n,i=(7+_t(e,0,r).getUTCDay()-t)%7;return-i+r-1}function Et(e,t,n,r,i){var s,o,a=(7+n-r)%7,l=St(e,r,i),u=1+7*(t-1)+a+l;return u<=0?(s=e-1,o=Xe(s)+u):u>Xe(e)?(s=e+1,o=u-Xe(e)):(s=e,o=u),{year:s,dayOfYear:o}}function Ct(e,t,n){var r,i,s=St(e.year(),t,n),o=Math.floor((e.dayOfYear()-s-1)/7)+1;return o<1?(i=e.year()-1,r=o+Mt(i,t,n)):o>Mt(e.year(),t,n)?(r=o-Mt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function Mt(e,t,n){var r=St(e,t,n),i=St(e+1,t,n);return(Xe(e)-r+i)/7}function Tt(e){return Ct(e,this._week.dow,this._week.doy).week}V("w",["ww",2],"wo","week"),V("W",["WW",2],"Wo","isoWeek"),Oe("w",fe,Te),Oe("ww",fe,ce),Oe("W",fe,Te),Oe("WW",fe,ce),He(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=ke(e)}));var Rt={dow:0,doy:6};function Ot(){return this._week.dow}function Nt(){return this._week.doy}function At(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")}function Lt(e){var t=Ct(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")}function It(e,t){return"string"!==typeof e?e:isNaN(e)?(e=t.weekdaysParse(e),"number"===typeof e?e:null):parseInt(e,10)}function kt(e,t){return"string"===typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function xt(e,t){return e.slice(t,7).concat(e.slice(0,t))}V("d",0,"do","day"),V("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),V("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),V("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),V("e",0,0,"weekday"),V("E",0,0,"isoWeekday"),Oe("d",fe),Oe("e",fe),Oe("E",fe),Oe("dd",(function(e,t){return t.weekdaysMinRegex(e)})),Oe("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),Oe("dddd",(function(e,t){return t.weekdaysRegex(e)})),He(["dd","ddd","dddd"],(function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:w(n).invalidWeekday=e})),He(["d","e","E"],(function(e,t,n,r){t[r]=ke(e)}));var Dt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ht="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Pt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),jt=Me,Ft=Me,Yt=Me;function Ut(e,t){var n=a(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?xt(n,this._week.dow):e?n[e.day()]:n}function Vt(e){return!0===e?xt(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Bt(e){return!0===e?xt(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Wt(e,t,n){var r,i,s,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)s=g([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(s,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(s,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(s,"").toLocaleLowerCase();return n?"dddd"===t?(i=$e.call(this._weekdaysParse,o),-1!==i?i:null):"ddd"===t?(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:null):(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null):"dddd"===t?(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null))):"ddd"===t?(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:null))):(i=$e.call(this._minWeekdaysParse,o),-1!==i?i:(i=$e.call(this._weekdaysParse,o),-1!==i?i:(i=$e.call(this._shortWeekdaysParse,o),-1!==i?i:null)))}function zt(e,t,n){var r,i,s;if(this._weekdaysParseExact)return Wt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=g([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(s="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(s.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}}function Gt(e){if(!this.isValid())return null!=e?this:NaN;var t=Ze(this,"Day");return null!=e?(e=It(e,this.localeData()),this.add(e-t,"d")):t}function Kt(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")}function Xt(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=kt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $t(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(u(this,"_weekdaysRegex")||(this._weekdaysRegex=jt),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function qt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(u(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ft),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function Jt(e){return this._weekdaysParseExact?(u(this,"_weekdaysRegex")||Qt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(u(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Yt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Qt(){function e(e,t){return t.length-e.length}var t,n,r,i,s,o=[],a=[],l=[],u=[];for(t=0;t<7;t++)n=g([2e3,1]).day(t),r=Le(this.weekdaysMin(n,"")),i=Le(this.weekdaysShort(n,"")),s=Le(this.weekdays(n,"")),o.push(r),a.push(i),l.push(s),u.push(r),u.push(i),u.push(s);o.sort(e),a.sort(e),l.sort(e),u.sort(e),this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+a.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Zt(){return this.hours()%12||12}function en(){return this.hours()||24}function tn(e,t){V(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function nn(e,t){return t._meridiemParse}function rn(e){return"p"===(e+"").toLowerCase().charAt(0)}V("H",["HH",2],0,"hour"),V("h",["hh",2],0,Zt),V("k",["kk",2],0,en),V("hmm",0,0,(function(){return""+Zt.apply(this)+P(this.minutes(),2)})),V("hmmss",0,0,(function(){return""+Zt.apply(this)+P(this.minutes(),2)+P(this.seconds(),2)})),V("Hmm",0,0,(function(){return""+this.hours()+P(this.minutes(),2)})),V("Hmmss",0,0,(function(){return""+this.hours()+P(this.minutes(),2)+P(this.seconds(),2)})),tn("a",!0),tn("A",!1),Oe("a",nn),Oe("A",nn),Oe("H",fe,Re),Oe("h",fe,Te),Oe("k",fe,Te),Oe("HH",fe,ce),Oe("hh",fe,ce),Oe("kk",fe,ce),Oe("hmm",pe),Oe("hmmss",ge),Oe("Hmm",pe),Oe("Hmmss",ge),De(["H","HH"],Ve),De(["k","kk"],(function(e,t,n){var r=ke(e);t[Ve]=24===r?0:r})),De(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),De(["h","hh"],(function(e,t,n){t[Ve]=ke(e),w(n).bigHour=!0})),De("hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r)),w(n).bigHour=!0})),De("hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r,2)),t[We]=ke(e.substr(i)),w(n).bigHour=!0})),De("Hmm",(function(e,t,n){var r=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r))})),De("Hmmss",(function(e,t,n){var r=e.length-4,i=e.length-2;t[Ve]=ke(e.substr(0,r)),t[Be]=ke(e.substr(r,2)),t[We]=ke(e.substr(i))}));var sn=/[ap]\.?m?\.?/i,on=Qe("Hours",!0);function an(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"}var ln,un={calendar:D,longDateFormat:K,invalidDate:$,ordinal:J,dayOfMonthOrdinalParse:Q,relativeTime:ee,months:st,monthsShort:ot,week:Rt,weekdays:Dt,weekdaysMin:Pt,weekdaysShort:Ht,meridiemParse:sn},cn={},hn={};function dn(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function mn(e){return e?e.toLowerCase().replace("_","-"):e}function fn(e){var t,n,r,i,s=0;while(s<e.length){i=mn(e[s]).split("-"),t=i.length,n=mn(e[s+1]),n=n?n.split("-"):null;while(t>0){if(r=gn(i.slice(0,t).join("-")),r)return r;if(n&&n.length>=t&&dn(i,n)>=t-1)break;t--}s++}return ln}function pn(e){return!(!e||!e.match("^[^/\\\\]*$"))}function gn(r){var i=null;if(void 0===cn[r]&&"undefined"!==typeof e&&e&&e.exports&&pn(r))try{i=ln._abbr,t,n("4678")("./"+r),yn(i)}catch(s){cn[r]=null}return cn[r]}function yn(e,t){var n;return e&&(n=h(t)?vn(e):wn(e,t),n?ln=n:"undefined"!==typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),ln._abbr}function wn(e,t){if(null!==t){var n,r=un;if(t.abbr=e,null!=cn[e])A("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=cn[e]._config;else if(null!=t.parentLocale)if(null!=cn[t.parentLocale])r=cn[t.parentLocale]._config;else{if(n=gn(t.parentLocale),null==n)return hn[t.parentLocale]||(hn[t.parentLocale]=[]),hn[t.parentLocale].push({name:e,config:t}),null;r=n._config}return cn[e]=new x(k(r,t)),hn[e]&&hn[e].forEach((function(e){wn(e.name,e.config)})),yn(e),cn[e]}return delete cn[e],null}function bn(e,t){if(null!=t){var n,r,i=un;null!=cn[e]&&null!=cn[e].parentLocale?cn[e].set(k(cn[e]._config,t)):(r=gn(e),null!=r&&(i=r._config),t=k(i,t),null==r&&(t.abbr=e),n=new x(t),n.parentLocale=cn[e],cn[e]=n),yn(e)}else null!=cn[e]&&(null!=cn[e].parentLocale?(cn[e]=cn[e].parentLocale,e===yn()&&yn(e)):null!=cn[e]&&delete cn[e]);return cn[e]}function vn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return ln;if(!a(e)){if(t=gn(e),t)return t;e=[e]}return fn(e)}function _n(){return O(cn)}function Sn(e){var t,n=e._a;return n&&-2===w(e).overflow&&(t=n[Ye]<0||n[Ye]>11?Ye:n[Ue]<1||n[Ue]>it(n[Fe],n[Ye])?Ue:n[Ve]<0||n[Ve]>24||24===n[Ve]&&(0!==n[Be]||0!==n[We]||0!==n[ze])?Ve:n[Be]<0||n[Be]>59?Be:n[We]<0||n[We]>59?We:n[ze]<0||n[ze]>999?ze:-1,w(e)._overflowDayOfYear&&(t<Fe||t>Ue)&&(t=Ue),w(e)._overflowWeeks&&-1===t&&(t=Ge),w(e)._overflowWeekday&&-1===t&&(t=Ke),w(e).overflow=t),e}var En=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Cn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Mn=/Z|[+-]\d\d(?::?\d\d)?/,Tn=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Rn=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],On=/^\/?Date\((-?\d+)/i,Nn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,An={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ln(e){var t,n,r,i,s,o,a=e._i,l=En.exec(a)||Cn.exec(a),u=Tn.length,c=Rn.length;if(l){for(w(e).iso=!0,t=0,n=u;t<n;t++)if(Tn[t][1].exec(l[1])){i=Tn[t][0],r=!1!==Tn[t][2];break}if(null==i)return void(e._isValid=!1);if(l[3]){for(t=0,n=c;t<n;t++)if(Rn[t][1].exec(l[3])){s=(l[2]||" ")+Rn[t][0];break}if(null==s)return void(e._isValid=!1)}if(!r&&null!=s)return void(e._isValid=!1);if(l[4]){if(!Mn.exec(l[4]))return void(e._isValid=!1);o="Z"}e._f=i+(s||"")+(o||""),Bn(e)}else e._isValid=!1}function In(e,t,n,r,i,s){var o=[kn(e),ot.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return s&&o.push(parseInt(s,10)),o}function kn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function xn(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Dn(e,t,n){if(e){var r=Ht.indexOf(e),i=new Date(t[0],t[1],t[2]).getDay();if(r!==i)return w(n).weekdayMismatch=!0,n._isValid=!1,!1}return!0}function Hn(e,t,n){if(e)return An[e];if(t)return 0;var r=parseInt(n,10),i=r%100,s=(r-i)/100;return 60*s+i}function Pn(e){var t,n=Nn.exec(xn(e._i));if(n){if(t=In(n[4],n[3],n[2],n[5],n[6],n[7]),!Dn(n[1],t,e))return;e._a=t,e._tzm=Hn(n[8],n[9],n[10]),e._d=_t.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),w(e).rfc2822=!0}else e._isValid=!1}function jn(e){var t=On.exec(e._i);null===t?(Ln(e),!1===e._isValid&&(delete e._isValid,Pn(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:s.createFromInputFallback(e)))):e._d=new Date(+t[1])}function Fn(e,t,n){return null!=e?e:null!=t?t:n}function Yn(e){var t=new Date(s.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Un(e){var t,n,r,i,s,o=[];if(!e._d){for(r=Yn(e),e._w&&null==e._a[Ue]&&null==e._a[Ye]&&Vn(e),null!=e._dayOfYear&&(s=Fn(e._a[Fe],r[Fe]),(e._dayOfYear>Xe(s)||0===e._dayOfYear)&&(w(e)._overflowDayOfYear=!0),n=_t(s,0,e._dayOfYear),e._a[Ye]=n.getUTCMonth(),e._a[Ue]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=o[t]=r[t];for(;t<7;t++)e._a[t]=o[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[Ve]&&0===e._a[Be]&&0===e._a[We]&&0===e._a[ze]&&(e._nextDay=!0,e._a[Ve]=0),e._d=(e._useUTC?_t:vt).apply(null,o),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[Ve]=24),e._w&&"undefined"!==typeof e._w.d&&e._w.d!==i&&(w(e).weekdayMismatch=!0)}}function Vn(e){var t,n,r,i,s,o,a,l,u;t=e._w,null!=t.GG||null!=t.W||null!=t.E?(s=1,o=4,n=Fn(t.GG,e._a[Fe],Ct(Jn(),1,4).year),r=Fn(t.W,1),i=Fn(t.E,1),(i<1||i>7)&&(l=!0)):(s=e._locale._week.dow,o=e._locale._week.doy,u=Ct(Jn(),s,o),n=Fn(t.gg,e._a[Fe],u.year),r=Fn(t.w,u.week),null!=t.d?(i=t.d,(i<0||i>6)&&(l=!0)):null!=t.e?(i=t.e+s,(t.e<0||t.e>6)&&(l=!0)):i=s),r<1||r>Mt(n,s,o)?w(e)._overflowWeeks=!0:null!=l?w(e)._overflowWeekday=!0:(a=Et(n,r,i,s,o),e._a[Fe]=a.year,e._dayOfYear=a.dayOfYear)}function Bn(e){if(e._f!==s.ISO_8601)if(e._f!==s.RFC_2822){e._a=[],w(e).empty=!0;var t,n,r,i,o,a,l,u=""+e._i,c=u.length,h=0;for(r=G(e._f,e._locale).match(j)||[],l=r.length,t=0;t<l;t++)i=r[t],n=(u.match(Ne(i,e))||[])[0],n&&(o=u.substr(0,u.indexOf(n)),o.length>0&&w(e).unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),h+=n.length),U[i]?(n?w(e).empty=!1:w(e).unusedTokens.push(i),Pe(i,n,e)):e._strict&&!n&&w(e).unusedTokens.push(i);w(e).charsLeftOver=c-h,u.length>0&&w(e).unusedInput.push(u),e._a[Ve]<=12&&!0===w(e).bigHour&&e._a[Ve]>0&&(w(e).bigHour=void 0),w(e).parsedDateParts=e._a.slice(0),w(e).meridiem=e._meridiem,e._a[Ve]=Wn(e._locale,e._a[Ve],e._meridiem),a=w(e).era,null!==a&&(e._a[Fe]=e._locale.erasConvertYear(a,e._a[Fe])),Un(e),Sn(e)}else Pn(e);else Ln(e)}function Wn(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?(r=e.isPM(n),r&&t<12&&(t+=12),r||12!==t||(t=0),t):t}function zn(e){var t,n,r,i,s,o,a=!1,l=e._f.length;if(0===l)return w(e).invalidFormat=!0,void(e._d=new Date(NaN));for(i=0;i<l;i++)s=0,o=!1,t=E({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],Bn(t),b(t)&&(o=!0),s+=w(t).charsLeftOver,s+=10*w(t).unusedTokens.length,w(t).score=s,a?s<r&&(r=s,n=t):(null==r||s<r||o)&&(r=s,n=t,o&&(a=!0));p(e,n||t)}function Gn(e){if(!e._d){var t=se(e._i),n=void 0===t.day?t.date:t.day;e._a=f([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),Un(e)}}function Kn(e){var t=new C(Sn(Xn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function Xn(e){var t=e._i,n=e._f;return e._locale=e._locale||vn(e._l),null===t||void 0===n&&""===t?v({nullInput:!0}):("string"===typeof t&&(e._i=t=e._locale.preparse(t)),M(t)?new C(Sn(t)):(m(t)?e._d=t:a(n)?zn(e):n?Bn(e):$n(e),b(e)||(e._d=null),e))}function $n(e){var t=e._i;h(t)?e._d=new Date(s.now()):m(t)?e._d=new Date(t.valueOf()):"string"===typeof t?jn(e):a(t)?(e._a=f(t.slice(0),(function(e){return parseInt(e,10)})),Un(e)):l(t)?Gn(e):d(t)?e._d=new Date(t):s.createFromInputFallback(e)}function qn(e,t,n,r,i){var s={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(l(e)&&c(e)||a(e)&&0===e.length)&&(e=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=i,s._l=n,s._i=e,s._f=t,s._strict=r,Kn(s)}function Jn(e,t,n,r){return qn(e,t,n,r,!1)}s.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))})),s.ISO_8601=function(){},s.RFC_2822=function(){};var Qn=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:v()})),Zn=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Jn.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:v()}));function er(e,t){var n,r;if(1===t.length&&a(t[0])&&(t=t[0]),!t.length)return Jn();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function tr(){var e=[].slice.call(arguments,0);return er("isBefore",e)}function nr(){var e=[].slice.call(arguments,0);return er("isAfter",e)}var rr=function(){return Date.now?Date.now():+new Date},ir=["year","quarter","month","week","day","hour","minute","second","millisecond"];function sr(e){var t,n,r=!1,i=ir.length;for(t in e)if(u(e,t)&&(-1===$e.call(ir,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<i;++n)if(e[ir[n]]){if(r)return!1;parseFloat(e[ir[n]])!==ke(e[ir[n]])&&(r=!0)}return!0}function or(){return this._isValid}function ar(){return Ar(NaN)}function lr(e){var t=se(e),n=t.year||0,r=t.quarter||0,i=t.month||0,s=t.week||t.isoWeek||0,o=t.day||0,a=t.hour||0,l=t.minute||0,u=t.second||0,c=t.millisecond||0;this._isValid=sr(t),this._milliseconds=+c+1e3*u+6e4*l+1e3*a*60*60,this._days=+o+7*s,this._months=+i+3*r+12*n,this._data={},this._locale=vn(),this._bubble()}function ur(e){return e instanceof lr}function cr(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function hr(e,t,n){var r,i=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&ke(e[r])!==ke(t[r]))&&o++;return o+s}function dr(e,t){V(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+P(~~(e/60),2)+t+P(~~e%60,2)}))}dr("Z",":"),dr("ZZ",""),Oe("Z",Ee),Oe("ZZ",Ee),De(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=fr(Ee,e)}));var mr=/([\+\-]|\d\d)/gi;function fr(e,t){var n,r,i,s=(t||"").match(e);return null===s?null:(n=s[s.length-1]||[],r=(n+"").match(mr)||["-",0,0],i=60*r[1]+ke(r[2]),0===i?0:"+"===r[0]?i:-i)}function pr(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(M(e)||m(e)?e.valueOf():Jn(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),s.updateOffset(n,!1),n):Jn(e).local()}function gr(e){return-Math.round(e._d.getTimezoneOffset())}function yr(e,t,n){var r,i=this._offset||0;if(!this.isValid())return null!=e?this:NaN;if(null!=e){if("string"===typeof e){if(e=fr(Ee,e),null===e)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=gr(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?Dr(this,Ar(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,s.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:gr(this)}function wr(e,t){return null!=e?("string"!==typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function br(e){return this.utcOffset(0,e)}function vr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(gr(this),"m")),this}function _r(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"===typeof this._i){var e=fr(Se,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Sr(e){return!!this.isValid()&&(e=e?Jn(e).utcOffset():0,(this.utcOffset()-e)%60===0)}function Er(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Cr(){if(!h(this._isDSTShifted))return this._isDSTShifted;var e,t={};return E(t,this),t=Xn(t),t._a?(e=t._isUTC?g(t._a):Jn(t._a),this._isDSTShifted=this.isValid()&&hr(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Mr(){return!!this.isValid()&&!this._isUTC}function Tr(){return!!this.isValid()&&this._isUTC}function Rr(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}s.updateOffset=function(){};var Or=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Nr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Ar(e,t){var n,r,i,s=e,o=null;return ur(e)?s={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(s={},t?s[t]=+e:s.milliseconds=+e):(o=Or.exec(e))?(n="-"===o[1]?-1:1,s={y:0,d:ke(o[Ue])*n,h:ke(o[Ve])*n,m:ke(o[Be])*n,s:ke(o[We])*n,ms:ke(cr(1e3*o[ze]))*n}):(o=Nr.exec(e))?(n="-"===o[1]?-1:1,s={y:Lr(o[2],n),M:Lr(o[3],n),w:Lr(o[4],n),d:Lr(o[5],n),h:Lr(o[6],n),m:Lr(o[7],n),s:Lr(o[8],n)}):null==s?s={}:"object"===typeof s&&("from"in s||"to"in s)&&(i=kr(Jn(s.from),Jn(s.to)),s={},s.ms=i.milliseconds,s.M=i.months),r=new lr(s),ur(e)&&u(e,"_locale")&&(r._locale=e._locale),ur(e)&&u(e,"_isValid")&&(r._isValid=e._isValid),r}function Lr(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Ir(e,t){var n={};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function kr(e,t){var n;return e.isValid()&&t.isValid()?(t=pr(t,e),e.isBefore(t)?n=Ir(e,t):(n=Ir(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function xr(e,t){return function(n,r){var i,s;return null===r||isNaN(+r)||(A(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),s=n,n=r,r=s),i=Ar(n,r),Dr(this,i,e),this}}function Dr(e,t,n,r){var i=t._milliseconds,o=cr(t._days),a=cr(t._months);e.isValid()&&(r=null==r||r,a&&ft(e,Ze(e,"Month")+a*n),o&&et(e,"Date",Ze(e,"Date")+o*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&s.updateOffset(e,o||a))}Ar.fn=lr.prototype,Ar.invalid=ar;var Hr=xr(1,"add"),Pr=xr(-1,"subtract");function jr(e){return"string"===typeof e||e instanceof String}function Fr(e){return M(e)||m(e)||jr(e)||d(e)||Ur(e)||Yr(e)||null===e||void 0===e}function Yr(e){var t,n,r=l(e)&&!c(e),i=!1,s=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],o=s.length;for(t=0;t<o;t+=1)n=s[t],i=i||u(e,n);return r&&i}function Ur(e){var t=a(e),n=!1;return t&&(n=0===e.filter((function(t){return!d(t)&&jr(e)})).length),t&&n}function Vr(e){var t,n,r=l(e)&&!c(e),i=!1,s=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<s.length;t+=1)n=s[t],i=i||u(e,n);return r&&i}function Br(e,t){var n=e.diff(t,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"}function Wr(e,t){1===arguments.length&&(arguments[0]?Fr(arguments[0])?(e=arguments[0],t=void 0):Vr(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Jn(),r=pr(n,this).startOf("day"),i=s.calendarFormat(this,r)||"sameElse",o=t&&(L(t[i])?t[i].call(this,n):t[i]);return this.format(o||this.localeData().calendar(i,this,Jn(n)))}function zr(){return new C(this)}function Gr(e,t){var n=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())}function Kr(e,t){var n=M(e)?e:Jn(e);return!(!this.isValid()||!n.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())}function Xr(e,t,n,r){var i=M(e)?e:Jn(e),s=M(t)?t:Jn(t);return!!(this.isValid()&&i.isValid()&&s.isValid())&&(r=r||"()",("("===r[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(s,n):!this.isAfter(s,n)))}function $r(e,t){var n,r=M(e)?e:Jn(e);return!(!this.isValid()||!r.isValid())&&(t=ie(t)||"millisecond","millisecond"===t?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))}function qr(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Jr(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Qr(e,t,n){var r,i,s;if(!this.isValid())return NaN;if(r=pr(e,this),!r.isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),t=ie(t),t){case"year":s=Zr(this,r)/12;break;case"month":s=Zr(this,r);break;case"quarter":s=Zr(this,r)/3;break;case"second":s=(this-r)/1e3;break;case"minute":s=(this-r)/6e4;break;case"hour":s=(this-r)/36e5;break;case"day":s=(this-r-i)/864e5;break;case"week":s=(this-r-i)/6048e5;break;default:s=this-r}return n?s:Ie(s)}function Zr(e,t){if(e.date()<t.date())return-Zr(t,e);var n,r,i=12*(t.year()-e.year())+(t.month()-e.month()),s=e.clone().add(i,"months");return t-s<0?(n=e.clone().add(i-1,"months"),r=(t-s)/(s-n)):(n=e.clone().add(i+1,"months"),r=(t-s)/(n-s)),-(i+r)||0}function ei(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function ti(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?z(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):L(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",z(n,"Z")):z(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function ni(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r,i="moment",s="";return this.isLocal()||(i=0===this.utcOffset()?"moment.utc":"moment.parseZone",s="Z"),e="["+i+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n="-MM-DD[T]HH:mm:ss.SSS",r=s+'[")]',this.format(e+t+n+r)}function ri(e){e||(e=this.isUtc()?s.defaultFormatUtc:s.defaultFormat);var t=z(this,e);return this.localeData().postformat(t)}function ii(e,t){return this.isValid()&&(M(e)&&e.isValid()||Jn(e).isValid())?Ar({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function si(e){return this.from(Jn(),e)}function oi(e,t){return this.isValid()&&(M(e)&&e.isValid()||Jn(e).isValid())?Ar({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function ai(e){return this.to(Jn(),e)}function li(e){var t;return void 0===e?this._locale._abbr:(t=vn(e),null!=t&&(this._locale=t),this)}s.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",s.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var ui=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(e){return void 0===e?this.localeData():this.locale(e)}));function ci(){return this._locale}var hi=1e3,di=60*hi,mi=60*di,fi=3506328*mi;function pi(e,t){return(e%t+t)%t}function gi(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-fi:new Date(e,t,n).valueOf()}function yi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-fi:Date.UTC(e,t,n)}function wi(e){var t,n;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yi:gi,e){case"year":t=n(this.year(),0,1);break;case"quarter":t=n(this.year(),this.month()-this.month()%3,1);break;case"month":t=n(this.year(),this.month(),1);break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=n(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=pi(t+(this._isUTC?0:this.utcOffset()*di),mi);break;case"minute":t=this._d.valueOf(),t-=pi(t,di);break;case"second":t=this._d.valueOf(),t-=pi(t,hi);break}return this._d.setTime(t),s.updateOffset(this,!0),this}function bi(e){var t,n;if(e=ie(e),void 0===e||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yi:gi,e){case"year":t=n(this.year()+1,0,1)-1;break;case"quarter":t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=n(this.year(),this.month()+1,1)-1;break;case"week":t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=mi-pi(t+(this._isUTC?0:this.utcOffset()*di),mi)-1;break;case"minute":t=this._d.valueOf(),t+=di-pi(t,di)-1;break;case"second":t=this._d.valueOf(),t+=hi-pi(t,hi)-1;break}return this._d.setTime(t),s.updateOffset(this,!0),this}function vi(){return this._d.valueOf()-6e4*(this._offset||0)}function _i(){return Math.floor(this.valueOf()/1e3)}function Si(){return new Date(this.valueOf())}function Ei(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Ci(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Mi(){return this.isValid()?this.toISOString():null}function Ti(){return b(this)}function Ri(){return p({},w(this))}function Oi(){return w(this).overflow}function Ni(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Ai(e,t){var n,r,i,o=this._eras||vn("en")._eras;for(n=0,r=o.length;n<r;++n){switch(typeof o[n].since){case"string":i=s(o[n].since).startOf("day"),o[n].since=i.valueOf();break}switch(typeof o[n].until){case"undefined":o[n].until=1/0;break;case"string":i=s(o[n].until).startOf("day").valueOf(),o[n].until=i.valueOf();break}}return o}function Li(e,t,n){var r,i,s,o,a,l=this.eras();for(e=e.toUpperCase(),r=0,i=l.length;r<i;++r)if(s=l[r].name.toUpperCase(),o=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(o===e)return l[r];break;case"NNNN":if(s===e)return l[r];break;case"NNNNN":if(a===e)return l[r];break}else if([s,o,a].indexOf(e)>=0)return l[r]}function Ii(e,t){var n=e.since<=e.until?1:-1;return void 0===t?s(e.since).year():s(e.since).year()+(t-e.offset)*n}function ki(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].name;if(r[e].until<=n&&n<=r[e].since)return r[e].name}return""}function xi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].narrow;if(r[e].until<=n&&n<=r[e].since)return r[e].narrow}return""}function Di(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e){if(n=this.clone().startOf("day").valueOf(),r[e].since<=n&&n<=r[e].until)return r[e].abbr;if(r[e].until<=n&&n<=r[e].since)return r[e].abbr}return""}function Hi(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf("day").valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-s(i[e].since).year())*n+i[e].offset;return this.year()}function Pi(e){return u(this,"_erasNameRegex")||Wi.call(this),e?this._erasNameRegex:this._erasRegex}function ji(e){return u(this,"_erasAbbrRegex")||Wi.call(this),e?this._erasAbbrRegex:this._erasRegex}function Fi(e){return u(this,"_erasNarrowRegex")||Wi.call(this),e?this._erasNarrowRegex:this._erasRegex}function Yi(e,t){return t.erasAbbrRegex(e)}function Ui(e,t){return t.erasNameRegex(e)}function Vi(e,t){return t.erasNarrowRegex(e)}function Bi(e,t){return t._eraYearOrdinalRegex||ve}function Wi(){var e,t,n,r,i,s=[],o=[],a=[],l=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=Le(u[e].name),r=Le(u[e].abbr),i=Le(u[e].narrow),o.push(n),s.push(r),a.push(i),l.push(n),l.push(r),l.push(i);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+o.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+s.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function zi(e,t){V(0,[e,e.length],0,t)}function Gi(e){return Qi.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function Ki(e){return Qi.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function Xi(){return Mt(this.year(),1,4)}function $i(){return Mt(this.isoWeekYear(),1,4)}function qi(){var e=this.localeData()._week;return Mt(this.year(),e.dow,e.doy)}function Ji(){var e=this.localeData()._week;return Mt(this.weekYear(),e.dow,e.doy)}function Qi(e,t,n,r,i){var s;return null==e?Ct(this,r,i).year:(s=Mt(e,r,i),t>s&&(t=s),Zi.call(this,e,t,n,r,i))}function Zi(e,t,n,r,i){var s=Et(e,t,n,r,i),o=_t(s.year,0,s.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}function es(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)}V("N",0,0,"eraAbbr"),V("NN",0,0,"eraAbbr"),V("NNN",0,0,"eraAbbr"),V("NNNN",0,0,"eraName"),V("NNNNN",0,0,"eraNarrow"),V("y",["y",1],"yo","eraYear"),V("y",["yy",2],0,"eraYear"),V("y",["yyy",3],0,"eraYear"),V("y",["yyyy",4],0,"eraYear"),Oe("N",Yi),Oe("NN",Yi),Oe("NNN",Yi),Oe("NNNN",Ui),Oe("NNNNN",Vi),De(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?w(n).era=i:w(n).invalidEra=e})),Oe("y",ve),Oe("yy",ve),Oe("yyy",ve),Oe("yyyy",ve),Oe("yo",Bi),De(["y","yy","yyy","yyyy"],Fe),De(["yo"],(function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[Fe]=n._locale.eraYearOrdinalParse(e,i):t[Fe]=parseInt(e,10)})),V(0,["gg",2],0,(function(){return this.weekYear()%100})),V(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),zi("gggg","weekYear"),zi("ggggg","weekYear"),zi("GGGG","isoWeekYear"),zi("GGGGG","isoWeekYear"),Oe("G",_e),Oe("g",_e),Oe("GG",fe,ce),Oe("gg",fe,ce),Oe("GGGG",we,de),Oe("gggg",we,de),Oe("GGGGG",be,me),Oe("ggggg",be,me),He(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=ke(e)})),He(["gg","GG"],(function(e,t,n,r){t[r]=s.parseTwoDigitYear(e)})),V("Q",0,"Qo","quarter"),Oe("Q",ue),De("Q",(function(e,t){t[Ye]=3*(ke(e)-1)})),V("D",["DD",2],"Do","date"),Oe("D",fe,Te),Oe("DD",fe,ce),Oe("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),De(["D","DD"],Ue),De("Do",(function(e,t){t[Ue]=ke(e.match(fe)[0])}));var ts=Qe("Date",!0);function ns(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")}V("DDD",["DDDD",3],"DDDo","dayOfYear"),Oe("DDD",ye),Oe("DDDD",he),De(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=ke(e)})),V("m",["mm",2],0,"minute"),Oe("m",fe,Re),Oe("mm",fe,ce),De(["m","mm"],Be);var rs=Qe("Minutes",!1);V("s",["ss",2],0,"second"),Oe("s",fe,Re),Oe("ss",fe,ce),De(["s","ss"],We);var is,ss,os=Qe("Seconds",!1);for(V("S",0,0,(function(){return~~(this.millisecond()/100)})),V(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),V(0,["SSS",3],0,"millisecond"),V(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),V(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),V(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),V(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),V(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),V(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),Oe("S",ye,ue),Oe("SS",ye,ce),Oe("SSS",ye,he),is="SSSS";is.length<=9;is+="S")Oe(is,ve);function as(e,t){t[ze]=ke(1e3*("0."+e))}for(is="S";is.length<=9;is+="S")De(is,as);function ls(){return this._isUTC?"UTC":""}function us(){return this._isUTC?"Coordinated Universal Time":""}ss=Qe("Milliseconds",!1),V("z",0,0,"zoneAbbr"),V("zz",0,0,"zoneName");var cs=C.prototype;function hs(e){return Jn(1e3*e)}function ds(){return Jn.apply(null,arguments).parseZone()}function ms(e){return e}cs.add=Hr,cs.calendar=Wr,cs.clone=zr,cs.diff=Qr,cs.endOf=bi,cs.format=ri,cs.from=ii,cs.fromNow=si,cs.to=oi,cs.toNow=ai,cs.get=tt,cs.invalidAt=Oi,cs.isAfter=Gr,cs.isBefore=Kr,cs.isBetween=Xr,cs.isSame=$r,cs.isSameOrAfter=qr,cs.isSameOrBefore=Jr,cs.isValid=Ti,cs.lang=ui,cs.locale=li,cs.localeData=ci,cs.max=Zn,cs.min=Qn,cs.parsingFlags=Ri,cs.set=nt,cs.startOf=wi,cs.subtract=Pr,cs.toArray=Ei,cs.toObject=Ci,cs.toDate=Si,cs.toISOString=ti,cs.inspect=ni,"undefined"!==typeof Symbol&&null!=Symbol.for&&(cs[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),cs.toJSON=Mi,cs.toString=ei,cs.unix=_i,cs.valueOf=vi,cs.creationData=Ni,cs.eraName=ki,cs.eraNarrow=xi,cs.eraAbbr=Di,cs.eraYear=Hi,cs.year=qe,cs.isLeapYear=Je,cs.weekYear=Gi,cs.isoWeekYear=Ki,cs.quarter=cs.quarters=es,cs.month=pt,cs.daysInMonth=gt,cs.week=cs.weeks=At,cs.isoWeek=cs.isoWeeks=Lt,cs.weeksInYear=qi,cs.weeksInWeekYear=Ji,cs.isoWeeksInYear=Xi,cs.isoWeeksInISOWeekYear=$i,cs.date=ts,cs.day=cs.days=Gt,cs.weekday=Kt,cs.isoWeekday=Xt,cs.dayOfYear=ns,cs.hour=cs.hours=on,cs.minute=cs.minutes=rs,cs.second=cs.seconds=os,cs.millisecond=cs.milliseconds=ss,cs.utcOffset=yr,cs.utc=br,cs.local=vr,cs.parseZone=_r,cs.hasAlignedHourOffset=Sr,cs.isDST=Er,cs.isLocal=Mr,cs.isUtcOffset=Tr,cs.isUtc=Rr,cs.isUTC=Rr,cs.zoneAbbr=ls,cs.zoneName=us,cs.dates=R("dates accessor is deprecated. Use date instead.",ts),cs.months=R("months accessor is deprecated. Use month instead",pt),cs.years=R("years accessor is deprecated. Use year instead",qe),cs.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",wr),cs.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Cr);var fs=x.prototype;function ps(e,t,n,r){var i=vn(),s=g().set(r,t);return i[n](s,e)}function gs(e,t,n){if(d(e)&&(t=e,e=void 0),e=e||"",null!=t)return ps(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=ps(e,r,n,"month");return i}function ys(e,t,n,r){"boolean"===typeof e?(d(t)&&(n=t,t=void 0),t=t||""):(t=e,n=t,e=!1,d(t)&&(n=t,t=void 0),t=t||"");var i,s=vn(),o=e?s._week.dow:0,a=[];if(null!=n)return ps(t,(n+o)%7,r,"day");for(i=0;i<7;i++)a[i]=ps(t,(i+o)%7,r,"day");return a}function ws(e,t){return gs(e,t,"months")}function bs(e,t){return gs(e,t,"monthsShort")}function vs(e,t,n){return ys(e,t,n,"weekdays")}function _s(e,t,n){return ys(e,t,n,"weekdaysShort")}function Ss(e,t,n){return ys(e,t,n,"weekdaysMin")}fs.calendar=H,fs.longDateFormat=X,fs.invalidDate=q,fs.ordinal=Z,fs.preparse=ms,fs.postformat=ms,fs.relativeTime=te,fs.pastFuture=ne,fs.set=I,fs.eras=Ai,fs.erasParse=Li,fs.erasConvertYear=Ii,fs.erasAbbrRegex=ji,fs.erasNameRegex=Pi,fs.erasNarrowRegex=Fi,fs.months=ct,fs.monthsShort=ht,fs.monthsParse=mt,fs.monthsRegex=wt,fs.monthsShortRegex=yt,fs.week=Tt,fs.firstDayOfYear=Nt,fs.firstDayOfWeek=Ot,fs.weekdays=Ut,fs.weekdaysMin=Bt,fs.weekdaysShort=Vt,fs.weekdaysParse=zt,fs.weekdaysRegex=$t,fs.weekdaysShortRegex=qt,fs.weekdaysMinRegex=Jt,fs.isPM=rn,fs.meridiem=an,yn("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===ke(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n}}),s.lang=R("moment.lang is deprecated. Use moment.locale instead.",yn),s.langData=R("moment.langData is deprecated. Use moment.localeData instead.",vn);var Es=Math.abs;function Cs(){var e=this._data;return this._milliseconds=Es(this._milliseconds),this._days=Es(this._days),this._months=Es(this._months),e.milliseconds=Es(e.milliseconds),e.seconds=Es(e.seconds),e.minutes=Es(e.minutes),e.hours=Es(e.hours),e.months=Es(e.months),e.years=Es(e.years),this}function Ms(e,t,n,r){var i=Ar(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function Ts(e,t){return Ms(this,e,t,1)}function Rs(e,t){return Ms(this,e,t,-1)}function Os(e){return e<0?Math.floor(e):Math.ceil(e)}function Ns(){var e,t,n,r,i,s=this._milliseconds,o=this._days,a=this._months,l=this._data;return s>=0&&o>=0&&a>=0||s<=0&&o<=0&&a<=0||(s+=864e5*Os(Ls(a)+o),o=0,a=0),l.milliseconds=s%1e3,e=Ie(s/1e3),l.seconds=e%60,t=Ie(e/60),l.minutes=t%60,n=Ie(t/60),l.hours=n%24,o+=Ie(n/24),i=Ie(As(o)),a+=i,o-=Os(Ls(i)),r=Ie(a/12),a%=12,l.days=o,l.months=a,l.years=r,this}function As(e){return 4800*e/146097}function Ls(e){return 146097*e/4800}function Is(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=ie(e),"month"===e||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+As(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Ls(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}}function ks(e){return function(){return this.as(e)}}var xs=ks("ms"),Ds=ks("s"),Hs=ks("m"),Ps=ks("h"),js=ks("d"),Fs=ks("w"),Ys=ks("M"),Us=ks("Q"),Vs=ks("y"),Bs=xs;function Ws(){return Ar(this)}function zs(e){return e=ie(e),this.isValid()?this[e+"s"]():NaN}function Gs(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ks=Gs("milliseconds"),Xs=Gs("seconds"),$s=Gs("minutes"),qs=Gs("hours"),Js=Gs("days"),Qs=Gs("months"),Zs=Gs("years");function eo(){return Ie(this.days()/7)}var to=Math.round,no={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ro(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function io(e,t,n,r){var i=Ar(e).abs(),s=to(i.as("s")),o=to(i.as("m")),a=to(i.as("h")),l=to(i.as("d")),u=to(i.as("M")),c=to(i.as("w")),h=to(i.as("y")),d=s<=n.ss&&["s",s]||s<n.s&&["ss",s]||o<=1&&["m"]||o<n.m&&["mm",o]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||c<=1&&["w"]||c<n.w&&["ww",c]),d=d||u<=1&&["M"]||u<n.M&&["MM",u]||h<=1&&["y"]||["yy",h],d[2]=t,d[3]=+e>0,d[4]=r,ro.apply(null,d)}function so(e){return void 0===e?to:"function"===typeof e&&(to=e,!0)}function oo(e,t){return void 0!==no[e]&&(void 0===t?no[e]:(no[e]=t,"s"===e&&(no.ss=t-1),!0))}function ao(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,i=!1,s=no;return"object"===typeof e&&(t=e,e=!1),"boolean"===typeof e&&(i=e),"object"===typeof t&&(s=Object.assign({},no,t),null!=t.s&&null==t.ss&&(s.ss=t.s-1)),n=this.localeData(),r=io(this,!i,s,n),i&&(r=n.pastFuture(+this,r)),n.postformat(r)}var lo=Math.abs;function uo(e){return(e>0)-(e<0)||+e}function co(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,i,s,o,a,l=lo(this._milliseconds)/1e3,u=lo(this._days),c=lo(this._months),h=this.asSeconds();return h?(e=Ie(l/60),t=Ie(e/60),l%=60,e%=60,n=Ie(c/12),c%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",i=h<0?"-":"",s=uo(this._months)!==uo(h)?"-":"",o=uo(this._days)!==uo(h)?"-":"",a=uo(this._milliseconds)!==uo(h)?"-":"",i+"P"+(n?s+n+"Y":"")+(c?s+c+"M":"")+(u?o+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var ho=lr.prototype;return ho.isValid=or,ho.abs=Cs,ho.add=Ts,ho.subtract=Rs,ho.as=Is,ho.asMilliseconds=xs,ho.asSeconds=Ds,ho.asMinutes=Hs,ho.asHours=Ps,ho.asDays=js,ho.asWeeks=Fs,ho.asMonths=Ys,ho.asQuarters=Us,ho.asYears=Vs,ho.valueOf=Bs,ho._bubble=Ns,ho.clone=Ws,ho.get=zs,ho.milliseconds=Ks,ho.seconds=Xs,ho.minutes=$s,ho.hours=qs,ho.days=Js,ho.weeks=eo,ho.months=Qs,ho.years=Zs,ho.humanize=ao,ho.toISOString=co,ho.toString=co,ho.toJSON=co,ho.locale=li,ho.localeData=ci,ho.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",co),ho.lang=ui,V("X",0,0,"unix"),V("x",0,0,"valueOf"),Oe("x",_e),Oe("X",Ce),De("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),De("x",(function(e,t,n){n._d=new Date(ke(e))})),
- //! moment.js
- s.version="2.30.1",o(Jn),s.fn=cs,s.min=tr,s.max=nr,s.now=rr,s.utc=g,s.unix=hs,s.months=ws,s.isDate=m,s.locale=yn,s.invalid=v,s.duration=Ar,s.isMoment=M,s.weekdays=vs,s.parseZone=ds,s.localeData=vn,s.isDuration=ur,s.monthsShort=bs,s.weekdaysMin=Ss,s.defineLocale=wn,s.updateLocale=bn,s.locales=_n,s.weekdaysShort=_s,s.normalizeUnits=ie,s.relativeTimeRounding=so,s.relativeTimeThreshold=oo,s.calendarFormat=Br,s.prototype=cs,s.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},s}))}).call(this,n("62e4")(e))},c24d:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return V}));var r=n("c0d8"),i=n("2b0e");function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function o(e,t,n){return t=h(t),g(e,m()?Reflect.construct(t,n||[],h(e).constructor):t.apply(e,n))}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,b(r.key),r)}}function u(e,t,n){return t&&l(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function c(e,t,n){return(t=b(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&y(e,t)}function m(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(m=function(){return!!e})()}function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function g(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return s(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}function w(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function b(e){var t=w(e,"string");return"symbol"==typeof t?t:t+""}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}var _=Symbol("unassigned"),S=null,E="The Handsontable instance bound to this component was destroyed and cannot be used properly.";function C(e){e.hotInstance&&(e.hotInstance.addHook("beforeChange",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeCreateCol",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveRow",(function(){e.__internalEdit=!0})),e.hotInstance.addHook("beforeRemoveCol",(function(){e.__internalEdit=!0})))}function M(e){var t=r["a"].hooks.getRegistered(),n={};for(var i in Object.assign(n,r["a"].DefaultSettings),n)n[i]={default:_};for(var s=0;s<t.length;s++)n[t[s]]={default:_};return n.settings={default:_},"HotTable"===e&&(n.id={type:String,default:"hot-"+Math.random().toString(36).substring(5)},n.wrapperRendererCacheSize={type:Number,default:3e3}),n}function T(e){var t={},n=e["settings"];if(n!==_)for(var r in n)n.hasOwnProperty(r)&&n[r]!==_&&(t[r]=n[r]);for(var i in e)e.hasOwnProperty(i)&&"settings"!==i&&e[i]!==_&&(t[i]=e[i]);return t}function R(e,t){var n=T(e),r=e.settings?e.settings:n,i=e.settings?n:null,s={};for(var o in r)!r.hasOwnProperty(o)||void 0===r[o]||t&&"data"!==o&&L(t[o],r[o])||(s[o]=r[o]);for(var a in i)!i.hasOwnProperty(a)||"id"===a||"settings"===a||"wrapperRendererCacheSize"===a||void 0===i[a]||t&&"data"!==a&&L(t[a],i[a])||(s[a]=i[a]);return s}function O(e,t){var n=null;return e.every((function(e,r){return!e.data||!e.data.attrs||void 0===e.data.attrs[t]||(n=e,!1)})),n}function N(e){return e.filter((function(e){return"HotColumn"===e.$options.name}))}function A(e,t,n,r){var i=t.$el?t.$el.ownerDocument:document,s={propsData:n,parent:t,data:r};S||(S=i.createElement("DIV"),S.id="vueHotComponents",i.body.appendChild(S));var o=i.createElement("DIV");return S.appendChild(o),new e.componentOptions.Ctor(s).$mount(o)}function L(e,t){var n=function(e){var t=function(){var e=new WeakSet;return function(t,n){if("object"===v(n)&&null!==n){if(e.has(n))return;e.add(n)}return n}}();return JSON.stringify(e,t)};return"function"===typeof e&&"function"===typeof t?e.toString()===t.toString():v(e)===v(t)&&n(e)===n(t)}var I="14.6.2",k=("undefined"!==typeof globalThis?globalThis:"undefined"!==typeof window?window:"undefined"!==typeof e||"undefined"!==typeof self&&self,{});(function(e){(function(t,n){var r=e;n(r)})(0,(function(e){var t=Symbol("newer"),n=Symbol("older");function r(e,t){"number"!==typeof e&&(t=e,e=0),this.size=0,this.limit=e,this.oldest=this.newest=void 0,this._keymap=new Map,t&&(this.assign(t),e<1&&(this.limit=this.size))}function i(e,r){this.key=e,this.value=r,this[t]=void 0,this[n]=void 0}e.LRUMap=r,r.prototype._markEntryAsUsed=function(e){e!==this.newest&&(e[t]&&(e===this.oldest&&(this.oldest=e[t]),e[t][n]=e[n]),e[n]&&(e[n][t]=e[t]),e[t]=void 0,e[n]=this.newest,this.newest&&(this.newest[t]=e),this.newest=e)},r.prototype.assign=function(e){var r,s=this.limit||Number.MAX_VALUE;this._keymap.clear();for(var o=e[Symbol.iterator](),a=o.next();!a.done;a=o.next()){var l=new i(a.value[0],a.value[1]);if(this._keymap.set(l.key,l),r?(r[t]=l,l[n]=r):this.oldest=l,r=l,0==s--)throw new Error("overflow")}this.newest=r,this.size=this._keymap.size},r.prototype.get=function(e){var t=this._keymap.get(e);if(t)return this._markEntryAsUsed(t),t.value},r.prototype.set=function(e,r){var s=this._keymap.get(e);return s?(s.value=r,this._markEntryAsUsed(s),this):(this._keymap.set(e,s=new i(e,r)),this.newest?(this.newest[t]=s,s[n]=this.newest):this.oldest=s,this.newest=s,++this.size,this.size>this.limit&&this.shift(),this)},r.prototype.shift=function(){var e=this.oldest;if(e)return this.oldest[t]?(this.oldest=this.oldest[t],this.oldest[n]=void 0):(this.oldest=void 0,this.newest=void 0),e[t]=e[n]=void 0,this._keymap["delete"](e.key),--this.size,[e.key,e.value]},r.prototype.has=function(e){return this._keymap.has(e)}}))})(k);var x={name:"HotTable",props:M("HotTable"),watch:{mergedHotSettings:function(e){this.hotInstance&&void 0!==e&&(e.data&&(this.hotInstance.isColumnModificationAllowed()||!this.hotInstance.isColumnModificationAllowed()&&this.hotInstance.countSourceCols()===this.miscCache.currentSourceColumns)&&(this.matchHotMappersSize(),delete e.data),Object.keys(e).length?this.hotInstance.updateSettings(e):this.hotInstance.render(),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols())}},data:function(){var e=this,t=new k.LRUMap(this.wrapperRendererCacheSize);return t.shift=function(){var e=k.LRUMap.prototype.shift.call(this);return e[1].component.$destroy(),e},{__internalEdit:!1,miscCache:{currentSourceColumns:null},__hotInstance:null,columnSettings:null,rendererCache:t,editorCache:new Map,get hotInstance(){return!e.__hotInstance||e.__hotInstance&&!e.__hotInstance.isDestroyed?e.__hotInstance:(console.warn(E),null)},set hotInstance(t){e.__hotInstance=t}}},computed:{mergedHotSettings:function(){return R(this.$props,this.hotInstance?this.hotInstance.getSettings():void 0)}},methods:{hotInit:function(){var e=this.getGlobalRendererVNode(),t=this.getGlobalEditorVNode(),n=R(this.$props);n.columns=this.columnSettings?this.columnSettings:n.columns,t&&(n.editor=this.getEditorClass(t,this),t.child.$destroy()),e&&(n.renderer=this.getRendererWrapper(e,this),e.child.$destroy()),this.hotInstance=new r["a"].Core(this.$el,n),this.hotInstance.init(),C(this),this.miscCache.currentSourceColumns=this.hotInstance.countSourceCols()},matchHotMappersSize:function(){var e=this;if(this.hotInstance){var t,n=this.hotInstance.getSourceData(),r=[],i=[],s=this.hotInstance.rowIndexMapper.getNumberOfIndexes(),o=this.hotInstance.isColumnModificationAllowed(),a=0;if(n&&n.length!==s&&n.length<s)for(var l=n.length;l<s;l++)r.push(l);if(o)if(a=this.hotInstance.columnIndexMapper.getNumberOfIndexes(),n&&n[0]&&(null===(t=n[0])||void 0===t?void 0:t.length)!==a&&n[0].length<a)for(var u=n[0].length;u<a;u++)i.push(u);this.hotInstance.batch((function(){r.length>0?e.hotInstance.rowIndexMapper.removeIndexes(r):e.hotInstance.rowIndexMapper.insertIndexes(s-1,n.length-s),o&&0!==n.length&&(i.length>0?e.hotInstance.columnIndexMapper.removeIndexes(i):e.hotInstance.columnIndexMapper.insertIndexes(a-1,n[0].length-a))}))}},getGlobalRendererVNode:function(){var e=this.$slots["default"]||[];return O(e,"hot-renderer")},getGlobalEditorVNode:function(){var e=this.$slots["default"]||[];return O(e,"hot-editor")},getColumnSettings:function(){var e=N(this.$children),t=!1,n=e.map((function(e){return e.usesRendererComponent&&(t=!0),p({},e.columnSettings)}));return t&&this.settings&&(!1!==this.settings.autoColumnSize||this.settings.autoRowSize)&&(!1!==this.autoColumnSize||this.autoRowSize)&&console.warn("Your `hot-table` configuration includes both `hot-column` and `autoRowSize`/`autoColumnSize`, which are not compatible with each other in this version of `@handsontable/vue`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment."),n.length?n:void 0},getRendererWrapper:function(e,t){var n=this;return function(r,i,s,o,a,l,u){if(i&&!i.getAttribute("ghost-table")){var c=n.rendererCache,h={hotInstance:r,TD:i,row:s,col:o,prop:a,value:l,cellProperties:u,isRenderer:!0};if(c&&!c.has("".concat(s,"-").concat(o))){var d=A(e,t,e.componentOptions.propsData,h);c.set("".concat(s,"-").concat(o),{component:d,lastUsedTD:null})}var m=c.get("".concat(s,"-").concat(o)),f=m.component,p=m.lastUsedTD;if(Object.assign(f.$data,h),!f.$el.parentElement||p!==i){while(i.firstChild)i.removeChild(i.firstChild);i.appendChild(f.$el),m.lastUsedTD=i}}return i}},getEditorClass:function(e,t){var n=e.key?e.key.toString():null,r=e.componentOptions.Ctor.options.name,i=n?"".concat(r,":").concat(n):r,s=this.editorCache,o=null;return s.has(i)?o=s.get(i):(o=A(e,t,e.componentOptions.propsData,{isEditor:!0}),s.set(i,o)),o.$data.hotCustomEditorClass}},mounted:function(){return this.columnSettings=this.getColumnSettings(),this.hotInit()},beforeDestroy:function(){this.hotInstance&&this.hotInstance.destroy()},version:I};function D(e,t,n,r,i,s,o,a,l,u){const c="function"===typeof n?n.options:n;return e&&e.render&&(c.render=e.render,c.staticRenderFns=e.staticRenderFns,c._compiled=!0,i&&(c.functional=!0)),n}var H=x,P=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:e.id}},[e._t("default")],2)},j=[],F=void 0,Y=void 0,U=!1,V=D({render:P,staticRenderFns:j},F,H,Y,U);M("HotColumn");function B(e,t,n,r){var i,s=arguments.length,o=s<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)o=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(o=(s<3?i(o):s>3?i(t,n,o):i(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}function W(e){return W="function"===typeof Symbol&&"symbol"===v(Symbol.iterator)?function(e){return v(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":v(e)},W(e)}function z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G(e){return K(e)||X(e)||$()}function K(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}function X(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}function $(){throw new TypeError("Invalid attempt to spread non-iterable instance")}function q(){return"undefined"!==typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function J(e,t){Q(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){Q(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){Q(e,t,n)}))}function Q(e,t,n){var r=n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t);r.forEach((function(r){var i=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,i,e,n):Reflect.defineMetadata(r,i,e)}))}"function"===typeof SuppressedError&&SuppressedError;var Z={__proto__:[]},ee=Z instanceof Array;function te(e){var t=W(e);return null==e||"object"!==t&&"function"!==t}function ne(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var r=new t;t.prototype._init=n;var i={};return Object.keys(r).forEach((function(e){void 0!==r[e]&&(i[e]=r[e])})),i}var re=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function ie(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(re.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"===typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return z({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return ne(this,e)}});var r=e.__decorators__;r&&(r.forEach((function(e){return e(t)})),delete e.__decorators__);var s=Object.getPrototypeOf(e.prototype),o=s instanceof i["default"]?s.constructor:i["default"],a=o.extend(t);return oe(a,e,o),q()&&J(a,e),a}var se={prototype:!0,arguments:!0,callee:!0,caller:!0};function oe(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!se[r]){var i=Object.getOwnPropertyDescriptor(e,r);if(!i||i.configurable){var s=Object.getOwnPropertyDescriptor(t,r);if(!ee){if("cid"===r)return;var o=Object.getOwnPropertyDescriptor(n,r);if(!te(s.value)&&o&&o.value===s.value)return}Object.defineProperty(e,r,s)}}}))}function ae(e){return"function"===typeof e?ie(e):function(t){return ie(t,e)}}ae.registerHooks=function(e){re.push.apply(re,G(e))};var le=function(e){function t(){var e;return a(this,t),e=o(this,t,arguments),e.name="BaseEditorComponent",e.instance=null,e.row=null,e.col=null,e.prop=null,e.TD=null,e.originalValue=null,e.cellProperties=null,e.state=null,e.hot=null,e}return d(t,e),u(t,[{key:"mounted",value:function(){var e=this;this.$data.hotCustomEditorClass=function(){var t=function(t){function n(t){var r;return a(this,n),r=o(this,n,[t]),e.$data.hotCustomEditorInstance=r,r}return d(n,t),u(n,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(r["a"].editors.BaseEditor);return Object.getOwnPropertyNames(r["a"].editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];return(t=e[n]).call.apply(t,[this].concat(i))})})),t}()}},{key:"_fireCallbacks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];(e=r["a"].editors.BaseEditor.prototype._fireCallbacks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"beginEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.beginEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"cancelChanges",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.cancelChanges).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"checkEditorSection",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.checkEditorSection).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"close",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.close).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"discardEditor",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.discardEditor).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"enableFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.enableFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"extend",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.extend).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"finishEditing",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.finishEditing).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"focus",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.focus).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"init",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.init).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isInFullEditMode",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isInFullEditMode).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isOpened",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isOpened).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"isWaiting",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.isWaiting).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"open",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.open).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"prepare",value:function(e,t,n,i,s,o){return this.$data.hotInstance=o.instance,this.$data.row=e,this.$data.col=t,this.$data.prop=n,this.$data.TD=i,this.$data.originalValue=s,this.$data.cellProperties=o,r["a"].editors.BaseEditor.prototype.prepare.call(this.$data.hotCustomEditorInstance,e,t,n,i,s,o)}},{key:"saveValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.saveValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"setValue",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.setValue).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"addHook",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.addHook).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"removeHooksByKey",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.removeHooksByKey).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"clearHooks",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.clearHooks).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCell",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCell).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellRect",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellRect).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsZIndex",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsZIndex).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}},{key:"getEditedCellsLayerClass",value:function(){for(var e,t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];return(e=r["a"].editors.BaseEditor.prototype.getEditedCellsLayerClass).call.apply(e,[this.$data.hotCustomEditorInstance].concat(n))}}])}(i["default"]);le=B([ae({})],le)}).call(this,n("c8ba"))},c272:function(e,t,n){"use strict";e.exports={}},c4fa:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i}));const r="gridDefault",i="editorManager.handlingEditor"},c5ae:function(e,t,n){"use strict";var r=n("9e75"),i=Math.min;e.exports=function(e){var t=r(e);return t>0?i(t,9007199254740991):0}},c5cd:function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return h}));n("7a89");var r=n("7b9c"),i=n("351d"),s=n("7ae0");function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}let u=0;class c{constructor(){o(this,"collection",new Map)}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",()=>this.runLocalHooks("change",t)),u+=1)}unregister(e){const t=this.collection.get(e);Object(r["isDefined"])(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),u-=1)}unregisterAll(){this.collection.forEach((e,t)=>this.unregister(t)),this.collection.clear()}get(e){return Object(r["isUndefined"])(e)?Array.from(this.collection.values()):this.collection.get(e)}getLength(){return this.collection.size}removeFromEvery(e){this.collection.forEach(t=>{t.remove(e)})}insertToEvery(e,t){this.collection.forEach(n=>{n.insert(e,t)})}initEvery(e){this.collection.forEach(t=>{t.init(e)})}}function h(){return u}Object(i["mixin"])(c,s["a"])},c5d7:function(e,t,n){"use strict";var r=n("ac4f"),i=n("7064"),s=n("2bab"),o=n("88c5"),a=!o("union")||!s("union");r({target:"Set",proto:!0,real:!0,forced:a},{union:i})},c7aa:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("he",{months:"ינואר_פברואר_מרץ_אפריל_מאי_יוני_יולי_אוגוסט_ספטמבר_אוקטובר_נובמבר_דצמבר".split("_"),monthsShort:"ינו׳_פבר׳_מרץ_אפר׳_מאי_יוני_יולי_אוג׳_ספט׳_אוק׳_נוב׳_דצמ׳".split("_"),weekdays:"ראשון_שני_שלישי_רביעי_חמישי_שישי_שבת".split("_"),weekdaysShort:"א׳_ב׳_ג׳_ד׳_ה׳_ו׳_ש׳".split("_"),weekdaysMin:"א_ב_ג_ד_ה_ו_ש".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [ב]MMMM YYYY",LLL:"D [ב]MMMM YYYY HH:mm",LLLL:"dddd, D [ב]MMMM YYYY HH:mm",l:"D/M/YYYY",ll:"D MMM YYYY",lll:"D MMM YYYY HH:mm",llll:"ddd, D MMM YYYY HH:mm"},calendar:{sameDay:"[היום ב־]LT",nextDay:"[מחר ב־]LT",nextWeek:"dddd [בשעה] LT",lastDay:"[אתמול ב־]LT",lastWeek:"[ביום] dddd [האחרון בשעה] LT",sameElse:"L"},relativeTime:{future:"בעוד %s",past:"לפני %s",s:"מספר שניות",ss:"%d שניות",m:"דקה",mm:"%d דקות",h:"שעה",hh:function(e){return 2===e?"שעתיים":e+" שעות"},d:"יום",dd:function(e){return 2===e?"יומיים":e+" ימים"},M:"חודש",MM:function(e){return 2===e?"חודשיים":e+" חודשים"},y:"שנה",yy:function(e){return 2===e?"שנתיים":e%10===0&&10!==e?e+" שנה":e+" שנים"}},meridiemParse:/אחה"צ|לפנה"צ|אחרי הצהריים|לפני הצהריים|לפנות בוקר|בבוקר|בערב/i,isPM:function(e){return/^(אחה"צ|אחרי הצהריים|בערב)$/.test(e)},meridiem:function(e,t,n){return e<5?"לפנות בוקר":e<10?"בבוקר":e<12?n?'לפנה"צ':"לפני הצהריים":e<18?n?'אחה"צ':"אחרי הצהריים":"בערב"}});return t}))},c8f3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("sq",{months:"Janar_Shkurt_Mars_Prill_Maj_Qershor_Korrik_Gusht_Shtator_Tetor_Nëntor_Dhjetor".split("_"),monthsShort:"Jan_Shk_Mar_Pri_Maj_Qer_Kor_Gus_Sht_Tet_Nën_Dhj".split("_"),weekdays:"E Diel_E Hënë_E Martë_E Mërkurë_E Enjte_E Premte_E Shtunë".split("_"),weekdaysShort:"Die_Hën_Mar_Mër_Enj_Pre_Sht".split("_"),weekdaysMin:"D_H_Ma_Më_E_P_Sh".split("_"),weekdaysParseExact:!0,meridiemParse:/PD|MD/,isPM:function(e){return"M"===e.charAt(0)},meridiem:function(e,t,n){return e<12?"PD":"MD"},longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[Sot në] LT",nextDay:"[Nesër në] LT",nextWeek:"dddd [në] LT",lastDay:"[Dje në] LT",lastWeek:"dddd [e kaluar në] LT",sameElse:"L"},relativeTime:{future:"në %s",past:"%s më parë",s:"disa sekonda",ss:"%d sekonda",m:"një minutë",mm:"%d minuta",h:"një orë",hh:"%d orë",d:"një ditë",dd:"%d ditë",M:"një muaj",MM:"%d muaj",y:"një vit",yy:"%d vite"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))},c9a1:function(e,t,n){"use strict";var r=n("54adf"),i=r.navigator,s=i&&i.userAgent;e.exports=s?String(s):""},cac7:function(e,t,n){"use strict";var r=n("d128"),i=n("a60d"),s=n("1caf");e.exports=function(e,t,n){r?i.f(e,t,s(0,n)):e[t]=n}},cbf2:function(e,t,n){"use strict";var r=n("80dd"),i=n("c272"),s=r("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(i.Array===e||o[s]===e)}},cc6f:function(e,t,n){"use strict";n.d(t,"a",(function(){return ha})),n.d(t,"b",(function(){return Vt}));var r,i,s={};n.r(s),n.d(s,"AddressPlugin",(function(){return ba})),n.d(s,"ArrayPlugin",(function(){return va})),n.d(s,"AbsPlugin",(function(){return _a})),n.d(s,"BitShiftPlugin",(function(){return Ma})),n.d(s,"BitwiseLogicOperationsPlugin",(function(){return Na})),n.d(s,"BooleanPlugin",(function(){return Aa})),n.d(s,"CharPlugin",(function(){return La})),n.d(s,"CodePlugin",(function(){return Ia})),n.d(s,"CountBlankPlugin",(function(){return ka})),n.d(s,"CountUniquePlugin",(function(){return xa})),n.d(s,"DateTimePlugin",(function(){return Da})),n.d(s,"DegreesPlugin",(function(){return Ya})),n.d(s,"DeltaPlugin",(function(){return Ua})),n.d(s,"ExpPlugin",(function(){return Va})),n.d(s,"FinancialPlugin",(function(){return Ba})),n.d(s,"FormulaTextPlugin",(function(){return $a})),n.d(s,"HyperlinkPlugin",(function(){return qa})),n.d(s,"InformationPlugin",(function(){return Ja})),n.d(s,"IsEvenPlugin",(function(){return Qa})),n.d(s,"IsOddPlugin",(function(){return Za})),n.d(s,"LogarithmPlugin",(function(){return el})),n.d(s,"MathConstantsPlugin",(function(){return nl})),n.d(s,"MatrixPlugin",(function(){return sl})),n.d(s,"MedianPlugin",(function(){return ol})),n.d(s,"ModuloPlugin",(function(){return al})),n.d(s,"NumericAggregationPlugin",(function(){return cl})),n.d(s,"PowerPlugin",(function(){return ml})),n.d(s,"RadiansPlugin",(function(){return fl})),n.d(s,"RadixConversionPlugin",(function(){return vl})),n.d(s,"RandomPlugin",(function(){return Ol})),n.d(s,"RoundingPlugin",(function(){return Ll})),n.d(s,"SqrtPlugin",(function(){return Il})),n.d(s,"ConditionalAggregationPlugin",(function(){return zl})),n.d(s,"SumprodPlugin",(function(){return Gl})),n.d(s,"TextPlugin",(function(){return Kl})),n.d(s,"TrigonometryPlugin",(function(){return Xl})),n.d(s,"LookupPlugin",(function(){return ql})),n.d(s,"RomanPlugin",(function(){return Jl})),n.d(s,"SimpleArithmerticPlugin",(function(){return tu})),n.d(s,"StatisticalPlugin",(function(){return Ju})),n.d(s,"MathPlugin",(function(){return Qu})),n.d(s,"ComplexPlugin",(function(){return nc})),n.d(s,"StatisticalAggregationPlugin",(function(){return pc})),function(e){e["RELATIVE"]="RELATIVE",e["ABSOLUTE"]="ABSOLUTE"}(r||(r={}));class o{constructor(e,t,n){this.type=e,this.col=t,this.sheet=n}static absolute(e,t){return new o(r.ABSOLUTE,e,t)}static relative(e,t){return new o(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleColumnAddress(e).col-n.toSimpleColumnAddress(e).col}isColumnAbsolute(){return this.type===r.ABSOLUTE}isColumnRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new o(this.type,this.col+t,r)}shiftedByColumns(e){return new o(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=wr(this,e);let n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),hr(t,n)}shiftRelativeDimensions(e,t){const n=this.isColumnRelative()?this.col+e:this.col;return new o(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnAbsolute()?this.col+e:this.col;return new o(this.type,n,this.sheet)}withSheet(e){return new o(this.type,this.col,e)}isInvalid(e){return this.toSimpleColumnAddress(e).col<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#COLR${this.col}`;case r.ABSOLUTE:return`${t}#COLA${this.col}`}}unparse(e){const t=this.toSimpleColumnAddress(e);if(dr(t))return;const n=j(t.col),i=this.type===r.ABSOLUTE?"$":"";return`${i}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class a{constructor(e,t,n){this.type=e,this.row=t,this.sheet=n}static absolute(e,t){return new a(r.ABSOLUTE,e,t)}static relative(e,t){return new a(r.RELATIVE,e,t)}static compareByAbsoluteAddress(e){return(t,n)=>t.toSimpleRowAddress(e).row-n.toSimpleRowAddress(e).row}isRowAbsolute(){return this.type===r.ABSOLUTE}isRowRelative(){return this.type===r.RELATIVE}isAbsolute(){return this.type===r.ABSOLUTE&&void 0!==this.sheet}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new a(this.type,this.row+n,r)}shiftedByRows(e){return new a(this.type,this.row+e,this.sheet)}toSimpleRowAddress(e){const t=wr(this,e);let n=this.row;return this.isRowRelative()&&(n=e.row+this.row),ur(t,n)}shiftRelativeDimensions(e,t){const n=this.isRowRelative()?this.row+t:this.row;return new a(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isRowAbsolute()?this.row+t:this.row;return new a(this.type,n,this.sheet)}withSheet(e){return new a(this.type,this.row,e)}isInvalid(e){return this.toSimpleRowAddress(e).row<0}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case r.RELATIVE:return`${t}#ROWR${this.row}`;case r.ABSOLUTE:return`${t}#ROWA${this.row}`}}unparse(e){const t=this.toSimpleRowAddress(e);if(cr(t))return;const n=this.type===r.ABSOLUTE?"$":"";return`${n}${t.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["CELL_REFERENCE_RELATIVE"]="CELL_REFERENCE",e["CELL_REFERENCE_ABSOLUTE"]="CELL_REFERENCE_ABSOLUTE",e["CELL_REFERENCE_ABSOLUTE_COL"]="CELL_REFERENCE_ABSOLUTE_COL",e["CELL_REFERENCE_ABSOLUTE_ROW"]="CELL_REFERENCE_ABSOLUTE_ROW"})(i||(i={}));class l{constructor(e,t,n,r){this.col=e,this.row=t,this.type=n,this.sheet=r}static fromColAndRow(e,t,n){const r=e.isColumnAbsolute()&&t.isRowAbsolute()?l.absolute.bind(this):e.isColumnAbsolute()?l.absoluteCol.bind(this):t.isRowAbsolute()?l.absoluteRow.bind(this):l.relative.bind(this);return r(e.col,t.row,n)}static relative(e,t,n){return new l(e,t,i.CELL_REFERENCE_RELATIVE,n)}static absolute(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,t,n){return new l(e,t,i.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){const t=wr(this,e);return this.type===i.CELL_REFERENCE_ABSOLUTE?mr(t,this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?mr(t,e.col+this.col,this.row):this.type===i.CELL_REFERENCE_ABSOLUTE_COL?mr(t,this.col,e.row+this.row):mr(t,e.col+this.col,e.row+this.row)}toColumnAddress(){const e=this.isColumnRelative()?r.RELATIVE:r.ABSOLUTE;return new o(e,this.col,this.sheet)}toRowAddress(){const e=this.isRowRelative()?r.RELATIVE:r.ABSOLUTE;return new a(e,this.row,this.sheet)}toSimpleColumnAddress(e){const t=wr(this,e);let n=this.col;return this.isColumnRelative()&&(n+=e.col),hr(t,n)}toSimpleRowAddress(e){const t=wr(this,e);let n=this.row;return this.isRowRelative()&&(n+=e.row),ur(t,n)}isRowAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===i.CELL_REFERENCE_RELATIVE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===i.CELL_REFERENCE_ABSOLUTE&&void 0!==this.sheet}shiftedByRows(e){return new l(this.col,this.row+e,this.type,this.sheet)}shiftedByColumns(e){return new l(this.col+e,this.row,this.type,this.sheet)}moved(e,t,n){const r=void 0===this.sheet?void 0:e;return new l(this.col+t,this.row+n,this.type,r)}withSheet(e){return new l(this.col,this.row,this.type,e)}isInvalid(e){return fr(this.toSimpleCellAddress(e))}shiftRelativeDimensions(e,t){const n=this.isColumnAbsolute()?this.col:this.col+e,r=this.isRowAbsolute()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnRelative()?this.col:this.col+e,r=this.isRowRelative()?this.row:this.row+t;return new l(n,r,this.type,this.sheet)}hash(e){const t=e&&void 0!==this.sheet?"#"+this.sheet:"";switch(this.type){case i.CELL_REFERENCE_RELATIVE:return`${t}#${this.row}R${this.col}`;case i.CELL_REFERENCE_ABSOLUTE:return`${t}#${this.row}A${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_COL:return`${t}#${this.row}AC${this.col}`;case i.CELL_REFERENCE_ABSOLUTE_ROW:return`${t}#${this.row}AR${this.col}`}}unparse(e){const t=this.toSimpleCellAddress(e);if(fr(t))return;const n=j(t.col),r=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_ROW?"$":"",s=this.type===i.CELL_REFERENCE_ABSOLUTE||this.type===i.CELL_REFERENCE_ABSOLUTE_COL?"$":"";return`${s}${n}${r}${t.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const u=":",c="$",h="\\s+",d="[ \\t\\n\\r]+",m="A-Za-zÀ-ʯ",f=m+"0-9_.",p=`[${m}0-9_]+`,g="'(((?!').|'')*)'",y=`(${p}|${g})!`,w=`(${y})?\\${c}?[A-Za-z]+\\${c}?[0-9]+`,b=`(${y})?\\${c}?[A-Za-z]+`,v=`(${y})?\\${c}?[0-9]+`,_="[rR][0-9]*[cC][0-9]*",S=`(${w})[^${f}]`,E=`[${m}_][${f}]*`,C=["0","1","2","3","4","5","6","7","8","9"],M=[...Array.from(Array(26)).map((e,t)=>t+"A".charCodeAt(0)),...Array.from(Array(26)).map((e,t)=>t+"a".charCodeAt(0)),...Array.from(Array(496)).map((e,t)=>t+192)].map(e=>String.fromCharCode(e)),T=new RegExp(`^(${y})?(\\${c}?)([A-Za-z]+)(\\${c}?)([0-9]+)$`),R=new RegExp(`^(${y})?(\\${c}?)([A-Za-z]+)$`),O=new RegExp(`^(${y})?(\\${c}?)([0-9]+)$`),N=new RegExp(`^${p}$`),A=(e,t,n)=>{const r=T.exec(t),i=P(r[6]);let s=Y(r,e);if(void 0===s)return;null===s&&(s=void 0);const o=Number(r[8])-1;return r[5]===c&&r[7]===c?l.absolute(i,o,s):r[5]===c?l.absoluteCol(i,o-n.row,s):r[7]===c?l.absoluteRow(i-n.col,o,s):l.relative(i-n.col,o-n.row,s)},L=(e,t,n)=>{const r=R.exec(t);let i=Y(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=P(r[6]);return r[5]===c?o.absolute(s,i):o.relative(s-n.col,i)},I=(e,t,n)=>{const r=O.exec(t);let i=Y(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=Number(r[6])-1;return r[5]===c?a.absolute(s,i):a.relative(s-n.row,i)},k=(e,t,n)=>{const r=T.exec(t);if(!r)return;const i=P(r[6]);let s=Y(r,e);if(void 0===s)return;null===s&&(s=n);const o=Number(r[8])-1;return mr(s,i,o)},x=(e,t,n)=>{const r=t.split(u);if(2!==r.length)return;const[i,s]=r,o=k(e,i,n);if(void 0===o)return;const a=k(e,s,o.sheet);return void 0!==a&&o.sheet===a.sheet?Sr(o,a):void 0},D=(e,t,n)=>{const r=j(t.col),i=F(t.sheet,e);if(void 0!==i)return n!==t.sheet?`${i}!${r}${t.row+1}`:`${r}${t.row+1}`},H=(e,t,n)=>{const r=D(e,t.start,n),i=D(e,t.end,t.start.sheet);return void 0===r||void 0===i?void 0:`${r}${u}${i}`};function P(e){return 1===e.length?e.toUpperCase().charCodeAt(0)-65:e.split("").reduce((e,t)=>26*e+(t.toUpperCase().charCodeAt(0)-64),0)-1}function j(e){let t="";while(e>=0)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function F(e,t){let n=t(e);if(void 0!==n)return N.test(n)?n:(n=n.replace(/'/g,"''"),`'${n}'`)}function Y(e,t){var n;let r=null!==(n=e[3])&&void 0!==n?n:e[2];return r?(r=r.replace(/''/g,"'"),t(r)):null}var U=n("fa83");
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const V=(e,t)=>({type:e,message:t});var B,W,z;(function(e){e["LexingError"]="LexingError",e["ParserError"]="ParsingError",e["StaticOffsetError"]="StaticOffsetError",e["StaticOffsetOutOfRangeError"]="StaticOffsetOutOfRangeError",e["RangeOffsetNotAllowed"]="RangeOffsetNotAllowed",e["InvalidRangeSize"]="InvalidRangeSize"})(B||(B={})),function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["MINUS_UNARY_OP"]="MINUS_UNARY_OP",e["PLUS_UNARY_OP"]="PLUS_UNARY_OP",e["PERCENT_OP"]="PERCENT_OP",e["CONCATENATE_OP"]="CONCATENATE_OP",e["EQUALS_OP"]="EQUALS_OP",e["NOT_EQUAL_OP"]="NOT_EQUAL_OP",e["GREATER_THAN_OP"]="GREATER_THAN_OP",e["LESS_THAN_OP"]="LESS_THAN_OP",e["GREATER_THAN_OR_EQUAL_OP"]="GREATER_THAN_OR_EQUAL_OP",e["LESS_THAN_OR_EQUAL_OP"]="LESS_THAN_OR_EQUAL_OP",e["PLUS_OP"]="PLUS_OP",e["MINUS_OP"]="MINUS_OP",e["TIMES_OP"]="TIMES_OP",e["DIV_OP"]="DIV_OP",e["POWER_OP"]="POWER_OP",e["FUNCTION_CALL"]="FUNCTION_CALL",e["NAMED_EXPRESSION"]="NAMED_EXPRESSION",e["PARENTHESIS"]="PARENTHESES",e["CELL_REFERENCE"]="CELL_REFERENCE",e["CELL_RANGE"]="CELL_RANGE",e["COLUMN_RANGE"]="COLUMN_RANGE",e["ROW_RANGE"]="ROW_RANGE",e["ERROR"]="ERROR",e["ERROR_WITH_RAW_INPUT"]="ERROR_WITH_RAW_INPUT",e["ARRAY"]="ARRAY"}(W||(W={})),function(e){e[e["RELATIVE"]=0]="RELATIVE",e[e["START_ABSOLUTE"]=1]="START_ABSOLUTE",e[e["BOTH_ABSOLUTE"]=2]="BOTH_ABSOLUTE"}(z||(z={}));const G=e=>({type:W.EMPTY,leadingWhitespace:null===e||void 0===e?void 0:e.image}),K=(e,t)=>({type:W.NUMBER,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),X=e=>{var t;return{type:W.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}},$=(e,t)=>({type:W.CELL_REFERENCE,reference:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),q=(e,t,n,r)=>(_e(e,t,n),{type:W.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}),J=(e,t,n,r)=>(_e(e,t,n),{type:W.COLUMN_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),Q=(e,t,n,r)=>(_e(e,t,n),{type:W.ROW_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:null===r||void 0===r?void 0:r.image}),Z=(e,t,n)=>({type:W.CONCATENATE_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ee=(e,t,n)=>({type:W.EQUALS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),te=(e,t,n)=>({type:W.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ne=(e,t,n)=>({type:W.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),re=(e,t,n)=>({type:W.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ie=(e,t,n)=>({type:W.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),se=(e,t,n)=>({type:W.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),oe=(e,t,n)=>({type:W.PLUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ae=(e,t,n)=>({type:W.MINUS_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),le=(e,t,n)=>({type:W.TIMES_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ue=(e,t,n)=>({type:W.DIV_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ce=(e,t,n)=>({type:W.POWER_OP,left:e,right:t,leadingWhitespace:null===n||void 0===n?void 0:n.image}),he=(e,t)=>({type:W.MINUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),de=(e,t)=>({type:W.PLUS_UNARY_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),me=(e,t)=>({type:W.PERCENT_OP,value:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),fe=(e,t,n,r,i)=>({type:W.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null===n||void 0===n?void 0:n.image,internalWhitespace:null===r||void 0===r?void 0:r.image,hyperlink:i}),pe=(e,t,n)=>({type:W.ARRAY,args:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),ge=(e,t)=>({type:W.NAMED_EXPRESSION,expressionName:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),ye=(e,t,n)=>({type:W.PARENTHESIS,expression:e,leadingWhitespace:null===t||void 0===t?void 0:t.image,internalWhitespace:null===n||void 0===n?void 0:n.image}),we=(e,t)=>({type:W.ERROR,error:e,leadingWhitespace:null===t||void 0===t?void 0:t.image}),be=(e,t,n)=>({type:W.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null===n||void 0===n?void 0:n.image}),ve=()=>({type:W.ERROR,error:lr.parsingError()});function _e(e,t,n){if(void 0!==e.sheet&&void 0===t.sheet||void 0===e.sheet&&void 0!==t.sheet)throw new Error("Start address inconsistent with end address");if(void 0===e.sheet&&n!==z.RELATIVE||void 0!==e.sheet&&n===z.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function Se(e,t){return(null!==t&&void 0!==t?t:"")+e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Ee={[W.PLUS_OP]:"+",[W.MINUS_OP]:"-",[W.TIMES_OP]:"*",[W.DIV_OP]:"/",[W.CONCATENATE_OP]:"&",[W.POWER_OP]:"^",[W.EQUALS_OP]:"=",[W.NOT_EQUAL_OP]:"<>",[W.GREATER_THAN_OP]:">",[W.GREATER_THAN_OR_EQUAL_OP]:">=",[W.LESS_THAN_OP]:"<",[W.LESS_THAN_OR_EQUAL_OP]:"<="},Ce=(e,t,n,r)=>({ast:e,relativeDependencies:t,hasVolatileFunction:n,hasStructuralChangeFunction:r});
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Me{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){const n=mt(t,this.functionRegistry),r=Ce(t,n,Te(t,this.functionRegistry.isFunctionVolatile),Te(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange));return this.cache.set(e,r),r}get(e){return this.cache.get(e)}maybeSetAndThenGet(e,t){const n=this.cache.get(e);return void 0!==n?n.ast:(this.set(e,t),t)}}const Te=(e,t)=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:case W.CELL_REFERENCE:case W.CELL_RANGE:case W.COLUMN_RANGE:case W.ROW_RANGE:case W.NAMED_EXPRESSION:return!1;case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return Te(e.value,t);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return Te(e.left,t)||Te(e.right,t);case W.PARENTHESIS:return Te(e.expression,t);case W.FUNCTION_CALL:return!!t(e.procedureName)||e.args.some(e=>Te(e,t));case W.ARRAY:return e.args.some(e=>e.some(e=>Te(e,t)))}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Re{}Re.DistinctSigns="Distinct signs.",Re.WrongArgNumber="Wrong number of arguments.",Re.EmptyArg="Empty function argument.",Re.EmptyArray="Empty array not allowed.",Re.ArrayDimensions="Array dimensions are not compatible.",Re.NoSpaceForArrayResult="No space for array result.",Re.ValueSmall="Value too small.",Re.ValueLarge="Value too large.",Re.BadCriterion="Incorrect criterion.",Re.RangeManySheets="Range spans more than one sheet.",Re.CellRangeExpected="Cell range expected.",Re.WrongDimension="Wrong range dimension.",Re.ScalarExpected="Cell range not allowed.",Re.NumberCoercion="Value cannot be coerced to number.",Re.NumberExpected="Number argument expected.",Re.IntegerExpected="Value needs to be an integer.",Re.BadMode="Mode not recognized.",Re.DateBounds="Date outside of bounds.",Re.OutOfSheet="Resulting reference is out of the sheet.",Re.WrongType="Wrong type of argument.",Re.NaN="NaN or infinite value encountered.",Re.EqualLength="Ranges need to be of equal length.",Re.Negative="Value cannot be negative.",Re.NotBinary="String does not represent a binary number.",Re.NotOctal="String does not represent an octal number.",Re.NotHex="String does not represent a hexadecimal number.",Re.EndStartPeriod="End period needs to be at least start period.",Re.CellRefExpected="Cell reference expected.",Re.EmptyRange="Empty range not allowed.",Re.BadRef="Address is not correct.",Re.NumberRange="Number-only range expected.",Re.ValueNotFound="Value not found.",Re.ValueBaseLarge="Value in base too large.",Re.ValueBaseSmall="Value in base too small.",Re.ValueBaseLong="Value in base too long.",Re.NegativeLength="Length cannot be negative.",Re.PatternNotFound="Pattern not found.",Re.OneValue="Needs at least one value.",Re.TwoValues="Range needs to contain at least two elements.",Re.ThreeValues="Range needs to contain at least three elements.",Re.IndexBounds="Index out of bounds.",Re.IndexLarge="Index too large.",Re.Formula="Expected formula.",Re.NegativeCount="Count cannot be negative.",Re.ParseError="Parsing error.",Re.SheetRef="Sheet does not exist.",Re.PeriodLong="Period number cannot exceed life length.",Re.InvalidDate="Invalid date.",Re.BitshiftLong="Result of bitshift is too long.",Re.EmptyString="Empty-string argument not allowed.",Re.LengthBounds="Length out of bounds.",Re.NegativeTime="Time cannot be negative.",Re.NoDefault="No default option.",Re.NoConditionMet="None of the conditions were met.",Re.Selector="Selector cannot exceed the number of arguments.",Re.StartEndDate="Start date needs to be earlier than end date.",Re.IncorrectDateTime="String does not represent correct DateTime.",Re.CharacterCodeBounds="Character code out of bounds.",Re.NonZero="Argument cannot be 0.",Re.LessThanOne="Argument cannot be less than 1.",Re.WeekendString="Incorrect weekend bitmask string.",Re.InvalidRoman="Invalid roman numeral.",Re.WrongOrder="Wrong order of values.",Re.ComplexNumberExpected="Complex number expected.",Re.ShouldBeIorJ="Should be 'i' or 'j'.",Re.SizeMismatch="Array dimensions mismatched.",Re.FunctionName=e=>`Function name ${e} not recognized.`,Re.NamedExpressionName=e=>`Named expression ${e} not recognized.`,Re.LicenseKey=e=>`License key is ${e}.`
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */;class Oe{constructor(){this.POSSIBLE_START_CHARACTERS=[...M,...C,c,"'","_"],this.cellReferenceRegexp=new RegExp(S,"y")}match(e,t){this.cellReferenceRegexp.lastIndex=t;const n=this.cellReferenceRegexp.exec(e+"@");return null==n||null==n[1]?null:(n[0]=n[1],n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ne{constructor(){this.POSSIBLE_START_CHARACTERS=[...M,"_"],this.namedExpressionRegexp=new RegExp(E,"y"),this.r1c1CellRefRegexp=new RegExp(`^${_}$`)}match(e,t){this.namedExpressionRegexp.lastIndex=t;const n=this.namedExpressionRegexp.exec(e);return null==n||null==n[0]||this.r1c1CellRefRegexp.test(n[0])?null:n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Ae=Object(U["createToken"])({name:"AdditionOp",pattern:U["Lexer"].NA}),Le=Object(U["createToken"])({name:"PlusOp",pattern:/\+/,categories:Ae}),Ie=Object(U["createToken"])({name:"MinusOp",pattern:/-/,categories:Ae}),ke=Object(U["createToken"])({name:"MultiplicationOp",pattern:U["Lexer"].NA}),xe=Object(U["createToken"])({name:"TimesOp",pattern:/\*/,categories:ke}),De=Object(U["createToken"])({name:"DivOp",pattern:/\//,categories:ke}),He=Object(U["createToken"])({name:"PowerOp",pattern:/\^/}),Pe=Object(U["createToken"])({name:"PercentOp",pattern:/%/}),je=Object(U["createToken"])({name:"BooleanOp",pattern:U["Lexer"].NA}),Fe=Object(U["createToken"])({name:"EqualsOp",pattern:/=/,categories:je}),Ye=Object(U["createToken"])({name:"NotEqualOp",pattern:/<>/,categories:je}),Ue=Object(U["createToken"])({name:"GreaterThanOp",pattern:/>/,categories:je}),Ve=Object(U["createToken"])({name:"LessThanOp",pattern:/</,categories:je}),Be=Object(U["createToken"])({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:je}),We=Object(U["createToken"])({name:"LessThanOrEqualOp",pattern:/<=/,categories:je}),ze=Object(U["createToken"])({name:"ConcatenateOp",pattern:/&/}),Ge=Object(U["createToken"])({name:"LParen",pattern:/\(/}),Ke=Object(U["createToken"])({name:"RParen",pattern:/\)/}),Xe=Object(U["createToken"])({name:"ArrayLParen",pattern:/{/}),$e=Object(U["createToken"])({name:"ArrayRParen",pattern:/}/}),qe=Object(U["createToken"])({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),Je=Object(U["createToken"])({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),Qe=Object(U["createToken"])({name:"RangeSeparator",pattern:new RegExp(u)}),Ze=Object(U["createToken"])({name:"ColumnRange",pattern:new RegExp(`${b}${u}${b}`)}),et=Object(U["createToken"])({name:"RowRange",pattern:new RegExp(`${v}${u}${v}`)}),tt=Object(U["createToken"])({name:"ProcedureName",pattern:new RegExp(`([${m}][${f}]*)\\(`)}),nt=new Oe,rt=Object(U["createToken"])({name:"CellReference",pattern:nt.match.bind(nt),start_chars_hint:nt.POSSIBLE_START_CHARACTERS,line_breaks:!1}),it=new Ne,st=Object(U["createToken"])({name:"NamedExpression",pattern:it.match.bind(it),start_chars_hint:it.POSSIBLE_START_CHARACTERS,line_breaks:!1}),ot=e=>{const t=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,r=e.translationPackage.buildFunctionMapping(),i=new RegExp("standard"===e.ignoreWhiteSpace?d:h),s=Object(U["createToken"])({name:"WhiteSpace",pattern:i}),o=Object(U["createToken"])({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),a=Object(U["createToken"])({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),l=Object(U["createToken"])({name:"NumberLiteral",pattern:new RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=Object(U["createToken"])({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});let c,m;e.functionArgSeparator===e.arrayColumnSeparator?(c=a,m=[]):e.functionArgSeparator===e.arrayRowSeparator?(c=o,m=[]):(c=Object(U["createToken"])({name:"ArgSeparator",pattern:e.functionArgSeparator}),m=[c]);const f=[s,Le,Ie,xe,De,He,Fe,Ye,Pe,Be,We,Ue,Ve,Ge,Ke,Xe,$e,u,tt,Qe,...m,Ze,et,l,qe,Je,ze,je,Ae,ke,rt,st,o,a];return{ArgSeparator:c,NumberLiteral:l,OffsetProcedureName:u,ArrayRowSeparator:o,ArrayColSeparator:a,WhiteSpace:s,allTokens:f,errorMapping:n,functionMapping:r,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class at extends U["EmbeddedActionsParser"]{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",()=>this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:Object(U["EMPTY_ALT"])(G())}])),this.procedureExpression=this.RULE("procedureExpression",()=>{var e;const t=this.CONSUME(tt),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=this.lexerConfig.functionMapping[n])&&void 0!==e?e:n,i=[];let s=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY(()=>{var e;const t=this.CONSUME(this.lexerConfig.ArgSeparator);s.type===W.EMPTY&&(s.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),i.push(s),s=this.SUBRULE2(this.booleanExpressionOrEmpty)}),i.push(s),1===i.length&&i[0].type===W.EMPTY&&(i.length=0);const o=this.CONSUME(Ke);return fe(r,i,t.leadingWhitespace,o.leadingWhitespace)}),this.namedExpressionExpression=this.RULE("namedExpressionExpression",()=>{const e=this.CONSUME(st);return ge(e.image,e.leadingWhitespace)}),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",()=>{const e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(Ge),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(Ke),this.handleOffsetHeuristic(e)}),this.columnRangeExpression=this.RULE("columnRangeExpression",()=>{const e=this.CONSUME(Ze),[t,n]=e.image.split(":"),r=this.ACTION(()=>L(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>L(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return we(new lr(Vn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return be(e.image,new lr(Vn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return J(s,o,a,e.leadingWhitespace)}),this.rowRangeExpression=this.RULE("rowRangeExpression",()=>{const e=this.CONSUME(et),[t,n]=e.image.split(":"),r=this.ACTION(()=>I(this.sheetMapping,t,this.formulaAddress)),i=this.ACTION(()=>I(this.sheetMapping,n,this.formulaAddress));if(void 0===r||void 0===i)return we(new lr(Vn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return be(e.image,new lr(Vn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==i.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:s,secondEnd:o,sheetRefType:a}=at.fixSheetIdsForRangeEnds(r,i);return Q(s,o,a,e.leadingWhitespace)}),this.cellReference=this.RULE("cellReference",()=>{const e=this.CONSUME(rt),t=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress));return void 0===t?be(e.image,new lr(Vn.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?be(e.image,new lr(Vn.NAME),e.leadingWhitespace):$(t,e.leadingWhitespace)}),this.endRangeReference=this.RULE("endRangeReference",e=>{var t;const n=this.CONSUME(rt),r=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress)),i=this.ACTION(()=>A(this.sheetMapping,n.image,this.formulaAddress));return void 0===r||void 0===i?this.ACTION(()=>be(`${e.image}:${n.image}`,new lr(Vn.REF),e.leadingWhitespace)):r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||i.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION(()=>be(`${e.image}:${n.image}`,new lr(Vn.NAME),e.leadingWhitespace)):this.buildCellRange(r,i,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image)}),this.endOfRangeExpression=this.RULE("endOfRangeExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeReference,{ARGS:[e]})},{ALT:()=>{var t;const n=this.SUBRULE(this.offsetProcedureExpression),r=this.ACTION(()=>A(this.sheetMapping,e.image,this.formulaAddress));return void 0===r?we(new lr(Vn.REF)):n.type===W.CELL_REFERENCE?this.buildCellRange(r,n.reference,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image):this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.cellRangeExpression=this.RULE("cellRangeExpression",()=>{const e=this.CONSUME(rt);return this.CONSUME2(Qe),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})}),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",e=>{const t=this.CONSUME(rt),n=this.ACTION(()=>A(this.sheetMapping,t.image,this.formulaAddress));return void 0===n?this.ACTION(()=>we(new lr(Vn.REF))):this.buildCellRange(e.reference,n,e.leadingWhitespace)}),this.endOfRangeWithOffsetStartExpression=this.RULE("endOfRangeWithOffsetStartExpression",e=>this.OR([{ALT:()=>this.SUBRULE(this.endRangeWithOffsetStartReference,{ARGS:[e]})},{ALT:()=>{const t=this.SUBRULE(this.offsetProcedureExpression);return t.type===W.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here")}}])),this.offsetExpression=this.RULE("offsetExpression",()=>{const e=this.SUBRULE(this.offsetProcedureExpression);let t;return this.OPTION(()=>{this.CONSUME(Qe),t=e.type===W.CELL_RANGE?this.parsingError(B.RangeOffsetNotAllowed,"Range offset not allowed here"):this.SUBRULE(this.endOfRangeWithOffsetStartExpression,{ARGS:[e]})}),void 0!==t?t:e}),this.insideArrayExpression=this.RULE("insideArrayExpression",()=>{const e=[[]];return e[e.length-1].push(this.SUBRULE(this.booleanExpression)),this.MANY(()=>{this.OR([{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayColSeparator),e[e.length-1].push(this.SUBRULE2(this.booleanExpression))}},{ALT:()=>{this.CONSUME(this.lexerConfig.ArrayRowSeparator),e.push([]),e[e.length-1].push(this.SUBRULE3(this.booleanExpression))}}])}),pe(e)}),this.parenthesisExpression=this.RULE("parenthesisExpression",()=>{const e=this.CONSUME(Ge),t=this.SUBRULE(this.booleanExpression),n=this.CONSUME(Ke);return ye(t,e.leadingWhitespace,n.leadingWhitespace)}),this.arrayExpression=this.RULE("arrayExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(Xe),t=this.SUBRULE(this.insideArrayExpression),n=this.CONSUME($e);return pe(t.args,e.leadingWhitespace,n.leadingWhitespace)}},{ALT:()=>this.SUBRULE(this.parenthesisExpression)}])),this.numericStringToNumber=e=>{const t=e.replace(this.lexerConfig.decimalSeparator,".");return Number(t)},this.positiveAtomicExpression=this.RULE("positiveAtomicExpression",()=>{var e;return this.OR(null!==(e=this.atomicExpCache)&&void 0!==e?e:this.atomicExpCache=[{ALT:()=>this.SUBRULE(this.arrayExpression)},{ALT:()=>this.SUBRULE(this.cellRangeExpression)},{ALT:()=>this.SUBRULE(this.columnRangeExpression)},{ALT:()=>this.SUBRULE(this.rowRangeExpression)},{ALT:()=>this.SUBRULE(this.offsetExpression)},{ALT:()=>this.SUBRULE(this.cellReference)},{ALT:()=>this.SUBRULE(this.procedureExpression)},{ALT:()=>this.SUBRULE(this.namedExpressionExpression)},{ALT:()=>{const e=this.CONSUME(this.lexerConfig.NumberLiteral);return K(this.numericStringToNumber(e.image),e.leadingWhitespace)}},{ALT:()=>{const e=this.CONSUME(qe);return X(e)}},{ALT:()=>{const e=this.CONSUME(Je),t=e.image.toUpperCase(),n=this.lexerConfig.errorMapping[t];return n?we(new lr(n),e.leadingWhitespace):this.parsingError(B.ParserError,"Unknown error literal")}}])}),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",()=>{const e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION(()=>this.CONSUME(Pe));return t?me(e,t.leadingWhitespace):e}),this.atomicExpression=this.RULE("atomicExpression",()=>this.OR([{ALT:()=>{const e=this.CONSUME(Ae),t=this.SUBRULE(this.atomicExpression);return Object(U["tokenMatcher"])(e,Le)?de(t,e.leadingWhitespace):Object(U["tokenMatcher"])(e,Ie)?he(t,e.leadingWhitespace):(this.customParsingError=V(B.ParserError,"Mismatched token type"),this.customParsingError)}},{ALT:()=>this.SUBRULE2(this.rightUnaryOpAtomicExpression)}])),this.powerExpression=this.RULE("powerExpression",()=>{let e=this.SUBRULE(this.atomicExpression);return this.MANY(()=>{const t=this.CONSUME(He),n=this.SUBRULE2(this.atomicExpression);Object(U["tokenMatcher"])(t,He)?e=ce(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.multiplicationExpression=this.RULE("multiplicationExpression",()=>{let e=this.SUBRULE(this.powerExpression);return this.MANY(()=>{const t=this.CONSUME(ke),n=this.SUBRULE2(this.powerExpression);Object(U["tokenMatcher"])(t,xe)?e=le(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,De)?e=ue(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.additionExpression=this.RULE("additionExpression",()=>{let e=this.SUBRULE(this.multiplicationExpression);return this.MANY(()=>{const t=this.CONSUME(Ae),n=this.SUBRULE2(this.multiplicationExpression);Object(U["tokenMatcher"])(t,Le)?e=oe(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ie)?e=ae(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.concatenateExpression=this.RULE("concatenateExpression",()=>{let e=this.SUBRULE(this.additionExpression);return this.MANY(()=>{const t=this.CONSUME(ze),n=this.SUBRULE2(this.additionExpression);e=Z(e,n,t.leadingWhitespace)}),e}),this.booleanExpression=this.RULE("booleanExpression",()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY(()=>{const t=this.CONSUME(je),n=this.SUBRULE2(this.concatenateExpression);Object(U["tokenMatcher"])(t,Fe)?e=ee(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ye)?e=te(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ue)?e=ne(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Ve)?e=re(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,Be)?e=ie(e,n,t.leadingWhitespace):Object(U["tokenMatcher"])(t,We)?e=se(e,n,t.leadingWhitespace):this.ACTION(()=>{throw Error("Operator not supported")})}),e}),this.formula=this.RULE("formula",()=>(this.CONSUME(Fe),this.SUBRULE(this.booleanExpression))),this.lexerConfig=e,this.sheetMapping=t,this.formulaAddress=mr(0,0,0),this.performSelfAnalysis()}parseFromTokens(e,t){this.input=e;let n=this.formulaWithContext(t),r=[];return this.customParsingError&&r.push(this.customParsingError),r=r.concat(this.errors.map(e=>({type:B.ParserError,message:e.message}))),r.length>0&&(n=ve()),{ast:n,errors:r}}reset(){super.reset(),this.customParsingError=void 0}formulaWithContext(e){return this.formulaAddress=e,this.formula()}buildCellRange(e,t,n){if(void 0===e.sheet&&void 0!==t.sheet)return this.parsingError(B.ParserError,"Malformed range expression");const{firstEnd:r,secondEnd:i,sheetRefType:s}=at.fixSheetIdsForRangeEnds(e,t);return q(r,i,s,n)}static fixSheetIdsForRangeEnds(e,t){const n=at.rangeSheetReferenceType(e.sheet,t.sheet),r=void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t;return{firstEnd:e,secondEnd:r,sheetRefType:n}}handleOffsetHeuristic(e){const t=e[0];if(t.type!==W.CELL_REFERENCE)return this.parsingError(B.StaticOffsetError,"First argument to OFFSET is not a reference");const n=e[1];let r;if(n.type===W.NUMBER&&Number.isInteger(n.value))r=n.value;else if(n.type===W.PLUS_UNARY_OP&&n.value.type===W.NUMBER&&Number.isInteger(n.value.value))r=n.value.value;else{if(n.type!==W.MINUS_UNARY_OP||n.value.type!==W.NUMBER||!Number.isInteger(n.value.value))return this.parsingError(B.StaticOffsetError,"Second argument to OFFSET is not a static number");r=-n.value.value}const s=e[2];let o;if(s.type===W.NUMBER&&Number.isInteger(s.value))o=s.value;else if(s.type===W.PLUS_UNARY_OP&&s.value.type===W.NUMBER&&Number.isInteger(s.value.value))o=s.value.value;else{if(s.type!==W.MINUS_UNARY_OP||s.value.type!==W.NUMBER||!Number.isInteger(s.value.value))return this.parsingError(B.StaticOffsetError,"Third argument to OFFSET is not a static number");o=-s.value.value}const a=e[3];let u;if(void 0===a)u=1;else{if(a.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if(u=a.value,u<1)return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(u))return this.parsingError(B.StaticOffsetError,"Fourth argument to OFFSET is not integer")}const c=e[4];let h;if(void 0===c)h=1;else{if(c.type!==W.NUMBER)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if(h=c.value,h<1)return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(h))return this.parsingError(B.StaticOffsetError,"Fifth argument to OFFSET is not integer")}const d=new l(t.reference.col+o,t.reference.row+r,t.reference.type);let m=d.col,f=d.row;if(t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_COL||(f+=this.formulaAddress.row),t.reference.type!==i.CELL_REFERENCE_RELATIVE&&t.reference.type!==i.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||f<0)return we(new lr(Vn.REF,Re.OutOfSheet));if(1===h&&1===u)return $(d);{const e=new l(d.col+h-1,d.row+u-1,d.type);return q(d,e,z.RELATIVE)}}parsingError(e,t){return this.customParsingError=V(e,t),ve()}static rangeSheetReferenceType(e,t){return void 0===e?z.RELATIVE:void 0===t?z.START_ABSOLUTE:z.BOTH_ABSOLUTE}}class lt{constructor(e){this.lexerConfig=e,this.lexer=new U["Lexer"](e.allTokens,{ensureOptimizations:!0})}tokenizeFormula(e){const t=this.lexer.tokenize(e);let n=t.tokens;return n=this.trimTrailingWhitespaces(n),n=this.skipWhitespacesInsideRanges(n),n=this.skipWhitespacesBeforeArgSeparators(n),t.tokens=n,t}skipWhitespacesInsideRanges(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>(Object(U["tokenMatcher"])(e,rt)||Object(U["tokenMatcher"])(e,Qe))&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&(Object(U["tokenMatcher"])(n,rt)||Object(U["tokenMatcher"])(n,Qe)))}skipWhitespacesBeforeArgSeparators(e){return lt.filterTokensByNeighbors(e,(e,t,n)=>!Object(U["tokenMatcher"])(e,this.lexerConfig.ArgSeparator)&&Object(U["tokenMatcher"])(t,this.lexerConfig.WhiteSpace)&&Object(U["tokenMatcher"])(n,this.lexerConfig.ArgSeparator))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let n=0;const r=[e[n++]];while(n<e.length-1)t(e[n-1],e[n],e[n+1])||r.push(e[n]),++n;return r.push(e[n]),r}trimTrailingWhitespaces(e){return e.length>0&&Object(U["tokenMatcher"])(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ut{constructor(e,t,n,r){this.config=e,this.lexerConfig=t,this.sheetMappingFn=n,this.namedExpressions=r}unparse(e,t){return"="+this.unparseAst(e,t)}unparseAst(e,t){var n,r;switch(e.type){case W.EMPTY:return Se("",e.leadingWhitespace);case W.NUMBER:return Se(ct(e.value,this.config.decimalSeparator),e.leadingWhitespace);case W.STRING:return Se('"'+e.value+'"',e.leadingWhitespace);case W.FUNCTION_CALL:{const n=e.args.map(e=>void 0!==e?this.unparseAst(e,t):"").join(this.config.functionArgSeparator),r=this.config.translationPackage.isFunctionTranslated(e.procedureName)?this.config.translationPackage.getFunctionTranslation(e.procedureName):e.procedureName,i=r+"("+n+Se(")",e.internalWhitespace);return Se(i,e.leadingWhitespace)}case W.NAMED_EXPRESSION:{const r=null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName;return Se(r||e.expressionName,e.leadingWhitespace)}case W.CELL_REFERENCE:{let n;return n=void 0!==e.reference.sheet?this.unparseSheetName(e.reference.sheet)+"!":"",n+=null!==(r=e.reference.unparse(t))&&void 0!==r?r:this.config.translationPackage.getErrorTranslation(Vn.REF),Se(n,e.leadingWhitespace)}case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:return Se(this.formatRange(e,t),e.leadingWhitespace);case W.PLUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return Se("+",e.leadingWhitespace)+n}case W.MINUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return Se("-",e.leadingWhitespace)+n}case W.PERCENT_OP:return this.unparseAst(e.value,t)+Se("%",e.leadingWhitespace);case W.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Vn.ERROR);return Se(t,e.leadingWhitespace)}case W.ERROR_WITH_RAW_INPUT:return Se(e.rawInput,e.leadingWhitespace);case W.PARENTHESIS:{const n=this.unparseAst(e.expression,t),r="("+n+Se(")",e.internalWhitespace);return Se(r,e.leadingWhitespace)}case W.ARRAY:{const n="{"+e.args.map(e=>e.map(e=>this.unparseAst(e,t)).join(this.config.arrayColumnSeparator)).join(this.config.arrayRowSeparator)+Se("}",e.internalWhitespace);return Se(n,e.leadingWhitespace)}default:{const n=this.unparseAst(e.left,t),r=this.unparseAst(e.right,t);return n+Se(Ee[e.type],e.leadingWhitespace)+r}}}unparseSheetName(e){const t=F(e,this.sheetMappingFn);if(void 0===t)throw new Vt(e);return t}formatRange(e,t){let n="",r="";void 0!==e.start.sheet&&e.sheetReferenceType!==z.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===z.BOTH_ABSOLUTE&&(r=this.unparseSheetName(e.end.sheet)+"!");const i=e.start.unparse(t),s=e.end.unparse(t);return void 0===i||void 0===s?this.config.translationPackage.getErrorTranslation(Vn.REF):`${n}${i}:${r}${s}`}}function ct(e,t){const n=e.toString();return n.replace(".",t)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ht{constructor(e,t,n){this.config=e,this.functionRegistry=t,this.sheetMapping=n,this.statsCacheUsed=0,this.lexerConfig=ot(e),this.lexer=new lt(this.lexerConfig),this.formulaParser=new at(this.lexerConfig,this.sheetMapping),this.cache=new Me(this.functionRegistry)}parse(e,t){this.formulaAddress=t;const n=this.tokenizeFormula(e);if(n.errors.length>0){const e=n.errors.map(e=>({type:B.LexingError,message:e.message}));return{ast:ve(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}const r=this.computeHashFromTokens(n.tokens,t);let i=this.cache.get(r);if(void 0!==i)++this.statsCacheUsed;else{const e=this.bindWhitespacesToTokens(n.tokens),s=this.formulaParser.parseFromTokens(e,t);if(s.errors.length>0)return Object.assign(Object.assign({},s),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});i=this.cache.set(r,s.ast)}const{ast:s,hasVolatileFunction:o,hasStructuralChangeFunction:a}=i,l=this.convertReversedRangesToRegularRanges(s),u=mt(l,this.functionRegistry);return{ast:l,errors:[],hasVolatileFunction:o,hasStructuralChangeFunction:a,dependencies:u}}convertReversedRangesToRegularRanges(e){switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:case W.CELL_REFERENCE:case W.NAMED_EXPRESSION:return e;case W.CELL_RANGE:{const{start:t,end:n}=e,r=this.orderCellRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.COLUMN_RANGE:{const{start:t,end:n}=e,r=this.orderColumnRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.ROW_RANGE:{const{start:t,end:n}=e,r=this.orderRowRangeEnds(t,n);return Object.assign(Object.assign({},e),{start:r.start,end:r.end})}case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:{const t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:{const t=this.convertReversedRangesToRegularRanges(e.left),n=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:n})}case W.PARENTHESIS:{const t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case W.FUNCTION_CALL:{const t=e.args.map(e=>this.convertReversedRangesToRegularRanges(e));return Object.assign(Object.assign({},e),{args:t})}case W.ARRAY:{const t=e.args.map(e=>e.map(e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}}}orderCellRangeEnds(e,t){const n=[e,t],[r,i]=n.map(e=>e.toColumnAddress()).sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,u]=n.map(e=>e.toRowAddress()).sort(a.compareByAbsoluteAddress(this.formulaAddress)),[c,h]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:l.fromColAndRow(r,s,c),end:l.fromColAndRow(i,u,h)}}orderColumnRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(o.compareByAbsoluteAddress(this.formulaAddress)),[s,a]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new o(r.type,r.col,s),end:new o(i.type,i.col,a)}}orderRowRangeEnds(e,t){const n=[e,t],[r,i]=n.sort(a.compareByAbsoluteAddress(this.formulaAddress)),[s,o]=n.map(e=>e.sheet).sort(ht.compareSheetIds.bind(this));return{start:new a(r.type,r.row,s),end:new a(i.type,i.row,o)}}static compareSheetIds(e,t){return e=null!=e?e:1/0,t=null!=t?t:1/0,e-t}fetchCachedResultForAst(e){const t=this.computeHashFromAst(e);return this.fetchCachedResult(t)}fetchCachedResult(e){const t=this.cache.get(e);if(void 0===t)throw new Error("There is no AST with such key in the cache");{const{ast:e,hasVolatileFunction:n,hasStructuralChangeFunction:r,relativeDependencies:i}=t;return{ast:e,errors:[],hasVolatileFunction:n,hasStructuralChangeFunction:r,dependencies:i}}}computeHashFromTokens(e,t){var n;let r="",i=0;while(i<e.length){const s=e[i];if(Object(U["tokenMatcher"])(s,rt)){const e=A(this.sheetMapping,s.image,t);r=void 0===e?r.concat(s.image):r.concat(e.hash(!0))}else if(Object(U["tokenMatcher"])(s,tt)){const e=s.image.toUpperCase().slice(0,-1),t=null!==(n=this.lexerConfig.functionMapping[e])&&void 0!==n?n:e;r=r.concat(t,"(")}else if(Object(U["tokenMatcher"])(s,Ze)){const[e,n]=s.image.split(":"),i=L(this.sheetMapping,e,t),o=L(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else if(Object(U["tokenMatcher"])(s,et)){const[e,n]=s.image.split(":"),i=I(this.sheetMapping,e,t),o=I(this.sheetMapping,n,t);r=void 0===i||void 0===o?r.concat("!REF"):r.concat(i.hash(!0),":",o.hash(!0))}else r=r.concat(s.image);i++}return r}rememberNewAst(e){const t=this.computeHashFromAst(e);return this.cache.maybeSetAndThenGet(t,e)}computeHashFromAst(e){return"="+this.computeHashOfAstNode(e)}computeHashOfAstNode(e){switch(e.type){case W.EMPTY:return e.leadingWhitespace||"";case W.NUMBER:return Se(ct(e.value,this.config.decimalSeparator),e.leadingWhitespace);case W.STRING:return Se('"'+e.value+'"',e.leadingWhitespace);case W.NAMED_EXPRESSION:return Se(e.expressionName,e.leadingWhitespace);case W.FUNCTION_CALL:{const t=e.args.map(e=>this.computeHashOfAstNode(e)).join(this.config.functionArgSeparator),n=e.procedureName+"("+t+Se(")",e.internalWhitespace);return Se(n,e.leadingWhitespace)}case W.CELL_REFERENCE:return Se(e.reference.hash(!0),e.leadingWhitespace);case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:{const t=e.start.hash(e.sheetReferenceType!==z.RELATIVE),n=e.end.hash(e.sheetReferenceType===z.BOTH_ABSOLUTE);return Se(t+":"+n,e.leadingWhitespace)}case W.MINUS_UNARY_OP:return Se("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case W.PLUS_UNARY_OP:return Se("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case W.PERCENT_OP:return this.computeHashOfAstNode(e.value)+Se("%",e.leadingWhitespace);case W.ERROR:{const t=this.config.translationPackage.getErrorTranslation(e.error?e.error.type:Vn.ERROR);return Se(t,e.leadingWhitespace)}case W.ERROR_WITH_RAW_INPUT:return Se(e.rawInput,e.leadingWhitespace);case W.ARRAY:{const t=e.args.map(e=>e.map(e=>this.computeHashOfAstNode(e)).join(",")).join(";");return Se("{"+t+Se("}",e.internalWhitespace),e.leadingWhitespace)}case W.PARENTHESIS:{const t=this.computeHashOfAstNode(e.expression),n="("+t+Se(")",e.internalWhitespace);return Se(n,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+Se(Ee[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){const t=[],n=e[0];Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace)||t.push(n);for(let r=1;r<e.length;++r){const n=e[r];if(Object(U["tokenMatcher"])(n,this.lexerConfig.WhiteSpace))continue;const i=e[r-1];Object(U["tokenMatcher"])(i,this.lexerConfig.WhiteSpace)&&(n.leadingWhitespace=i),t.push(n)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const dt=(e,t,n,r)=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:return;case W.NAMED_EXPRESSION:return void(r&&n.push(new wt(e.expressionName)));case W.CELL_REFERENCE:return void(r&&n.push(new ft(e.reference)));case W.CELL_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new pt(e.start,e.end)));case W.COLUMN_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new gt(e.start,e.end)));case W.ROW_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new yt(e.start,e.end)));case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return void dt(e.value,t,n,!0);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return dt(e.left,t,n,!0),void dt(e.right,t,n,!0);case W.PARENTHESIS:return void dt(e.expression,t,n,r);case W.FUNCTION_CALL:{const r=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);return void e.args.forEach(e=>dt(e,t,n,r))}}},mt=(e,t)=>{const n=new Array;return dt(e,t,n,!0),n};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ft{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class pt{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new Er(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class gt{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new Cr(t.sheet,t.col,n.col)}}class yt{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new Mr(t.sheet,t.row,n.row)}}class wt{constructor(e){this.name=e}absolutize(e){return this}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const bt=(e,t)=>e.map(e=>e.absolutize(t)),vt=e=>e.filter(e=>e instanceof wt||(e instanceof Er?!(fr(e.start)||fr(e.end)):!fr(e))),_t=Symbol("Empty value");function St(e){return e instanceof Et?e.val:e}class Et{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function Ct(e,t){if("number"===typeof e)return t;{const n=e.fromNumber(t);return n.format=e.format,n}}class Mt extends Et{getDetailedType(){return Lt.NUMBER_DATE}}class Tt extends Et{getDetailedType(){return Lt.NUMBER_CURRENCY}}class Rt extends Et{getDetailedType(){return Lt.NUMBER_TIME}}class Ot extends Et{getDetailedType(){return Lt.NUMBER_DATETIME}}class Nt extends Et{getDetailedType(){return Lt.NUMBER_PERCENT}}function At(e){return"number"===typeof e||e instanceof Et}var Lt,It;function kt(e){return e instanceof Et?e.getDetailedType():Lt.NUMBER_RAW}function xt(e){return e instanceof Et?e.format:void 0}function Dt(e){return e instanceof Et?{type:e.getDetailedType(),format:e.format}:{type:Lt.NUMBER_RAW}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["NUMBER_RAW"]="NUMBER_RAW",e["NUMBER_DATE"]="NUMBER_DATE",e["NUMBER_TIME"]="NUMBER_TIME",e["NUMBER_DATETIME"]="NUMBER_DATETIME",e["NUMBER_CURRENCY"]="NUMBER_CURRENCY",e["NUMBER_PERCENT"]="NUMBER_PERCENT"})(Lt||(Lt={}));class Ht{constructor(e,t,n,r){this._data=e,this.range=t,this.dependencyGraph=n,this._hasOnlyNumbers=r,this.size=void 0===e?new ei(t.effectiveWidth(n),t.effectiveHeight(n)):new ei(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,n){return new Ht(e,t,n,!0)}static onlyNumbers(e){return new Ht(e,void 0,void 0,!0)}static onlyValues(e){return new Ht(e,void 0,void 0,void 0)}static onlyRange(e,t){return new Ht(void 0,e,t,void 0)}static fromScalar(e){return new Ht([[e]],void 0,void 0,void 0)}isAdHoc(){return void 0===this.range}width(){return this.size.width}height(){return this.size.height}valuesFromTopLeftCorner(){this.ensureThatComputed();const e=[];for(let t=0;t<this._data.length;t++)for(let n=0;n<this._data[0].length;n++)e.push(this._data[t][n]);return e}*effectiveAddressesFromData(e){for(let t=0;t<this.data.length;++t){const n=this.data[t];for(let r=0;r<n.length;++r)yield mr(e.sheet,e.col+r,e.row+t)}}*entriesFromTopLeftCorner(e){this.ensureThatComputed();for(let t=0;t<this.size.height;++t)for(let n=0;n<this.size.width;++n)yield[this._data[t][n],mr(e.sheet,e.col+n,e.row+t)]}*iterateValuesFromTopLeftCorner(){yield*this.valuesFromTopLeftCorner()}numberOfElements(){return this.size.width*this.size.height}hasOnlyNumbers(){if(void 0===this._hasOnlyNumbers){this._hasOnlyNumbers=!0;for(const e of this.data)for(const t of e)if("number"!==typeof t)return this._hasOnlyNumbers=!1,!1}return this._hasOnlyNumbers}rawNumbers(){return this._data}rawData(){var e;return this.ensureThatComputed(),null!==(e=this._data)&&void 0!==e?e:[]}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}ensureThatComputed(){void 0===this._data&&(this._hasOnlyNumbers=!0,this._data=this.range.addressesArrayMap(this.dependencyGraph,e=>{const t=this.dependencyGraph.getCellValue(e);return t instanceof Ht?(this._hasOnlyNumbers=!1,new lr(Vn.VALUE,Re.ScalarExpected)):(At(t)||(this._hasOnlyNumbers=!1),t)}))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Pt{constructor(){this.changes=new Map}static empty(){return new Pt}addAll(e){for(const t of e.changes.values())this.add(t.address,t);return this}addChange(e,t,n){this.addInterpreterValue(e,t,n)}exportChanges(e){let t=[];return this.changes.forEach(n=>{const r=e.exportChange(n);Array.isArray(r)?t=t.concat(r):t.push(r)}),t}getChanges(){return Array.from(this.changes.values())}isEmpty(){return 0===this.changes.size}add(e,t){const n=t.value;if(n instanceof Ht)for(const r of n.effectiveAddressesFromData(e))this.changes.delete(gr(r));this.changes.set(gr(e),t)}addInterpreterValue(e,t,n){this.add(t,{address:t,value:e,oldValue:n})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class jt{constructor(e,t,n){if(this.sheet=e,this.rowStart=t,this.rowEnd=n,t<0)throw Error("Starting row cant be less than 0");if(n<t)throw Error("Row span cant end before start")}get numberOfRows(){return this.rowEnd-this.rowStart+1}get start(){return this.rowStart}get end(){return this.rowEnd}static fromNumberOfRows(e,t,n){return new jt(e,t,t+n-1)}static fromRowStartAndEnd(e,t,n){return new jt(e,t,n)}*rows(){for(let e=this.rowStart;e<=this.rowEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.rowStart,e.rowStart),n=Math.min(this.rowEnd,e.rowEnd);return t>n?null:new jt(this.sheet,t,n)}firstRow(){return new jt(this.sheet,this.rowStart,this.rowStart)}}class Ft{constructor(e,t,n){if(this.sheet=e,this.columnStart=t,this.columnEnd=n,t<0)throw Error("Starting column cant be less than 0");if(n<t)throw Error("Column span cant end before start")}get numberOfColumns(){return this.columnEnd-this.columnStart+1}get start(){return this.columnStart}get end(){return this.columnEnd}static fromNumberOfColumns(e,t,n){return new Ft(e,t,t+n-1)}static fromColumnStartAndEnd(e,t,n){return new Ft(e,t,n)}*columns(){for(let e=this.columnStart;e<=this.columnEnd;++e)yield e}intersect(e){if(this.sheet!==e.sheet)throw Error("Can't intersect spans from different sheets");const t=Math.max(this.columnStart,e.columnStart),n=Math.min(this.columnEnd,e.columnEnd);return t>n?null:new Ft(this.sheet,t,n)}firstColumn(){return new Ft(this.sheet,this.columnStart,this.columnStart)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["BUILD_ENGINE_TOTAL"]="BUILD_ENGINE_TOTAL",e["PARSER"]="PARSER",e["GRAPH_BUILD"]="GRAPH_BUILD",e["COLLECT_DEPENDENCIES"]="COLLECT_DEPENDENCIES",e["PROCESS_DEPENDENCIES"]="PROCESS_DEPENDENCIES",e["TOP_SORT"]="TOP_SORT",e["BUILD_COLUMN_INDEX"]="BUILD_COLUMN_INDEX",e["EVALUATION"]="EVALUATION",e["VLOOKUP"]="VLOOKUP",e["TRANSFORM_ASTS"]="TRANSFORM_ASTS",e["TRANSFORM_ASTS_POSTPONED"]="TRANSFORM_ASTS_POSTPONED",e["ADJUSTING_ADDRESS_MAPPING"]="ADJUSTING_ADDRESS_MAPPING",e["ADJUSTING_ARRAY_MAPPING"]="ADJUSTING_ARRAY_MAPPING",e["ADJUSTING_RANGES"]="ADJUSTING_RANGES",e["ADJUSTING_GRAPH"]="ADJUSTING_GRAPH",e["CRITERION_FUNCTION_FULL_CACHE_USED"]="CRITERION_FUNCTION_FULL_CACHE_USED",e["CRITERION_FUNCTION_PARTIAL_CACHE_USED"]="CRITERION_FUNCTION_PARTIAL_CACHE_USED"})(It||(It={}));
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Yt{constructor(){this.stats=new Map([[It.CRITERION_FUNCTION_FULL_CACHE_USED,0],[It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;const t=(null!==(e=this.stats.get(It.CRITERION_FUNCTION_FULL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(It.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;const t=(null!==(e=this.stats.get(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(It.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(It.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0)}start(e){if(this.startTimes.get(e))throw Error(`Statistics ${e} already started`);this.startTimes.set(e,Date.now())}end(e){var t;const n=Date.now(),r=this.startTimes.get(e);if(!r)throw Error(`Statistics ${e} not started`);{let i=null!==(t=this.stats.get(e))&&void 0!==t?t:0;i+=n-r,this.stats.set(e,i),this.startTimes.delete(e)}}measure(e,t){this.start(e);const n=t();return this.end(e),n}snapshot(){return new Map(this.stats)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ut extends Yt{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vt extends Error{constructor(e){super("There's no sheet with id = "+e)}}class Bt extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class Wt extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class zt extends Error{constructor(){super("Sheet size limit exceeded")}}class Gt extends Error{constructor(){super("This is not a formula")}}class Kt extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class Xt extends Error{constructor(e){super("Invalid arguments, expected "+e)}}class $t extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class qt extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class Jt extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class Qt extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class Zt extends Error{constructor(){super("There is no operation to undo")}}class en extends Error{constructor(){super("There is no operation to redo")}}class tn extends Error{constructor(){super("There is nothing to paste")}}function nn(e,t){switch(typeof t){case"function":case"symbol":return t.toString();case"bigint":return"BigInt("+t.toString()+")";default:return t instanceof RegExp?"RegExp("+t.toString()+")":t}}class rn extends Error{constructor(e){super("Unable to parse value: "+JSON.stringify(e,nn,4))}}class sn extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class on extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class an extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class ln extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class un extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class cn extends Error{constructor(){super("Computations are suspended")}}class hn extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class dn extends Error{constructor(e){super("Cannot register translation for function with id: "+e)}}class mn extends Error{constructor(){super("Language not registered.")}}class fn extends Error{constructor(){super("Language already registered.")}}class pn extends Error{static functionNotDeclaredInPlugin(e,t){return new pn(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new pn(`Function method ${e} not found in plugin ${t}`)}}class gn extends Error{static cannotRegisterFunctionWithId(e){return new gn("Cannot register function with id "+e)}static cannotUnregisterFunctionWithId(e){return new gn("Cannot unregister function with id "+e)}static cannotUnregisterProtectedPlugin(){return new gn("Cannot unregister protected plugin")}}class yn extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class wn extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class bn extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class vn extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class _n{constructor(e){this.policy=e,this.mapping=new Map}getCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);return t.getCell(e)}fetchCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);const n=t.getCell(e);if(!n)throw Error("Vertex for address missing in AddressMapping");return n}strategyFor(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);return t}addSheet(e,t){if(this.mapping.has(e))throw Error("Sheet already added");this.mapping.set(e,t)}autoAddSheet(e,t){const{height:n,width:r,fill:i}=t,s=this.policy.call(i);this.addSheet(e,new s(r,n))}getCellValue(e){const t=this.getCell(e);return void 0===t?_t:t instanceof Rn?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){const t=this.getCell(e);return t instanceof $n?t.getValues().rawValue:t instanceof Rn?t.getArrayCellRawValue(e):null}setCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized");n.setCell(e,t)}moveCell(e,t){const n=this.mapping.get(e.sheet);if(!n)throw Error("Sheet not initialized.");if(e.sheet!==t.sheet)throw Error("Cannot move cells between sheets.");if(n.has(t))throw new Error("Cannot move cell. Destination already occupied.");const r=n.getCell(e);if(void 0===r)throw new Error("Cannot move cell. No cell with such address.");this.setCell(t,r),this.removeCell(e)}removeCell(e){const t=this.mapping.get(e.sheet);if(!t)throw Error("Sheet not initialized");t.removeCell(e)}has(e){const t=this.mapping.get(e.sheet);return void 0!==t&&t.has(e)}getHeight(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);return t.getHeight()}getWidth(e){const t=this.mapping.get(e);if(!t)throw new Vt(e);return t.getWidth()}addRows(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Vt(e);r.addRows(t,n)}removeRows(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);t.removeRows(e)}removeSheet(e){this.mapping.delete(e)}addColumns(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new Vt(e);r.addColumns(t,n)}removeColumns(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new Vt(e.sheet);t.removeColumns(e)}*verticesFromRowsSpan(e){yield*this.mapping.get(e.sheet).verticesFromRowsSpan(e)}*verticesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).verticesFromColumnsSpan(e)}*entriesFromRowsSpan(e){yield*this.mapping.get(e.sheet).entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.mapping.get(e.sheet).entriesFromColumnsSpan(e)}*entries(){for(const[e,t]of this.mapping.entries())yield*t.getEntries(e)}*sheetEntries(e){const t=this.mapping.get(e);if(void 0===t)throw new Vt(e);yield*t.getEntries(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Sn{constructor(){this.arrayMapping=new Map}getArray(e){const t=this.getArrayByCorner(e.start);if(null===t||void 0===t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(gr(e))}setArray(e,t){this.arrayMapping.set(gr(e.start),t)}removeArray(e){"string"===typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(gr(e.start))}count(){return this.arrayMapping.size}*arraysInRows(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetRows(e.sheet,e.rowStart,e.rowEnd)&&(yield[t,n])}*arraysInCols(e){for(const[t,n]of this.arrayMapping.entries())n.spansThroughSheetColumn(e.sheet,e.columnStart,e.columnEnd)&&(yield[t,n])}isFormulaArrayInRow(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetRows(e,t))return!0;return!1}isFormulaArrayInAllRows(e){let t=!0;for(const n of e.rows())this.isFormulaArrayInRow(e.sheet,n)||(t=!1);return t}isFormulaArrayInColumn(e,t){for(const n of this.arrayMapping.values())if(n.spansThroughSheetColumn(e,t))return!0;return!1}isFormulaArrayInAllColumns(e){let t=!0;for(const n of e.columns())this.isFormulaArrayInColumn(e.sheet,n)||(t=!1);return t}isFormulaArrayInRange(e){for(const t of this.arrayMapping.values())if(t.getRange().doesOverlap(e))return!0;return!1}isFormulaArrayAtAddress(e){for(const t of this.arrayMapping.values())if(t.getRange().addressInRange(e))return!0;return!1}moveArrayVerticesAfterRowByRows(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.row?[i.shifted(0,n),r]:void 0})}moveArrayVerticesAfterColumnByColumns(e,t,n){this.updateArrayVerticesInSheet(e,(e,r)=>{const i=r.getRange();return t<=i.start.col?[i.shifted(n,0),r]:void 0})}updateArrayVerticesInSheet(e,t){const n=Array();for(const[r,i]of this.arrayMapping.entries()){if(i.sheet!==e)continue;const s=t(r,i);void 0!==s&&(this.removeArray(r),n.push(s))}n.forEach(([e,t])=>{this.setArray(e,t)})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class En{constructor(e){this.size=e}width(){return this.size.width}height(){return this.size.height}get(e,t){throw Error("Array not computed yet.")}simpleRangeValue(){throw Error("Array not computed yet.")}}class Cn{constructor(e){if(this.size=new ei(e.length>0?e[0].length:0,e.length),this.array=e,this.size.width<=0||this.size.height<=0)throw Error("Incorrect array size")}static fromInterpreterValue(e){return new Cn(e instanceof Ht?e.data:[[e]])}simpleRangeValue(){return Ht.onlyValues(this.array)}addRows(e,t){this.array.splice(e,0,...this.nullArrays(t,this.width())),this.size.height+=t}addColumns(e,t){for(let n=0;n<this.height();n++)this.array[n].splice(e,0,...new Array(t).fill(_t));this.size.width+=t}removeRows(e,t){if(this.outOfBound(0,e)||this.outOfBound(0,t))throw Error("Array index out of bound");const n=t-e+1;this.array.splice(e,n),this.size.height-=n}removeColumns(e,t){if(this.outOfBound(e,0)||this.outOfBound(t,0))throw Error("Array index out of bound");const n=t-e+1;for(const r of this.array)r.splice(e,n);this.size.width-=n}nullArrays(e,t){const n=[];for(let r=0;r<e;++r)n.push(new Array(t).fill(_t));return n}get(e,t){if(this.outOfBound(e,t))throw Error("Array index out of bound");return this.array[t][e]}set(e,t,n){if(this.outOfBound(e,t))throw Error("Array index out of bound");this.array[t][e]=n}width(){return this.size.width}height(){return this.size.height}raw(){return this.array}resize(e){if(this.height()<e.height&&isFinite(e.height)&&this.addRows(this.height(),e.height-this.height()),this.height()>e.height)throw Error("Resizing to smaller array");if(this.width()<e.width&&isFinite(e.width)&&this.addColumns(this.width(),e.width-this.width()),this.width()>e.width)throw Error("Resizing to smaller array")}outOfBound(e,t){return e<0||t<0||t>this.size.height-1||e>this.size.width-1}}class Mn{constructor(e,t){this.error=e,this.size=t}get(e,t){return this.error}width(){return this.size.width}height(){return this.size.height}simpleRangeValue(){return this.error}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Tn{constructor(e,t,n){this.formula=e,this.cellAddress=t,this.version=n}get width(){return 1}get height(){return 1}static fromAst(e,t,n,r){return n.isScalar()?new On(e,t,r):new Rn(e,t,n,r)}getFormula(e){return this.ensureRecentData(e),this.formula}ensureRecentData(e){if(this.version!=e.version()){const[t,n,r]=e.applyTransformations(this.formula,this.cellAddress,this.version);this.formula=t,this.cellAddress=n,this.version=r}}getAddress(e){return this.ensureRecentData(e),this.cellAddress}}class Rn extends Tn{constructor(e,t,n,r=0){super(e,t,r),n.isRef?this.array=new Mn(new lr(Vn.REF,Re.NoSpaceForArrayResult),ei.error()):this.array=new En(n)}get width(){return this.array.width()}get height(){return this.array.height()}get sheet(){return this.cellAddress.sheet}get leftCorner(){return this.cellAddress}setCellValue(e){if(e instanceof lr)return this.setErrorValue(e),e;const t=Cn.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof En)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof En))return this.array.simpleRangeValue()}getArrayCellValue(e){const t=e.col-this.cellAddress.col,n=e.row-this.cellAddress.row;try{return this.array.get(t,n)}catch(r){return new lr(Vn.REF)}}getArrayCellRawValue(e){const t=this.getArrayCellValue(e);return t instanceof lr||t===_t?void 0:St(t)}setArrayCellValue(e,t){const n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.array instanceof Cn&&this.array.set(n,r,t)}setNoSpace(){return this.array=new Mn(new lr(Vn.SPILL,Re.NoSpaceForArrayResult),ei.error()),this.getCellValue()}getRange(){return Er.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return Er.spanFromOrUndef(this.cellAddress,this.width,this.height)}setAddress(e){this.cellAddress=e}setFormula(e){this.formula=e}spansThroughSheetRows(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.row<=n&&t<this.cellAddress.row+this.height}spansThroughSheetColumn(e,t,n=t){return this.cellAddress.sheet===e&&this.cellAddress.col<=n&&t<this.cellAddress.col+this.width}isComputed(){return!(this.array instanceof En)}columnsFromArray(){return Ft.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return jt.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return br(this.cellAddress,e)}setErrorValue(e){this.array=new Mn(e,this.array.size)}}class On extends Tn{constructor(e,t,n){super(e,t,n)}valueOrUndef(){return this.cachedCellValue}setCellValue(e){return this.cachedCellValue=e,this.cachedCellValue}getCellValue(){if(void 0!==this.cachedCellValue)return this.cachedCellValue;throw Error("Value of the formula cell is not computed.")}isComputed(){return void 0!==this.cachedCellValue}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Nn{constructor(e){this.range=e,this.functionCache=new Map,this.criterionFunctionCache=new Map,this.dependentCacheRanges=new Set,this.bruteForce=!1}get start(){return this.range.start}get end(){return this.range.end}get sheet(){return this.range.start.sheet}getFunctionValue(e){return this.functionCache.get(e)}setFunctionValue(e,t){this.functionCache.set(e,t)}getCriterionFunctionValue(e,t){var n;return null===(n=this.getCriterionFunctionValues(e).get(t))||void 0===n?void 0:n[0]}getCriterionFunctionValues(e){var t;return null!==(t=this.criterionFunctionCache.get(e))&&void 0!==t?t:new Map}setCriterionFunctionValues(e,t){this.criterionFunctionCache.set(e,t)}addDependentCacheRange(e){e!==this&&this.dependentCacheRanges.add(e)}clearCache(){this.functionCache.clear(),this.criterionFunctionCache.clear(),this.dependentCacheRanges.forEach(e=>e.criterionFunctionCache.clear()),this.dependentCacheRanges.clear()}getStart(){return this.start}getEnd(){return this.end}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const An=(e,t,n,r,i)=>{if(t instanceof Nn){const e=t.range.intersectionWith(n);return void 0!==e?Array.from(e.addresses(i)):[]}let s,o;return t instanceof Tn?(s=t.getFormula(r),o=t.getAddress(r),mt(s,e).filter(e=>e instanceof ft).map(e=>e.dependency.toSimpleCellAddress(o)).filter(e=>n.addressInRange(e))):[]};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Ln;(function(e){e[e["ON_STACK"]=0]="ON_STACK",e[e["PROCESSED"]=1]="PROCESSED",e[e["POPPED"]=2]="POPPED"})(Ln||(Ln={}));class In{constructor(e=[],t=[]){this.nodesSparseArray=e,this.edgesSparseArray=t,this.entranceTime=[],this.low=[],this.parent=[],this.inSCC=[],this.nodeStatus=[],this.order=[],this.sccNonSingletons=[],this.timeCounter=0}getTopSortedWithSccSubgraphFrom(e,t,n){const r=e.reverse();return r.forEach(e=>this.runDFS(e)),this.postprocess(r,n,t)}getAdjacentNodeIds(e){return this.edgesSparseArray[e].filter(e=>void 0!==e&&this.nodesSparseArray[e])}runDFS(e){if(void 0!==this.nodeStatus[e])return;this.nodeStatus[e]=Ln.ON_STACK;const t=[e],n=[];while(t.length>0){const e=t[t.length-1];switch(this.nodeStatus[e]){case Ln.ON_STACK:this.handleOnStack(e,n,t);break;case Ln.PROCESSED:this.handleProcessed(e,n,t);break;case Ln.POPPED:t.pop();break}}}handleOnStack(e,t,n){this.entranceTime[e]=this.timeCounter,this.low[e]=this.timeCounter,this.timeCounter++,t.push(e),this.getAdjacentNodeIds(e).forEach(t=>{void 0===this.entranceTime[t]&&(n.push(t),this.parent[t]=e,this.nodeStatus[t]=Ln.ON_STACK)}),this.nodeStatus[e]=Ln.PROCESSED}handleProcessed(e,t,n){let r=this.entranceTime[e];if(this.getAdjacentNodeIds(e).forEach(t=>{this.inSCC[t]||(r=this.parent[t]===e?Math.min(r,this.low[t]):Math.min(r,this.entranceTime[t]))}),this.low[e]=r,r===this.entranceTime[e]){const n=[];do{n.push(t[t.length-1]),t.pop()}while(n[n.length-1]!==e);n.forEach(e=>{this.inSCC[e]=!0}),this.order.push(...n),n.length>1&&n.forEach(e=>{this.sccNonSingletons[e]=!0})}n.pop(),this.nodeStatus[e]=Ln.POPPED}postprocess(e,t,n){const r=[];e.forEach(e=>{r[e]=!0});const i=[],s=[];return this.order.reverse(),this.order.forEach(e=>{const o=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||o.includes(e)?(s.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),o.forEach(e=>r[e]=!0)):(i.push(this.nodesSparseArray[e]),r[e]&&n(this.nodesSparseArray[e])&&o.forEach(e=>r[e]=!0))}),{sorted:i,cycled:s}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class kn{constructor(e,t){this.rawValue=e,this.processFn=t,this.processedValue=null}getProcessedValue(){return null===this.processedValue&&(this.processedValue=this.processFn(this.rawValue)),this.processedValue}markAsModified(){this.processedValue=null}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class xn{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.nodesIds=new Map,this.dirtyAndVolatileNodeIds=new kn({dirty:[],volatile:[]},e=>this.processDirtyAndVolatileNodeIds(e)),this.infiniteRangeIds=new Set,this.changingWithStructureNodeIds=[],this.nextId=0}getNodes(){return this.nodesSparseArray.filter(e=>void 0!==e)}hasNode(e){return this.nodesIds.has(e)}existsEdge(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);return void 0!==n&&void 0!==r&&this.edgesSparseArray[n].includes(r)}adjacentNodes(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return new Set(this.edgesSparseArray[t].filter(e=>void 0!==e).map(e=>this.nodesSparseArray[e]))}adjacentNodesCount(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);return this.fixEdgesArrayForNode(t).length}addNodeAndReturnId(e){const t=this.nodesIds.get(e);if(void 0!==t)return t;const n=this.nextId;return this.nextId++,this.nodesSparseArray[n]=e,this.edgesSparseArray[n]=[],this.nodesIds.set(e,n),n}addEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);this.edgesSparseArray[n].includes(r)||this.edgesSparseArray[n].push(r)}removeNode(e){const t=this.getNodeId(e);if(void 0===t)throw this.missingNodeError(e);this.edgesSparseArray[t].length>0&&(this.edgesSparseArray[t].forEach(e=>this.dirtyAndVolatileNodeIds.rawValue.dirty.push(e)),this.dirtyAndVolatileNodeIds.markAsModified());const n=this.removeDependencies(e);return delete this.nodesSparseArray[t],delete this.edgesSparseArray[t],this.infiniteRangeIds.delete(t),this.nodesIds.delete(e),n}removeEdge(e,t){const n=this.getNodeIdIfNotNumber(e),r=this.getNodeIdIfNotNumber(t);if(void 0===n)throw this.missingNodeError(e);if(void 0===r)throw this.missingNodeError(t);const i=this.edgesSparseArray[n].indexOf(r);if(-1===i)throw new Error("Edge does not exist");delete this.edgesSparseArray[n][i]}removeEdgeIfExists(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);if(void 0===n)return;if(void 0===r)return;const i=this.edgesSparseArray[n].indexOf(r);-1!==i&&delete this.edgesSparseArray[n][i]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),()=>!0,()=>{})}getTopSortedWithSccSubgraphFrom(e,t,n){const r=new In(this.nodesSparseArray,this.edgesSparseArray),i=e.map(e=>this.getNodeId(e)).filter(e=>void 0!==e);return r.getTopSortedWithSccSubgraphFrom(i,t,n)}markNodeAsVolatile(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.volatile.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsDirty(e){const t=this.getNodeId(e);void 0!==t&&(this.dirtyAndVolatileNodeIds.rawValue.dirty.push(t),this.dirtyAndVolatileNodeIds.markAsModified())}getDirtyAndVolatileNodes(){return this.dirtyAndVolatileNodeIds.getProcessedValue()}clearDirtyNodes(){this.dirtyAndVolatileNodeIds.rawValue.dirty=[],this.dirtyAndVolatileNodeIds.markAsModified()}markNodeAsChangingWithStructure(e){const t=this.getNodeId(e);void 0!==t&&this.changingWithStructureNodeIds.push(t)}markChangingWithStructureNodesAsDirty(){this.changingWithStructureNodeIds.length<=0||(this.dirtyAndVolatileNodeIds.rawValue.dirty=[...this.dirtyAndVolatileNodeIds.rawValue.dirty,...this.changingWithStructureNodeIds],this.dirtyAndVolatileNodeIds.markAsModified())}markNodeAsInfiniteRange(e){const t=this.getNodeIdIfNotNumber(e);void 0!==t&&this.infiniteRangeIds.add(t)}getInfiniteRanges(){return[...this.infiniteRangeIds].map(e=>({node:this.nodesSparseArray[e],id:e}))}getNodeId(e){return this.nodesIds.get(e)}getNodeIdIfNotNumber(e){return"number"===typeof e?e:this.nodesIds.get(e)}fixEdgesArrayForNode(e){const t=this.edgesSparseArray[e];return this.edgesSparseArray[e]=t.filter(e=>void 0!==e&&this.nodesSparseArray[e]),this.edgesSparseArray[e]}removeDependencies(e){const t=this.dependencyQuery(e);return t.forEach(([t,n])=>{this.removeEdgeIfExists(n,e)}),t}processDirtyAndVolatileNodeIds({dirty:e,volatile:t}){return[...new Set([...e,...t])].map(e=>this.nodesSparseArray[e]).filter(e=>void 0!==e)}missingNodeError(e){return new Error("Unknown node "+e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Dn{constructor(){this.rangeMapping=new Map}getMappingSize(e){var t,n;return null!==(n=null===(t=this.rangeMapping.get(e))||void 0===t?void 0:t.size)&&void 0!==n?n:0}setRange(e){let t=this.rangeMapping.get(e.getStart().sheet);void 0===t&&(t=new Map,this.rangeMapping.set(e.getStart().sheet,t));const n=Hn(e.getStart(),e.getEnd());t.set(n,e)}removeRange(e){const t=e.getStart().sheet,n=this.rangeMapping.get(t);if(void 0===n)return;const r=Hn(e.getStart(),e.getEnd());n.delete(r),0===n.size&&this.rangeMapping.delete(t)}getRange(e,t){const n=this.rangeMapping.get(e.sheet),r=Hn(e,t);return null===n||void 0===n?void 0:n.get(r)}fetchRange(e,t){const n=this.getRange(e,t);if(!n)throw Error("Range does not exist");return n}truncateRanges(e,t){const n=Array(),r=Array(),i=Array(),s=e.sheet;for(const[a,l]of this.entriesFromSheet(e.sheet)){const o=l.range;e.start<=t(l.range.end)&&(o.removeSpan(e),o.shouldBeRemoved()?(this.removeByKey(s,a),n.push(l)):r.push([a,l]),i.push(l))}const o=[];r.sort((e,n)=>jn(e[1],n[1],t));for(const[a,l]of r){const e=Pn(l.range);if(e===a)continue;const t=this.getByKey(s,e);this.removeByKey(s,a),void 0!==t&&l!=t?o.push([t,l]):this.setRange(l)}return{verticesToRemove:n,verticesToMerge:o,verticesWithChangedSize:i}}moveAllRangesInSheetAfterRowByRows(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.row?(r.range.shiftByRows(n),{changedSize:!1,vertex:r}):t>r.start.row&&t<=r.end.row?(r.range.expandByRows(n),{changedSize:!0,vertex:r}):void 0)}moveAllRangesInSheetAfterColumnByColumns(e,t,n){return this.updateVerticesFromSheet(e,(e,r)=>t<=r.start.col?(r.range.shiftByColumns(n),{changedSize:!1,vertex:r}):t>r.start.col&&t<=r.end.col?(r.range.expandByColumns(n),{changedSize:!0,vertex:r}):void 0)}moveRangesInsideSourceRange(e,t,n,r){this.updateVerticesFromSheet(e.sheet,(i,s)=>e.containsRange(s.range)?(s.range.shiftByColumns(t),s.range.shiftByRows(n),s.range.moveToSheet(r),{changedSize:!1,vertex:s}):void 0)}removeRangesInSheet(e){if(this.rangeMapping.has(e)){const t=this.rangeMapping.get(e).values();return this.rangeMapping.delete(e),t}return[][Symbol.iterator]()}*rangesInSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.values())}*rangeVerticesContainedInRange(e){for(const t of this.rangesInSheet(e.sheet))e.containsRange(t.range)&&(yield t)}findSmallerRange(e){if(e.height()>1&&Number.isFinite(e.height())){const t=mr(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n){const t=Er.fromSimpleCellAddresses(mr(e.start.sheet,e.start.col,e.end.row),e.end);return{smallerRangeVertex:n,restRange:t}}}return{restRange:e}}*entriesFromSheet(e){const t=this.rangeMapping.get(e);t&&(yield*t.entries())}removeByKey(e,t){this.rangeMapping.get(e).delete(t)}getByKey(e,t){var n;return null===(n=this.rangeMapping.get(e))||void 0===n?void 0:n.get(t)}updateVerticesFromSheet(e,t){const n=Array();for(const[r,i]of this.entriesFromSheet(e)){const s=t(r,i);void 0!==s&&(this.removeByKey(e,r),n.push(s))}return n.forEach(e=>{this.setRange(e.vertex)}),{verticesWithChangedSize:n.filter(e=>e.changedSize).map(e=>e.vertex)}}}function Hn(e,t){return`${e.col},${e.row},${t.col},${t.row}`}function Pn(e){return Hn(e.start,e.end)}const jn=(e,t,n)=>{const r=n(e.range.start),i=n(e.range.start);if(r===i){const r=n(e.range.end),i=n(t.range.end);return r-i}return r-i};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Fn{constructor(e,t,n){this.functions=e,this.errors=t,this.ui=n,this._protectedTranslations={VERSION:"VERSION"},this.checkUI(),this.checkErrors(),this.checkFunctionTranslations(this.functions),Object.assign(this.functions,this._protectedTranslations)}extendFunctions(e){this.checkFunctionTranslations(e),Object.assign(this.functions,e)}buildFunctionMapping(){return Object.keys(this.functions).reduce((e,t)=>(e[this.functions[t]]=t,e),{})}buildErrorMapping(){return Object.keys(this.errors).reduce((e,t)=>(e[this.errors[t]]=t,e),{})}isFunctionTranslated(e){return void 0!==this.functions[e]}getFunctionTranslations(e){const t=[];for(const n of e)this.isFunctionTranslated(n)&&t.push(this.functions[n]);return t}getFunctionTranslation(e){const t=this.functions[e];if(void 0===t)throw new hn("functions."+e);return t}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===Vn.LIC)return`#${Vn.LIC}!`;const t=this.errors[e];if(void 0===t)throw new hn("errors."+e);return t}getUITranslation(e){const t=this.ui[e];if(void 0===t)throw new hn("ui."+e);return t}checkUI(){for(const e of Object.values(Un))if(!(e in this.ui))throw new hn("ui."+e)}checkErrors(){for(const e of Object.values(Vn))if(!(e in this.errors)&&e!==Vn.LIC)throw new hn("errors."+e)}checkFunctionTranslations(e){const t=new Set(Object.getOwnPropertyNames(e));for(const n of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(n))throw new dn(n)}}function Yn(e){return new Fn(Object.assign({},e.functions),Object.assign({},e.errors),Object.assign({},e.ui))}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Un,Vn,Bn;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function Wn(e){return e.toLowerCase()}(function(e){e["NEW_SHEET_PREFIX"]="NEW_SHEET_PREFIX"})(Un||(Un={}));class zn{constructor(e,t){this.id=e,this.displayName=t}get canonicalName(){return Wn(this.displayName)}}class Gn{constructor(e){this.languages=e,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=e=>{const t=this.mappingFromCanonicalName.get(Wn(e));if(void 0===t)throw new Bt(e);return t.id},this.get=e=>{var t;return null===(t=this.mappingFromCanonicalName.get(Wn(e)))||void 0===t?void 0:t.id},this.fetchDisplayName=e=>this.fetchSheetById(e).displayName,this.sheetNamePrefix=e.getUITranslation(Un.NEW_SHEET_PREFIX)}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){const t=Wn(e);if(this.mappingFromCanonicalName.has(t))throw new Wt(e);this.lastSheetId++;const n=new zn(this.lastSheetId,e);return this.store(n),n.id}removeSheet(e){const t=this.fetchSheetById(e);e==this.lastSheetId&&--this.lastSheetId,this.mappingFromCanonicalName.delete(t.canonicalName),this.mappingFromId.delete(t.id)}getDisplayName(e){var t;return null===(t=this.mappingFromId.get(e))||void 0===t?void 0:t.displayName}*displayNames(){for(const e of this.mappingFromCanonicalName.values())yield e.displayName}numberOfSheets(){return this.mappingFromCanonicalName.size}hasSheetWithId(e){return this.mappingFromId.has(e)}hasSheetWithName(e){return this.mappingFromCanonicalName.has(Wn(e))}renameSheet(e,t){const n=this.fetchSheetById(e),r=n.displayName;if(r===t)return;const i=this.mappingFromCanonicalName.get(Wn(t));if(void 0!==i&&i.id!==n.id)throw new Wt(t);const s=n.canonicalName;return this.mappingFromCanonicalName.delete(s),n.displayName=t,this.store(n),r}sheetNames(){return Array.from(this.mappingFromId.values()).map(e=>e.displayName)}store(e){this.mappingFromId.set(e.id,e),this.mappingFromCanonicalName.set(e.canonicalName,e)}fetchSheetById(e){const t=this.mappingFromId.get(e);if(void 0===t)throw new Vt(e);return t}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Kn{constructor(e,t,n,r,i,s,o,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=n,this.arrayMapping=r,this.stats=i,this.lazilyTransformingAstService=s,this.functionRegistry=o,this.namedExpressions=a,this.changes=Pt.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e).map(([e,t])=>e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>t instanceof wt?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:yr(t)?t:Sr(t.start,t.end))}return[]}},this.dependencyQueryVertices=e=>{if(e instanceof Nn)return this.rangeDependencyQuery(e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map(t=>{if(t instanceof Er)return[t.start,this.rangeMapping.fetchRange(t.start,t.end)];if(t instanceof wt){const n=this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet);return[n.address,this.addressMapping.fetchCell(n.address)]}return[t,this.addressMapping.fetchCell(t)]})}return[]}},this.rangeDependencyQuery=e=>{const t=[],{smallerRangeVertex:n,restRange:r}=this.rangeMapping.findSmallerRange(e.range);let i;void 0!==n&&this.graph.adjacentNodes(n).has(e)?(i=r,t.push([new Er(n.start,n.end),n])):i=e.range;for(const s of i.addresses(this)){const e=this.addressMapping.getCell(s);void 0!==e&&t.push([s,e])}return t},this.formulaDependencyQuery=e=>{let t,n;if(!(e instanceof Tn))return;n=e.getAddress(this.lazilyTransformingAstService),t=e.getFormula(this.lazilyTransformingAstService);const r=mt(t,this.functionRegistry);return[n,bt(r,n)]},this.graph=new xn(this.dependencyQueryVertices)}static buildEmpty(e,t,n,r,i){return new Kn(new _n(t.chooseAddressMappingPolicy),new Dn,new Gn(t.translationPackage),new Sn,i,e,n,r)}setFormulaToCell(e,t,n,r,i,s){const o=Tn.fromAst(t,e,r,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(o),this.processCellDependencies(n,o),this.graph.markNodeAsDirty(o),i&&this.markAsVolatile(o),s&&this.markAsDependentOnStructureChange(o),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setParsingErrorToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);return this.exchangeOrAddGraphNode(n,t),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t),this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setValueToCell(e,t){const n=this.shrinkPossibleArrayAndGetCell(e);if(n instanceof Rn&&this.arrayMapping.removeArray(n.getRange()),n instanceof $n){const e=n.getValues();e.rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsDirty(n))}else{const r=new $n(t.parsedValue,t.rawValue);this.exchangeOrAddGraphNode(n,r),this.addressMapping.setCell(e,r),this.graph.markNodeAsDirty(r)}return this.correctInfiniteRangesDependency(e),this.getAndClearContentChanges()}setCellEmpty(e){const t=this.shrinkPossibleArrayAndGetCell(e);if(void 0===t)return Pt.empty();if(this.graph.adjacentNodes(t).size>0){const n=new Xn;this.exchangeGraphNode(t,n),0===this.graph.adjacentNodesCount(n)?(this.removeVertex(n),this.addressMapping.removeCell(e)):(this.graph.markNodeAsDirty(n),this.addressMapping.setCell(e,n))}else this.removeVertex(t),this.addressMapping.removeCell(e);return this.getAndClearContentChanges()}clearDirtyVertices(){this.graph.clearDirtyNodes()}verticesToRecompute(){return this.graph.getDirtyAndVolatileNodes()}processCellDependencies(e,t){const n=this.graph.getNodeId(t);e.forEach(e=>{if(e instanceof Er){const t=e;let r=this.getRange(t.start,t.end);void 0===r&&(r=new Nn(t),this.rangeMapping.setRange(r)),this.graph.addNodeAndReturnId(r);const i=this.graph.getNodeId(r);t.isFinite()||this.graph.markNodeAsInfiniteRange(i);const{smallerRangeVertex:s,restRange:o}=this.rangeMapping.findSmallerRange(t);if(void 0!==s){if(this.graph.addEdge(s,i),r.bruteForce){r.bruteForce=!1;for(const e of t.addresses(this))this.graph.removeEdge(this.fetchCell(e),i)}}else r.bruteForce=!0;const a=this.arrayMapping.getArray(o);if(void 0!==a)this.graph.addEdge(a,i);else for(const e of o.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,i)}this.graph.addEdge(i,n),t.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(r)}else if(e instanceof wt){const r=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:i,id:s}=this.fetchNamedExpressionVertex(e.name,r);this.graph.addEdge(null!==s&&void 0!==s?s:i,n)}else{const{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:t,n)}})}fetchNamedExpressionVertex(e,t){const n=this.namedExpressions.namedExpressionOrPlaceholder(e,t);return this.fetchCellOrCreateEmpty(n.address)}exchangeNode(e,t){const n=this.fetchCellOrCreateEmpty(e).vertex,r=this.fetchCellOrCreateEmpty(t).vertex;this.addressMapping.removeCell(e),this.exchangeGraphNode(n,r)}fetchCellOrCreateEmpty(e){const t=this.addressMapping.getCell(e);if(void 0!==t)return{vertex:t,id:void 0};const n=new Xn,r=this.graph.addNodeAndReturnId(n);return this.addressMapping.setCell(e,n),{vertex:n,id:r}}removeRows(e){this.stats.measure(It.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromRowsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Rn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeRows(e)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.row);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterRemovingRows(e.sheet,e.rowStart,e.numberOfRows)}),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}removeSheet(e){this.clearSheet(e);for(const[t,n]of this.addressMapping.sheetEntries(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);this.removeVertex(n),this.addressMapping.removeCell(t)}this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.removeRangesInSheet(e);for(const e of t)this.removeVertex(e);this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeSheet(e)})})}clearSheet(e){const t=new Set;for(const[n,r]of this.addressMapping.sheetEntries(e))r instanceof Rn?t.add(r):this.setCellEmpty(n);for(const n of t.values())this.setArrayEmpty(n);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(It.ADJUSTING_GRAPH,()=>{for(const[t,n]of this.addressMapping.entriesFromColumnsSpan(e)){for(const e of this.graph.adjacentNodes(n))this.graph.markNodeAsDirty(e);if(n instanceof Rn){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}}),this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.removeColumns(e)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.truncateRanges(e,e=>e.col);return this.getArrayVerticesRelatedToRanges(t)});return this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns)),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterRowByRows(e.sheet,e.rowStart,e.numberOfRows);return this.fixRangesWhenAddingRows(e.sheet,e.rowStart,e.numberOfRows),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)});for(const n of this.addressMapping.verticesFromRowsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(It.ADJUSTING_ADDRESS_MAPPING,()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)});const t=this.stats.measure(It.ADJUSTING_RANGES,()=>{const t=this.rangeMapping.moveAllRangesInSheetAfterColumnByColumns(e.sheet,e.columnStart,e.numberOfColumns);return this.fixRangesWhenAddingColumns(e.sheet,e.columnStart,e.numberOfColumns),this.getArrayVerticesRelatedToRanges(t.verticesWithChangedSize)});this.stats.measure(It.ADJUSTING_ARRAY_MAPPING,()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns));for(const n of this.addressMapping.verticesFromColumnsSpan(e))this.graph.markNodeAsDirty(n);return this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}isThereSpaceForArray(e){const t=e.getRangeOrUndef();if(void 0===t)return!1;for(const n of t.addresses(this)){const t=this.addressMapping.getCell(n);if(void 0!==t&&!(t instanceof Xn)&&t!==e)return!1}return!0}moveCells(e,t,n,r){for(const i of e.addressesWithDirection(t,n,this)){const s=mr(r,i.col+t,i.row+n);let o=this.addressMapping.getCell(i);const a=this.addressMapping.getCell(s);if(this.addressMapping.removeCell(i),void 0!==o){this.graph.markNodeAsDirty(o),this.addressMapping.setCell(s,o);let t=void 0;for(const n of this.graph.adjacentNodes(o))n instanceof Nn&&!e.containsRange(n.range)&&(t=null!==t&&void 0!==t?t:this.fetchCellOrCreateEmpty(i).vertex,this.graph.addEdge(t,n),this.graph.removeEdge(o,n));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(i,t))}if(void 0!==a){void 0===o&&this.addressMapping.removeCell(s);for(const e of this.graph.adjacentNodes(a))o=null!==o&&void 0!==o?o:this.fetchCellOrCreateEmpty(s).vertex,this.graph.addEdge(o,e),this.graph.markNodeAsDirty(o);this.removeVertex(a)}}for(const i of this.rangeMapping.rangeVerticesContainedInRange(e))for(const t of this.graph.adjacentNodes(i))if(t instanceof Nn&&!e.containsRange(t.range)){this.graph.removeEdge(i,t);for(const e of i.range.addresses(this)){const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t),this.addressMapping.setCell(e,n),this.graph.markNodeAsDirty(n)}}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}setArrayEmpty(e){const t=Er.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),n=this.graph.adjacentNodes(e);for(const r of t.addresses(this))this.addressMapping.removeCell(r);for(const r of n.values()){const t=An(this.functionRegistry,r,e.getRange(),this.lazilyTransformingAstService,this);for(const e of t){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}t.length>0&&this.graph.markNodeAsDirty(r)}this.removeVertex(e),this.arrayMapping.removeArray(e.getRange())}addVertex(e,t){this.graph.addNodeAndReturnId(t),this.addressMapping.setCell(e,t)}addArrayVertex(e,t){this.graph.addNodeAndReturnId(t),this.setAddressMappingForArrayVertex(t,e)}*arrayFormulaNodes(){for(const e of this.graph.getNodes())e instanceof Rn&&(yield e)}*entriesFromRowsSpan(e){yield*this.addressMapping.entriesFromRowsSpan(e)}*entriesFromColumnsSpan(e){yield*this.addressMapping.entriesFromColumnsSpan(e)}fetchCell(e){return this.addressMapping.fetchCell(e)}getCell(e){return this.addressMapping.getCell(e)}getCellValue(e){return this.addressMapping.getCellValue(e)}getRawValue(e){return this.addressMapping.getRawValue(e)}getScalarValue(e){const t=this.addressMapping.getCellValue(e);return t instanceof Ht?new lr(Vn.VALUE,Re.ScalarExpected):t}existsEdge(e,t){return this.graph.existsEdge(e,t)}getSheetId(e){return this.sheetMapping.fetch(e)}getSheetHeight(e){return this.addressMapping.getHeight(e)}getSheetWidth(e){return this.addressMapping.getWidth(e)}getArray(e){return this.arrayMapping.getArray(e)}getRange(e,t){return this.rangeMapping.getRange(e,t)}topSortWithScc(){return this.graph.topSortWithScc()}markAsVolatile(e){this.graph.markNodeAsVolatile(e)}markAsDependentOnStructureChange(e){this.graph.markNodeAsChangingWithStructure(e)}forceApplyPostponedTransformations(){for(const e of this.graph.getNodes())e instanceof On&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(const t of e.addresses(this)){const e=this.getScalarValue(t);e!==_t&&(yield[St(e),t])}}computeListOfValuesInRange(e){const t=[];for(const n of e.addresses(this)){const e=this.getScalarValue(n);t.push(e)}return t}shrinkArrayToCorner(e){this.cleanAddressMappingUnderArray(e);for(const t of this.adjacentArrayVertices(e)){let n;n=t instanceof Tn?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let r=!1;for(const[i,s]of n)e.isLeftCorner(i)&&(r=!0),this.graph.addEdge(s,t),this.graph.markNodeAsDirty(s);r||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){const t=this.getCell(e);return t instanceof Rn&&!t.isLeftCorner(e)}getAndClearContentChanges(){const e=this.changes;return this.changes=Pt.empty(),e}getAdjacentNodesAddresses(e){const t=this.graph.adjacentNodes(e),n=[];return t.forEach(e=>{const t=e;t instanceof Nn?n.push(Sr(t.start,t.end)):n.push(t.getAddress(this.lazilyTransformingAstService))}),n}exchangeGraphNode(e,t){this.graph.addNodeAndReturnId(t);const n=this.graph.adjacentNodes(e);this.removeVertex(e),n.forEach(e=>{this.graph.hasNode(e)&&this.graph.addEdge(t,e)})}setArray(e,t){this.arrayMapping.setArray(e,t)}correctInfiniteRangesDependency(e){const t=this.graph.getInfiniteRanges().filter(({node:t})=>t.range.addressInRange(e));if(t.length<=0)return;const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e),i=null!==r&&void 0!==r?r:this.graph.getNodeId(n);t.forEach(({id:e})=>{this.graph.addEdge(i,e)})}exchangeOrAddGraphNode(e,t){e?this.exchangeGraphNode(e,t):this.graph.addNodeAndReturnId(t)}getArrayVerticesRelatedToRanges(e){const t=new Set;return e.forEach(e=>{this.graph.hasNode(e)&&this.graph.adjacentNodes(e).forEach(e=>{e instanceof Rn&&t.add(e)})}),t}correctInfiniteRangesDependenciesByRangeVertex(e){this.graph.getInfiniteRanges().forEach(({id:t,node:n})=>{const r=e.range.intersectionWith(n.range);void 0!==r&&r.addresses(this).forEach(e=>{const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==r&&void 0!==r?r:n,t)})})}cleanAddressMappingUnderArray(e){const t=e.getRange();for(const n of t.addresses(this)){const t=e.getArrayCellValue(n);this.getCell(n)===e?e.isLeftCorner(n)?this.changes.addChange(new lr(Vn.REF),n,t):(this.addressMapping.removeCell(n),this.changes.addChange(_t,n,t)):this.changes.addChange(_t,n,t)}}*formulaDirectDependenciesToArray(e,t){var n;const[,r]=null!==(n=this.formulaDependencyQuery(e))&&void 0!==n?n:[];if(void 0!==r)for(const i of r)if(!(i instanceof wt||i instanceof Er)&&t.getRange().addressInRange(i)){const e=this.fetchCellOrCreateEmpty(i).vertex;yield[i,e]}}*rangeDirectDependenciesToArray(e,t){const{restRange:n}=this.rangeMapping.findSmallerRange(e.range);for(const r of n.addresses(this))if(t.getRange().addressInRange(r)){const e=this.fetchCellOrCreateEmpty(r).vertex;yield[r,e]}}*adjacentArrayVertices(e){const t=this.graph.adjacentNodes(e);for(const n of t)(n instanceof Tn||n instanceof Nn)&&(yield n)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,n){const r=Array.from(this.rangeMapping.rangesInSheet(e));for(const i of r)if(i.range.includesRow(t+n))if(i.bruteForce){const e=i.range.rangeWithSameWidth(t,n);for(const t of e.addresses(this)){const{vertex:e,id:n}=this.fetchCellOrCreateEmpty(t);this.graph.addEdge(null!==n&&void 0!==n?n:e,i)}}else{let e=i,t=this.rangeMapping.findSmallerRange(e.range);if(void 0!==t.smallerRangeVertex)continue;while(void 0===t.smallerRangeVertex){const n=new Nn(Er.spanFrom(e.range.start,e.range.width(),e.range.height()-1));this.rangeMapping.setRange(n),this.graph.addNodeAndReturnId(n);const r=new Er(mr(e.range.start.sheet,e.range.start.col,e.range.end.row),e.range.end);this.addAllFromRange(r,e),this.graph.addEdge(n,e),e=n,t=this.rangeMapping.findSmallerRange(e.range)}this.graph.addEdge(t.smallerRangeVertex,e),this.addAllFromRange(t.restRange,e),this.graph.removeEdge(t.smallerRangeVertex,i)}}addAllFromRange(e,t){for(const n of e.addresses(this)){const{vertex:e,id:r}=this.fetchCellOrCreateEmpty(n);this.graph.addEdge(null!==r&&void 0!==r?r:e,t)}}fixRangesWhenAddingColumns(e,t,n){for(const r of this.rangeMapping.rangesInSheet(e))if(r.range.includesColumn(t+n)){let i;i=r.bruteForce?r.range.rangeWithSameHeight(t,n):Er.spanFrom(mr(e,t,r.range.end.row),n,1);for(const e of i.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!==n&&void 0!==n?n:t,r)}}}exchangeOrAddFormulaVertex(e){const t=e.getAddress(this.lazilyTransformingAstService),n=Er.spanFrom(t,e.width,e.height),r=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof Rn&&this.setArray(n,e),this.exchangeOrAddGraphNode(r,e),this.addressMapping.setCell(t,e),e instanceof Rn){if(!this.isThereSpaceForArray(e))return;for(const t of n.addresses(this)){if(e.isLeftCorner(t))continue;const n=this.getCell(t);this.exchangeOrAddGraphNode(n,e)}}for(const i of n.addresses(this))this.addressMapping.setCell(i,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof Rn))return;const n=Er.spanFromOrUndef(t,e.width,e.height);if(void 0!==n&&(this.setArray(n,e),this.isThereSpaceForArray(e)))for(const r of n.addresses(this))this.addressMapping.setCell(r,e)}truncateRanges(e,t){const{verticesToRemove:n,verticesToMerge:r,verticesWithChangedSize:i}=this.rangeMapping.truncateRanges(e,t);for(const[s,o]of r)this.mergeRangeVertices(s,o);for(const s of n)this.removeVertexAndCleanupDependencies(s);return i}fixArraysAfterAddingRow(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(jt.fromRowStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.col;s<=i.end.col;++s)for(let o=t;o<=i.end.row;++o){const t=mr(e,s,o),i=mr(e,s,o+n),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(_t,i,a)}}}fixArraysAfterRemovingRows(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(jt.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}fixArraysAfterAddingColumn(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(Ft.fromColumnStartAndEnd(e,t-1,t-1))){const i=r.getRange();for(let s=i.start.row;s<=i.end.row;++s)for(let o=t;o<=i.end.col;++o){const t=mr(e,o,s),i=mr(e,o+n,s),a=r.getArrayCellValue(t);this.addressMapping.moveCell(i,t),this.changes.addChange(_t,i,a)}}}fixArraysAfterRemovingColumns(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(Ft.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(r))for(const e of r.getRange().addresses(this))this.addressMapping.setCell(e,r);else this.setNoSpaceIfArray(r)}shrinkPossibleArrayAndGetCell(e){const t=this.getCell(e);return t instanceof Rn?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof Rn&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof Nn&&this.rangeMapping.removeRange(e)}mergeRangeVertices(e,t){const n=this.graph.adjacentNodes(t);this.removeVertexAndCleanupDependencies(t),this.graph.removeEdgeIfExists(e,t),n.forEach(t=>{this.graph.hasNode(t)&&this.graph.addEdge(e,t)})}removeVertexAndCleanupDependencies(e){const t=new Set(this.graph.removeNode(e));while(t.size>0){const e=t.values().next().value;t.delete(e);const[n,r]=e;this.graph.hasNode(r)&&0===this.graph.adjacentNodesCount(r)&&((r instanceof Nn||r instanceof Xn)&&this.graph.removeNode(r).forEach(e=>t.add(e)),r instanceof Nn?this.rangeMapping.removeRange(r):r instanceof Xn&&this.addressMapping.removeCell(n))}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Xn{constructor(){}getCellValue(){return _t}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class $n{constructor(e,t){this.parsedValue=e,this.rawValue=t}getValues(){return{parsedValue:this.parsedValue,rawValue:this.rawValue}}setValues(e){this.parsedValue=e.parsedValue,this.rawValue=e.rawValue}getCellValue(){return this.parsedValue}setCellValue(e){throw Error("SetCellValue is deprecated for ValueCellVertex")}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class qn{constructor(e,t){this.errors=e,this.rawInput=t}getCellValue(){const e=this.errors.map(e=>e.message).find(e=>e);return lr.parsingError(e)}getFormula(){return this.rawInput}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Jn{constructor(e,t){this.width=e,this.height=t,this.mapping=new Map}getCell(e){var t;return null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);let n=this.mapping.get(e.col);n||(n=new Map,this.mapping.set(e.col,n)),n.set(e.row,t)}has(e){var t;return!!(null===(t=this.mapping.get(e.col))||void 0===t?void 0:t.get(e.row))}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){var t;null===(t=this.mapping.get(e.col))||void 0===t||t.delete(e.row)}addRows(e,t){this.mapping.forEach(n=>{const r=new Map;n.forEach((i,s)=>{s>=e&&(r.set(s+t,i),n.delete(s))}),r.forEach((e,t)=>{n.set(t,e)})}),this.height+=t}addColumns(e,t){const n=new Map;this.mapping.forEach((r,i)=>{i>=e&&(n.set(i+t,r),this.mapping.delete(i))}),n.forEach((e,t)=>{this.mapping.set(t,e)}),this.width+=t}removeRows(e){this.mapping.forEach(t=>{const n=new Map;t.forEach((r,i)=>{i>=e.rowStart&&(t.delete(i),i>e.rowEnd&&n.set(i-e.numberOfRows,r))}),n.forEach((e,n)=>{t.set(n,e)})});const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){const t=new Map;this.mapping.forEach((n,r)=>{r>=e.columnStart&&(this.mapping.delete(r),r>e.columnEnd&&t.set(r-e.numberOfColumns,n))}),t.forEach((e,t)=>{this.mapping.set(t,e)});const n=Math.min(this.width-1,e.columnEnd),r=Math.max(0,n-e.columnStart+1);this.width=Math.max(0,this.width-r)}*getEntries(e){for(const[t,n]of this.mapping)for(const[r,i]of n)yield[mr(e,t,r),i]}*verticesFromColumn(e){const t=this.mapping.get(e);if(void 0!==t)for(const[n,r]of t)yield r}*verticesFromRow(e){for(const t of this.mapping.values()){const n=t.get(e);void 0!==n&&(yield n)}}*verticesFromColumnsSpan(e){for(const t of e.columns()){const e=this.mapping.get(t);if(void 0!==e)for(const[t,n]of e)yield n}}*verticesFromRowsSpan(e){for(const t of this.mapping.values())for(const n of e.rows()){const e=t.get(n);void 0!==e&&(yield e)}}*entriesFromRowsSpan(e){for(const[t,n]of this.mapping.entries())for(const r of e.rows()){const i=n.get(r);void 0!==i&&(yield[mr(e.sheet,t,r),i])}}*entriesFromColumnsSpan(e){for(const t of e.columns()){const n=this.mapping.get(t);if(void 0!==n)for(const[r,i]of n.entries())yield[mr(e.sheet,t,r),i]}}*vertices(){for(const[e,t]of this.mapping)for(const[n,r]of t)void 0!==r&&(yield r)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Qn{constructor(e,t){this.width=e,this.height=t,this.mapping=new Array(t);for(let n=0;n<t;n++)this.mapping[n]=new Array(e)}getCell(e){return this.getCellVertex(e.col,e.row)}setCell(e,t){this.width=Math.max(this.width,e.col+1),this.height=Math.max(this.height,e.row+1);const n=this.mapping[e.row];n||(this.mapping[e.row]=new Array(this.width)),this.mapping[e.row][e.col]=t}has(e){const t=this.mapping[e.row];return!!t&&!!t[e.col]}getHeight(){return this.height}getWidth(){return this.width}removeCell(e){void 0!==this.mapping[e.row]&&delete this.mapping[e.row][e.col]}addRows(e,t){const n=[];for(let r=0;r<t;r++)n.push(new Array(this.width));this.mapping.splice(e,0,...n),this.height+=t}addColumns(e,t){for(let n=0;n<this.height;n++)void 0!==this.mapping[n]&&this.mapping[n].splice(e,0,...new Array(t));this.width+=t}removeRows(e){this.mapping.splice(e.rowStart,e.numberOfRows);const t=Math.min(this.height-1,e.rowEnd),n=Math.max(0,t-e.rowStart+1);this.height=Math.max(0,this.height-n)}removeColumns(e){for(let r=0;r<this.height;r++)void 0!==this.mapping[r]&&this.mapping[r].splice(e.columnStart,e.numberOfColumns);const t=Math.min(this.width-1,e.columnEnd),n=Math.max(0,t-e.columnStart+1);this.width=Math.max(0,this.width-n)}*getEntries(e){for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n){const r=this.getCellVertex(n,t);r&&(yield[mr(e,n,t),r])}}*verticesFromColumn(e){for(let t=0;t<this.height;++t){const n=this.getCellVertex(e,t);n&&(yield n)}}*verticesFromRow(e){for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let e=0;e<this.height;++e){const n=this.getCellVertex(t,e);n&&(yield n)}}*verticesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const e=this.getCellVertex(t,n);e&&(yield e)}}*entriesFromRowsSpan(e){for(let t=0;t<this.width;++t)for(let n=e.rowStart;n<=e.rowEnd;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*entriesFromColumnsSpan(e){for(let t=e.columnStart;t<=e.columnEnd;++t)for(let n=0;n<this.height;++n){const r=this.getCellVertex(t,n);r&&(yield[mr(e.sheet,t,n),r])}}*vertices(){for(let e=0;e<this.height;++e)for(let t=0;t<this.width;++t){const n=this.getCellVertex(t,e);n&&(yield n)}}getCellVertex(e,t){var n;return null===(n=this.mapping[t])||void 0===n?void 0:n[e]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["DIV_BY_ZERO"]="DIV_BY_ZERO",e["NAME"]="NAME",e["VALUE"]="VALUE",e["NUM"]="NUM",e["NA"]="NA",e["CYCLE"]="CYCLE",e["REF"]="REF",e["SPILL"]="SPILL",e["LIC"]="LIC",e["ERROR"]="ERROR"})(Vn||(Vn={})),function(e){e["FORMULA"]="FORMULA",e["VALUE"]="VALUE",e["ARRAY"]="ARRAY",e["EMPTY"]="EMPTY",e["ARRAYFORMULA"]="ARRAYFORMULA"}(Bn||(Bn={}));const Zn=(e,t)=>e instanceof Rn?e.isLeftCorner(t)?Bn.ARRAYFORMULA:Bn.ARRAY:e instanceof On||e instanceof qn?Bn.FORMULA:e instanceof $n?Bn.VALUE:Bn.EMPTY;var er,tr;(function(e){e["EMPTY"]="EMPTY",e["NUMBER"]="NUMBER",e["STRING"]="STRING",e["BOOLEAN"]="BOOLEAN",e["ERROR"]="ERROR"})(er||(er={})),function(e){e["NUMBER"]="NUMBER"}(tr||(tr={}));const nr=Object.assign(Object.assign({},er),tr),rr=Object.assign(Object.assign({},er),Lt),ir=e=>{switch(e){case nr.EMPTY:return 0;case nr.NUMBER:return 1;case nr.STRING:return 2;case nr.BOOLEAN:return 3;case nr.ERROR:return 4}throw new Error("Cell value not computed")},sr=e=>{if(e===_t)return nr.EMPTY;if(e instanceof lr||e instanceof Ht)return nr.ERROR;if("string"===typeof e)return nr.STRING;if(At(e))return nr.NUMBER;if("boolean"===typeof e)return nr.BOOLEAN;throw new Error("Cell value not computed")},or=e=>At(e)?kt(e):sr(e),ar=e=>At(e)?xt(e):void 0;class lr{constructor(e,t,n){this.type=e,this.message=t,this.root=n}static parsingError(e){return new lr(Vn.ERROR,`${Re.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new lr(this.type,this.message,e):this}}const ur=(e,t)=>({sheet:e,row:t}),cr=e=>e.row<0,hr=(e,t)=>({sheet:e,col:t}),dr=e=>e.col<0,mr=(e,t,n)=>({sheet:e,col:t,row:n}),fr=e=>e.col<0||e.row<0,pr=(e,t,n,r)=>mr(t,e.col+n,e.row+r),gr=e=>`${e.sheet},${e.row},${e.col}`;function yr(e){var t,n,r;return e&&("object"===typeof e||"function"===typeof e)&&"number"===typeof(null===(t=e)||void 0===t?void 0:t.sheet)&&"number"===typeof(null===(n=e)||void 0===n?void 0:n.col)&&"number"===typeof(null===(r=e)||void 0===r?void 0:r.row)}const wr=(e,t)=>{var n;return null!==(n=e.sheet)&&void 0!==n?n:t.sheet},br=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row,vr="AbsoluteCellRange: Wrong range size";function _r(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("start"in e&&yr(e.start)&&"end"in e&&yr(e.end))}const Sr=(e,t)=>({start:e,end:t});class Er{constructor(e,t){if(e.sheet!==t.sheet)throw new $t(e.sheet,t.sheet);this.start=mr(e.sheet,e.col,e.row),this.end=mr(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new $t(e.sheet,t.sheet);const n=t.col-e.col,r=t.row-e.row;return Number.isFinite(r)&&Number.isFinite(n)?new Er(e,t):Number.isFinite(r)?new Mr(e.sheet,e.row,t.row):new Cr(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===W.CELL_RANGE?Er.fromCellRange(e,t):e.type===W.COLUMN_RANGE?Cr.fromColumnRange(e,t):Mr.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return Er.fromAst(e,t)}catch(n){return}}static fromCellRange(e,t){return new Er(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,n){const r=Er.spanFromOrUndef(e,t,n);if(void 0===r)throw new Error(vr);return r}static spanFromOrUndef(e,t,n){if(!Number.isFinite(t)&&Number.isFinite(n)){if(0!==e.col)return;return new Mr(e.sheet,e.row,e.row+n-1)}if(!Number.isFinite(n)&&Number.isFinite(t)){if(0!==e.row)return;return new Cr(e.sheet,e.col,e.col+t-1)}if(Number.isFinite(n)&&Number.isFinite(t))return new Er(e,mr(e.sheet,e.col+t-1,e.row+n-1))}static fromCoordinates(e,t,n,r,i){return new Er(mr(e,t,n),mr(e,r,i))}isFinite(){return Number.isFinite(this.size())}doesOverlap(e){return this.start.sheet==e.start.sheet&&(!(this.end.row<e.start.row||this.start.row>e.end.row)&&!(this.end.col<e.start.col||this.start.col>e.end.col))}addressInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row&&this.start.col<=e.col&&this.end.col>=e.col)}columnInRange(e){return this.sheet===e.sheet&&(this.start.col<=e.col&&this.end.col>=e.col)}rowInRange(e){return this.sheet===e.sheet&&(this.start.row<=e.row&&this.end.row>=e.row)}containsRange(e){return this.addressInRange(e.start)&&this.addressInRange(e.end)}intersectionWith(e){if(this.sheet!==e.start.sheet)return;const t=Math.max(this.start.row,e.start.row),n=Math.min(this.end.row,e.end.row),r=Math.max(this.start.col,e.start.col),i=Math.min(this.end.col,e.end.col);return t>n||r>i?void 0:new Er(mr(this.sheet,r,t),mr(this.sheet,i,n))}includesRow(e){return this.start.row<e&&this.end.row>=e}includesColumn(e){return this.start.col<e&&this.end.col>=e}shiftByRows(e){this.start.row+=e,this.end.row+=e}expandByRows(e){this.end.row+=e}shiftByColumns(e){this.start.col+=e,this.end.col+=e}shifted(e,t){return Er.spanFrom(mr(this.sheet,this.start.col+e,this.start.row+t),this.width(),this.height())}expandByColumns(e){this.end.col+=e}moveToSheet(e){this.start.sheet=e,this.end.sheet=e}removeSpan(e){e instanceof jt?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return this.width()<=0||this.height()<=0}rangeWithSameWidth(e,t){return Er.spanFrom(mr(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return Er.spanFrom(mr(this.sheet,e,this.start.row),t,this.height())}toString(){return`${this.start.sheet},${this.start.col},${this.start.row},${this.end.col},${this.end.row}`}width(){return this.end.col-this.start.col+1}height(){return this.end.row-this.start.row+1}size(){return this.height()*this.width()}arrayOfAddressesInRange(){const e=[];for(let t=0;t<this.height();++t){e[t]=[];for(let n=0;n<this.width();++n){const r=mr(this.sheet,this.start.col+n,this.start.row+t);e[t].push(r)}}return e}withStart(e){return new Er(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return br(this.start,e.start)&&br(this.end,e.end)}addressesArrayMap(e,t){const n=[];let r=this.start.row;while(r<=this.effectiveEndRow(e)){let i=this.start.col;const s=[];while(i<=this.effectiveEndColumn(e))s.push(t(mr(this.start.sheet,i,r))),i++;n.push(s),r++}return n}addresses(e){const t=[];let n=this.start.row;const r=this.effectiveEndRow(e),i=this.effectiveEndColumn(e);while(n<=r){let e=this.start.col;while(e<=i)t.push(mr(this.start.sheet,e,n)),e++;n++}return t}*addressesWithDirection(e,t,n){if(e>0)if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.effectiveEndColumn(n);while(t>=this.start.col)yield mr(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(n);while(e>=this.start.row){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;while(e<=this.effectiveEndRow(n)){let t=this.start.col;while(t<=this.effectiveEndColumn(n))yield mr(this.start.sheet,t,e),t+=1;e+=1}}}getAddress(e,t){if(e<0||t<0||t>this.height()-1||e>this.width()-1)throw Error("Index out of bound");return mr(this.start.sheet,this.start.col+e,this.start.row+t)}exceedsSheetSizeLimits(e,t){return this.end.col>=e||this.end.row>=t}effectiveEndColumn(e){return this.end.col}effectiveEndRow(e){return this.end.row}effectiveWidth(e){return this.width()}effectiveHeight(e){return this.height()}removeRows(e,t){if(!(e>this.end.row)){if(t<this.start.row){const n=t-e+1;return this.shiftByRows(-n)}e<=this.start.row&&(this.start.row=e),this.end.row-=Math.min(t,this.end.row)-e+1}}removeColumns(e,t){if(!(e>this.end.col)){if(t<this.start.col){const n=t-e+1;return this.shiftByColumns(-n)}e<=this.start.col&&(this.start.col=e),this.end.col-=Math.min(t,this.end.col)-e+1}}}class Cr extends Er{constructor(e,t,n){super(mr(e,t,0),mr(e,n,Number.POSITIVE_INFINITY))}static fromColumnRange(e,t){const n=e.start.toSimpleColumnAddress(t),r=e.end.toSimpleColumnAddress(t);if(n.sheet!==r.sheet)throw new $t(n.sheet,r.sheet);return new Cr(n.sheet,n.col,r.col)}shouldBeRemoved(){return this.width()<=0}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new Cr(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new Cr(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.col>=e}effectiveEndRow(e){return this.effectiveHeight(e)-1}effectiveHeight(e){return e.getSheetHeight(this.sheet)}removeRows(e,t){}}class Mr extends Er{constructor(e,t,n){super(mr(e,0,t),mr(e,Number.POSITIVE_INFINITY,n))}static fromRowRangeAst(e,t){const n=e.start.toSimpleRowAddress(t),r=e.end.toSimpleRowAddress(t);if(n.sheet!==r.sheet)throw new $t(n.sheet,r.sheet);return new Mr(n.sheet,n.row,r.row)}shouldBeRemoved(){return this.height()<=0}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new Mr(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new Mr(this.sheet,e,e+t-1)}exceedsSheetSizeLimits(e,t){return this.end.row>=t}effectiveEndColumn(e){return this.effectiveWidth(e)-1}effectiveWidth(e){return e.getSheetWidth(this.sheet)}removeColumns(e,t){}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Tr{constructor(e,t,n){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function Rr(e){const t=e.caseSensitive?e.accentSensitive?"variant":"case":e.accentSensitive?"accent":"base",n=e.caseFirst,r=e.ignorePunctuation;return new Intl.Collator(e.localeLang,{sensitivity:t,caseFirst:n,ignorePunctuation:r})}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Or="i",Nr=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class Ar{constructor(e,t,n){this.config=e,this.dateTimeHelper=t,this.numberLiteralsHelper=n,this.lt=(e,t)=>this.compare(e,t)<0,this.leq=(e,t)=>this.compare(e,t)<=0,this.gt=(e,t)=>this.compare(e,t)>0,this.geq=(e,t)=>this.compare(e,t)>=0,this.eq=(e,t)=>0===this.compare(e,t),this.neq=(e,t)=>0!==this.compare(e,t),this.pow=(e,t)=>Math.pow(St(e),St(t)),this.addWithEpsilonRaw=(e,t)=>{const n=e+t;return Math.abs(n)<this.actualEps*Math.abs(e)?0:n},this.addWithEpsilon=(e,t)=>{const n=Kr(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(St(e),St(t)),n)},this.unaryMinus=e=>Ct(e,-St(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new Nt(St(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>e instanceof lr?e:t instanceof lr?t:"number"===typeof e?"number"===typeof t?this.addWithEpsilonRaw(e,t):e:"number"===typeof t?t:0,this.subtract=(e,t)=>{const n=Kr(e,t),r=St(e),i=St(t);let s=r-i;return Math.abs(s)<this.actualEps*Math.abs(r)&&(s=0),this.ExtendedNumberFactory(s,n)},this.divide=(e,t)=>{const n=St(e),r=St(t);if(0===r)return new lr(Vn.DIV_BY_ZERO);{const i=Xr(e,t);return this.ExtendedNumberFactory(n/r,i)}},this.multiply=(e,t)=>{const n=Xr(e,t);return this.ExtendedNumberFactory(St(e)*St(t),n)},this.manyToExactComplex=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(At(n)||"string"===typeof n){const e=this.coerceScalarToComplex(n);e instanceof lr||t.push(e)}}return t},this.coerceNumbersExactRanges=e=>this.manyToNumbers(e,this.manyToExactNumbers),this.coerceNumbersCoerceRangesDropNulls=e=>this.manyToNumbers(e,this.manyToCoercedNumbersDropNulls),this.manyToExactNumbers=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;At(n)&&t.push(St(n))}return t},this.manyToOnlyNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(At(n))t.push(St(n));else if(n!==_t)return new lr(Vn.VALUE,Re.NumberExpected)}return t},this.manyToCoercedNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof lr)return n;if(n===_t)continue;const e=this.coerceScalarToNumberOrError(n);At(e)&&t.push(St(e))}return t},this.collator=Rr(e),this.actualEps=e.smartRounding?e.precisionEpsilon:0}eqMatcherFunction(e){const t=this.buildRegex(e);return e=>"string"===typeof e&&t.test(this.normalizeString(e))}neqMatcherFunction(e){const t=this.buildRegex(e);return e=>!("string"===typeof e)||!t.test(this.normalizeString(e))}searchString(e,t){var n;const r=this.buildRegex(e,!1),i=r.exec(t);return null!==(n=null===i||void 0===i?void 0:i.index)&&void 0!==n?n:-1}requiresRegex(e){if(!this.config.useRegularExpressions&&!this.config.useWildcards)return!this.config.matchWholeCell;for(let t=0;t<e.length;t++){const n=e.charAt(t);if(Ur(n)||this.config.useRegularExpressions&&Br(n))return!0}return!1}floatCmp(e,t){const n=St(e),r=St(t),i=1+this.actualEps;return r>=0&&n*i>=r&&n<=r*i||r<=0&&n*i<=r&&n>=r*i?0:n>r?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof lr?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new lr(Vn.VALUE,Re.NumberCoercion)}coerceToMaybeNumber(e){var t;return null!==(t=this.coerceNonDateScalarToMaybeNumber(e))&&void 0!==t?t:"string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):void 0}coerceNonDateScalarToMaybeNumber(e){if(e===_t)return 0;if("string"===typeof e){if(""===e)return 0;const t=this.coerceStringToMaybePercentNumber(e);if(void 0!==t)return t;const n=this.coerceStringToMaybeCurrencyNumber(e);return void 0!==n?n:this.numberLiteralsHelper.numericStringToMaybeNumber(e.trim())}return At(e)?e:"boolean"===typeof e?Number(e):void 0}coerceStringToMaybePercentNumber(e){const t=e.trim();if(t.endsWith("%")){const e=t.slice(0,t.length-1).trim(),n=this.numberLiteralsHelper.numericStringToMaybeNumber(e);if(void 0!==n)return new Nt(n/100)}}coerceStringToMaybeCurrencyNumber(e){const t=this.currencyMatcher(e.trim());if(void 0!==t){const[e,n]=t,r=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==r)return new Tt(r,e)}}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length).trim()];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length).trim()]}}coerceComplexExactRanges(e){const t=[];for(const r of e)if(r instanceof Ht)t.push(r);else if(r!==_t){const e=this.coerceScalarToComplex(r);if(e instanceof lr)return e;t.push(e)}const n=[];for(const r of t)if(r instanceof Ht){const e=this.manyToExactComplex(r.valuesFromTopLeftCorner());if(e instanceof lr)return e;n.push(...e)}else n.push(r);return n}coerceScalarToComplex(e){return e instanceof lr?e:e===_t?[0,0]:At(e)?[St(e),0]:"string"===typeof e?this.coerceStringToComplex(e):new lr(Vn.NUM,Re.ComplexNumberExpected)}ExtendedNumberFactory(e,t){const{type:n,format:r}=t;switch(n){case Lt.NUMBER_RAW:return e;case Lt.NUMBER_CURRENCY:return new Tt(e,null!==r&&void 0!==r?r:this.config.currencySymbol[0]);case Lt.NUMBER_DATE:return new Mt(e,r);case Lt.NUMBER_DATETIME:return new Ot(e,r);case Lt.NUMBER_TIME:return new Rt(e,r);case Lt.NUMBER_PERCENT:return new Nt(e,r)}}buildRegex(e,t=!0){let n;e=this.normalizeString(e);let r=this.config.useWildcards,i=this.config.useRegularExpressions;if(i)try{RegExp(e)}catch(s){i=!1,r=!1}return n=i?Gr(e,this.config.caseSensitive):r?Wr(e,this.config.caseSensitive):zr(e,this.config.caseSensitive),this.config.matchWholeCell&&t?RegExp("^("+n+")$"):RegExp(n)}normalizeString(e){return this.config.caseSensitive||(e=e.toLowerCase()),this.config.accentSensitive||(e=Jr(e,"nfd").replace(/[\u0300-\u036f]/g,"")),e}compare(e,t){if("string"===typeof e||"string"===typeof t){const n="string"===typeof e?this.dateTimeHelper.dateStringToDateNumber(e):e,r="string"===typeof t?this.dateTimeHelper.dateStringToDateNumber(t):t;if(At(n)&&At(r))return this.floatCmp(n,r)}return e===_t?e=xr(t):t===_t&&(t=xr(e)),"string"===typeof e&&"string"===typeof t?this.stringCmp(e,t):"boolean"===typeof e&&"boolean"===typeof t?jr(kr(e),kr(t)):At(e)&&At(t)?this.floatCmp(e,t):e===_t&&t===_t?0:jr(ir(sr(e)),ir(sr(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){const n=[];for(const i of e)if(i instanceof Ht)n.push(i);else{const e=St(this.coerceScalarToNumberOrError(i));if(e instanceof lr)return e;n.push(e)}const r=[];for(const i of n)if(i instanceof Ht){const e=t(i.valuesFromTopLeftCorner());if(e instanceof lr)return e;r.push(...e)}else r.push(i);return r}coerceStringToComplex(e){const t=Nr.exec(e);if(null===t)return new lr(Vn.NUM,Re.ComplexNumberExpected);let n,r;return n=void 0!==t[6]?"-"===t[1]?[0,-1]:[0,1]:this.parseComplexToken(t[1]+t[3],t[5]),n instanceof lr||void 0===t[8]?n:(r=void 0!==t[14]?"-"===t[9]?[0,-1]:[0,1]:this.parseComplexToken(t[9]+t[11],t[13]),r instanceof lr?r:""!==t[5]||""===t[13]?new lr(Vn.NUM,Re.ComplexNumberExpected):"+"===t[8]?[n[0]+r[0],n[1]+r[1]]:[n[0]-r[0],n[1]-r[1]])}parseComplexToken(e,t){const n=St(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new lr(Vn.NUM,Re.ComplexNumberExpected):""===t?[n,0]:[0,n]}}function Lr([e,t],n){if(!isFinite(e)||!isFinite(t))return new lr(Vn.NUM,Re.NaN);if(n=null!==n&&void 0!==n?n:Or,0===t)return""+e;const r=`${-1===t||1===t?"":Math.abs(t)}${n}`;return 0===e?`${t<0?"-":""}${r}`:`${e}${t<0?"-":"+"}${r}`}function Ir(e){return e instanceof Ht?e:Ht.fromScalar(e)}function kr(e){return Number(e)}function xr(e){return"string"===typeof e?"":At(e)?0:"boolean"!==typeof e&&_t}function Dr(e){if(e instanceof lr||"boolean"===typeof e)return e;if(e===_t)return!1;if(At(e))return 0!==St(e);{const t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&(""!==t&&void 0)}}function Hr(e){return e instanceof lr||"string"===typeof e?e:e===_t?"":At(e)?St(e).toString():e?"TRUE":"FALSE"}function Pr(e){return e===_t?0:e}function jr(e,t){const n=St(e),r=St(t);return n>r?1:n<r?-1:0}function Fr(e){return isNaN(e)||e===1/0||e===-1/0}function Yr(e){return 0===e?0:e}function Ur(e){return["*","?"].includes(e)}const Vr=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function Br(e){return Vr.includes(e)}function Wr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);if("~"===i){if(r==e.length-1){n+="~";continue}const t=e.charAt(r+1);Ur(t)||Br(t)?(n+="\\"+t,r++):(n+=t,r++)}else Ur(i)?n+="."+i:Br(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function zr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Br(i)?n+="\\"+i:n+=t?i:i.toLowerCase()}return n}function Gr(e,t){let n="";for(let r=0;r<e.length;r++){const i=e.charAt(r);Ur(i)||Br(i)?n+=i:n+=t?i:i.toLowerCase()}return n}function Kr(e,t){const{type:n,format:r}=Dt(e),{type:i,format:s}=Dt(t);if(n===Lt.NUMBER_RAW)return{type:i,format:s};if(i===Lt.NUMBER_RAW)return{type:n,format:r};if((n===Lt.NUMBER_DATETIME||n===Lt.NUMBER_DATE)&&(i===Lt.NUMBER_DATETIME||i===Lt.NUMBER_DATE))return{type:Lt.NUMBER_RAW};if(n===Lt.NUMBER_TIME){if(i===Lt.NUMBER_DATE)return{type:Lt.NUMBER_DATETIME,format:`${s} ${r}`};if(i===Lt.NUMBER_DATETIME)return{type:Lt.NUMBER_DATETIME,format:s}}if(i===Lt.NUMBER_TIME){if(n===Lt.NUMBER_DATE)return{type:Lt.NUMBER_DATETIME,format:`${r} ${s}`};if(n===Lt.NUMBER_DATETIME)return{type:Lt.NUMBER_DATETIME,format:r}}return{type:n,format:r}}function Xr(e,t){let{type:n,format:r}=Dt(e),{type:i,format:s}=Dt(t);return n===Lt.NUMBER_PERCENT&&(n=Lt.NUMBER_RAW,r=void 0),i===Lt.NUMBER_PERCENT&&(i=Lt.NUMBER_RAW,s=void 0),n===Lt.NUMBER_RAW?{type:i,format:s}:i===Lt.NUMBER_RAW?{type:n,format:r}:{type:Lt.NUMBER_RAW}}function $r(e){return Jr(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function qr(e,t){var n;if(e.isAdHoc())return null===(n=e.data[0])||void 0===n?void 0:n[0];const r=e.range;if(t.formulaAddress.sheet===r.sheet)if(1===r.width()){const n=t.formulaAddress.row-r.start.row;if(n>=0&&n<r.height())return e.data[n][0]}else if(1===r.height()){const n=t.formulaAddress.col-r.start.col;if(n>=0&&n<r.width())return e.data[0][n]}}function Jr(e,t){return e.normalize(t.toUpperCase())}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var Qr;(function(e){e["STRING"]="STRING",e["NUMBER"]="NUMBER",e["BOOLEAN"]="BOOLEAN",e["SCALAR"]="SCALAR",e["NOERROR"]="NOERROR",e["RANGE"]="RANGE",e["INTEGER"]="INTEGER",e["COMPLEX"]="COMPLEX",e["ANY"]="ANY"})(Qr||(Qr={}));class Zr{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,n,r)=>{const i=this.evaluateArguments(e,t,n),s=i.map(([e,t])=>e),o=i.map(([e,t])=>t),a=this.buildMetadataForEachArgumentValue(s.length,n),l=t.arraysFlag&&!n.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,s.length))return new lr(Vn.NA,Re.WrongArgNumber);const[u,c]=l?this.calculateSizeOfVectorizedResultArray(s,a):[1,1];if(1===u&&1===c){const e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,o,r,n.returnNumberType)}const h=[...Array(u).keys()].map(e=>[...Array(c).keys()].map(i=>{const u=this.vectorizeAndBroadcastArgumentsIfNecessary(l,s,a,e,i),c=this.calculateSingleCellOfResultArray(t,u,a,o,r,n.returnNumberType);if(c instanceof Ht)throw new Error("Function returning array cannot be vectorized.");return c}));return Ht.onlyValues(h)},this.runFunctionWithReferenceArgument=(e,t,n,r,i,s=(()=>new lr(Vn.NA,Re.CellRefExpected)))=>{if(0===e.length)return this.returnNumberWrapper(r(),n.returnNumberType);if(e.length>1)return new lr(Vn.NA,Re.WrongArgNumber);let o,a=e[0];while(a.type===W.PARENTHESIS)a=a.expression;if(a.type===W.CELL_REFERENCE)o=a.reference.toSimpleCellAddress(t.formulaAddress);else if(a.type===W.CELL_RANGE||a.type===W.COLUMN_RANGE||a.type===W.ROW_RANGE)try{o=Er.fromAst(a,t.formulaAddress).start}catch(l){return new lr(Vn.REF,Re.CellRefExpected)}return void 0!==o?this.returnNumberWrapper(i(o),n.returnNumberType):this.runFunction(e,t,n,s)},this.interpreter=e,this.dependencyGraph=e.dependencyGraph,this.columnSearch=e.columnSearch,this.config=e.config,this.serialization=e.serialization,this.arraySizePredictor=e.arraySizePredictor,this.dateTimeHelper=e.dateTimeHelper,this.arithmeticHelper=e.arithmeticHelper}evaluateAst(e,t){return this.interpreter.evaluateAst(e,t)}arraySizeForAst(e,t){return this.arraySizePredictor.checkArraySizeForAst(e,t)}listOfScalarValues(e,t){const n=[];for(const r of e){const e=this.evaluateAst(r,t);if(e instanceof Ht)for(const t of e.valuesFromTopLeftCorner())n.push([t,!0]);else n.push([e,!1])}return n}coerceToType(e,t,n){let r;if(e instanceof Ht)switch(t.argumentType){case Qr.RANGE:case Qr.ANY:r=e;break;default:{const t=qr(e,n);if(void 0===t)return;e=t}}if(!(e instanceof Ht))switch(t.argumentType){case Qr.INTEGER:case Qr.NUMBER:const n=this.coerceScalarToNumberOrError(e);if(!At(n)){r=n;break}const i=St(n);if(void 0!==t.maxValue&&i>t.maxValue)return new lr(Vn.NUM,Re.ValueLarge);if(void 0!==t.minValue&&i<t.minValue)return new lr(Vn.NUM,Re.ValueSmall);if(void 0!==t.lessThan&&i>=t.lessThan)return new lr(Vn.NUM,Re.ValueLarge);if(void 0!==t.greaterThan&&i<=t.greaterThan)return new lr(Vn.NUM,Re.ValueSmall);if(t.argumentType===Qr.INTEGER&&!Number.isInteger(i))return new lr(Vn.NUM,Re.IntegerExpected);r=n;break;case Qr.STRING:r=Hr(e);break;case Qr.BOOLEAN:r=Dr(e);break;case Qr.SCALAR:case Qr.NOERROR:case Qr.ANY:r=e;break;case Qr.RANGE:if(e instanceof lr)return e;r=Ir(e);break;case Qr.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(St(e))}return t.passSubtype||void 0===r?r:St(r)}calculateSingleCellOfResultArray(e,t,n,r,i,s){const o=this.coerceArgumentsToRequiredTypes(e,t,n,r);if(o instanceof lr)return o;const a=i(...o);return this.returnNumberWrapper(a,s)}coerceArgumentsToRequiredTypes(e,t,n,r){const i=[];for(let s=0;s<n.length;s++){const o=n[s],a=void 0!==t[s]?t[s]:null===o||void 0===o?void 0:o.defaultValue;if(void 0===a){i.push(void 0);continue}const l=this.coerceToType(a,o,e);if(void 0===l&&!r[s])return new lr(Vn.VALUE,Re.WrongType);if(l instanceof lr&&o.argumentType!==Qr.SCALAR)return l;i.push(l)}return i}vectorizeAndBroadcastArgumentsIfNecessary(e,t,n,r,i){return t.map((t,s)=>e&&this.isRangePassedAsAScalarArgument(t,n[s])?this.vectorizeAndBroadcastRangeArgument(t,r,i):t)}vectorizeAndBroadcastRangeArgument(e,t,n){var r;const i=1===e.height()?0:t,s=1===e.width()?0:n;return null===(r=e.data[i])||void 0===r?void 0:r[s]}evaluateArguments(e,t,n){return n.expandRanges?this.listOfScalarValues(e,t):e.map(e=>[this.evaluateAst(e,t),!1])}buildMetadataForEachArgumentValue(e,t){const n=t.parameters?[...t.parameters]:[],r=void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0;if(r)while(e>n.length)n.push(...n.slice(n.length-t.repeatLastArgs));return n}isNumberOfArgumentValuesValid(e,t){if(t>e.length)return!1;if(t<e.length){const n=e.slice(t),r=n.every(e=>(null===e||void 0===e?void 0:e.optionalArg)||void 0!==(null===e||void 0===e?void 0:e.defaultValue));return r}return!0}calculateSizeOfVectorizedResultArray(e,t){const n=e.filter((e,n)=>this.isRangePassedAsAScalarArgument(e,t[n])),r=Math.max(1,...n.map(e=>e.height())),i=Math.max(1,...n.map(e=>e.width()));return[r,i]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&(e instanceof Ht&&![Qr.RANGE,Qr.ANY].includes(t.argumentType))}metadata(e){const t=this.constructor.implementedFunctions[e];if(void 0!==t)return t;throw new Error(`No metadata for function ${e}.`)}returnNumberWrapper(e,t,n){return void 0!==t&&At(e)?this.arithmeticHelper.ExtendedNumberFactory(St(e),{type:t,format:n}):e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ei{constructor(e,t,n=!1){this.width=e,this.height=t,this.isRef=n}static error(){return new ei(1,1,!0)}static scalar(){return new ei(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}function ti(e,t){return new ei(Math.max(e.width,t.width),Math.max(e.height,t.height))}function ni(e){return new ei(e.width,e.height)}class ri{constructor(e,t){this.config=e,this.functionRegistry=t}checkArraySize(e,t){return this.checkArraySizeForAst(e,{formulaAddress:t,arraysFlag:this.config.useArrayArithmetic})}checkArraySizeForAst(e,t){switch(e.type){case W.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case W.COLUMN_RANGE:case W.ROW_RANGE:case W.CELL_RANGE:{const n=Er.fromAstOrUndef(e,t.formulaAddress);return void 0===n?ei.error():new ei(n.width(),n.height(),!0)}case W.ARRAY:{const n=[],r=[];for(const o of e.args){const e=o.map(e=>this.checkArraySizeForAst(e,t)),i=Math.min(...e.map(e=>e.height)),s=e.reduce((e,t)=>e+t.width,0);n.push(i),r.push(s)}const i=n.reduce((e,t)=>e+t,0),s=Math.min(...r);return new ei(s,i)}case W.STRING:case W.NUMBER:return ei.scalar();case W.CELL_REFERENCE:return new ei(1,1,!0);case W.DIV_OP:case W.CONCATENATE_OP:case W.EQUALS_OP:case W.GREATER_THAN_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.LESS_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.NOT_EQUAL_OP:case W.PLUS_OP:case W.POWER_OP:case W.TIMES_OP:{const n=this.checkArraySizeForAst(e.left,t),r=this.checkArraySizeForAst(e.right,t);return!t.arraysFlag&&(n.height>1||n.width>1||r.height>1||r.width>1)?ei.error():ti(n,r)}case W.MINUS_UNARY_OP:case W.PLUS_UNARY_OP:case W.PERCENT_OP:{const n=this.checkArraySizeForAst(e.value,t);return!t.arraysFlag&&(n.height>1||n.width>1)?ei.error():ni(n)}case W.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case W.EMPTY:return ei.error();default:return ei.error()}}checkArraySizeForFunction(e,t){const n=this.functionRegistry.getArraySizeFunction(e.procedureName);if(void 0!==n)return n(e,t);const r=this.functionRegistry.getMetadata(e.procedureName);if(void 0===r||r.expandRanges||!t.arraysFlag||r.vectorizationForbidden||void 0===r.parameters)return new ei(1,1);const i=e.args.map(e=>{var n;return this.checkArraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(n=null===r||void 0===r?void 0:r.arrayFunction)&&void 0!==n&&n))}),s=[...r.parameters];if(void 0!==r.repeatLastArgs&&s.length<i.length&&(i.length-s.length)%r.repeatLastArgs!==0)return ei.error();while(s.length<i.length){if(void 0===r.repeatLastArgs)return ei.error();s.push(...s.slice(s.length-r.repeatLastArgs))}let o=1,a=1;for(let l=0;l<i.length;l++)s[l].argumentType!==Qr.RANGE&&s[l].argumentType!==Qr.ANY&&(a=Math.max(a,i[l].height),o=Math.max(o,i[l].width));return new ei(o,a)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ii{constructor(e,t,n){var r;this.value=t,this.address=n,this.type=e.type,this.message=null!==(r=e.message)&&void 0!==r?r:""}toString(){return this.value}valueOf(){return this.value}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function si(e,t,n){if("undefined"===typeof e)return ma.defaultConfig[n];if("string"===typeof t){if(typeof e===t)return e;throw new sn(t,n)}if(t.includes(e))return e;throw new un(t.map(e=>`'${e}'`).join(" "),n)}function oi(e,t,n){if(e<n)throw new an(t,n)}function ai(e,t,n){if(e>n)throw new ln(t,n)}function li(e,t,n,r){if(t(e))return e;if("undefined"===typeof e)return ma.defaultConfig[r];throw new sn(n,r)}function ui(...e){const t=new Map;e.forEach(e=>{const n=t.get(e.value)||[];n.push(e.name),t.set(e.value,n)});const n=[];for(const r of t.values())r.length>1&&n.push(r);if(n.length>0){n.forEach(e=>e.sort());const e=n.map(e=>`[${e}]`).join("; ");throw new Error("Config initialization failed. Parameters in conflict: "+e)}}function ci(e,t,n){if(typeof e!==t)throw new sn(t,n)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const hi=new RegExp("^ss(\\.(s+|0+))?$"),di=new RegExp("^[0-9/.\\-: ]+[ap]?m?$"),mi=new RegExp("\\s+"),fi=new RegExp("[ /.-]"),pi=":",gi=1e3,yi=Mi(Si),wi=Mi(Ei);function bi(e,t,n){if(void 0===t&&void 0===n)return;let r=e.replace(mi," ").trim().toLowerCase();if(!Ci(r))return;let i=r.substring(r.length-2);"am"===i||"pm"===i?r=r.substring(0,r.length-2).trim():(i=r.substring(r.length-1),"a"===i||"p"===i?r=r.substring(0,r.length-1).trim():i=void 0);const s=r.split(fi);s.length>=2&&s[s.length-2].includes(pi)&&(s[s.length-2]=s[s.length-2]+"."+s[s.length-1],s.pop());const o=s[s.length-1].split(pi);if(void 0!==i&&o.push(i),1===s.length)return vi(o,n);if(1===o.length)return _i(s,t);const a=_i(s.slice(0,s.length-1),t),l=vi(o,n);return void 0===a||void 0===l?void 0:Object.assign(Object.assign({},a),l)}function vi(e,t){var n,r,i;if(void 0===t)return;const{itemsCount:s,hourItem:o,minuteItem:a,secondItem:l}=yi(t);let u=void 0;if("am"===e[e.length-1]||"a"===e[e.length-1]?(u=!1,e.pop()):"pm"!==e[e.length-1]&&"p"!==e[e.length-1]||(u=!0,e.pop()),e.length!==s)return;const c=Number(null!==(n=e[l])&&void 0!==n?n:"0");if(!Number.isFinite(c))return;const h=Math.round(c*gi)/gi,d=Number(null!==(r=e[a])&&void 0!==r?r:"0");if(!Number.isFinite(d)||!Number.isInteger(d))return;const m=Number(null!==(i=e[o])&&void 0!==i?i:"0");if(!Number.isFinite(m)||!Number.isInteger(m))return;if(void 0!==u&&(m<0||m>12))return;const f=void 0!==u?m%12+(u?12:0):m;return{hours:f,minutes:d,seconds:h}}function _i(e,t){var n;if(void 0===t)return;const{itemsCount:r,dayItem:i,monthItem:s,shortYearItem:o,longYearItem:a}=wi(t);if(e.length!==r)return;const l=Number(e[i]);if(!Number.isFinite(l)||!Number.isInteger(l))return;const u=Number(e[s]);if(!Number.isFinite(u)||!Number.isInteger(u))return;if(e[a]&&e[o])return;const c=Number(null!==(n=e[a])&&void 0!==n?n:e[o]);return!Number.isFinite(c)||!Number.isInteger(c)||e[a]&&(c<1e3||c>9999)||e[o]&&(c<0||c>99)?void 0:{year:c,month:u,day:l}}function Si(e){const t=e.toLowerCase().trim(),n=t.endsWith("am/pm")?t.substring(0,t.length-5):t.endsWith("a/p")?t.substring(0,e.length-3):t,r=n.trim().split(pi);return{itemsCount:r.length,hourItem:r.indexOf("hh"),minuteItem:r.indexOf("mm"),secondItem:r.findIndex(e=>hi.test(e))}}function Ei(e){const t=e.toLowerCase().trim().split(fi);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}}function Ci(e){return di.test(e)}function Mi(e){const t={};return n=>{const r=t[n];if(void 0!==r)return r;const i=e(n);return t[n]=i,i}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Ti=[31,28,31,30,31,30,31,31,30,31,30,31],Ri=[0,31,59,90,120,151,181,212,243,273,304,334],Oi=60,Ni=60,Ai=24;function Li(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("year"in e&&"number"===typeof e.year&&"month"in e&&"number"===typeof e.month&&"day"in e&&"number"===typeof e.day)}function Ii(e){return!(!e||"object"!==typeof e&&"function"!==typeof e)&&("hours"in e&&"number"===typeof e.hours&&"minutes"in e&&"number"===typeof e.minutes&&"seconds"in e&&"number"===typeof e.seconds)}const ki={year:9999,month:12,day:31};class xi{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(ki),this.leapYear1900=e.leapYear1900,!this.leapYear1900&&0<=this.dateToNumber({year:1900,month:2,day:28})?this.epochYearZero=this.numberToSimpleDate(2).year:this.epochYearZero=this.numberToSimpleDate(1).year,this.parseDateTime=e.parseDateTime}getWithinBounds(e){return e<=this.maxDateValue&&e>=0?e:void 0}dateStringToDateNumber(e){const{dateTime:t,dateFormat:n="",timeFormat:r=""}=this.parseDateTimeFromConfigFormats(e);if(void 0!==t)return Ii(t)?Li(t)?new Ot(Ui(t)+this.dateToNumber(t),n+" "+r):new Rt(Ui(t),r):Li(t)?new Mt(this.dateToNumber(t),n):0}parseDateTimeFromConfigFormats(e){return this.parseDateTimeFromFormats(e,this.config.dateFormats,this.config.timeFormats)}getNullYear(){return this.config.nullYear}getEpochYearZero(){return this.epochYearZero}isValidDate(e){return!(isNaN(e.year)||isNaN(e.month)||isNaN(e.day))&&(e.day===Math.round(e.day)&&e.month===Math.round(e.month)&&e.year===Math.round(e.year)&&(!(e.year<1582)&&(!(e.month<1||e.month>12)&&(!(e.day<1)&&(this.isLeapYear(e.year)&&2===e.month?e.day<=29:e.day<=Ti[e.month-1])))))}dateToNumber(e){return this.dateToNumberFromZero(e)-this.minDateAbsoluteValue}relativeNumberToAbsoluteNumber(e){return e+this.minDateAbsoluteValue-(this.leapYear1900?1:0)}numberToSimpleDate(e){const t=Math.floor(e)+this.minDateAbsoluteValue;let n=Math.floor(t/365.2425);this.dateToNumberFromZero({year:n+1,month:1,day:1})<=t?n++:this.dateToNumberFromZero({year:n-1,month:1,day:1})>t&&n--;const r=t-this.dateToNumberFromZero({year:n,month:1,day:1}),i=Di(r-(this.isLeapYear(n)&&r>=59?1:0)),s=r-Ri[i]-(this.isLeapYear(n)&&i>1?1:0);return{year:n,month:i+1,day:s+1}}numberToSimpleDateTime(e){const t=Yi(e%1),n=Math.floor(t.hours/Ai);t.hours=t.hours%Ai;const r=this.numberToSimpleDate(Math.floor(e)+n);return Object.assign(Object.assign({},r),t)}leapYearsCount(e){return Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400)+(this.config.leapYear1900&&e>=1900?1:0)}daysInMonth(e,t){return this.isLeapYear(e)&&2===t?29:Ti[t-1]}endOfMonth(e){return{year:e.year,month:e.month,day:this.daysInMonth(e.year,e.month)}}toBasisUS(e,t){return 31===e.day&&(e.day=30),30===e.day&&31===t.day&&(t.day=30),2===e.month&&e.day===this.daysInMonth(e.year,e.month)&&(e.day=30,2===t.month&&t.day===this.daysInMonth(t.year,t.month)&&(t.day=30)),[e,t]}yearLengthForBasis(e,t){return e.year!==t.year?e.year+1!==t.year||e.month<t.month||e.month===t.month&&e.day<t.day?(this.leapYearsCount(t.year)-this.leapYearsCount(e.year-1))/(t.year-e.year+1)+365:this.countLeapDays(t)!==this.countLeapDays({year:e.year,month:e.month,day:e.day-1})?366:365:this.isLeapYear(e.year)?366:365}parseSingleFormat(e,t,n){const r=this.parseDateTime(e,t,n);if(!Li(r)||(r.year>=0&&r.year<100&&(r.year<this.getNullYear()?r.year+=2e3:r.year+=1900),this.isValidDate(r)))return r}parseDateTimeFromFormats(e,t,n){const r=0===t.length?[void 0]:t,i=0===n.length?[void 0]:n;for(const s of r)for(const t of i){const n=this.parseSingleFormat(e,s,t);if(void 0!==n)return{dateTime:n,timeFormat:t,dateFormat:s}}return{}}countLeapDays(e){return e.month>2||2===e.month&&e.day>=29?this.leapYearsCount(e.year):this.leapYearsCount(e.year-1)}dateToNumberFromZero(e){return 365*e.year+Ri[e.month-1]+e.day-1+(e.month<=2?this.leapYearsCount(e.year-1):this.leapYearsCount(e.year))}isLeapYear(e){return!(e%4)&&(!!(e%100)||(!(e%400)||1900===e&&this.config.leapYear1900))}}function Di(e){let t=0;return Ri[t+6]<=e&&(t+=6),Ri[t+3]<=e&&(t+=3),Ri[t+2]<=e?t+=2:Ri[t+1]<=e&&(t+=1),t}function Hi(e,t){const n=12*e.year+e.month-1+t;return{year:Math.floor(n/12),month:n%12+1,day:e.day}}function Pi(e){return{year:e.year,month:e.month,day:Math.min(e.day,Ti[e.month-1])}}function ji(e){return Math.round(3600*e*24)/86400}function Fi(e,t=1){return Math.round(e*t)/t}function Yi(e){const t=e*Ai*Ni*Oi,n=Fi(t%Oi,1e5)%Oi,r=(t-n)/Oi,i=Math.round(r%Ni)%Ni,s=(r-i)/Ni,o=Math.round(s);return{hours:o,minutes:i,seconds:n}}function Ui(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function Vi(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Bi{call(){return Qn}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Wi=/(\\.|dd|DD|d|D|mm|MM|m|M|YYYY|YY|yyyy|yy|HH|hh|H|h|ss(\.(0+|s+))?|s|AM\/PM|am\/pm|A\/P|a\/p|\[mm]|\[MM]|\[hh]|\[HH])/g,zi=/(\\.|[#0]+(\.[#0]*)?)/g;var Gi,Ki;function Xi(e,t){return{type:e,value:t}}function $i(e){Wi.lastIndex=0;const t=[];let n;do{n=Wi.exec(e),null!==n&&t.push(n)}while(n);return t}function qi(e){zi.lastIndex=0;const t=zi.exec(e);return null!==t?[t]:[]}function Ji(e,t){const n=[];let r=0;for(let s=0;s<e.length;++s){const i=e[s];if(i.index!==r){const e=t.substr(r,i.index-r);n.push(Xi(Gi.FREE_TEXT,e))}i[0].startsWith("\\")?n.push(Xi(Gi.FREE_TEXT,i[0])):n.push(Xi(Gi.FORMAT,i[0])),r=i.index+i[0].length}const i=e[e.length-1];if(i.index+i[0].length<t.length){const e=t.substr(i.index+i[0].length,t.length);n.push(Xi(Gi.FREE_TEXT,e))}return n}function Qi(e){const t=$i(e);return t.every(e=>es(e))?void 0:{type:Ki.DATE,tokens:Ji(t,e)}}function Zi(e){const t=qi(e);return t.every(e=>es(e))?void 0:{type:Ki.NUMBER,tokens:Ji(t,e)}}function es(e){return e[0].startsWith("\\")}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function ts(e,t,n,r){const i=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==i)return i;const s=n.stringifyDuration(Yi(e),t);if(void 0!==s)return s;const o=Zi(t);return void 0!==o?ss(o.tokens,e):t}function ns(e,t){let n=""+e;while(n.length<t)n="0"+n;return n}function rs(e,t){let n=""+e;while(n.length<t)n+="0";return n}function is(e,t){return e.split(t).length-1}function ss(e,t){let n="";for(let r=0;r<e.length;++r){const i=e[r];if(i.type===Gi.FREE_TEXT){n+=i.value;continue}const s=i.value.split("."),o=s[0],a=s[1]||"",l=s[1]?".":"",u=Number(t.toFixed(a.length)).toString().split(".");let c=u[0]||"",h=u[1]||"";if(o.length>c.length){const e=is(o.substr(0,o.length-c.length),"0");c=ns(c,e+c.length)}const d=is(a.substr(h.length,a.length-h.length),"0");h=rs(h,d+h.length),n+=c+l+h}return n}function os(e,t){const n=Qi(t);if(void 0===n)return;const r=n.tokens;let i="";for(const s of r)if(s.type!==Gi.FREE_TEXT)switch(s.value.toLowerCase()){case"h":case"hh":i+=ns(e.hours,s.value.length),e.hours=0;break;case"[hh]":i+=ns(e.hours,s.value.length-2),e.hours=0;break;case"m":case"mm":i+=ns(e.minutes,s.value.length),e.minutes=0;break;case"[mm]":i+=ns(e.minutes+60*e.hours,s.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":i+=ns(Math.floor(e.seconds),s.value.length);break;default:if(hi.test(s.value)){const t=Math.max(s.value.length-3,0);i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}else i+=s.value;return i}function as(e,t){const n=Qi(t);if(void 0===n)return;const r=n.tokens;let i="",s=!1;const o=r.some(e=>e.type===Gi.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value));for(let a=0;a<r.length;a++){const t=r[a];if(t.type!==Gi.FREE_TEXT)switch(t.value.toLowerCase()){case"h":case"hh":s=!0,i+=ns(o?(e.hours+11)%12+1:e.hours,t.value.length);break;case"d":case"dd":i+=ns(e.day,t.value.length);break;case"s":case"ss":i+=ns(Math.floor(e.seconds),t.value.length);break;case"m":case"mm":a+1<r.length&&r[a+1].value.startsWith(":")&&(s=!0),i+=ns(s?e.minutes:e.month,t.value.length),s=!0;break;case"yy":i+=ns(e.year%100,t.value.length);break;case"yyyy":i+=e.year;break;case"am/pm":case"a/p":{const[n,r]=t.value.split("/");i+=e.hours<12?n:r;break}default:if(hi.test(t.value)){const n=t.value.length-3;i+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,n))/Math.pow(10,n)}`;continue}return}else i+=t.value}return i}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["FORMAT"]="FORMAT",e["FREE_TEXT"]="FREE_TEXT"})(Gi||(Gi={})),function(e){e["DATE"]="DATE",e["NUMBER"]="NUMBER",e["STRING"]="STRING"}(Ki||(Ki={}));const ls="length",us=e=>parseInt(e,16),cs=e=>parseInt(e,10),hs=e=>(e+"").replace(/\-/g,""),ds=(e,t,n)=>e["substr"](t,n),ms=e=>e["codePointAt"](0)-65;function fs(e){return 25===hs(e)[ls]?us(ds(hs(e),us("12"),ms("F")))/(us(ds(hs(e),ms("C"),ms("Y")>>4))||1+(~~![][ls]<<3)):0}function ps(e){if(e=(e+"").replace(/\-/g,""),e[ls]!==ms("Z"))return!1;let t=0;return[[0,ms("G")+1],[ms("H"),ms("H")-1],[ms("G")+ms("H"),ms("G")]].reduce((n,[r,i],s)=>(n|=(cs(""+cs(us(ds(e,t+r-(0===s?0:2),i+(s?2:0)))+(us(ds(e,t+r+i,2))+[]).padStart(2,"0")))%97||2)>>1,t+=2,n),ms("A"))===[]+1>>1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const gs={invalid:()=>"The license key for HyperFormula is invalid.",expired:({keyValidityDate:e})=>`The license key for HyperFormula expired on ${e}, and is not valid for the installed version.`,missing:()=>"The license key for HyperFormula is missing."};let ys=!1;function ws(e){const t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e)t.template="valid";else if("string"===typeof e&&ps(e)){const[n,r,i]="18/07/2024".split("/"),s=Math.floor(new Date(`${r}/${n}/${i}`).getTime()/864e5),o=fs(e);t.vars.keyValidityDate=bs(new Date(864e5*(o+1))),t.template=s>o?"expired":"valid"}else""!==e&&(t.template="invalid");return ys||"valid"===t.template||(console.warn(gs[t.template](t.vars)),ys=!0),t.template}function bs(e){const t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=t[e.getMonth()],r=e.getDate(),i=e.getFullYear();return`${n} ${r}, ${i}`}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */var vs,_s,Ss;function Es(e){return e.startsWith("=")}function Cs(e){const t=e.toLowerCase();return"true"===t||"false"===t}function Ms(e,t){const n=e.toUpperCase(),r=/#[A-Za-z0-9\/]+[?!]?/;return r.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}(function(e){class t{constructor(e){this.value=e,this.value=Ct(this.value,Yr(St(this.value)))}}e.Number=t;class n{constructor(e){this.value=e}}e.String=n;class r{constructor(e){this.value=e}}e.Boolean=r;class i{static getSingletonInstance(){return i.instance||(i.instance=new i),i.instance}}e.Empty=i;class s{constructor(e){this.formula=e}}e.Formula=s;class o{constructor(e,t){this.value=new lr(e,t)}}e.Error=o})(vs||(vs={}));class Ts{constructor(e,t,n){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=n}parse(e){if(void 0===e||null===e)return vs.Empty.getSingletonInstance();if("number"===typeof e)return Fr(e)?new vs.Error(Vn.NUM,Re.ValueLarge):new vs.Number(e);if("boolean"===typeof e)return new vs.Boolean(e);if(e instanceof Date){const t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()}),n=Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3}),r=t+n;return r<0?new vs.Error(Vn.NUM,Re.DateBounds):r%1===0?new vs.Number(new Mt(r,"Date()")):r<1?new vs.Number(new Rt(r,"Date()")):new vs.Number(new Ot(r,"Date()"))}if("string"===typeof e){if(Cs(e))return new vs.Boolean("true"===e.toLowerCase());if(Es(e))return new vs.Formula(e);if(Ms(e,this.config.errorMapping))return new vs.Error(this.config.errorMapping[e.toUpperCase()]);{let t,n=e.trim(),r=0;if(n.endsWith("%"))r=1,n=n.slice(0,n.length-1);else{const e=this.currencyMatcher(n);void 0!==e&&(r=2,[t,n]=e)}const i=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==i){let e;return e=1===r?new Nt(i/100):2===r?new Tt(i,t):i,new vs.Number(e)}const s=this.dateHelper.dateStringToDateNumber(n);return void 0!==s?new vs.Number(s):new vs.String(e.startsWith("'")?e.slice(1):e)}}throw new rn(e)}currencyMatcher(e){for(const t of this.config.currencySymbol){if(e.startsWith(t))return[t,e.slice(t.length)];if(e.endsWith(t))return[t,e.slice(0,e.length-t.length)]}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e[e["COPY"]=0]="COPY",e[e["CUT"]=1]="CUT"})(_s||(_s={})),function(e){e[e["VALUE"]=0]="VALUE",e[e["EMPTY"]=1]="EMPTY",e[e["FORMULA"]=2]="FORMULA",e[e["PARSING_ERROR"]=3]="PARSING_ERROR"}(Ss||(Ss={}));class Rs{constructor(e,t,n,r,i){this.sourceLeftCorner=e,this.width=t,this.height=n,this.type=r,this.content=i}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n)yield[mr(e.sheet,e.col+n,e.row+t),this.content[t][n]]}}class Os{constructor(e,t,n){this.dependencyGraph=t,this.operations=n,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}cut(e,t,n){this.clipboard=new Rs(e,t,n,_s.CUT)}copy(e,t,n){const r=[];for(let i=0;i<n;++i){r[i]=[];for(let n=0;n<t;++n){const t=this.operations.getClipboardCell(mr(e.sheet,e.col+n,e.row+i));r[i].push(t)}}this.clipboard=new Rs(e,t,n,_s.COPY,r)}abortCut(){this.clipboard&&this.clipboard.type===_s.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(fr(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new Xt("a valid target address.");const t=Er.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new zt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Error("It is not possible to paste onto an array")}isCutClipboard(){return void 0!==this.clipboard&&this.clipboard.type===_s.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===_s.COPY}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ns{constructor(e,t,n,r){this.displayName=e,this.address=t,this.added=n,this.options=r}normalizeExpressionName(){return this.displayName.toLowerCase()}copy(){return new Ns(this.displayName,this.address,this.added,this.options)}}class As{constructor(){this.mapping=new Map}has(e){return this.mapping.has(this.normalizeExpressionName(e))}isNameAvailable(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);return!(n&&n.added)}add(e){this.mapping.set(e.normalizeExpressionName(),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}getExisting(e){const t=this.mapping.get(this.normalizeExpressionName(e));return t&&t.added?t:void 0}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&(n.added=!1)}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}normalizeExpressionName(e){return e.toLowerCase()}}class Ls{constructor(){this.mapping=new Map}add(e){this.mapping.set(this.normalizeExpressionName(e.displayName),e)}get(e){return this.mapping.get(this.normalizeExpressionName(e))}has(e){return this.mapping.has(this.normalizeExpressionName(e))}getAllNamedExpressions(){return Array.from(this.mapping.values()).filter(e=>e.added)}isNameAvailable(e){const t=this.normalizeExpressionName(e);return!this.mapping.has(t)}remove(e){const t=this.normalizeExpressionName(e),n=this.mapping.get(t);n&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class Is{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new As,this.worksheetStores=new Map,this.addressCache=new Map}isNameAvailable(e,t){var n,r;return void 0===t?this.workbookStore.isNameAvailable(e):null===(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.isNameAvailable(e))||void 0===r||r}namedExpressionInAddress(e){const t=this.addressCache.get(e);return t&&t.added?t:void 0}namedExpressionForScope(e,t){var n;return void 0===t?this.workbookStore.getExisting(e):null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e)}nearestNamedExpression(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.get(e))&&void 0!==r?r:this.workbookStore.getExisting(e)}isExpressionInScope(e,t){var n,r;return null!==(r=null===(n=this.worksheetStore(t))||void 0===n?void 0:n.has(e))&&void 0!==r&&r}isNameValid(e){const t=new RegExp(`^${w}$`),n=new RegExp(`^${_}$`),r=new RegExp(`^${E}$`);return!t.test(e)&&!n.test(e)&&r.test(e)}addNamedExpression(e,t,n){const r=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);let i=r.get(e);return void 0!==i?(i.added=!0,i.displayName=e,i.options=n):(i=new Ns(e,this.nextAddress(),!0,n),r.add(i)),this.addressCache.set(i.address.row,i),i}restoreNamedExpression(e,t){const n=void 0===t?this.workbookStore:this.worksheetStoreOrCreate(t);return e.added=!0,n.add(e),this.addressCache.set(e.address.row,e),e}namedExpressionOrPlaceholder(e,t){var n;return null!==(n=this.worksheetStoreOrCreate(t).get(e))&&void 0!==n?n:this.workbookNamedExpressionOrPlaceholder(e)}workbookNamedExpressionOrPlaceholder(e){let t=this.workbookStore.get(e);return void 0===t&&(t=new Ns(e,this.nextAddress(),!1),this.workbookStore.add(t)),t}remove(e,t){let n;n=void 0===t?this.workbookStore:this.worksheetStore(t);const r=null===n||void 0===n?void 0:n.get(e);if(void 0===n||void 0===r||!r.added)throw Error("Named expression does not exist");n.remove(e),n instanceof Ls&&0===n.mapping.size&&this.worksheetStores.delete(t),this.addressCache.delete(r.address.row)}getAllNamedExpressionsNamesInScope(e){return this.getAllNamedExpressions().filter(({scope:t})=>t===e).map(e=>e.expression.displayName)}getAllNamedExpressionsNames(){return this.getAllNamedExpressions().map(e=>e.expression.displayName)}getAllNamedExpressions(){const e=[];return this.workbookStore.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:void 0})}),this.worksheetStores.forEach((t,n)=>{t.getAllNamedExpressions().forEach(t=>{e.push({expression:t,scope:n})})}),e}getAllNamedExpressionsForScope(e){var t,n;return void 0===e?this.workbookStore.getAllNamedExpressions():null!==(n=null===(t=this.worksheetStores.get(e))||void 0===t?void 0:t.getAllNamedExpressions())&&void 0!==n?n:[]}worksheetStoreOrCreate(e){let t=this.worksheetStores.get(e);return t||(t=new Ls,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return mr(Is.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}Is.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;const ks=e=>{switch(e.type){case W.EMPTY:case W.NUMBER:case W.STRING:case W.ERROR:case W.ERROR_WITH_RAW_INPUT:return!1;case W.CELL_REFERENCE:return!e.reference.isAbsolute();case W.CELL_RANGE:case W.COLUMN_RANGE:case W.ROW_RANGE:return!e.start.isAbsolute();case W.NAMED_EXPRESSION:return!1;case W.PERCENT_OP:case W.PLUS_UNARY_OP:case W.MINUS_UNARY_OP:return ks(e.value);case W.CONCATENATE_OP:case W.EQUALS_OP:case W.NOT_EQUAL_OP:case W.LESS_THAN_OP:case W.GREATER_THAN_OP:case W.LESS_THAN_OR_EQUAL_OP:case W.GREATER_THAN_OR_EQUAL_OP:case W.MINUS_OP:case W.PLUS_OP:case W.TIMES_OP:case W.DIV_OP:case W.POWER_OP:return ks(e.left)||ks(e.right);case W.PARENTHESIS:return ks(e.expression);case W.FUNCTION_CALL:return e.args.some(e=>ks(e));case W.ARRAY:return e.args.some(e=>e.some(e=>ks(e)))}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class xs{performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[r,i]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService)),s=t.rememberNewAst(r);n.setFormula(s),n.setAddress(i)}}transformSingleAst(e,t){const n=this.transformAst(e,t),r=this.fixNodeAddress(t);return[n,r]}transformAst(e,t){switch(e.type){case W.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case W.CELL_RANGE:return this.transformCellRangeAst(e,t);case W.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case W.ROW_RANGE:return this.transformRowRangeAst(e,t);case W.EMPTY:case W.ERROR:case W.NUMBER:case W.NAMED_EXPRESSION:case W.ERROR_WITH_RAW_INPUT:case W.STRING:return e;case W.PERCENT_OP:case W.MINUS_UNARY_OP:case W.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case W.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map(e=>this.transformAst(e,t))});case W.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case W.ARRAY:return Object.assign(Object.assign({},e),{args:e.args.map(e=>e.map(e=>this.transformAst(e,t)))});default:return Object.assign(Object.assign({},e),{left:this.transformAst(e.left,t),right:this.transformAst(e.right,t)})}}transformCellReferenceAst(e,t){const n=this.transformCellAddress(e.reference,t);return n instanceof l?Object.assign(Object.assign({},e),{reference:n}):n===Vn.REF?we(new lr(Vn.REF)):e}transformCellRangeAst(e,t){const n=this.transformCellRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}transformColumnRangeAst(e,t){const n=this.transformColumnRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}transformRowRangeAst(e,t){const n=this.transformRowRange(e.start,e.end,t);return Array.isArray(n)?Object.assign(Object.assign({},e),{start:n[0],end:n[1]}):n===Vn.REF?we(new lr(Vn.REF)):e}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ds extends xs{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!1}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=wr(e,t);if(n!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;const r=e.toSimpleColumnAddress(t);if(n===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return this.columnsSpan.columnStart<=r.col&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);if(t.sheet===this.columnsSpan.sheet&&n!==this.columnsSpan.sheet)return!e.isColumnAbsolute()&&(!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns));if(e.isColumnAbsolute())return!(e.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(this.columnsSpan.numberOfColumns);{const n=e.toSimpleColumnAddress(t);return n.col<this.columnsSpan.columnStart?!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns):t.col<this.columnsSpan.columnStart&&e.shiftedByColumns(this.columnsSpan.numberOfColumns)}}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col+this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Vn.REF||i===Vn.REF?Vn.REF:!(!r&&!i)&&[r||e,i||t]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Hs extends xs{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!1}transformColumnRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}transformCellAddress(e,t){const n=wr(e,t);if(n!==this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet)return!1;const r=e.toSimpleRowAddress(t);return n===this.rowsSpan.sheet&&t.sheet!==this.rowsSpan.sheet?this.rowsSpan.rowStart<=r.row&&e.shiftedByRows(this.rowsSpan.numberOfRows):t.sheet===this.rowsSpan.sheet&&n!==this.rowsSpan.sheet?!e.isRowAbsolute()&&(!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows)):e.isRowAbsolute()?!(e.row<this.rowsSpan.rowStart)&&e.shiftedByRows(this.rowsSpan.numberOfRows):r.row<this.rowsSpan.rowStart?!(t.row<this.rowsSpan.rowStart)&&e.shiftedByRows(-this.rowsSpan.numberOfRows):t.row<this.rowsSpan.rowStart&&e.shiftedByRows(this.rowsSpan.numberOfRows)}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row+this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return r===Vn.REF||i===Vn.REF?Vn.REF:!(!r&&!i)&&[r||e,i||t]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ps extends xs{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&Vn.REF}transformCellRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}transformColumnRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}transformRowRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&Vn.REF}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class js extends xs{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r,this.dependentFormulaTransformer=new Fs(e,t,n,r)}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}transformSingleAst(e,t){if(this.sourceRange.addressInRange(t)){const n=this.transformAst(e,t);return[n,this.fixNodeAddress(t)]}return this.dependentFormulaTransformer.transformSingleAst(e,t)}fixNodeAddress(e){return mr(this.toSheet,e.col+this.toRight,e.row+this.toBottom)}transformCellAddress(e,t){return this.transformAddress(e,t)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformAddress(e,t){const n=this.sourceRange;if(e instanceof l){const r=e.toSimpleCellAddress(t);if(n.addressInRange(r))return e.shiftAbsoluteDimensions(this.toRight,this.toBottom)}return e.shiftRelativeDimensions(-this.toRight,-this.toBottom)}transformRange(e,t,n){const r=this.sourceRange;if(e instanceof l&&t instanceof l){const i=e.toSimpleCellAddress(n),s=t.toSimpleCellAddress(n);if(r.addressInRange(i)&&r.addressInRange(s))return[e.shiftAbsoluteDimensions(this.toRight,this.toBottom),t.shiftAbsoluteDimensions(this.toRight,this.toBottom)]}return[e.shiftRelativeDimensions(-this.toRight,-this.toBottom),t.shiftRelativeDimensions(-this.toRight,-this.toBottom)]}}class Fs extends xs{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!this.shouldMove(e,t)&&e.moved(this.toSheet,this.toRight,this.toBottom)}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}shouldMove(e,t){return e instanceof l?this.sourceRange.addressInRange(e.toSimpleCellAddress(t)):e instanceof a?this.sourceRange.rowInRange(e.toSimpleRowAddress(t))&&!this.sourceRange.isFinite():this.sourceRange.columnInRange(e.toSimpleColumnAddress(t))&&!this.sourceRange.isFinite()}transformRange(e,t,n){const r=this.transformCellAddress(e,n),i=this.transformCellAddress(t,n);return!(!r||!i)&&[r,i]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ys extends xs{constructor(e){super(),this.columnsSpan=e}get sheet(){return this.columnsSpan.sheet}isIrreversible(){return!0}transformRowRangeAst(e,t){return e}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){throw Error("Not implemented")}transformColumnRange(e,t,n){return this.transformRange(e,t,n)}transformCellAddress(e,t){const n=wr(e,t);if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet!==n)return!1;if(this.columnsSpan.sheet!==t.sheet&&this.columnsSpan.sheet===n){const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart)return!1;if(n.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet!==n){if(e.isColumnAbsolute())return!1;if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}if(this.columnsSpan.sheet===t.sheet&&this.columnsSpan.sheet===n)if(e.isColumnAbsolute()){if(e.col<this.columnsSpan.columnStart)return!1;if(e.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns)}else{const n=e.toSimpleColumnAddress(t);if(n.col<this.columnsSpan.columnStart){if(t.col<this.columnsSpan.columnStart)return!1;if(t.col>this.columnsSpan.columnEnd)return e.shiftedByColumns(this.columnsSpan.numberOfColumns)}else if(n.col>this.columnsSpan.columnEnd){if(t.col<this.columnsSpan.columnStart)return e.shiftedByColumns(-this.columnsSpan.numberOfColumns);if(t.col>this.columnsSpan.columnEnd)return!1}}return Vn.REF}fixNodeAddress(e){return this.columnsSpan.sheet===e.sheet&&this.columnsSpan.columnStart<=e.col?Object.assign(Object.assign({},e),{col:e.col-this.columnsSpan.numberOfColumns}):e}transformRange(e,t,n){const r=wr(e,n);let i=e,s=t;if(this.columnsSpan.sheet===r){const r=e.toSimpleColumnAddress(n),o=t.toSimpleColumnAddress(n);if(this.columnsSpan.columnStart<=r.col&&this.columnsSpan.columnEnd>=o.col)return Vn.REF;r.col>=this.columnsSpan.columnStart&&r.col<=this.columnsSpan.columnEnd&&(i=e.shiftedByColumns(this.columnsSpan.columnEnd-r.col+1)),o.col>=this.columnsSpan.columnStart&&o.col<=this.columnsSpan.columnEnd&&(s=t.shiftedByColumns(-(o.col-this.columnsSpan.columnStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);if(!1===o&&!1===a)return[i,s];if(o===Vn.REF||a===Vn.REF)throw Error("Cannot happen");return[o||i,a||s]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Us extends xs{constructor(e){super(),this.rowsSpan=e}get sheet(){return this.rowsSpan.sheet}isIrreversible(){return!0}transformColumnRangeAst(e,t){return e}transformCellAddress(e,t){const n=wr(e,t);if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet!==n)return!1;if(this.rowsSpan.sheet!==t.sheet&&this.rowsSpan.sheet===n){const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart)return!1;if(n.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet!==n){if(e.isRowAbsolute())return!1;if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}if(this.rowsSpan.sheet===t.sheet&&this.rowsSpan.sheet===n)if(e.isRowAbsolute()){if(e.row<this.rowsSpan.rowStart)return!1;if(e.row>this.rowsSpan.rowEnd)return e.shiftedByRows(-this.rowsSpan.numberOfRows)}else{const n=e.toSimpleRowAddress(t);if(n.row<this.rowsSpan.rowStart){if(t.row<this.rowsSpan.rowStart)return!1;if(t.row>this.rowsSpan.rowEnd)return e.shiftedByRows(this.rowsSpan.numberOfRows)}else if(n.row>this.rowsSpan.rowEnd){if(t.row<this.rowsSpan.rowStart)return e.shiftedByRows(-this.rowsSpan.numberOfRows);if(t.row>this.rowsSpan.rowEnd)return!1}}return Vn.REF}transformCellRange(e,t,n){return this.transformRange(e,t,n)}transformRowRange(e,t,n){return this.transformRange(e,t,n)}transformColumnRange(e,t,n){throw Error("Not implemented")}fixNodeAddress(e){return this.rowsSpan.sheet===e.sheet&&this.rowsSpan.rowStart<=e.row?Object.assign(Object.assign({},e),{row:e.row-this.rowsSpan.numberOfRows}):e}transformRange(e,t,n){const r=wr(e,n);let i=e,s=t;if(this.rowsSpan.sheet===r){const r=e.toSimpleRowAddress(n),o=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=r.row&&this.rowsSpan.rowEnd>=o.row)return Vn.REF;r.row>=this.rowsSpan.rowStart&&r.row<=this.rowsSpan.rowEnd&&(i=e.shiftedByRows(this.rowsSpan.rowEnd-r.row+1)),o.row>=this.rowsSpan.rowStart&&o.row<=this.rowsSpan.rowEnd&&(s=t.shiftedByRows(-(o.row-this.rowsSpan.rowStart+1)))}const o=this.transformCellAddress(i,n),a=this.transformCellAddress(s,n);return!1===o&&!1===a?[i,s]:o===Vn.REF||a===Vn.REF?Vn.REF:[o||i,a||s]}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vs extends xs{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[t]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService));n.setFormula(t)}}fixNodeAddress(e){return e}transformCellAddress(e,t){return this.transformAddress(e)}transformCellRange(e,t,n){return this.transformAddress(e)}transformColumnRange(e,t,n){return this.transformAddress(e)}transformRowRange(e,t,n){return this.transformAddress(e)}transformAddress(e){return e.sheet===this.sheet&&Vn.REF}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function Bs(e){if(!Array.isArray(e))throw new Xt("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new Xt("an array of arrays.")}function Ws(e){let t=0,n=0,r=0;for(let s=0;s<e.length;s++){let i=0;for(let t=0;t<e[s].length;t++){const n=e[s][t];void 0!==n&&null!==n&&(i=t+1,++r)}t=Math.max(t,i),i>0&&(n=s+1)}const i=t*n;return{height:n,width:t,fill:0===i?0:r/i}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class zs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return qs(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>jt.fromNumberOfRows(this.sheet,e[0],e[1]))}}class Gs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}rowsSpans(){return this.normalizedIndexes().map(e=>jt.fromNumberOfRows(this.sheet,e[0],e[1]))}}class Ks{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Js(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>Ft.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class Xs{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return qs(this.indexes)}columnsSpans(){return this.normalizedIndexes().map(e=>Ft.fromNumberOfColumns(this.sheet,e[0],e[1]))}}class $s{constructor(e,t,n,r,i,s,o,a,l){this.dependencyGraph=t,this.columnSearch=n,this.cellContentParser=r,this.parser=i,this.stats=s,this.lazilyTransformingAstService=o,this.namedExpressions=a,this.arraySizePredictor=l,this.changes=Pt.empty(),this.allocateNamedExpressionAddressSpace(),this.maxColumns=e.maxColumns,this.maxRows=e.maxRows}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}removeRows(e){const t=[];for(const n of e.rowsSpans()){const e=this.doRemoveRows(n);e&&t.push(e)}return t}addRows(e){for(const t of e.rowsSpans())this.doAddRows(t)}addColumns(e){for(const t of e.columnsSpans())this.doAddColumns(t)}removeColumns(e){const t=[];for(const n of e.columnsSpans()){const e=this.doRemoveColumns(n);e&&t.push(e)}return t}removeSheet(e){this.dependencyGraph.removeSheet(e);let t=0;this.stats.measure(It.TRANSFORM_ASTS,()=>{const n=new Vs(e);n.performEagerTransformations(this.dependencyGraph,this.parser),t=this.lazilyTransformingAstService.addTransformation(n)}),this.sheetMapping.removeSheet(e),this.columnSearch.removeSheet(e);const n=this.namedExpressions.getAllNamedExpressionsForScope(e).map(t=>this.removeNamedExpression(t.normalizeExpressionName(),e));return{version:t,scopedNamedExpressions:n}}removeSheetByName(e){const t=this.sheetMapping.fetch(e);return this.removeSheet(t)}clearSheet(e){this.dependencyGraph.clearSheet(e),this.columnSearch.removeSheet(e)}addSheet(e){const t=this.sheetMapping.addSheet(e),n=[];return this.dependencyGraph.addressMapping.autoAddSheet(t,Ws(n)),this.sheetMapping.fetchDisplayName(t)}renameSheet(e,t){return this.sheetMapping.renameSheet(e,t)}moveRows(e,t,n,r){const i=jt.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(i),r<t&&(t+=n);const s=mr(e,0,t),o=mr(e,0,r);this.moveCells(s,Number.POSITIVE_INFINITY,n,o);const a=jt.fromNumberOfRows(e,t,n);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,n,r){const i=Ft.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(i),r<t&&(t+=n);const s=mr(e,t,0),o=mr(e,r,0);this.moveCells(s,n,Number.POSITIVE_INFINITY,o);const a=Ft.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,n,r){this.ensureItIsPossibleToMoveCells(e,t,n,r);const i=Er.spanFrom(e,t,n),s=Er.spanFrom(r,t,n),o=r.col-e.col,a=r.row-e.row,l=r.sheet,u=this.getRangeClipboardCells(s),c=this.dependencyGraph.rawValuesFromRange(s);this.columnSearch.removeValues(c);const h=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.moveValues(h,o,a,l);let d=0;this.stats.measure(It.TRANSFORM_ASTS,()=>{const e=new js(i,o,a,l);e.performEagerTransformations(this.dependencyGraph,this.parser),d=this.lazilyTransformingAstService.addTransformation(e)}),this.dependencyGraph.moveCells(i,o,a,l);const m=this.updateNamedExpressionsForMovedCells(e,t,n,r);return{version:d,overwrittenCellsData:u,addedGlobalNamedExpressions:m}}setRowOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Er.spanFrom({sheet:e,col:0,row:i},1/0,1),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t},n])=>[{sheet:e,col:t,row:s},n]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}setColumnOrder(e,t){const n=[];let r=[];for(const[i,s]of t)if(i!==s){const t=Er.spanFrom({sheet:e,col:i,row:0},1,1/0),o=this.getRangeClipboardCells(t);r=r.concat(o),n.push(o.map(([{sheet:e,col:t,row:n},r])=>[{sheet:e,col:s,row:n},r]))}return n.forEach(t=>this.restoreClipboardCells(e,t.values())),r}addNamedExpression(e,t,n,r){const i=this.namedExpressions.addNamedExpression(e,n,r);this.storeNamedExpressionInCell(i.address,t),this.adjustNamedExpressionEdges(i,e,n)}restoreNamedExpression(e,t,n){const r=e.displayName;this.restoreCell(e.address,t);const i=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(i,r,n)}changeNamedExpressionExpression(e,t,n,r){const i=this.namedExpressions.namedExpressionForScope(e,n);if(!i)throw new Qt(e);const s=i.copy();i.options=r;const o=this.getClipboardCell(i.address);return this.storeNamedExpressionInCell(i.address,t),[s,o]}removeNamedExpression(e,t){const n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new Qt(e);this.namedExpressions.remove(n.displayName,t);const r=this.getClipboardCell(n.address);if(void 0!==t){const t=this.namedExpressions.workbookNamedExpressionOrPlaceholder(e);this.dependencyGraph.exchangeNode(n.address,t.address)}else this.dependencyGraph.setCellEmpty(n.address);return[n,r]}ensureItIsPossibleToMoveCells(e,t,n,r){if(fr(e)||!(Qs(t)&&Qs(n)||Zs(e,t,n))||fr(r)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(r.sheet))throw new Xt("a valid range of cells to move.");const i=Er.spanFrom(e,t,n),s=Er.spanFrom(r,t,n);if(s.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new zt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(i))throw new yn;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(s))throw new wn}restoreClipboardCells(e,t){const n=[];for(const[r,i]of t)if(this.restoreCell(r,i),i.type===Ss.FORMULA){const{dependencies:t}=this.parser.fetchCachedResult(i.hash);n.push(...this.updateNamedExpressionsForTargetAddress(e,r,t))}return n}restoreCell(e,t){switch(t.type){case Ss.VALUE:this.setValueToCell(t,e);break;case Ss.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case Ss.EMPTY:this.setCellEmpty(e);break;case Ss.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e);break}}getOldContent(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Xn)return[e,{type:Ss.EMPTY}];if(t instanceof $n)return[e,Object.assign({type:Ss.VALUE},t.getValues())];if(t instanceof Tn)return[t.getAddress(this.lazilyTransformingAstService),{type:Ss.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof qn)return[e,{type:Ss.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors}];throw Error("Trying to copy unsupported type")}getClipboardCell(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof Xn)return{type:Ss.EMPTY};if(t instanceof $n)return Object.assign({type:Ss.VALUE},t.getValues());if(t instanceof Rn){const n=t.getArrayCellValue(e);return n===_t?{type:Ss.EMPTY}:{type:Ss.VALUE,parsedValue:n,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof On)return{type:Ss.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof qn)return{type:Ss.PARSING_ERROR,rawInput:t.rawInput,errors:t.errors};throw Error("Trying to copy unsupported type")}getSheetClipboardCells(e){const t=this.dependencyGraph.getSheetHeight(e),n=this.dependencyGraph.getSheetWidth(e),r=new Array(t);for(let i=0;i<t;i++){r[i]=new Array(n);for(let t=0;t<n;t++){const n=mr(e,t,i);r[i][t]=this.getClipboardCell(n)}}return r}getRangeClipboardCells(e){const t=[];for(const n of e.addresses(this.dependencyGraph))t.push([n,this.getClipboardCell(n)]);return t}setCellContent(e,t){const n=this.cellContentParser.parse(t),r=this.getOldContent(e);if(n instanceof vs.Formula){const t=this.parser.parse(n.formula,e),{ast:r,errors:s}=t;if(s.length>0)this.setParsingErrorToCell(n.formula,s,e);else try{const n=this.arraySizePredictor.checkArraySize(r,e);if(n.width<=0||n.height<=0)throw Error("Incorrect array size");this.setFormulaToCell(e,n,t)}catch(i){if(!i.message)throw i;const t={type:B.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(n.formula,[t],e)}}else n instanceof vs.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e);return r}setSheetContent(e,t){this.clearSheet(e);for(let n=0;n<t.length;n++)for(let r=0;r<t[n].length;r++){const i=mr(e,r,n);this.setCellContent(i,t[n][r])}}setParsingErrorToCell(e,t,n){const r=this.dependencyGraph.getCellValue(n),i=new qn(t,e),s=this.dependencyGraph.setParsingErrorToCell(n,i);this.columnSearch.remove(St(r),n),this.columnSearch.applyChanges(s.getChanges()),this.changes.addAll(s),this.changes.addChange(i.getCellValue(),n)}setFormulaToCell(e,t,{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}){const o=this.dependencyGraph.getCellValue(e),a=this.dependencyGraph.setFormulaToCell(e,n,bt(s,e),t,r,i);this.columnSearch.remove(St(o),e),this.columnSearch.applyChanges(a.getChanges()),this.changes.addAll(a)}setValueToCell(e,t){const n=this.dependencyGraph.getCellValue(t),r=this.dependencyGraph.setValueToCell(t,e);this.columnSearch.change(St(n),St(e.parsedValue),t),this.columnSearch.applyChanges(r.getChanges().filter(e=>!br(e.address,t))),this.changes.addAll(r),this.changes.addChange(e.parsedValue,t)}setCellEmpty(e){if(this.dependencyGraph.isArrayInternalCell(e))return;const t=this.dependencyGraph.getCellValue(e),n=this.dependencyGraph.setCellEmpty(e);this.columnSearch.remove(St(t),e),this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(_t,e)}setFormulaToCellFromCache(e,t){const{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:i,dependencies:s}=this.parser.fetchCachedResult(e),o=bt(s,t),[a]=new Ps(t.sheet).transformSingleAst(n,t);this.parser.rememberNewAst(a);const l=vt(o),u=this.arraySizePredictor.checkArraySize(n,t);this.dependencyGraph.setFormulaToCell(t,a,l,u,r,i)}rowEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getHeight(t);return e>=n}getAndClearContentChanges(){const e=this.changes;return this.changes=Pt.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(r.getChanges());let i=0;return this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Us(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const t=[];for(const[s]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:s,cellType:this.getClipboardCell(s)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(r.getChanges()),this.columnSearch.removeColumns(e);let i=0;return this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Ys(e);t.performEagerTransformations(this.dependencyGraph,this.parser),i=this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(n),{version:i,removedCells:t,columnFrom:e.columnStart,columnCount:e.numberOfColumns}}doAddRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const{affectedArrays:t}=this.dependencyGraph.addRows(e);this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Hs(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}rewriteAffectedArrays(e){for(const t of e.values()){if(t.array.size.isRef)continue;const e=t.getFormula(this.lazilyTransformingAstService),n=t.getAddress(this.lazilyTransformingAstService),r=this.parser.computeHashFromAst(e);this.setFormulaToCellFromCache(r,n)}}doAddColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const{affectedArrays:t,contentChanges:n}=this.dependencyGraph.addColumns(e);this.columnSearch.addColumns(e),this.columnSearch.applyChanges(n.getChanges()),this.stats.measure(It.TRANSFORM_ASTS,()=>{const t=new Ds(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)}),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){const n=this.dependencyGraph.addressMapping.getWidth(t);return e>=n}adjustNamedExpressionEdges(e,t,n){if(void 0===n)return;const{vertex:r,id:i}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),s=null!==i&&void 0!==i?i:this.dependencyGraph.graph.getNodeId(r),o=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(o.address),u=null!==l&&void 0!==l?l:this.dependencyGraph.graph.getNodeId(a);for(const c of this.dependencyGraph.graph.adjacentNodes(a))if(c instanceof On&&c.getAddress(this.lazilyTransformingAstService).sheet===n){const t=c.getFormula(this.lazilyTransformingAstService),n=c.getAddress(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(t);for(const i of bt(r,n))i instanceof wt&&i.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(u,c),this.dependencyGraph.graph.addEdge(s,c))}}storeNamedExpressionInCell(e,t){const n=this.cellContentParser.parse(t);if(n instanceof vs.Formula){const t=this.parser.parse(n.formula,mr(-1,0,0));if(ks(t.ast))throw new bn;const{ast:r,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=t;this.dependencyGraph.setFormulaToCell(e,r,bt(o,e),ei.scalar(),i,s)}else n instanceof vs.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,n,r){if(e.sheet===r.sheet)return[];const i=[],s=Er.spanFrom(r,t,n);for(const o of s.addresses(this.dependencyGraph)){const t=this.addressMapping.fetchCell(o);if(t instanceof On&&o.sheet!==e.sheet){const n=t.getFormula(this.lazilyTransformingAstService),{dependencies:r}=this.parser.fetchCachedResultForAst(n);i.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,o,r))}}return i}updateNamedExpressionsForTargetAddress(e,t,n){if(e===t.sheet)return[];const r=[],i=this.addressMapping.fetchCell(t);for(const s of bt(n,t)){if(!(s instanceof wt))continue;const n=s.name,o=this.dependencyGraph.fetchNamedExpressionVertex(n,e).vertex,a=this.namedExpressions.isExpressionInScope(n,t.sheet),l=a?this.dependencyGraph.fetchNamedExpressionVertex(n,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(n,o,r);l!==o&&(this.dependencyGraph.graph.removeEdgeIfExists(o,i),this.dependencyGraph.graph.addEdge(l,i))}return r}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheet(Is.SHEET_FOR_WORKBOOK_EXPRESSIONS,new Jn(0,0))}copyOrFetchGlobalNamedExpressionVertex(e,t,n){let r=this.namedExpressions.namedExpressionForScope(e);if(void 0===r)if(r=this.namedExpressions.addNamedExpression(e),n.push(r.normalizeExpressionName()),t instanceof On){const e=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),{ast:n,hasVolatileFunction:i,hasStructuralChangeFunction:s,dependencies:o}=e;this.dependencyGraph.setFormulaToCell(r.address,n,bt(o,r.address),ei.scalar(),i,s)}else t instanceof Xn?this.setCellEmpty(r.address):t instanceof $n&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address).vertex}}function qs(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1],i=r[0]+r[1];return t<=i?r[1]+=Math.max(0,n-(i-t)):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]-=r,r+=n[i][1];return n}function Js(e){if(e.length<=1)return e;const t=[...e].sort(([e],[t])=>e-t),n=t.reduce((e,[t,n])=>{const r=e[e.length-1];return t===r[0]?r[1]=Math.max(r[1],n):e.push([t,n]),e},[t[0]]);let r=0;for(let i=0;i<n.length;++i)n[i][0]+=r,r+=n[i][1];return n}function Qs(e){return Number.isInteger(e)&&e>0}function Zs(e,t,n){return 0===e.row&&Qs(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&Qs(n)&&t===Number.POSITIVE_INFINITY}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class eo{}class to extends eo{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}}class no extends eo{constructor(e,t,n,r,i,s,o){super(),this.sourceLeftCorner=e,this.width=t,this.height=n,this.destinationLeftCorner=r,this.overwrittenCellsData=i,this.addedGlobalNamedExpressions=s,this.version=o}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}}class ro extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class io extends eo{constructor(e,t,n){super(),this.sheetId=e,this.rowMapping=t,this.oldContent=n}doUndo(e){e.undoSetRowOrder(this)}doRedo(e){e.redoSetRowOrder(this)}}class so extends eo{constructor(e,t,n){super(),this.sheetId=e,this.columnMapping=t,this.oldContent=n}doUndo(e){e.undoSetColumnOrder(this)}doRedo(e){e.redoSetColumnOrder(this)}}class oo extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldSheetContent=t,this.newSheetContent=n}doUndo(e){e.undoSetSheetContent(this)}doRedo(e){e.redoSetSheetContent(this)}}class ao extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startRow=t,this.numberOfRows=n,this.targetRow=r,this.version=i,this.undoStart=this.startRow<this.targetRow?this.targetRow-this.numberOfRows:this.targetRow,this.undoEnd=this.startRow>this.targetRow?this.startRow+this.numberOfRows:this.startRow}doUndo(e){e.undoMoveRows(this)}doRedo(e){e.redoMoveRows(this)}}class lo extends eo{constructor(e,t,n,r,i){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=n,this.targetColumn=r,this.version=i,this.undoStart=this.startColumn<this.targetColumn?this.targetColumn-this.numberOfColumns:this.targetColumn,this.undoEnd=this.startColumn>this.targetColumn?this.startColumn+this.numberOfColumns:this.startColumn}doUndo(e){e.undoMoveColumns(this)}doRedo(e){e.redoMoveColumns(this)}}class uo extends eo{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class co extends eo{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class ho extends eo{constructor(e){super(),this.sheetName=e}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class mo extends eo{constructor(e,t,n,r,i){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=n,this.scopedNamedExpressions=r,this.version=i}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class fo extends eo{constructor(e,t,n){super(),this.sheetId=e,this.oldName=t,this.newName=n}doUndo(e){e.undoRenameSheet(this)}doRedo(e){e.redoRenameSheet(this)}}class po extends eo{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class go extends eo{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class yo extends eo{constructor(e,t,n,r){super(),this.targetLeftCorner=e,this.oldContent=t,this.newContent=n,this.addedGlobalNamedExpressions=r}doUndo(e){e.undoPaste(this)}doRedo(e){e.redoPaste(this)}}class wo extends eo{constructor(e,t,n,r){super(),this.name=e,this.newContent=t,this.scope=n,this.options=r}doUndo(e){e.undoAddNamedExpression(this)}doRedo(e){e.redoAddNamedExpression(this)}}class bo extends eo{constructor(e,t,n){super(),this.namedExpression=e,this.content=t,this.scope=n}doUndo(e){e.undoRemoveNamedExpression(this)}doRedo(e){e.redoRemoveNamedExpression(this)}}class vo extends eo{constructor(e,t,n,r,i){super(),this.namedExpression=e,this.newContent=t,this.oldContent=n,this.scope=r,this.options=i}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class _o extends eo{constructor(){super(...arguments),this.operations=[]}add(e){this.operations.push(e)}*reversedOperations(){for(let e=this.operations.length-1;e>=0;e--)yield this.operations[e]}doUndo(e){e.undoBatch(this)}doRedo(e){e.redoBatch(this)}}class So{constructor(e,t){this.operations=t,this.oldData=new Map,this.undoStack=[],this.redoStack=[],this.undoLimit=e.undoLimit}saveOperation(e){void 0!==this.batchUndoEntry?this.batchUndoEntry.add(e):this.addUndoEntry(e)}beginBatchMode(){this.batchUndoEntry=new _o}commitBatchMode(){if(void 0===this.batchUndoEntry)throw Error("Batch mode wasn't started");this.addUndoEntry(this.batchUndoEntry),this.batchUndoEntry=void 0}storeDataForVersion(e,t,n){this.oldData.has(e)||this.oldData.set(e,[]);const r=this.oldData.get(e);r.push([t,n])}clearRedoStack(){this.redoStack=[]}clearUndoStack(){this.undoStack=[]}isUndoStackEmpty(){return 0===this.undoStack.length}isRedoStackEmpty(){return 0===this.redoStack.length}undo(){const e=this.undoStack.pop();if(!e)throw Error("Attempted to undo without operation on stack");this.undoEntry(e),this.redoStack.push(e)}undoBatch(e){for(const t of e.reversedOperations())this.undoEntry(t)}undoRemoveRows(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},rowsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addRows(new Gs(t,[[e.rowFrom,e.rowCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},columnsRemovals:n}=e;for(let r=n.length-1;r>=0;--r){const e=n[r];this.operations.addColumns(new Ks(t,[[e.columnFrom,e.columnCount]]));for(const{address:t,cellType:n}of e.removedCells)this.operations.restoreCell(t,n);this.restoreOldDataFromVersion(e.version-1)}}undoAddRows(e){const t=e.command.rowsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeRows(new zs(e.command.sheet,[[r.rowStart,r.numberOfRows]]))}}undoAddColumns(e){const t=e.command.columnsSpans();for(let n=t.length-1;n>=0;--n){const r=t[n];this.operations.removeColumns(new Xs(e.command.sheet,[[r.columnStart,r.numberOfColumns]]))}}undoSetCellContents(e){for(const t of e.cellContents){const e=t.address,[n,r]=t.oldContent;br(e,n)||this.operations.setCellEmpty(e),this.operations.restoreCell(n,r)}}undoPaste(e){this.restoreOperationOldContent(e.oldContent);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoMoveRows(e){const{sheet:t}=e;this.operations.moveRows(t,e.undoStart,e.numberOfRows,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveColumns(e){const{sheet:t}=e;this.operations.moveColumns(t,e.undoStart,e.numberOfColumns,e.undoEnd),this.restoreOldDataFromVersion(e.version-1)}undoMoveCells(e){this.operations.forceApplyPostponedTransformations(),this.operations.moveCells(e.destinationLeftCorner,e.width,e.height,e.sourceLeftCorner),this.restoreOperationOldContent(e.overwrittenCellsData),this.restoreOldDataFromVersion(e.version-1);for(const t of e.addedGlobalNamedExpressions)this.operations.removeNamedExpression(t)}undoAddSheet(e){const{sheetName:t}=e;this.operations.removeSheetByName(t)}undoRemoveSheet(e){this.operations.forceApplyPostponedTransformations();const{oldSheetContent:t,sheetId:n}=e;this.operations.addSheet(e.sheetName);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}for(const[r,i]of e.scopedNamedExpressions)this.operations.restoreNamedExpression(r,i,n);this.restoreOldDataFromVersion(e.version-1)}undoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.oldName)}undoClearSheet(e){const{oldSheetContent:t,sheetId:n}=e;for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoSetSheetContent(e){const{oldSheetContent:t,sheetId:n}=e;this.operations.clearSheet(n);for(let r=0;r<t.length;r++){const e=t[r];for(let t=0;t<e.length;t++){const i=e[t],s=mr(n,t,r);this.operations.restoreCell(s,i)}}}undoAddNamedExpression(e){this.operations.removeNamedExpression(e.name,e.scope)}undoRemoveNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.content,e.scope)}undoChangeNamedExpression(e){this.operations.restoreNamedExpression(e.namedExpression,e.oldContent,e.scope)}undoSetRowOrder(e){this.restoreOperationOldContent(e.oldContent)}undoSetColumnOrder(e){this.restoreOperationOldContent(e.oldContent)}redo(){const e=this.redoStack.pop();if(!e)throw Error("Attempted to redo without operation on stack");this.redoEntry(e),this.undoStack.push(e)}redoBatch(e){for(const t of e.operations)this.redoEntry(t)}redoRemoveRows(e){this.operations.removeRows(e.command)}redoMoveCells(e){this.operations.moveCells(e.sourceLeftCorner,e.width,e.height,e.destinationLeftCorner)}redoRemoveColumns(e){this.operations.removeColumns(e.command)}redoPaste(e){const{targetLeftCorner:t,newContent:n}=e,r=n.length,i=n[0].length;for(let s=0;s<r;++s)for(let e=0;e<i;++e){const r=mr(t.sheet,t.col+e,t.row+s);this.operations.restoreCell(r,n[s][e])}}redoSetCellContents(e){for(const t of e.cellContents)this.operations.setCellContent(t.address,t.newContent)}redoAddRows(e){this.operations.addRows(e.command)}redoAddColumns(e){this.operations.addColumns(e.command)}redoRemoveSheet(e){this.operations.removeSheetByName(e.sheetName)}redoAddSheet(e){this.operations.addSheet(e.sheetName)}redoRenameSheet(e){this.operations.renameSheet(e.sheetId,e.newName)}redoMoveRows(e){this.operations.moveRows(e.sheet,e.startRow,e.numberOfRows,e.targetRow)}redoMoveColumns(e){this.operations.moveColumns(e.sheet,e.startColumn,e.numberOfColumns,e.targetColumn)}redoClearSheet(e){this.operations.clearSheet(e.sheetId)}redoSetSheetContent(e){const{sheetId:t,newSheetContent:n}=e;this.operations.setSheetContent(t,n)}redoAddNamedExpression(e){this.operations.addNamedExpression(e.name,e.newContent,e.scope,e.options)}redoRemoveNamedExpression(e){this.operations.removeNamedExpression(e.namedExpression.displayName,e.scope)}redoChangeNamedExpression(e){this.operations.changeNamedExpressionExpression(e.namedExpression.displayName,e.newContent,e.scope,e.options)}redoSetRowOrder(e){this.operations.setRowOrder(e.sheetId,e.rowMapping)}redoSetColumnOrder(e){this.operations.setColumnOrder(e.sheetId,e.columnMapping)}addUndoEntry(e){this.undoStack.push(e),this.undoStack.splice(0,Math.max(0,this.undoStack.length-this.undoLimit))}undoEntry(e){e.doUndo(this)}restoreOperationOldContent(e){for(const[t,n]of e)this.operations.restoreCell(t,n)}redoEntry(e){e.doRedo(this)}restoreOldDataFromVersion(e){const t=this.oldData.get(e)||[];for(const n of t){const[e,t]=n;this.operations.setFormulaToCellFromCache(t,e)}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Eo{constructor(e,t,n,r,i,s,o,a,l,u){this.operations=t,this.undoRedo=n,this.clipboardOperations=r,this.dependencyGraph=i,this.columnSearch=s,this.parser=o,this.cellContentParser=a,this.lazilyTransformingAstService=l,this.namedExpressions=u,this.maxRows=e.maxRows,this.maxColumns=e.maxColumns}get sheetMapping(){return this.dependencyGraph.sheetMapping}addRows(e,...t){const n=new Gs(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(n),this.undoRedo.saveOperation(new ro(n))}removeRows(e,...t){const n=new zs(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeRows(n);this.undoRedo.saveOperation(new to(n,r))}addColumns(e,...t){const n=new Ks(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(n),this.undoRedo.saveOperation(new uo(n))}removeColumns(e,...t){const n=new Xs(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeColumns(n);this.undoRedo.saveOperation(new co(n,r))}moveCells(e,t,n,r){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const{version:i,overwrittenCellsData:s,addedGlobalNamedExpressions:o}=this.operations.moveCells(e,t,n,r);this.undoRedo.saveOperation(new no(e,t,n,r,s,o,i))}moveRows(e,t,n,r){this.ensureItIsPossibleToMoveRows(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const i=this.operations.moveRows(e,t,n,r);this.undoRedo.saveOperation(new ao(e,t,n,r,i))}moveColumns(e,t,n,r){this.ensureItIsPossibleToMoveColumns(e,t,n,r),this.undoRedo.clearRedoStack();const i=this.operations.moveColumns(e,t,n,r);this.undoRedo.saveOperation(new lo(e,t,n,r,i))}cut(e,t,n){this.clipboardOperations.cut(e,t,n)}ensureItIsPossibleToCopy(e,t,n){if(!Co(t))throw new Xt("width to be positive integer.");if(!Co(n))throw new Xt("height to be positive integer.")}copy(e,t,n){this.ensureItIsPossibleToCopy(e,t,n),this.clipboardOperations.copy(e,t,n)}paste(e){const t=this.clipboardOperations.clipboard;if(void 0===t)throw new tn;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);const n=Er.spanFrom(e,t.width,t.height),r=this.operations.getRangeClipboardCells(n);this.undoRedo.clearRedoStack();const i=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new yo(e,r,t.content,i))}}beginUndoRedoBatchMode(){this.undoRedo.beginBatchMode()}commitUndoRedoBatchMode(){this.undoRedo.commitBatchMode()}isClipboardEmpty(){return void 0===this.clipboardOperations.clipboard}clearClipboard(){this.clipboardOperations.clear()}addSheet(e){void 0!==e&&this.ensureItIsPossibleToAddSheet(e),this.undoRedo.clearRedoStack();const t=this.operations.addSheet(e);return this.undoRedo.saveOperation(new ho(t)),t}removeSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.sheetMapping.fetchDisplayName(e),n=this.operations.getSheetClipboardCells(e),{version:r,scopedNamedExpressions:i}=this.operations.removeSheet(e);this.undoRedo.saveOperation(new mo(t,e,n,i,r))}renameSheet(e,t){this.ensureItIsPossibleToRenameSheet(e,t);const n=this.operations.renameSheet(e,t);return void 0!==n&&(this.undoRedo.clearRedoStack(),this.undoRedo.saveOperation(new fo(e,n,t))),n}clearSheet(e){this.ensureScopeIdIsValid(e),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const t=this.operations.getSheetClipboardCells(e);this.operations.clearSheet(e),this.undoRedo.saveOperation(new po(e,t))}setCellContents(e,t){if(t instanceof Array){for(let r=0;r<t.length;r++)if(!(t[r]instanceof Array))throw new Xt("an array of arrays or a raw cell value.")}else t=[[t]];this.ensureItIsPossibleToChangeCellContents(e,t),this.undoRedo.clearRedoStack();const n=[];for(let r=0;r<t.length;r++)for(let i=0;i<t[r].length;i++){const s={sheet:e.sheet,row:e.row+r,col:e.col+i},o=t[r][i];this.clipboardOperations.abortCut();const a=this.operations.setCellContent(s,o);n.push({address:s,newContent:o,oldContent:a})}this.undoRedo.saveOperation(new go(n))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),Bs(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new oo(e,n,t))}setRowOrder(e,t){this.validateSwapRowIndexes(e,t),this.testRowOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setRowOrder(e,t);this.undoRedo.saveOperation(new io(e,t,n))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Er.spanFrom({sheet:e,col:n,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new yn}}setColumnOrder(e,t){this.validateSwapColumnIndexes(e,t),this.testColumnOrderForArrays(e,t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.setColumnOrder(e,t);this.undoRedo.saveOperation(new so(e,t,n))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Er.spanFrom({sheet:e,col:0,row:n},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new yn}}mappingFromOrder(e,t,n){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==r)throw new Xt(`number of ${n}s provided to be sheet ${"row"===n?"height":"width"}.`);const i=[];for(let s=0;s<r;s++)t[s]!==s&&i.push([s,t[s]]);return i}undo(){if(this.undoRedo.isUndoStackEmpty())throw new Zt;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new en;this.clipboardOperations.abortCut(),this.undoRedo.redo()}addNamedExpression(e,t,n,r){this.ensureItIsPossibleToAddNamedExpression(e,t,n),this.operations.addNamedExpression(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new wo(e,t,n,r))}changeNamedExpressionExpression(e,t,n,r){this.ensureItIsPossibleToChangeNamedExpression(e,n,t);const[i,s]=this.operations.changeNamedExpressionExpression(e,n,t,r);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new vo(i,n,s,t,r))}removeNamedExpression(e,t){this.ensureScopeIdIsValid(t);const[n,r]=this.operations.removeNamedExpression(e,t);return this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new bo(n,r,t)),n}ensureItIsPossibleToAddNamedExpression(e,t,n){this.ensureScopeIdIsValid(n),this.ensureNamedExpressionNameIsValid(e,n),this.ensureNamedExpressionIsValid(t)}ensureItIsPossibleToChangeNamedExpression(e,t,n){if(this.ensureScopeIdIsValid(n),void 0===this.namedExpressions.namedExpressionForScope(e,n))throw new Qt(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new Qt(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.dependencyGraph.getSheetHeight(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxRows)throw new zt;for(const[i,s]of t)if(!Mo(i)||!Co(s))throw new Xt("row number to be nonnegative and number of rows to add to be positive.")}ensureItIsPossibleToRemoveRows(e,...t){for(const[n,r]of t){const t=n+r-1;if(!Mo(n)||!Mo(t))throw new Xt("starting and ending row to be nonnegative.");if(t<n)throw new Xt("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.dependencyGraph.getSheetWidth(e),r=t.map(e=>e[1]).reduce((e,t)=>e+t,0);if(n+r>this.maxColumns)throw new zt;for(const[i,s]of t)if(!Mo(i)||!Co(s))throw new Xt("column number to be nonnegative and number of columns to add to be positive.")}ensureItIsPossibleToRemoveColumns(e,...t){for(const[n,r]of t){const t=n+r-1;if(!Mo(n)||!Mo(t))throw new Xt("starting and ending column to be nonnegative.");if(t<n)throw new Xt("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}}ensureItIsPossibleToMoveRows(e,t,n,r){this.ensureItIsPossibleToAddRows(e,[r,n]);const i=mr(e,0,t),s=mr(e,0,r);if(!this.sheetMapping.hasSheetWithId(e)||fr(i)||fr(s)||!Co(n)||r<=t+n&&r>=t)throw new Xt("a valid range of rows to move.");const o=this.dependencyGraph.getSheetWidth(e),a=Er.spanFrom(i,o,n);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new yn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(jt.fromNumberOfRows(e,r-1,2)))throw new wn}ensureItIsPossibleToMoveColumns(e,t,n,r){this.ensureItIsPossibleToAddColumns(e,[r,n]);const i=mr(e,t,0),s=mr(e,r,0);if(!this.sheetMapping.hasSheetWithId(e)||fr(i)||fr(s)||!Co(n)||r<=t+n&&r>=t)throw new Xt("a valid range of columns to move.");const o=this.dependencyGraph.getSheetHeight(e),a=Er.spanFrom(i,n,o);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new yn;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(Ft.fromNumberOfColumns(e,r-1,2)))throw new wn}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new Wt(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new Vt(e);const n=this.sheetMapping.get(t);if(void 0!==n&&n!==e)throw new Wt(t)}ensureItIsPossibleToChangeContent(e){if(fr(e))throw new Kt(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new Vt(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){const n=Ws(t),r=Er.spanFrom(e,n.width,n.height);this.ensureRangeInSizeLimits(r);for(const i of r.addresses(this.dependencyGraph))this.ensureItIsPossibleToChangeContent(i)}ensureItIsPossibleToChangeSheetContents(e,t){const n=Ws(t),r=Er.spanFrom(mr(e,0,0),n.width,n.height);this.ensureRangeInSizeLimits(r)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new zt}isThereSomethingToUndo(){return!this.undoRedo.isUndoStackEmpty()}isThereSomethingToRedo(){return!this.undoRedo.isRedoStackEmpty()}getAndClearContentChanges(){return this.operations.getAndClearContentChanges()}ensureScopeIdIsValid(e){if(void 0!==e&&!this.sheetMapping.hasSheetWithId(e))throw new Vt(e)}validateRowOrColumnMapping(e,t,n){const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),i=t.map(([e,t])=>e).sort((e,t)=>e-t),s=t.map(([e,t])=>t).sort((e,t)=>e-t);for(let o=0;o<i.length;o++){if(!Mo(i[o])||i[o]>=r)throw new Xt(`${n} numbers to be nonnegative integers and less than sheet ${"row"===n?"height":"width"}.`);if(i[o]===i[o+1])throw new Xt(`source ${n} numbers to be unique.`);if(i[o]!==s[o])throw new Xt(`target ${n} numbers to be permutation of source ${n} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new Jt(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new qt(e)}ensureNamedExpressionIsValid(e){const t=this.cellContentParser.parse(e);if(t instanceof vs.Formula){const e=this.parser.parse(t.formula,mr(-1,0,0));if(ks(e.ast))throw new bn}}}function Co(e){return Number.isInteger(e)&&e>0}function Mo(e){return Number.isInteger(e)&&e>=0}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class To{constructor(e,t,n,r,i,s){this.config=e,this.stats=t,this.interpreter=n,this.lazilyTransformingAstService=r,this.dependencyGraph=i,this.columnSearch=s}run(){this.stats.start(It.TOP_SORT);const{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(It.TOP_SORT),this.stats.measure(It.EVALUATION,()=>{this.recomputeFormulas(t,e)})}partialRun(e){const t=Pt.empty();return this.stats.measure(It.EVALUATION,()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,e=>{if(e instanceof Tn){const n=e.isComputed()?e.getCellValue():void 0,r=this.recomputeFormulaVertexValue(e);if(r!==n){const i=e.getAddress(this.lazilyTransformingAstService);return t.addChange(r,i),this.columnSearch.change(St(n),St(r),i),!0}return!1}return!(e instanceof Nn)||(e.clearCache(),!0)},e=>{if(e instanceof Nn)e.clearCache();else if(e instanceof Tn){const n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(St(e.valueOrUndef()),n);const r=new lr(Vn.CYCLE,void 0,e);e.setCellValue(r),t.addChange(r,n)}})}),t}runAndForget(e,t,n){const r=[];for(const s of bt(n,t))if(s instanceof Er){const e=s;if(void 0===this.dependencyGraph.getRange(e.start,e.end)){const t=new Nn(e);this.dependencyGraph.rangeMapping.setRange(t),r.push(t)}}const i=this.evaluateAstToCellValue(e,new Tr(t,this.config.useArrayArithmetic));return r.forEach(e=>{this.dependencyGraph.rangeMapping.removeRange(e)}),i}recomputeFormulas(e,t){e.forEach(e=>{e instanceof Tn&&e.setCellValue(new lr(Vn.CYCLE,void 0,e))}),t.forEach(e=>{if(e instanceof Tn){const t=this.recomputeFormulaVertexValue(e),n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(St(t),n)}else e instanceof Nn&&e.clearCache()})}recomputeFormulaVertexValue(e){const t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof Rn&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{const n=e.getFormula(this.lazilyTransformingAstService),r=this.evaluateAstToCellValue(n,new Tr(t,this.config.useArrayArithmetic,e));return e.setCellValue(r)}}evaluateAstToCellValue(e,t){const n=this.interpreter.evaluateAst(e,t);return n instanceof Ht?n:n===_t&&this.config.evaluateNullToZero?0:n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ro{constructor(e,t){this.address=e,this.newValue=t}get col(){return this.address.col}get row(){return this.address.row}get sheet(){return this.address.sheet}get value(){return this.newValue}}class Oo{constructor(e,t){this.name=e,this.newValue=t}}class No{constructor(e,t,n,r){this.config=e,this.namedExpressions=t,this.sheetIndexMapping=n,this.lazilyTransformingService=r}exportChange(e){const t=e.value,n=e.address;if(n.sheet===Is.SHEET_FOR_WORKBOOK_EXPRESSIONS){const e=this.namedExpressions.namedExpressionInAddress(n.row);if(!e)throw new Error("Missing named expression");return new Oo(e.displayName,this.exportScalarOrRange(t))}if(t instanceof Ht){const e=[];for(const[r,i]of t.entriesFromTopLeftCorner(n))e.push(new Ro(i,this.exportValue(r)));return e}return new Ro(n,this.exportValue(t))}exportValue(e){return e instanceof Ht?this.detailedError(new lr(Vn.VALUE,Re.ScalarExpected)):this.config.smartRounding&&At(e)?this.cellValueRounding(St(e)):e instanceof lr?this.detailedError(e):e===_t?null:St(e)}exportScalarOrRange(e){return e instanceof Ht?e.rawData().map(e=>e.map(e=>this.exportValue(e))):this.exportValue(e)}detailedError(e){var t,n;let r=void 0;const i=null===(t=e.root)||void 0===t?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==i&&(r=i.sheet===Is.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(n=this.namedExpressions.namedExpressionInAddress(i.row))||void 0===n?void 0:n.displayName:D(this.sheetIndexMapping,i,-1)),new ii(e,this.config.translationPackage.getErrorTranslation(e.type),r)}cellValueRounding(e){if(0===e)return e;const t=Math.floor(Math.log10(Math.abs(e))),n=Math.pow(10,this.config.precisionRounding-t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ao{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnSearch=t,this.parser=n,this.cellContentParser=r,this.stats=i,this.arraySizePredictor=s,this.buildStrategy=new Lo(e,t,n,i,r,s)}buildGraph(e,t){const n=t.measure(It.COLLECT_DEPENDENCIES,()=>this.buildStrategy.run(e));this.dependencyGraph.getAndClearContentChanges(),t.measure(It.PROCESS_DEPENDENCIES,()=>this.processDependencies(n))}processDependencies(e){e.forEach((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)})}}class Lo{constructor(e,t,n,r,i,s){this.dependencyGraph=e,this.columnIndex=t,this.parser=n,this.stats=r,this.cellContentParser=i,this.arraySizePredictor=s}run(e){const t=new Map;for(const n in e){const r=this.dependencyGraph.getSheetId(n),i=e[n];for(let e=0;e<i.length;++e){const n=i[e];for(let i=0;i<n.length;++i){const s=n[i],o=mr(r,i,e),a=this.cellContentParser.parse(s);if(a instanceof vs.Formula){const e=this.stats.measure(It.PARSER,()=>this.parser.parse(a.formula,o));if(e.errors.length>0){this.shrinkArrayIfNeeded(o);const t=new qn(e.errors,a.formula);this.dependencyGraph.addVertex(o,t)}else{this.shrinkArrayIfNeeded(o);const n=this.arraySizePredictor.checkArraySize(e.ast,o);if(n.isScalar()){const n=new On(e.ast,o,0);t.set(n,bt(e.dependencies,o)),this.dependencyGraph.addVertex(o,n),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(n),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(n)}else{const r=new Rn(e.ast,o,new ei(n.width,n.height));t.set(r,bt(e.dependencies,o)),this.dependencyGraph.addArrayVertex(o,r)}}}else if(a instanceof vs.Empty);else{this.shrinkArrayIfNeeded(o);const e=new $n(a.value,s);this.columnIndex.add(St(a.value),o),this.dependencyGraph.addVertex(o,e)}}}}return t}shrinkArrayIfNeeded(e){const t=this.dependencyGraph.getCell(e);t instanceof Rn&&this.dependencyGraph.shrinkArrayToCorner(t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Io=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class ko extends Zr{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),()=>{const{licenseKeyValidityState:e,licenseKey:t}=this.config;let n;return Io.has(t)?n=Io.get(t):Io.has(e)?n=Io.get(e):"valid"===e&&(n=t.slice(-5)),`HyperFormula v${ha.version}, ${n}`})}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function xo(e,t){var n;let r=t.implementedFunctions[e];const i=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==i){if(void 0!==r)throw new vn(e,t.name);r=t.implementedFunctions[i]}if(void 0===r)throw pn.functionNotDeclaredInPlugin(e,t.name);return r}ko.implementedFunctions={VERSION:{method:"version",parameters:[]}};class Do{constructor(e){if(this.config=e,this.functions=new Map,this.arraySizeFunctions=new Map,this.volatileFunctions=new Set,this.arrayFunctions=new Set,this.structuralChangeFunctions=new Set,this.functionsWhichDoesNotNeedArgumentsToBeComputed=new Set,this.functionsMetadata=new Map,this.doesFunctionNeedArgumentToBeComputed=e=>this.functionsWhichDoesNotNeedArgumentsToBeComputed.has(e),this.isFunctionVolatile=e=>this.volatileFunctions.has(e),this.isArrayFunction=e=>this.arrayFunctions.has(e),this.isFunctionDependentOnSheetStructureChange=e=>this.structuralChangeFunctions.has(e),e.functionPlugins.length>0){this.instancePlugins=new Map;for(const t of e.functionPlugins)Do.loadPluginFunctions(t,this.instancePlugins)}else this.instancePlugins=new Map(Do.plugins);for(const[t,n]of Do.protectedFunctions())Do.loadFunctionUnprotected(n,t,this.instancePlugins);for(const[t,n]of this.instancePlugins.entries())this.categorizeFunction(t,xo(t,n))}static registerFunctionPlugin(e,t){this.loadPluginFunctions(e,this.plugins),void 0!==t&&this.loadTranslations(t)}static registerFunction(e,t,n){this.loadPluginFunction(t,e,this.plugins),void 0!==n&&this.loadTranslations(n)}static unregisterFunction(e){if(this.functionIsProtected(e))throw gn.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(const t of this.protectedPlugins())if(t===e)throw gn.cannotUnregisterProtectedPlugin();for(const[t,n]of this.plugins.entries())n===e&&this.plugins.delete(t)}static unregisterAll(){this.plugins.clear()}static getRegisteredFunctionIds(){return[...Array.from(this.plugins.keys()),...Array.from(this._protectedPlugins.keys())]}static getPlugins(){return Array.from(new Set(this.plugins.values()).values())}static getFunctionPlugin(e){return this.functionIsProtected(e)?void 0:this.plugins.get(e)}static functionIsProtected(e){return this._protectedPlugins.has(e)}static loadTranslations(e){const t=new Set(ha.getRegisteredLanguagesCodes());Object.keys(e).forEach(n=>{t.has(n)&&ha.getLanguage(n).extendFunctions(e[n])})}static loadPluginFunctions(e,t){Object.keys(e.implementedFunctions).forEach(n=>{this.loadPluginFunction(e,n,t)}),void 0!==e.aliases&&Object.keys(e.aliases).forEach(n=>{this.loadPluginFunction(e,n,t)})}static loadPluginFunction(e,t,n){if(this.functionIsProtected(t))throw gn.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}static loadFunctionUnprotected(e,t,n){const r=xo(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,r))throw pn.functionMethodNotFound(r,e.name);n.set(t,e)}static*protectedFunctions(){for(const[e,t]of this._protectedPlugins)void 0!==t&&(yield[e,t])}static*protectedPlugins(){for(const[,e]of this._protectedPlugins)void 0!==e&&(yield e)}initializePlugins(e){const t=[];for(const[n,r]of this.instancePlugins.entries()){let i=t.find(e=>e instanceof r);void 0===i&&(i=new r(e),t.push(i));const s=xo(n,r),o=s.method;this.functions.set(n,[o,i]);const a=s.arraySizeMethod;void 0!==a&&this.arraySizeFunctions.set(n,[a,i])}}getFunctionPlugin(e){if(!Do.functionIsProtected(e))return this.instancePlugins.get(e)}getFunction(e){const t=this.functions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getArraySizeFunction(e){const t=this.arraySizeFunctions.get(e);if(void 0!==t&&this.config.translationPackage.isFunctionTranslated(e)){const[e,n]=t;return(t,r)=>n[e](t,r)}}getMetadata(e){return this.functionsMetadata.get(e)}getPlugins(){const e=new Set;for(const[t,n]of this.instancePlugins)Do.functionIsProtected(t)||e.add(n);return Array.from(e)}getRegisteredFunctionIds(){return Array.from(this.functions.keys())}categorizeFunction(e,t){t.isVolatile&&this.volatileFunctions.add(e),t.arrayFunction&&this.arrayFunctions.add(e),t.doesNotNeedArgumentsToBeComputed&&this.functionsWhichDoesNotNeedArgumentsToBeComputed.add(e),t.isDependentOnSheetStructureChange&&this.structuralChangeFunctions.add(e),this.functionsMetadata.set(e,t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- var Ho;Do.plugins=new Map,Do._protectedPlugins=new Map([["VERSION",ko],["OFFSET",void 0]]),function(e){e["GREATER_THAN"]="GREATER_THAN",e["GREATER_THAN_OR_EQUAL"]="GREATER_THAN_OR_EQUAL",e["LESS_THAN"]="LESS_THAN",e["LESS_THAN_OR_EQUAL"]="LESS_THAN_OR_EQUAL",e["NOT_EQUAL"]="NOT_EQUAL",e["EQUAL"]="EQUAL"}(Ho||(Ho={}));const Po=(e,t)=>({operator:e,value:t});class jo{constructor(e){var t,n,r,i;this.trueString=null!==(n=null===(t=e.translationPackage.getMaybeFunctionTranslation("TRUE"))||void 0===t?void 0:t.toLowerCase())&&void 0!==n?n:"true",this.falseString=null!==(i=null===(r=e.translationPackage.getMaybeFunctionTranslation("FALSE"))||void 0===r?void 0:r.toLowerCase())&&void 0!==i?i:"false"}fromCellValue(e,t){if("string"!==typeof e&&"boolean"!==typeof e&&"number"!==typeof e)return;const n=this.parseCriterion(e,t);return void 0!==n?{raw:e,lambda:Uo(n,t)}:void 0}parseCriterion(e,t){if("number"===typeof e||"boolean"===typeof e)return Po(Ho.EQUAL,e);if("string"===typeof e){const n=Fo.exec(e);let r,i;n?(i=Yo(n[1]),r=n[2]):(i=Ho.EQUAL,r=e);const s=t.coerceToMaybeNumber(r),o=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===i)return;if(""===r)return Po(i,null);if(void 0!==s)return Po(i,St(s));if(i===Ho.EQUAL||i===Ho.NOT_EQUAL)return Po(i,null!==o&&void 0!==o?o:r)}}}const Fo=/([<>=]+)(.*)/;function Yo(e){switch(e){case">":return Ho.GREATER_THAN;case">=":return Ho.GREATER_THAN_OR_EQUAL;case"<":return Ho.LESS_THAN;case"<=":return Ho.LESS_THAN_OR_EQUAL;case"<>":return Ho.NOT_EQUAL;case"=":return Ho.EQUAL;default:return}}const Uo=(e,t)=>{switch(e.operator){case Ho.GREATER_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>0:e=>!1;case Ho.GREATER_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)>=0:e=>!1;case Ho.LESS_THAN:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<0:e=>!1;case Ho.LESS_THAN_OR_EQUAL:return"number"===typeof e.value?n=>"number"===typeof n&&t.floatCmp(n,e.value)<=0:e=>!1;case Ho.EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0===t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!1;const r=t.coerceToMaybeNumber(n);return void 0!==r&&0===t.floatCmp(r,e.value)}return!1}:"string"===typeof e.value?t.eqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"===typeof t&&t===e.value:e=>e===_t;case Ho.NOT_EQUAL:return"number"===typeof e.value?n=>{if("number"===typeof n)return 0!==t.floatCmp(n,e.value);if("string"===typeof n){if(""===n)return!0;const r=t.coerceToMaybeNumber(n);return void 0===r||0!==t.floatCmp(r,e.value)}return!0}:"string"===typeof e.value?t.neqMatcherFunction(e.value):"boolean"===typeof e.value?t=>"boolean"!==typeof t||t!==e.value:e=>e!==_t}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Vo{constructor(e,t,n,r,i,s,o,a,l,u){this.config=e,this.dependencyGraph=t,this.columnSearch=n,this.stats=r,this.arithmeticHelper=i,this.functionRegistry=s,this.namedExpressions=o,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=u,this.equalOp=(e,t)=>Wo(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>Wo(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>Wo(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>Wo(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>Wo(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>Wo(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>Wo(this.arithmeticHelper.concat,Hr(e),Hr(t)),this.plusOp=(e,t)=>Wo(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>Wo(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>Wo(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>Wo(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>Wo(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>Bo(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>Bo(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new jo(e)}evaluateAst(e,t){let n=this.evaluateAstWithoutPostprocessing(e,t);if(At(n)){if(Fr(St(n)))return new lr(Vn.NUM,Re.NaN);n=Ct(n,Yr(St(n)))}return n instanceof Ht&&1===n.height()&&1===n.width()&&([[n]]=n.data),zo(n,t.formulaVertex)}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case W.EMPTY:return _t;case W.CELL_REFERENCE:{const n=e.reference.toSimpleCellAddress(t.formulaAddress);return fr(n)?new lr(Vn.REF,Re.BadRef):this.dependencyGraph.getCellValue(n)}case W.NUMBER:case W.STRING:return e.value;case W.CONCATENATE_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,n,r,t)}case W.EQUALS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,n,r,t)}case W.NOT_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.notEqualOp,n,r,t)}case W.GREATER_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOp,n,r,t)}case W.LESS_THAN_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOp,n,r,t)}case W.GREATER_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.greaterThanOrEqualOp,n,r,t)}case W.LESS_THAN_OR_EQUAL_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.lessThanOrEqualOp,n,r,t)}case W.PLUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,n,r,t)}case W.MINUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,n,r,t)}case W.TIMES_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,n,r,t)}case W.POWER_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,n,r,t)}case W.DIV_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,n,r,t)}case W.PLUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,n,t)}case W.MINUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,n,t)}case W.PERCENT_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,n,t)}case W.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!Do.functionIsProtected(e.procedureName))return new lr(Vn.LIC,Re.LicenseKey(this.config.licenseKeyValidityState));const n=this.functionRegistry.getFunction(e.procedureName);return void 0!==n?n(e,new Tr(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex)):new lr(Vn.NAME,Re.FunctionName(e.procedureName))}case W.NAMED_EXPRESSION:{const n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);return n?this.dependencyGraph.getCellValue(n.address):new lr(Vn.NAME,Re.NamedExpressionName(e.expressionName))}case W.CELL_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Er.fromCellRange(e,t.formulaAddress),r=this.dependencyGraph.getArray(n);if(r){const e=r.array;if(e instanceof En)throw new Error("Array should be already computed");if(e instanceof lr)return e;if(e instanceof Cn)return Ht.fromRange(e.raw(),n,this.dependencyGraph);throw new Error("Unknown array")}return Ht.onlyRange(n,this.dependencyGraph)}case W.COLUMN_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Cr.fromColumnRange(e,t.formulaAddress);return Ht.onlyRange(n,this.dependencyGraph)}case W.ROW_RANGE:{if(!this.rangeSpansOneSheet(e))return new lr(Vn.REF,Re.RangeManySheets);const n=Mr.fromRowRangeAst(e,t.formulaAddress);return Ht.onlyRange(n,this.dependencyGraph)}case W.PARENTHESIS:return this.evaluateAst(e.expression,t);case W.ARRAY:{let n=void 0;const r=[];for(const i of e.args){let e=void 0;const s=[];for(const n of i){const r=Ir(this.evaluateAst(n,t)),i=r.height();if(void 0===e)e=i,s.push(...r.data);else{if(e!==i)return new lr(Vn.REF,Re.SizeMismatch);for(let e=0;e<i;e++)s[e].push(...r.data[e])}}const o=s[0].length;if(void 0===n)n=o,r.push(...s);else{if(n!==o)return new lr(Vn.REF,Re.SizeMismatch);r.push(...s)}}return Ht.onlyValues(r)}case W.ERROR_WITH_RAW_INPUT:case W.ERROR:return e.error}}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,n){var r;if(t instanceof Ht&&!n.arraysFlag&&(t=null!==(r=qr(t,n))&&void 0!==r?r:new lr(Vn.VALUE,Re.ScalarExpected)),t instanceof lr)return t;if(t instanceof Ht){const n=t.data.map(t=>t.map(e));return Ht.onlyValues(n)}return e(t)}binaryRangeWrapper(e,t,n,r){var i,s;if(t instanceof Ht&&!r.arraysFlag&&(t=null!==(i=qr(t,r))&&void 0!==i?i:new lr(Vn.VALUE,Re.ScalarExpected)),t instanceof lr)return t;if(n instanceof Ht&&!r.arraysFlag&&(n=null!==(s=qr(n,r))&&void 0!==s?s:new lr(Vn.VALUE,Re.ScalarExpected)),n instanceof lr)return n;if(t instanceof Ht||n instanceof Ht){if(!(t instanceof Ht)){if(n.isAdHoc()){const r=n.data;for(let n=0;n<r.length;n++)for(let i=0;i<r[0].length;i++)r[n][i]=e(t,r[n][i]);return Ht.onlyValues(r)}t=Ht.fromScalar(t)}if(!(n instanceof Ht)){if(t.isAdHoc()){const r=t.data;for(let t=0;t<r.length;t++)for(let i=0;i<r[0].length;i++)r[t][i]=e(r[t][i],n);return Ht.onlyValues(r)}n=Ht.fromScalar(n)}if(t.width()===n.width()&&t.height()===n.height()){if(t.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)r[t][n]=e(r[t][n],i[t][n]);return Ht.onlyValues(r)}if(n.isAdHoc()){const r=t.data,i=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)i[t][n]=e(r[t][n],i[t][n]);return Ht.onlyValues(i)}}const r=Math.max(t.width(),n.width()),i=Math.max(t.height(),n.height()),s=Array(i);for(let e=0;e<i;e++)s[e]=Array(r);for(let o=0;o<i;o++){const i=1!==t.height()?o:0,a=1!==n.height()?o:0;for(let l=0;l<r;l++){const r=1!==t.width()?l:0,u=1!==n.width()?l:0;i<t.height()&&a<n.height()&&r<t.width()&&u<n.width()?s[o][l]=e(t.data[i][r],n.data[a][u]):s[o][l]=new lr(Vn.NA)}}return Ht.onlyValues(s)}return e(t,n)}}function Bo(e,t){return t instanceof lr?t:e(t)}function Wo(e,t,n){return t instanceof lr?t:n instanceof lr?n:e(t,n)}function zo(e,t){return e instanceof lr&&void 0!==t?e.attachRootVertex(t):e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Go{constructor(e){this.sheet=e,this.transformations=[]}add(e){this.transformations.push(e)}performEagerTransformations(e,t){this.transformations.forEach(n=>n.performEagerTransformations(e,t))}transformSingleAst(e,t){let[n,r]=[e,t];return this.transformations.forEach(e=>{[n,r]=e.transformSingleAst(n,r)}),[n,r]}isIrreversible(){return!0}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ko{constructor(e){this.stats=e,this.transformations=[]}version(){return this.transformations.length}addTransformation(e){return void 0!==this.combinedTransformer?this.combinedTransformer.add(e):this.transformations.push(e),this.version()}beginCombinedMode(e){this.combinedTransformer=new Go(e)}commitCombinedMode(){if(void 0===this.combinedTransformer)throw Error("Combined mode wasn't started");return this.transformations.push(this.combinedTransformer),this.combinedTransformer=void 0,this.version()}applyTransformations(e,t,n){this.stats.start(It.TRANSFORM_ASTS_POSTPONED);for(let i=n;i<this.transformations.length;i++){const n=this.transformations[i];n.isIrreversible()&&(this.undoRedo.storeDataForVersion(i,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));const[r,s]=n.transformSingleAst(e,t);e=r,t=s}const r=this.parser.rememberNewAst(e);return this.stats.end(It.TRANSFORM_ASTS_POSTPONED),[r,t,this.transformations.length]}*getTransformationsFrom(e,t){for(let n=e;n<this.transformations.length;n++){const e=this.transformations[n];t&&!t(e)||(yield e)}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */const Xo=-1;function $o(e,t,{searchCoordinate:n,orderingDirection:r,matchExactly:i},s){const o=t.start[n],a="col"===n?t.effectiveEndColumn(s):t.effectiveEndRow(s),l="col"===n?e=>St(s.getCellValue(mr(t.sheet,e,t.start.row))):e=>St(s.getCellValue(mr(t.sheet,t.start.col,e))),u="asc"===r?(e,t)=>Jo(e,t):(e,t)=>-Jo(e,t),c=qo(t=>u(e,l(t))>=0,o,a),h=l(c);return c===Xo||typeof h!==typeof e||i&&h!==e?Xo:c-o}function qo(e,t,n){let r=t,i=n;while(r<i){const t=Math.ceil((r+i)/2);e(t)?r=t:i=t-1}return r===i&&e(r)?r:Xo}function Jo(e,t){return typeof e===typeof t?e===_t?0:e<t?-1:e>t?1:0:e===_t?-1:t===_t?1:t instanceof lr||"number"===typeof e&&"string"===typeof t||"number"===typeof e&&"boolean"===typeof t?-1:"string"===typeof e&&"number"===typeof t?1:"string"===typeof e&&"boolean"===typeof t?-1:1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Qo{constructor(e){this.dependencyGraph=e}advancedFind(e,t){let n;const r=t.range;n=void 0===r?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(r);for(let i=0;i<n.length;i++)if(e(St(n[i])))return i;return-1}basicFind(e,t,n,{ordering:r,matchExactly:i}){const s="string"===typeof e?$r(e):e,o=t.range;return void 0===o?this.findNormalizedValue(s,t.valuesFromTopLeftCorner()):"none"===r?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(o)):$o(s,o,{searchCoordinate:n,orderingDirection:r,matchExactly:i},this.dependencyGraph)}findNormalizedValue(e,t){return t.map(St).map(e=>"string"===typeof e?$r(e):e).indexOf(e)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Zo extends Qo{constructor(e){super(e),this.dependencyGraph=e}add(e,t){}remove(e,t){}change(e,t,n){}applyChanges(e){}addColumns(e){}removeColumns(e){}removeSheet(e){}moveValues(e,t,n,r){}removeValues(e){}find(e,t,n){return this.basicFind(e,t,"row",n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ea{constructor(e,t,n){this.dependencyGraph=e,this.config=t,this.stats=n,this.index=new Map,this.transformingService=this.dependencyGraph.lazilyTransformingAstService,this.binarySearchStrategy=new Zo(e)}add(e,t){if(!(e===_t||e instanceof lr))if(e instanceof Ht)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(St(n),r);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof Ht)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(St(n),r);else this.removeSingleValue(e,t)}change(e,t,n){e!==t&&(this.remove(e,n),this.add(t,n))}applyChanges(e){for(const t of e)void 0!==t.oldValue&&this.change(St(t.oldValue),St(t.value),t.address)}moveValues(e,t,n,r){for(const[i,s]of e){const e=pr(s,r,t,n);this.remove(i,s),this.add(i,e)}}removeValues(e){for(const[t,n]of e)this.remove(t,n)}find(e,t,{ordering:n,matchExactly:r}){const i=!0===r?"findFirst":"findLast",s=this.findUsingColumnIndex(e,t,i);return void 0!==s?s:this.binarySearchStrategy.find(e,t,{ordering:n,matchExactly:r})}findUsingColumnIndex(e,t,n){const r=t.range;if(void 0===r)return;this.ensureRecentData(r.sheet,r.start.col,e);const i=this.getColumnMap(r.sheet,r.start.col);if(!i)return-1;const s="string"===typeof e?$r(e):e,o=i.get(s);if(!o||!o.index||0===o.index.length)return;const a=ea.findRowBelongingToRange(o,r,n);return void 0!==a?a-r.start.row:void 0}static findRowBelongingToRange(e,t,n){const r=t.start.row,i=t.end.row,s="findFirst"===n?ta(r,e.index,"upperBound"):ta(i,e.index,"lowerBound");if(-1===s)return;const o=e.index[s],a=o>=r&&o<=i;return a?o:void 0}advancedFind(e,t){return this.binarySearchStrategy.advancedFind(e,t)}addColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,0,...Array(e.numberOfColumns))}removeColumns(e){const t=this.index.get(e.sheet);t&&t.splice(e.columnStart,e.numberOfColumns)}removeSheet(e){this.index.delete(e)}getColumnMap(e,t){this.index.has(e)||this.index.set(e,[]);const n=this.index.get(e);let r=n[t];return r||(r=new Map,n[t]=r),r}getValueIndex(e,t,n){const r=this.getColumnMap(e,t);let i=this.getColumnMap(e,t).get(n);return i||(i={version:this.transformingService.version(),index:[]},r.set(n,i)),i}ensureRecentData(e,t,n){const r=this.getValueIndex(e,t,n),i=this.transformingService.version();if(r.version===i)return;const s=this.transformingService.getTransformationsFrom(r.version,t=>t.sheet===e&&(t instanceof Hs||t instanceof Us));for(const o of s)o instanceof Hs?this.addRows(t,o.rowsSpan,n):o instanceof Us&&this.removeRows(t,o.rowsSpan,n);r.version=i}addSingleCellValue(e,t){this.stats.measure(It.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e),"string"===typeof e&&(e=$r(e));const n=this.getValueIndex(t.sheet,t.col,e);ea.addValue(n,t.row)})}removeSingleValue(e,t){this.stats.measure(It.BUILD_COLUMN_INDEX,()=>{this.ensureRecentData(t.sheet,t.col,e);const n=this.getColumnMap(t.sheet,t.col);"string"===typeof e&&(e=$r(e));const r=n.get(e);if(!r)return;const i=ta(t.row,r.index);i>-1&&r.index.splice(i,1),0===r.index.length&&n.delete(e),0===n.size&&delete this.index.get(t.sheet)[t.col]})}addRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.shiftRows(r,t.rowStart,t.numberOfRows)}removeRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);ea.removeRowsFromValues(r,t),ea.shiftRows(r,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){const n=ta(t,e.index,"lowerBound"),r=e.index[n]===t;r||e.index.splice(n+1,0,t)}static removeRowsFromValues(e,t){const n=ta(t.rowStart,e.index,"upperBound"),r=ta(t.rowEnd,e.index,"lowerBound"),i=n>-1&&r>-1&&n<=r&&e.index[n]<=t.rowEnd;i&&e.index.splice(n,r-n+1)}static shiftRows(e,t,n){const r=ta(t,e.index,"upperBound");if(-1!==r)for(let i=r;i<e.index.length;++i)e.index[i]+=n}}function ta(e,t,n="upperBound"){let r=0,i=t.length-1;while(r<=i){const n=Math.floor((r+i)/2);if(e>t[n])r=n+1;else{if(!(e<t[n]))return n;i=n-1}}const s="lowerBound"===n?i:r,o=s>=0&&s<=t.length;return o?s:-1}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function na(e,t,n){return t.useColumnIndex?new ea(e,t,n):new Zo(e)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ra{constructor(e){this.config=e;const t="."===this.config.thousandSeparator?"\\"+this.config.thousandSeparator:this.config.thousandSeparator,n="."===this.config.decimalSeparator?"\\"+this.config.decimalSeparator:this.config.decimalSeparator;this.numberPattern=new RegExp(`^([+-]?((${n}\\d+)|(\\d+(${t}\\d{3,})*(${n}\\d*)?)))(e[+-]?\\d+)?$`),this.allThousandSeparatorsRegex=new RegExp(""+t,"g")}numericStringToMaybeNumber(e){if(this.numberPattern.test(e)){const t=this.numericStringToNumber(e);if(isNaN(t))return;return t}}numericStringToNumber(e){const t=e.replace(this.allThousandSeparatorsRegex,"").replace(this.config.decimalSeparator,".");return Number(t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ia{constructor(e,t,n){this.dependencyGraph=e,this.unparser=t,this.exporter=n}getCellHyperlink(e){const t=this.dependencyGraph.getCell(e);if(t instanceof On){const e=t.getFormula(this.dependencyGraph.lazilyTransformingAstService);if("HYPERLINK"===e.procedureName)return e.hyperlink}}getCellFormula(e,t){const n=this.dependencyGraph.getCell(e);if(n instanceof On){const r=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!==t&&void 0!==t?t:e,this.unparser.unparse(r,t)}if(n instanceof Rn){const r=n.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(r.row!==e.row||r.col!==e.col||r.sheet!==e.sheet)return;t=null!==t&&void 0!==t?t:e;const i=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==i)return this.unparser.unparse(i,t)}else if(n instanceof qn)return n.getFormula()}getCellSerialized(e,t){var n;return null!==(n=this.getCellFormula(e,t))&&void 0!==n?n:this.getRawValue(e)}getCellValue(e){return this.exporter.exportValue(this.dependencyGraph.getScalarValue(e))}getRawValue(e){return this.dependencyGraph.getRawValue(e)}getSheetValues(e){return this.genericSheetGetter(e,e=>this.getCellValue(e))}getSheetFormulas(e){return this.genericSheetGetter(e,e=>this.getCellFormula(e))}genericSheetGetter(e,t){const n=this.dependencyGraph.getSheetHeight(e),r=this.dependencyGraph.getSheetWidth(e),i=new Array(n);for(let s=0;s<n;s++){i[s]=new Array(r);for(let n=0;n<r;n++){const r=mr(e,n,s);i[s][n]=t(r)}for(let e=r-1;e>=0;e--){if(null!==i[s][e]&&void 0!==i[s][e])break;i[s].pop()}}for(let s=n-1;s>=0;s--){if(0!==i[s].length)break;i.pop()}return i}genericAllSheetsGetter(e){const t={};for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);t[n]=e(r)}return t}getSheetSerialized(e){return this.genericSheetGetter(e,e=>this.getCellSerialized(e))}getAllSheetsValues(){return this.genericAllSheetsGetter(e=>this.getSheetValues(e))}getAllSheetsFormulas(){return this.genericAllSheetsGetter(e=>this.getSheetFormulas(e))}getAllSheetsSerialized(){return this.genericAllSheetsGetter(e=>this.getSheetSerialized(e))}getAllNamedExpressionsSerialized(){const e=[];let t=0;for(const n of this.dependencyGraph.sheetMapping.displayNames()){const r=this.dependencyGraph.sheetMapping.fetch(n);e[r]=t,t++}return this.dependencyGraph.namedExpressions.getAllNamedExpressions().map(t=>({name:t.expression.displayName,expression:this.getCellSerialized(t.expression.address),scope:void 0!==t.scope?e[t.scope]:void 0,options:t.expression.options}))}withNewConfig(e,t){const n=new ut(e,ot(e),this.dependencyGraph.sheetMapping.fetchDisplayName,t);return new ia(this.dependencyGraph,n,this.exporter)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class sa{static buildFromSheets(e,t={},n=[]){const r=new ma(t);return this.buildEngine(r,e,n)}static buildFromSheet(e,t={},n=[]){const r=new ma(t),i=r.translationPackage.getUITranslation(Un.NEW_SHEET_PREFIX)+"1";return this.buildEngine(r,{[i]:e},n)}static buildEmpty(e={},t=[]){return this.buildEngine(new ma(e),{},t)}static rebuildWithConfig(e,t,n,r){return this.buildEngine(e,t,n,r)}static buildEngine(e,t={},n=[],r=(e.useStats?new Yt:new Ut)){r.start(It.BUILD_ENGINE_TOTAL);const i=new Is,s=new Do(e),o=new Ko(r),a=Kn.buildEmpty(o,e,s,i,r),l=na(a,e,r),u=a.sheetMapping,c=a.addressMapping;for(const T in t)if(Object.prototype.hasOwnProperty.call(t,T)){const n=t[T];Bs(n);const r=Ws(n);if(r.height>e.maxRows||r.width>e.maxColumns)throw new zt;const i=u.addSheet(T);c.autoAddSheet(i,r)}const h=new ht(e,s,u.get);o.parser=h;const d=new ut(e,ot(e),u.fetchDisplayName,i),m=new xi(e),f=new ra(e),p=new Ar(e,m,f),g=new Ts(e,m,f),y=new ri(e,s),w=new $s(e,a,l,g,h,r,o,i,y),b=new So(e,w);o.undoRedo=b;const v=new Os(e,a,w),_=new Eo(e,w,b,v,a,l,h,g,o,i);n.forEach(e=>{_.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),_.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)});const S=new No(e,i,u.fetchDisplayName,o),E=new ia(a,d,S),C=new Vo(e,a,l,r,p,s,i,E,y,m);r.measure(It.GRAPH_BUILD,()=>{const e=new Ao(a,l,h,g,r,y);e.buildGraph(t,r)});const M=new To(e,r,C,o,a,l);return M.run(),r.end(It.BUILD_ENGINE_TOTAL),{config:e,stats:r,dependencyGraph:a,columnSearch:l,parser:h,unparser:d,cellContentParser:g,evaluator:M,lazilyTransformingAstService:o,crudOperations:_,exporter:S,namedExpressions:i,serialization:E,functionRegistry:s}}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */function oa(e){for(const[t,n]of Object.entries(e))n instanceof Function?e[t]=aa(n):delete e[t]}function aa(e){return()=>{throw new Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}var la,ua=n("c0e2");
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e["SheetAdded"]="sheetAdded",e["SheetRemoved"]="sheetRemoved",e["SheetRenamed"]="sheetRenamed",e["NamedExpressionAdded"]="namedExpressionAdded",e["NamedExpressionRemoved"]="namedExpressionRemoved",e["ValuesUpdated"]="valuesUpdated",e["EvaluationSuspended"]="evaluationSuspended",e["EvaluationResumed"]="evaluationResumed"})(la||(la={}));class ca extends ua["TinyEmitter"]{emit(e,...t){return super.emit(e,...t),this}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ha{constructor(e,t,n,r,i,s,o,a,l,u,c,h,d,m){this._config=e,this._stats=t,this._dependencyGraph=n,this._columnSearch=r,this._parser=i,this._unparser=s,this._cellContentParser=o,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=u,this._exporter=c,this._namedExpressions=h,this._serialization=d,this._functionRegistry=m,this._emitter=new ca,this._evaluationSuspended=!1}static get defaultConfig(){return pa()}get graph(){return this.dependencyGraph.graph}get rangeMapping(){return this.dependencyGraph.rangeMapping}get arrayMapping(){return this.dependencyGraph.arrayMapping}get sheetMapping(){return this.dependencyGraph.sheetMapping}get addressMapping(){return this.dependencyGraph.addressMapping}get dependencyGraph(){return this._dependencyGraph}get evaluator(){return this._evaluator}get columnSearch(){return this._columnSearch}get lazilyTransformingAstService(){return this._lazilyTransformingAstService}get licenseKeyValidityState(){return this._config.licenseKeyValidityState}static buildFromArray(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheet(e,t,n))}static buildFromSheets(e,t={},n=[]){return this.buildFromEngineState(sa.buildFromSheets(e,t,n))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(sa.buildEmpty(e,t))}static getLanguage(e){ci(e,"string","languageCode");const t=this.registeredLanguages.get(e);if(void 0===t)throw new mn;return t}static registerLanguage(e,t){if(ci(e,"string","languageCode"),this.registeredLanguages.has(e))throw new fn;this.registeredLanguages.set(e,Yn(t))}static unregisterLanguage(e){if(ci(e,"string","languageCode"),!this.registeredLanguages.has(e))throw new mn;this.registeredLanguages.delete(e)}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){Do.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){Do.unregisterFunctionPlugin(e)}static registerFunction(e,t,n){ci(e,"string","functionId"),Do.registerFunction(e,t,n)}static unregisterFunction(e){ci(e,"string","functionId"),Do.unregisterFunction(e)}static unregisterAllFunctions(){Do.unregisterAll()}static getRegisteredFunctionNames(e){ci(e,"string","code");const t=Do.getRegisteredFunctionIds(),n=this.getLanguage(e);return n.getFunctionTranslations(t)}static getFunctionPlugin(e){return ci(e,"string","functionId"),Do.getFunctionPlugin(e)}static getAllFunctionPlugins(){return Do.getPlugins()}static buildFromEngineState(e){return new ha(e.config,e.stats,e.dependencyGraph,e.columnSearch,e.parser,e.unparser,e.cellContentParser,e.evaluator,e.lazilyTransformingAstService,e.crudOperations,e.exporter,e.namedExpressions,e.serialization,e.functionRegistry)}getCellValue(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return ci(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return ci(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return ci(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter(e=>this.getSheetDimensions(e))}getSheetDimensions(e){return ci(e,"number","sheetId"),{width:this.dependencyGraph.getSheetWidth(e),height:this.dependencyGraph.getSheetHeight(e)}}getAllSheetsValues(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsValues()}getAllSheetsFormulas(){return this._serialization.getAllSheetsFormulas()}getAllSheetsSerialized(){return this.ensureEvaluationIsNotSuspended(),this._serialization.getAllSheetsSerialized()}updateConfig(e){const t=Object.entries(e).every(([e,t])=>this._config[e]===t);t||this.rebuildWithConfig(e)}getConfig(){return this._config.getConfig()}rebuildAndRecalculate(){this.rebuildWithConfig({})}getStats(){return this._stats.snapshot()}undo(){return this._crudOperations.undo(),this.recomputeIfDependencyGraphNeedsIt()}redo(){return this._crudOperations.redo(),this.recomputeIfDependencyGraphNeedsIt()}isThereSomethingToUndo(){return this._crudOperations.isThereSomethingToUndo()}isThereSomethingToRedo(){return this._crudOperations.isThereSomethingToRedo()}isItPossibleToSetCellContents(e){let t;if(yr(e))t=new Er(e,e);else{if(!_r(e))throw new sn("SimpleCellAddress | SimpleCellRange","address");t=new Er(e.start,e.end)}try{this._crudOperations.ensureRangeInSizeLimits(t);for(const e of t.addresses(this._dependencyGraph))this._crudOperations.ensureItIsPossibleToChangeContent(e)}catch(n){return!1}return!0}setCellContents(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}swapRowIndexes(e,t){return ci(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){ci(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(n){return!1}}setRowOrder(e,t){ci(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}isItPossibleToSetRowOrder(e,t){ci(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"row");return this._crudOperations.validateSwapRowIndexes(e,n),this._crudOperations.testRowOrderForArrays(e,n),!0}catch(n){return!1}}swapColumnIndexes(e,t){return ci(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){ci(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(n){return!1}}setColumnOrder(e,t){ci(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}isItPossibleToSetColumnOrder(e,t){ci(e,"number","sheetId");try{const n=this._crudOperations.mappingFromOrder(e,t,"column");return this._crudOperations.validateSwapColumnIndexes(e,n),this._crudOperations.testColumnOrderForArrays(e,n),!0}catch(n){return!1}}isItPossibleToAddRows(e,...t){ci(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...n),!0}catch(r){return!1}}addRows(e,...t){return ci(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){ci(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...n),!0}catch(r){return!1}}removeRows(e,...t){return ci(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){ci(e,"number","sheetId");const n=Js(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...n),!0}catch(r){return!1}}addColumns(e,...t){return ci(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){ci(e,"number","sheetId");const n=qs(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...n),!0}catch(r){return!1}}removeColumns(e,...t){return ci(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!yr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!_r(e))throw new sn("SimpleCellRange","source");try{const n=new Er(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(n.start,n.width(),n.height(),t),!0}catch(n){return!1}}moveCells(e,t){if(!yr(t))throw new sn("SimpleCellAddress","destinationLeftCorner");if(!_r(e))throw new sn("SimpleCellRange","source");const n=new Er(e.start,e.end);return this._crudOperations.moveCells(n.start,n.width(),n.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,n,r){ci(e,"number","sheetId"),ci(t,"number","startRow"),ci(n,"number","numberOfRows"),ci(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(i){return!1}}moveRows(e,t,n,r){return ci(e,"number","sheetId"),ci(t,"number","startRow"),ci(n,"number","numberOfRows"),ci(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,n,r){ci(e,"number","sheetId"),ci(t,"number","startColumn"),ci(n,"number","numberOfColumns"),ci(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(i){return!1}}moveColumns(e,t,n,r){return ci(e,"number","sheetId"),ci(t,"number","startColumn"),ci(n,"number","numberOfColumns"),ci(r,"number","targetColumn"),this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!_r(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!_r(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!yr(e))throw new sn("SimpleCellAddress","targetLeftCorner");return this.ensureEvaluationIsNotSuspended(),this._crudOperations.paste(e),this.recomputeIfDependencyGraphNeedsIt()}isClipboardEmpty(){return this._crudOperations.isClipboardEmpty()}clearClipboard(){this._crudOperations.clearClipboard()}clearRedoStack(){this._crudOperations.undoRedo.clearRedoStack()}clearUndoStack(){this._crudOperations.undoRedo.clearUndoStack()}getRangeValues(e){if(!_r(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellValue(e)))}getRangeFormulas(e){if(!_r(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellFormula(e)))}getRangeSerialized(e){if(!_r(e))throw new sn("SimpleCellRange","source");const t=new Er(e.start,e.end);return t.arrayOfAddressesInRange().map(e=>e.map(e=>this.getCellSerialized(e)))}getFillRangeData(e,t,n=!1){if(!_r(e))throw new sn("SimpleCellRange","source");if(!_r(t))throw new sn("SimpleCellRange","target");const r=new Er(e.start,e.end),i=new Er(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),i.arrayOfAddressesInRange().map(i=>i.map(i=>{const s=((i.row-(n?t:e).start.row)%r.height()+r.height())%r.height()+e.start.row,o=((i.col-(n?t:e).start.col)%r.width()+r.width())%r.width()+e.start.col;return this._serialization.getCellSerialized({row:s,col:o,sheet:r.sheet},i)}))}isItPossibleToAddSheet(e){ci(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(t){return!1}}addSheet(e){void 0!==e&&ci(e,"string","sheetName");const t=this._crudOperations.addSheet(e);return this._emitter.emit(la.SheetAdded,t),t}isItPossibleToRemoveSheet(e){ci(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}removeSheet(e){ci(e,"number","sheetId");const t=this.sheetMapping.getDisplayName(e);this._crudOperations.removeSheet(e);const n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.SheetRemoved,t,n),n}isItPossibleToClearSheet(e){ci(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(t){return!1}}clearSheet(e){return ci(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){ci(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(n){return!1}}setSheetContent(e,t){return ci(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return ci(e,"string","cellAddress"),ci(t,"number","sheetId"),k(this.sheetMapping.get,e,t)}simpleCellRangeFromString(e,t){return ci(e,"string","cellRange"),ci(t,"number","sheetId"),x(this.sheetMapping.get,e,t)}simpleCellAddressToString(e,t){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return ci(t,"number","sheetId"),D(this.sheetMapping.fetchDisplayName,e,t)}simpleCellRangeToString(e,t){if(!_r(e))throw new sn("SimpleCellRange","cellRange");return ci(t,"number","sheetId"),H(this.sheetMapping.fetchDisplayName,e,t)}getCellDependents(e){let t;if(yr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!_r(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.getAdjacentNodesAddresses(t)}getCellPrecedents(e){let t;if(yr(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!_r(e))throw new sn("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return ci(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}getSheetNames(){return this.sheetMapping.sheetNames()}getSheetId(e){return ci(e,"string","sheetName"),this.sheetMapping.get(e)}doesSheetExist(e){return ci(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.dependencyGraph.getCell(e);return Zn(t,e)}doesCellHaveSimpleValue(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Bn.VALUE}doesCellHaveFormula(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Bn.FORMULA||t===Bn.ARRAYFORMULA}isCellEmpty(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");return this.getCellType(e)===Bn.EMPTY}isCellPartOfArray(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===Bn.ARRAY||t===Bn.ARRAYFORMULA}getCellValueType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return sr(t)}getCellValueDetailedType(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return or(t)}getCellValueFormat(e){if(!yr(e))throw new sn("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return ar(t)}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){ci(e,"number","sheetId"),ci(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(n){return!1}}renameSheet(e,t){ci(e,"number","sheetId"),ci(t,"string","newName");const n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(la.SheetRenamed,n,t)}batch(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(t){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),t}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}suspendEvaluation(){this._evaluationSuspended=!0,this._emitter.emit(la.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,n){ci(e,"string","expressionName"),void 0!==n&&ci(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(r){return!1}}addNamedExpression(e,t,n,r){ci(e,"string","expressionName"),void 0!==n&&ci(n,"number","scope"),this._crudOperations.addNamedExpression(e,t,n,r);const i=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionAdded,e,i),i}getNamedExpressionValue(e,t){ci(e,"string","expressionName"),void 0!==t&&ci(t,"number","scope"),this.ensureEvaluationIsNotSuspended(),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return n?this._serialization.getCellValue(n.address):void 0}getNamedExpressionFormula(e,t){ci(e,"string","expressionName"),void 0!==t&&ci(t,"number","scope"),this._crudOperations.ensureScopeIdIsValid(t);const n=this._namedExpressions.namedExpressionForScope(e,t);return void 0===n?void 0:this._serialization.getCellFormula(n.address)}getNamedExpression(e,t){ci(e,"string","expressionName"),void 0!==t&&ci(t,"number","scope");const n=this._namedExpressions.namedExpressionForScope(e,t);if(void 0===n)return;const r=this._serialization.getCellFormula(n.address);return{name:e,scope:t,expression:r,options:n.options}}isItPossibleToChangeNamedExpression(e,t,n){ci(e,"string","expressionName"),void 0!==n&&ci(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(r){return!1}}changeNamedExpression(e,t,n,r){return ci(e,"string","expressionName"),void 0!==n&&ci(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){ci(e,"string","expressionName"),void 0!==t&&ci(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(n){return!1}}removeNamedExpression(e,t){ci(e,"string","expressionName"),void 0!==t&&ci(t,"number","scope");const n=this._crudOperations.removeNamedExpression(e,t);if(n){const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(la.NamedExpressionRemoved,n.displayName,e),e}return[]}listNamedExpressions(e){return void 0!==e&&ci(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){ci(e,"string","formulaString");const{ast:t,address:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new Gt;return this._unparser.unparse(t,n)}calculateFormula(e,t){ci(e,"string","formulaString"),ci(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);const{ast:n,address:r,dependencies:i}=this.extractTemporaryFormula(e,t);if(void 0===n)throw new Gt;const s=this.evaluator.runAndForget(n,r,i);return this._exporter.exportScalarOrRange(s)}getNamedExpressionsFromFormula(e){ci(e,"string","formulaString");const{ast:t,dependencies:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new Gt;const r=n.filter(e=>e instanceof wt).map(e=>e.name),i=[...new Set(r)];return i}validateFormula(e){ci(e,"string","formulaString");const{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){const e=ha.getLanguage(this._config.language);return e.getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return ci(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return ci(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return ci(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return ci(e,"number","val"),Yi(e)}on(e,t){this._emitter.on(e,t)}once(e,t){this._emitter.once(e,t)}off(e,t){this._emitter.off(e,t)}destroy(){oa(this)}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new cn}extractTemporaryFormula(e,t=1){const n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof vs.Formula))return{address:r,dependencies:[]};const{ast:i,errors:s,dependencies:o}=this._parser.parse(n.formula,r);return s.length>0?{address:r,dependencies:[]}:{ast:i,address:r,dependencies:o}}rebuildWithConfig(e){const t=this._config.mergeConfig(e),n=this._config.mergeConfig({language:e.language}),r=this._serialization.withNewConfig(n,this._namedExpressions).getAllSheetsSerialized(),i=this._serialization.getAllNamedExpressionsSerialized(),s=sa.rebuildWithConfig(t,r,i,this._stats);this._config=s.config,this._stats=s.stats,this._dependencyGraph=s.dependencyGraph,this._columnSearch=s.columnSearch,this._parser=s.parser,this._unparser=s.unparser,this._cellContentParser=s.cellContentParser,this._evaluator=s.evaluator,this._lazilyTransformingAstService=s.lazilyTransformingAstService,this._crudOperations=s.crudOperations,this._exporter=s.exporter,this._namedExpressions=s.namedExpressions,this._serialization=s.serialization,this._functionRegistry=s.functionRegistry}recomputeIfDependencyGraphNeedsIt(){if(this._evaluationSuspended)return[];{const e=this._crudOperations.getAndClearContentChanges(),t=this.dependencyGraph.verticesToRecompute();this.dependencyGraph.clearDirtyVertices(),t.length>0&&e.addAll(this.evaluator.partialRun(t));const n=e.exportChanges(this._exporter);return e.isEmpty()||this._emitter.emit(la.ValuesUpdated,n),n}}}ha.version="2.7.1",ha.buildDate="18/07/2024 11:23:17",ha.releaseDate="18/07/2024",ha.languages={},ha.registeredLanguages=new Map;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const da=new WeakMap;class ma{constructor(e={},t=!0){const{accentSensitive:n,binarySearchThreshold:r,caseSensitive:i,caseFirst:s,chooseAddressMappingPolicy:o,context:a,currencySymbol:l,dateFormats:u,decimalSeparator:c,evaluateNullToZero:h,functionArgSeparator:d,functionPlugins:m,ignorePunctuation:f,leapYear1900:p,localeLang:g,language:y,ignoreWhiteSpace:w,licenseKey:b,matchWholeCell:v,arrayColumnSeparator:_,arrayRowSeparator:S,maxRows:E,maxColumns:C,nullYear:M,nullDate:T,parseDateTime:R,precisionEpsilon:O,precisionRounding:N,stringifyDateTime:A,stringifyDuration:L,smartRounding:I,timeFormats:k,thousandSeparator:x,useArrayArithmetic:D,useStats:H,undoLimit:P,useColumnIndex:j,useRegularExpressions:F,useWildcards:Y}=e;t&&ma.warnDeprecatedOptions(e),this.useArrayArithmetic=si(D,"boolean","useArrayArithmetic"),this.accentSensitive=si(n,"boolean","accentSensitive"),this.caseSensitive=si(i,"boolean","caseSensitive"),this.caseFirst=si(s,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=si(f,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!==o&&void 0!==o?o:ma.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...li(u,Array.isArray,"array","dateFormats")],this.timeFormats=[...li(k,Array.isArray,"array","timeFormats")],this.functionArgSeparator=si(d,"string","functionArgSeparator"),this.decimalSeparator=si(c,[".",","],"decimalSeparator"),this.language=si(y,"string","language"),this.ignoreWhiteSpace=si(w,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=si(b,"string","licenseKey"),this.thousandSeparator=si(x,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=si(_,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=si(S,[";","|"],"arrayRowSeparator"),this.localeLang=si(g,"string","localeLang"),this.functionPlugins=[...null!==m&&void 0!==m?m:ma.defaultConfig.functionPlugins],this.smartRounding=si(I,"boolean","smartRounding"),this.evaluateNullToZero=si(h,"boolean","evaluateNullToZero"),this.nullYear=si(M,"number","nullYear"),oi(this.nullYear,"nullYear",0),ai(this.nullYear,"nullYear",100),this.precisionRounding=si(N,"number","precisionRounding"),oi(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=si(O,"number","precisionEpsilon"),oi(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=si(j,"boolean","useColumnIndex"),this.useStats=si(H,"boolean","useStats"),this.binarySearchThreshold=null!==r&&void 0!==r?r:ma.defaultConfig.binarySearchThreshold,this.parseDateTime=si(R,"function","parseDateTime"),this.stringifyDateTime=si(A,"function","stringifyDateTime"),this.stringifyDuration=si(L,"function","stringifyDuration"),this.translationPackage=ha.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=li(T,Li,"IDate","nullDate"),this.leapYear1900=si(p,"boolean","leapYear1900"),this.undoLimit=si(P,"number","undoLimit"),this.useRegularExpressions=si(F,"boolean","useRegularExpressions"),this.useWildcards=si(Y,"boolean","useWildcards"),this.matchWholeCell=si(v,"boolean","matchWholeCell"),oi(this.undoLimit,"undoLimit",0),this.maxRows=si(E,"number","maxRows"),oi(this.maxRows,"maxRows",1),this.maxColumns=si(C,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(l),oi(this.maxColumns,"maxColumns",1),this.context=a,da.set(this,{licenseKeyValidityState:ws(this.licenseKey)}),ui({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),ui({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){const t=[...li(e,Array.isArray,"array","currencySymbol")];return t.forEach(e=>{if("string"!==typeof e)throw new sn("string[]","currencySymbol");if(""===e)throw new on("currencySymbol")}),t}get licenseKeyValidityState(){return da.get(this).licenseKeyValidityState}getConfig(){return fa(this)}mergeConfig(e){const t=Object.assign({},this.getConfig(),e);return ma.warnDeprecatedOptions(e),new ma(t,!1)}static warnDeprecatedOptions(e){ma.warnDeprecatedIfUsed(e.binarySearchThreshold,"binarySearchThreshold","1.1")}static warnDeprecatedIfUsed(e,t,n,r){void 0!==e&&(void 0===r?console.warn(`${t} option is deprecated since ${n}`):console.warn(`${t} option is deprecated since ${n}, please use ${r}`))}}function fa(e){var t;const n={};for(const r in ma.defaultConfig){const i=null!==(t=e[r])&&void 0!==t?t:ma.defaultConfig[r];Array.isArray(i)?n[r]=[...i]:n[r]=i}return n}function pa(){return fa({})}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */ma.defaultConfig={accentSensitive:!1,binarySearchThreshold:20,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new Bi,dateFormats:["DD/MM/YYYY","DD/MM/YY"],decimalSeparator:".",evaluateNullToZero:!1,functionArgSeparator:",",functionPlugins:[],ignorePunctuation:!1,language:"enGB",ignoreWhiteSpace:"standard",licenseKey:"",leapYear1900:!1,localeLang:"en",matchWholeCell:!0,arrayColumnSeparator:",",arrayRowSeparator:";",maxRows:4e4,maxColumns:18278,nullYear:30,nullDate:{year:1899,month:12,day:30},parseDateTime:bi,precisionEpsilon:1e-13,precisionRounding:14,smartRounding:!0,stringifyDateTime:as,stringifyDuration:os,timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};const ga={errors:{CYCLE:"#CYCLE!",DIV_BY_ZERO:"#DIV/0!",ERROR:"#ERROR!",NA:"#N/A",NAME:"#NAME?",NUM:"#NUM!",REF:"#REF!",SPILL:"#SPILL!",VALUE:"#VALUE!"},functions:{FILTER:"FILTER",ADDRESS:"ADDRESS",ARRAY_CONSTRAIN:"ARRAY_CONSTRAIN",ARRAYFORMULA:"ARRAYFORMULA",ABS:"ABS",ACOS:"ACOS",ACOSH:"ACOSH",ACOT:"ACOT",ACOTH:"ACOTH",AND:"AND",ARABIC:"ARABIC",ASIN:"ASIN",ASINH:"ASINH",ATAN2:"ATAN2",ATAN:"ATAN",ATANH:"ATANH",AVERAGE:"AVERAGE",AVERAGEA:"AVERAGEA",AVERAGEIF:"AVERAGEIF",BASE:"BASE",BIN2DEC:"BIN2DEC",BIN2HEX:"BIN2HEX",BIN2OCT:"BIN2OCT",BITAND:"BITAND",BITLSHIFT:"BITLSHIFT",BITOR:"BITOR",BITRSHIFT:"BITRSHIFT",BITXOR:"BITXOR",CEILING:"CEILING",CHAR:"CHAR",CHOOSE:"CHOOSE",CLEAN:"CLEAN",CODE:"CODE",COLUMN:"COLUMN",COLUMNS:"COLUMNS",CONCATENATE:"CONCATENATE",CORREL:"CORREL",COS:"COS",COSH:"COSH",COT:"COT",COTH:"COTH",COUNT:"COUNT",COUNTA:"COUNTA",COUNTBLANK:"COUNTBLANK",COUNTIF:"COUNTIF",COUNTIFS:"COUNTIFS",COUNTUNIQUE:"COUNTUNIQUE",CSC:"CSC",CSCH:"CSCH",CUMIPMT:"CUMIPMT",CUMPRINC:"CUMPRINC",DATE:"DATE",DATEDIF:"DATEDIF",DATEVALUE:"DATEVALUE",DAY:"DAY",DAYS360:"DAYS360",DAYS:"DAYS",DB:"DB",DDB:"DDB",DEC2BIN:"DEC2BIN",DEC2HEX:"DEC2HEX",DEC2OCT:"DEC2OCT",DECIMAL:"DECIMAL",DEGREES:"DEGREES",DELTA:"DELTA",DOLLARDE:"DOLLARDE",DOLLARFR:"DOLLARFR",EDATE:"EDATE",EFFECT:"EFFECT",EOMONTH:"EOMONTH",ERF:"ERF",ERFC:"ERFC",EVEN:"EVEN",EXACT:"EXACT",EXP:"EXP",FALSE:"FALSE",FIND:"FIND",FORMULATEXT:"FORMULATEXT",FV:"FV",FVSCHEDULE:"FVSCHEDULE",HEX2BIN:"HEX2BIN",HEX2DEC:"HEX2DEC",HEX2OCT:"HEX2OCT",HLOOKUP:"HLOOKUP",HOUR:"HOUR",HYPERLINK:"HYPERLINK",IF:"IF",IFERROR:"IFERROR",IFNA:"IFNA",IFS:"IFS",INDEX:"INDEX",INT:"INT",INTERVAL:"INTERVAL",IPMT:"IPMT",ISBINARY:"ISBINARY",ISBLANK:"ISBLANK",ISERR:"ISERR",ISERROR:"ISERROR",ISEVEN:"ISEVEN",ISFORMULA:"ISFORMULA",ISLOGICAL:"ISLOGICAL",ISNA:"ISNA",ISNONTEXT:"ISNONTEXT",ISNUMBER:"ISNUMBER",ISODD:"ISODD",ISOWEEKNUM:"ISOWEEKNUM",ISPMT:"ISPMT",ISREF:"ISREF",ISTEXT:"ISTEXT",LEFT:"LEFT",LEN:"LEN",LN:"LN",LOG10:"LOG10",LOG:"LOG",LOWER:"LOWER",MATCH:"MATCH",MAX:"MAX",MAXA:"MAXA",MAXIFS:"MAXIFS",MAXPOOL:"MAXPOOL",MEDIAN:"MEDIAN",MEDIANPOOL:"MEDIANPOOL",MID:"MID",MIN:"MIN",MINA:"MINA",MINIFS:"MINIFS",MINUTE:"MINUTE",MIRR:"MIRR",MMULT:"MMULT",MOD:"MOD",MONTH:"MONTH",NA:"NA",NETWORKDAYS:"NETWORKDAYS","NETWORKDAYS.INTL":"NETWORKDAYS.INTL",NOMINAL:"NOMINAL",NOT:"NOT",NOW:"NOW",NPER:"NPER",NPV:"NPV",OCT2BIN:"OCT2BIN",OCT2DEC:"OCT2DEC",OCT2HEX:"OCT2HEX",ODD:"ODD",OFFSET:"OFFSET",OR:"OR",PI:"PI",PMT:"PMT",PDURATION:"PDURATION",PRODUCT:"PRODUCT",POWER:"POWER",PPMT:"PPMT",PROPER:"PROPER",PV:"PV",RADIANS:"RADIANS",RAND:"RAND",RATE:"RATE",REPLACE:"REPLACE",REPT:"REPT",RIGHT:"RIGHT",ROMAN:"ROMAN",ROUND:"ROUND",ROUNDDOWN:"ROUNDDOWN",ROUNDUP:"ROUNDUP",ROW:"ROW",ROWS:"ROWS",RRI:"RRI",SEARCH:"SEARCH",SEC:"SEC",SECH:"SECH",SECOND:"SECOND",SHEET:"SHEET",SHEETS:"SHEETS",SIN:"SIN",SINH:"SINH",SLN:"SLN",SPLIT:"SPLIT",SQRT:"SQRT",STDEVA:"STDEVA","STDEV.P":"STDEV.P",STDEVPA:"STDEVPA","STDEV.S":"STDEV.S",SUBSTITUTE:"SUBSTITUTE",SUBTOTAL:"SUBTOTAL",SUM:"SUM",SUMIF:"SUMIF",SUMIFS:"SUMIFS",SUMPRODUCT:"SUMPRODUCT",SUMSQ:"SUMSQ",SWITCH:"SWITCH",SYD:"SYD",T:"T",TAN:"TAN",TANH:"TANH",TBILLEQ:"TBILLEQ",TBILLPRICE:"TBILLPRICE",TBILLYIELD:"TBILLYIELD",TEXT:"TEXT",TIME:"TIME",TIMEVALUE:"TIMEVALUE",TODAY:"TODAY",TRANSPOSE:"TRANSPOSE",TRIM:"TRIM",TRUE:"TRUE",TRUNC:"TRUNC",UNICHAR:"UNICHAR",UNICODE:"UNICODE",UPPER:"UPPER",VARA:"VARA","VAR.P":"VAR.P",VARPA:"VARPA","VAR.S":"VAR.S",VLOOKUP:"VLOOKUP",WEEKDAY:"WEEKDAY",WEEKNUM:"WEEKNUM",WORKDAY:"WORKDAY","WORKDAY.INTL":"WORKDAY.INTL",XNPV:"XNPV",XOR:"XOR",YEAR:"YEAR",YEARFRAC:"YEARFRAC","HF.ADD":"HF.ADD","HF.CONCAT":"HF.CONCAT","HF.DIVIDE":"HF.DIVIDE","HF.EQ":"HF.EQ","HF.GT":"HF.GT","HF.GTE":"HF.GTE","HF.LT":"HF.LT","HF.LTE":"HF.LTE","HF.MINUS":"HF.MINUS","HF.MULTIPLY":"HF.MULTIPLY","HF.NE":"HF.NE","HF.POW":"HF.POW","HF.UMINUS":"HF.UMINUS","HF.UNARY_PERCENT":"HF.UNARY_PERCENT","HF.UPLUS":"HF.UPLUS",VARP:"VARP",VAR:"VAR",STDEVP:"STDEVP",STDEV:"STDEV","EXPON.DIST":"EXPON.DIST",FISHER:"FISHER",FISHERINV:"FISHERINV",GAMMA:"GAMMA","GAMMA.DIST":"GAMMA.DIST",GAMMALN:"GAMMALN","GAMMALN.PRECISE":"GAMMALN.PRECISE","GAMMA.INV":"GAMMA.INV",GAUSS:"GAUSS",FACT:"FACT",FACTDOUBLE:"FACTDOUBLE",COMBIN:"COMBIN",COMBINA:"COMBINA",GCD:"GCD",LCM:"LCM",MROUND:"MROUND",MULTINOMIAL:"MULTINOMIAL",QUOTIENT:"QUOTIENT",RANDBETWEEN:"RANDBETWEEN",SERIESSUM:"SERIESSUM",SIGN:"SIGN",SQRTPI:"SQRTPI",SUMX2MY2:"SUMX2MY2",SUMX2PY2:"SUMX2PY2",SUMXMY2:"SUMXMY2",EXPONDIST:"EXPONDIST",GAMMADIST:"GAMMADIST",GAMMAINV:"GAMMAINV","BETA.DIST":"BETA.DIST",BETADIST:"BETADIST","BETA.INV":"BETA.INV",BETAINV:"BETAINV","BINOM.DIST":"BINOM.DIST",BINOMDIST:"BINOMDIST","BINOM.INV":"BINOM.INV",BESSELI:"BESSELI",BESSELJ:"BESSELJ",BESSELK:"BESSELK",BESSELY:"BESSELY","CHISQ.DIST":"CHISQ.DIST","CHISQ.DIST.RT":"CHISQ.DIST.RT","CHISQ.INV":"CHISQ.INV","CHISQ.INV.RT":"CHISQ.INV.RT",CHIDIST:"CHIDIST",CHIINV:"CHIINV","F.DIST":"F.DIST","F.DIST.RT":"F.DIST.RT","F.INV":"F.INV","F.INV.RT":"F.INV.RT",FDIST:"FDIST",FINV:"FINV",WEIBULL:"WEIBULL","WEIBULL.DIST":"WEIBULL.DIST",POISSON:"POISSON","POISSON.DIST":"POISSON.DIST","HYPGEOM.DIST":"HYPGEOM.DIST",HYPGEOMDIST:"HYPGEOMDIST","T.DIST":"T.DIST","T.DIST.2T":"T.DIST.2T","T.DIST.RT":"T.DIST.RT","T.INV":"T.INV","T.INV.2T":"T.INV.2T",TDIST:"TDIST",TINV:"TINV",LOGINV:"LOGINV","LOGNORM.DIST":"LOGNORM.DIST","LOGNORM.INV":"LOGNORM.INV",LOGNORMDIST:"LOGNORMDIST","NORM.DIST":"NORM.DIST","NORM.INV":"NORM.INV","NORM.S.DIST":"NORM.S.DIST","NORM.S.INV":"NORM.S.INV",NORMDIST:"NORMDIST",NORMINV:"NORMINV",NORMSDIST:"NORMSDIST",NORMSINV:"NORMSINV",PHI:"PHI","NEGBINOM.DIST":"NEGBINOM.DIST",NEGBINOMDIST:"NEGBINOMDIST",COMPLEX:"COMPLEX",IMABS:"IMABS",IMAGINARY:"IMAGINARY",IMARGUMENT:"IMARGUMENT",IMCONJUGATE:"IMCONJUGATE",IMCOS:"IMCOS",IMCOSH:"IMCOSH",IMCOT:"IMCOT",IMCSC:"IMCSC",IMCSCH:"IMCSCH",IMDIV:"IMDIV",IMEXP:"IMEXP",IMLN:"IMLN",IMLOG10:"IMLOG10",IMLOG2:"IMLOG2",IMPOWER:"IMPOWER",IMPRODUCT:"IMPRODUCT",IMREAL:"IMREAL",IMSEC:"IMSEC",IMSECH:"IMSECH",IMSIN:"IMSIN",IMSINH:"IMSINH",IMSQRT:"IMSQRT",IMSUB:"IMSUB",IMSUM:"IMSUM",IMTAN:"IMTAN",LARGE:"LARGE",SMALL:"SMALL",AVEDEV:"AVEDEV",CONFIDENCE:"CONFIDENCE","CONFIDENCE.NORM":"CONFIDENCE.NORM","CONFIDENCE.T":"CONFIDENCE.T",DEVSQ:"DEVSQ",GEOMEAN:"GEOMEAN",HARMEAN:"HARMEAN",CRITBINOM:"CRITBINOM","COVARIANCE.P":"COVARIANCE.P","COVARIANCE.S":"COVARIANCE.S",COVAR:"COVAR",PEARSON:"PEARSON",RSQ:"RSQ",STANDARDIZE:"STANDARDIZE","Z.TEST":"Z.TEST",ZTEST:"ZTEST","F.TEST":"F.TEST",FTEST:"FTEST",STEYX:"STEYX",SLOPE:"SLOPE","CHISQ.TEST":"CHISQ.TEST",CHITEST:"CHITEST","T.TEST":"T.TEST",TTEST:"TTEST",SKEW:"SKEW","SKEW.P":"SKEW.P",WEIBULLDIST:"WEIBULLDIST",VARS:"VARS",TINV2T:"TINV2T",TDISTRT:"TDISTRT",TDIST2T:"TDIST2T",STDEVS:"STDEVS",FINVRT:"FINVRT",FDISTRT:"FDISTRT",CHIDISTRT:"CHIDISTRT",CHIINVRT:"CHIINVRT",COVARIANCEP:"COVARIANCEP",COVARIANCES:"COVARIANCES",LOGNORMINV:"LOGNORMINV",POISSONDIST:"POISSONDIST",SKEWP:"SKEWP","CEILING.MATH":"CEILING.MATH",FLOOR:"FLOOR","FLOOR.MATH":"FLOOR.MATH","CEILING.PRECISE":"CEILING.PRECISE","FLOOR.PRECISE":"FLOOR.PRECISE","ISO.CEILING":"ISO.CEILING"},langCode:"enGB",ui:{NEW_SHEET_PREFIX:"Sheet"}};var ya,wa=ga;
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */(function(e){e[e["FullyAbsolute"]=1]="FullyAbsolute",e[e["RowAbsoluteColRelative"]=2]="RowAbsoluteColRelative",e[e["RowRelativeColAbsolute"]=3]="RowRelativeColAbsolute",e[e["FullyRelative"]=4]="FullyRelative"})(ya||(ya={}));class ba extends Zr{verifyAddressArguments(e,t,n,r){if(r){if(e<1||t<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.FullyAbsolute==n){if(e<1||t<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.RowAbsoluteColRelative==n){if(e<1)return new lr(Vn.VALUE,Re.LessThanOne)}else if(ya.RowRelativeColAbsolute==n&&t<1)return new lr(Vn.VALUE,Re.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),(e,t,n,r,i)=>{const s=this.verifyAddressArguments(e,t,n,r);if(void 0!==s)return s;const o=j(t-1);let a="";void 0!==i&&null!==i&&(a=i+"!");const l=0==t?"C":`C[${t}]`,u=0==e?"R":`R[${e}]`;return ya.FullyRelative==n?r?`${a}${o}${e}`:`${a}${u}${l}`:ya.RowRelativeColAbsolute==n?r?`${a}$${o}${e}`:`${a}${u}C${t}`:ya.RowAbsoluteColRelative==n?r?`${a}${o}$${e}`:`${a}R${e}${l}`:r?`${a}$${o}$${e}`:`${a}R${e}C${t}`})}}ba.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4},{argumentType:Qr.BOOLEAN,optionalArg:!0,defaultValue:!0},{argumentType:Qr.STRING,optionalArg:!0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class va extends Zr{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),e=>e)}arrayformulaArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("ARRAYFORMULA"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});return r[0]}arrayconstrain(e,t){return this.runFunction(e.args,t,this.metadata("ARRAY_CONSTRAIN"),(e,t,n)=>{t=Math.min(t,e.height()),n=Math.min(n,e.width());const r=e.data,i=[];for(let s=0;s<t;s++)i.push(r[s].slice(0,n));return Ht.onlyValues(i)})}arrayconstrainArraySize(e,t){if(3!==e.args.length)return ei.error();const n=this.metadata("ARRAY_CONSTRAIN"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))});let{height:i,width:s}=r[0];return e.args[1].type===W.NUMBER&&(i=Math.min(i,e.args[1].value)),e.args[2].type===W.NUMBER&&(s=Math.min(s,e.args[2].value)),i<1||s<1||!Number.isInteger(i)||!Number.isInteger(s)?ei.error():new ei(s,i)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),(e,...t)=>{for(const i of t)if(e.width()!==i.width()||e.height()!==i.height())return new lr(Vn.NA,Re.EqualLength);if(e.width()>1&&e.height()>1)return new lr(Vn.NA,Re.WrongDimension);const n=e.data,r=[];for(let i=0;i<e.height();i++){const s=[];for(let r=0;r<e.width();r++){let e=!0;for(const n of t){const t=Dr(n.data[i][r]);if(!0!==t){e=!1;break}}e&&s.push(n[i][r])}s.length>0&&r.push(s)}return r.length>0?Ht.onlyValues(r):new lr(Vn.NA,Re.EmptyRange)})}filterArraySize(e,t){if(e.args.length<=1)return ei.error();const n=this.metadata("FILTER"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=Math.max(...r.map(e=>e.width)),s=Math.max(...r.map(e=>e.height));return new ei(i,s)}}va.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",arraySizeMethod:"arrayformulaArraySize",arrayFunction:!0,parameters:[{argumentType:Qr.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",arraySizeMethod:"arrayconstrainArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",arraySizeMethod:"filterArraySize",arrayFunction:!0,parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class _a extends Zr{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}_a.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const Sa=0xffffffffffff,Ea=-53,Ca=53;class Ma extends Zr{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),Ta)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),Ra)}}function Ta(e,t){return t<0?Ra(e,-t):Oa(e*Math.pow(2,t))}function Ra(e,t){return t<0?Ta(e,-t):Oa(Math.floor(e/Math.pow(2,t)))}function Oa(e){return e>Sa?new lr(Vn.NUM,Re.BitshiftLong):e}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Ma.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:Ea,maxValue:Ca}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:Ea,maxValue:Ca}]}};class Na extends Zr{bitand(e,t){return this.runFunction(e.args,t,this.metadata("BITAND"),(e,t)=>e&t)}bitor(e,t){return this.runFunction(e.args,t,this.metadata("BITOR"),(e,t)=>e|t)}bitxor(e,t){return this.runFunction(e.args,t,this.metadata("BITXOR"),(e,t)=>e^t)}}Na.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Aa extends Zr{literalTrue(e,t){return this.runFunction(e.args,t,this.metadata("TRUE"),()=>!0)}literalFalse(e,t){return this.runFunction(e.args,t,this.metadata("FALSE"),()=>!1)}conditionalIf(e,t){return this.runFunction(e.args,t,this.metadata("IF"),(e,t,n)=>e?t:n)}ifs(e,t){return this.runFunction(e.args,t,this.metadata("IFS"),(...e)=>{for(let t=0;t<e.length;t+=2)if(e[t])return e[t+1];return new lr(Vn.NA,Re.NoConditionMet)})}and(e,t){return this.runFunction(e.args,t,this.metadata("AND"),(...e)=>e.filter(e=>void 0!==e).every(e=>!!e))}or(e,t){return this.runFunction(e.args,t,this.metadata("OR"),(...e)=>e.filter(e=>void 0!==e).some(e=>e))}not(e,t){return this.runFunction(e.args,t,this.metadata("NOT"),e=>!e)}xor(e,t){return this.runFunction(e.args,t,this.metadata("XOR"),(...e)=>{let t=0;return e.filter(e=>void 0!==e).forEach(e=>{e&&t++}),t%2===1})}switch(e,t){return this.runFunction(e.args,t,this.metadata("SWITCH"),(e,...t)=>{const n=t.length;let r=0;for(;r+1<n;r+=2)if(!(t[r]instanceof lr)&&this.arithmeticHelper.eq(e,t[r]))return t[r+1];return r<n?t[r]:new lr(Vn.NA,Re.NoDefault)})}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),(e,t)=>e instanceof lr?t:e)}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),(e,t)=>e instanceof lr&&e.type===Vn.NA?t:e)}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),(e,...t)=>e>t.length?new lr(Vn.NUM,Re.Selector):t[e-1])}}Aa.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:Qr.BOOLEAN},{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:Qr.BOOLEAN},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:Qr.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:Qr.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:Qr.SCALAR,passSubtype:!0},{argumentType:Qr.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.SCALAR,passSubtype:!0}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class La extends Zr{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=256?new lr(Vn.VALUE,Re.CharacterCodeBounds):String.fromCharCode(Math.trunc(e)))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),e=>e<1||e>=1114112?new lr(Vn.VALUE,Re.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e)))}}La.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:Qr.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ia extends Zr{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),e=>0===e.length?new lr(Vn.VALUE,Re.EmptyString):e.charCodeAt(0))}unicode(e,t){return this.runFunction(e.args,t,this.metadata("UNICODE"),e=>{var t;return null!==(t=e.codePointAt(0))&&void 0!==t?t:new lr(Vn.VALUE,Re.EmptyString)})}}Ia.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:Qr.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:Qr.STRING}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ka extends Zr{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),(...e)=>{let t=0;return e.forEach(e=>{e===_t&&t++}),t})}}ka.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class xa extends Zr{countunique(e,t){return this.runFunction(e.args,t,this.metadata("COUNTUNIQUE"),(...e)=>{const t=new Set,n=new Set;for(const r of e)r instanceof lr?n.add(r.type):""!==r&&t.add(r);return t.size+n.size})}}xa.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:Qr.SCALAR}],repeatLastArgs:1,expandRanges:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Da extends Zr{constructor(){super(...arguments),this.isoweeknumCore=e=>{const t=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),n=this.dateTimeHelper.numberToSimpleDate(e),r=this.dateTimeHelper.dateToNumber({year:n.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(r),s=i+((4-i)%7+7)%7,o=Math.floor((t-1)/7)-Math.floor((s-1)/7)+1;return 0===o?this.isoweeknumCore(e-7)+1:o},this.days360Core=(e,t,n)=>{const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);let s,o;return n?(s=Vi(r),o=Vi(i)):[s,o]=this.dateTimeHelper.toBasisUS(r,i),360*(o.year-s.year)+30*(o.month-s.month)+o.day-s.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),(e,t,n)=>{const r=Math.trunc(n);let i=Math.trunc(t),s=Math.trunc(e);s<this.dateTimeHelper.getEpochYearZero()&&(s+=this.dateTimeHelper.getEpochYearZero());const o=Math.floor((i-1)/12);s+=o,i-=12*o;const a={year:s,month:i,day:1};if(this.dateTimeHelper.isValidDate(a)){let e=this.dateTimeHelper.dateToNumber(a)+(r-1);return e=this.dateTimeHelper.getWithinBounds(e),void 0===e?new lr(Vn.NUM,Re.DateBounds):e}return new lr(Vn.VALUE,Re.InvalidDate)})}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),(e,t,n)=>{const r=Ui({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return r<0?new lr(Vn.NUM,Re.NegativeTime):r%1})}eomonth(e,t){return this.runFunction(e.args,t,this.metadata("EOMONTH"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e);let r=this.dateTimeHelper.dateToNumber(this.dateTimeHelper.endOfMonth(Hi(n,t)));return r=this.dateTimeHelper.getWithinBounds(r),void 0===r?new lr(Vn.NUM,Re.DateBounds):r})}day(e,t){return this.runFunction(e.args,t,this.metadata("DAY"),e=>this.dateTimeHelper.numberToSimpleDate(e).day)}days(e,t){return this.runFunction(e.args,t,this.metadata("DAYS"),(e,t)=>Math.trunc(e)-Math.trunc(t))}month(e,t){return this.runFunction(e.args,t,this.metadata("MONTH"),e=>this.dateTimeHelper.numberToSimpleDate(e).month)}year(e,t){return this.runFunction(e.args,t,this.metadata("YEAR"),e=>this.dateTimeHelper.numberToSimpleDate(e).year)}hour(e,t){return this.runFunction(e.args,t,this.metadata("HOUR"),e=>Yi(ji(e)%1).hours)}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),e=>Yi(ji(e)%1).minutes)}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),e=>Yi(ji(e)%1).seconds)}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),(e,t)=>ts(e,t,this.config,this.dateTimeHelper))}weekday(e,t){return this.runFunction(e.args,t,this.metadata("WEEKDAY"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));if(3===t)return(n-1)%7;const r=ja.get(t);return void 0===r?new lr(Vn.NUM,Re.BadMode):(n-r)%7+1})}weeknum(e,t){return this.runFunction(e.args,t,this.metadata("WEEKNUM"),(e,t)=>{const n=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e)),r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),s=this.dateTimeHelper.relativeNumberToAbsoluteNumber(i);if(21===t)return this.isoweeknumCore(e);const o=ja.get(t);return void 0===o?new lr(Vn.NUM,Re.BadMode):Math.floor((n-o)/7)-Math.floor((s-o)/7)+1})}isoweeknum(e,t){return this.runFunction(e.args,t,this.metadata("ISOWEEKNUM"),this.isoweeknumCore)}datevalue(e,t){return this.runFunction(e.args,t,this.metadata("DATEVALUE"),e=>{const{dateTime:t}=this.dateTimeHelper.parseDateTimeFromConfigFormats(e);return void 0===t?new lr(Vn.VALUE,Re.IncorrectDateTime):Li(t)?(Ii(t)?Math.trunc(Ui(t)):0)+this.dateTimeHelper.dateToNumber(t):0})}timevalue(e,t){return this.runFunction(e.args,t,this.metadata("TIMEVALUE"),e=>{const t=this.dateTimeHelper.dateStringToDateNumber(e);return void 0===t?new lr(Vn.VALUE,Re.IncorrectDateTime):St(t)%1})}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),()=>{const e=new Date(Date.now());return Ui({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()})+this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}today(e,t){return this.runFunction(e.args,t,this.metadata("TODAY"),()=>{const e=new Date(Date.now());return this.dateTimeHelper.dateToNumber({year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()})})}edate(e,t){return this.runFunction(e.args,t,this.metadata("EDATE"),(e,t)=>{const n=this.dateTimeHelper.numberToSimpleDate(e),r=Pi(Hi(n,t));let i=this.dateTimeHelper.dateToNumber(r);return i=this.dateTimeHelper.getWithinBounds(i),void 0===i?new lr(Vn.NUM,Re.DateBounds):i})}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),(e,t,n)=>{if(e>t)return new lr(Vn.NUM,Re.StartEndDate);if("D"===n)return Math.floor(t)-Math.floor(e);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);switch(n){case"M":return 12*(i.year-r.year)+(i.month-r.month)-(i.day<r.day?1:0);case"YM":return(i.month-r.month+12-(i.day<r.day?1:0))%12;case"Y":return i.month>r.month||i.month===r.month&&i.day>=r.day?i.year-r.year:i.year-r.year-1;case"MD":if(i.day>=r.day)return i.day-r.day;{const e=1===i.month?12:i.month-1,t=1===i.month?i.year-1:i.year;return this.dateTimeHelper.daysInMonth(t,e)+i.day-r.day}case"YD":return i.month>r.month||i.month===r.month&&i.day>=r.day?Math.floor(t)-this.dateTimeHelper.dateToNumber({year:i.year,month:r.month,day:r.day}):Math.floor(t)-Math.floor(e)-365*(i.year-r.year-1)-this.dateTimeHelper.leapYearsCount(i.year-1)+this.dateTimeHelper.leapYearsCount(r.year);default:return new lr(Vn.NUM,Re.BadMode)}})}days360(e,t){return this.runFunction(e.args,t,this.metadata("DAYS360"),this.days360Core)}yearfrac(e,t){return this.runFunction(e.args,t,this.metadata("YEARFRAC"),(e,t,n)=>{switch(e=Math.trunc(e),t=Math.trunc(t),e>t&&([e,t]=[t,e]),n){case 0:return this.days360Core(e,t,!1)/360;case 1:return(t-e)/this.dateTimeHelper.yearLengthForBasis(this.dateTimeHelper.numberToSimpleDate(e),this.dateTimeHelper.numberToSimpleDate(t));case 2:return(t-e)/360;case 3:return(t-e)/365;case 4:return this.days360Core(e,t,!0)/360}throw new Error("Should not be reachable.")})}interval(e,t){return this.runFunction(e.args,t,this.metadata("INTERVAL"),e=>{e=Math.trunc(e);const t=e%60;e=Math.trunc(e/60);const n=e%60;e=Math.trunc(e/60);const r=e%24;e=Math.trunc(e/24);const i=e%30;e=Math.trunc(e/30);const s=e%12,o=Math.trunc(e/12);return"P"+(o>0?o+"Y":"")+(s>0?s+"M":"")+(i>0?i+"D":"")+"T"+(r>0?r+"H":"")+(n>0?n+"M":"")+(t>0?t+"S":"")})}networkdays(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS"),(e,t,n)=>this.networkdayscore(e,t,1,n))}networkdaysintl(e,t){return this.runFunction(e.args,t,this.metadata("NETWORKDAYS.INTL"),(e,t,n,r)=>this.networkdayscore(e,t,n,r))}workday(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY"),(e,t,n)=>this.workdaycore(e,t,1,n))}workdayintl(e,t){return this.runFunction(e.args,t,this.metadata("WORKDAY.INTL"),(e,t,n,r)=>this.workdaycore(e,t,n,r))}networkdayscore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);let i=1;e>t&&([e,t]=[t,e],i=-1);const s=Pa(n);if(s instanceof lr)return s;const o=this.simpleRangeToFilteredHolidays(s,r);return o instanceof lr?o:i*this.countWorkdays(e,t,s,o)}workdaycore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);const i=Pa(n);if(i instanceof lr)return i;const s=this.simpleRangeToFilteredHolidays(i,r);if(s instanceof lr)return s;if(t>0){let n=1;while(this.countWorkdays(e+1,e+n,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e+1,e+o,i,s)<t?r=o:n=o}return e+n}if(t<0){t*=-1;let n=1;while(this.countWorkdays(e-n,e-1,i,s)<t)n*=2;let r=1;while(r+1<n){const o=Math.trunc((r+n)/2);this.countWorkdays(e-o,e-1,i,s)<t?r=o:n=o}return e-n}return e}countWorkdays(e,t,n,r){const i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),s=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));let o=0;for(let a=0;a<7;a++)"0"===n.charAt(a)&&(o+=Math.floor((i+6-a)/7),o-=Math.floor((s-1+6-a)/7));return o-=Ha(t+1,r)-Ha(e,r),o}simpleRangeToFilteredHolidays(e,t){var n;const r=null!==(n=null===t||void 0===t?void 0:t.valuesFromTopLeftCorner())&&void 0!==n?n:[];for(const s of r)if(s instanceof lr)return s;const i=[];for(const s of r)if(s!==_t){if(!At(s))return new lr(Vn.VALUE,Re.WrongType);i.push(Math.trunc(St(s)))}return[...new Set(i)].sort((e,t)=>e-t).filter(t=>{const n=this.dateTimeHelper.relativeNumberToAbsoluteNumber(t),r=(n-1)%7;return"0"===e.charAt(r)})}}function Ha(e,t){if(0===t.length)return 0;if(e<=t[0])return 0;if(t[t.length-1]<e)return t.length;let n=0,r=t.length-1;while(n+1<r){const i=Math.floor((r+n)/2);t[i]>=e?r=i:n=i}return r}function Pa(e){var t;return"number"!==typeof e&&"string"!==typeof e?new lr(Vn.VALUE,Re.WrongType):"string"===typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new lr(Vn.NUM,Re.WeekendString):null!==(t=Fa.get(e))&&void 0!==t?t:new lr(Vn.NUM,Re.BadMode)}Da.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:Qr.STRING}],returnNumberType:Lt.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:Qr.STRING}],returnNumberType:Lt.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:Lt.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:Lt.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:Qr.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NOERROR,defaultValue:1},{argumentType:Qr.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NOERROR,defaultValue:1},{argumentType:Qr.RANGE,optionalArg:!0}]}};const ja=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),Fa=new Map([[1,"0000011"],[2,"1000001"],[3,"1100000"],[4,"0110000"],[5,"0011000"],[6,"0001100"],[7,"0000110"],[11,"0000001"],[12,"1000000"],[13,"0100000"],[14,"0010000"],[15,"0001000"],[16,"0000100"],[17,"0000010"]]);
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ya extends Zr{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),e=>e*(180/Math.PI))}}Ya.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ua extends Zr{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),(e,t)=>e===t?1:0)}}Ua.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Va extends Zr{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}Va.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ba extends Zr{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),Wa)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),za)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),Ka)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),Ga)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Vn.NUM,Re.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=za(e,a,t,n,0,s);return o})}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),(e,t,n,r,i,s)=>{if(r>i)return new lr(Vn.NUM,Re.EndStartPeriod);let o=0;for(let a=r;a<=i;a++)o+=Ka(e,a,t,n,0,s);return o})}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),(e,t,n,r,i)=>{if(12===i&&r>n||r>n+1)return new lr(Vn.NUM,Re.PeriodLong);if(t>=e)return 0;const s=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,o=e*s*i/12;if(1===r)return o;let a=o;for(let l=0;l<r-2;l++)a+=(e-a)*s;return r===n+1?(e-a)*s*(12-i)/12:(e-a)*s})}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),(e,t,n,r,i)=>{if(r>n)return new lr(Vn.NUM);let s,o=i/n;o>=1?(o=1,s=1===r?e:0):s=e*Math.pow(1-o,r-1);const a=e*Math.pow(1-o,r);return Math.max(s-Math.max(t,a),0)})}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),(e,t)=>{if(t<1)return new lr(Vn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+10*(e-Math.trunc(e))/t})}dollarfr(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARFR"),(e,t)=>{if(t<1)return new lr(Vn.DIV_BY_ZERO);t=Math.trunc(t);while(t>10)t/=10;return Math.trunc(e)+(e-Math.trunc(e))*t/10})}effect(e,t){return this.runFunction(e.args,t,this.metadata("EFFECT"),(e,t)=>(t=Math.trunc(t),Math.pow(1+e/t,t)-1))}ispmt(e,t){return this.runFunction(e.args,t,this.metadata("ISPMT"),(e,t,n,r)=>0===n?new lr(Vn.DIV_BY_ZERO):r*e*(t/n-1))}nominal(e,t){return this.runFunction(e.args,t,this.metadata("NOMINAL"),(e,t)=>(t=Math.trunc(t),(Math.pow(e+1,1/t)-1)*t))}nper(e,t){return this.runFunction(e.args,t,this.metadata("NPER"),(e,t,n,r,i)=>0===e?0===t?new lr(Vn.DIV_BY_ZERO):(-n-r)/t:(i&&(t*=1+e),Math.log((t-r*e)/(n*e+t))/Math.log(1+e)))}rate(e,t){return this.runFunction(e.args,t,this.metadata("RATE"),(e,t,n,r,i,s)=>{if(s<=-1)return new lr(Vn.VALUE);const o=1e-7,a=50;let l=s;i=i?1:0;for(let u=0;u<a;u++){if(l<=-1)return new lr(Vn.NUM);let s,a;if(Math.abs(l)<o)s=n*(1+e*l)+t*(1+l*i)*e+r;else{const o=Math.pow(1+l,e);s=n*o+t*(1/l+i)*(o-1)+r}if(Math.abs(s)<o)return l;if(Math.abs(l)<o)a=n*e+t*i*e;else{const r=Math.pow(1+l,e),s=e*Math.pow(1+l,e-1);a=n*s+t*(1/l+i)*s+t*(-1/(l*l))*(r-1)}l-=s/a}return new lr(Vn.NUM)})}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),(e,t,n,r,i)=>(i=i?1:0,-1===e?new lr(0===t?Vn.NUM:Vn.DIV_BY_ZERO):0===e?-n*t-r:((1-Math.pow(1+e,t))*n*(1+e*i)/e-r)/Math.pow(1+e,t)))}rri(e,t){return this.runFunction(e.args,t,this.metadata("RRI"),(e,t,n)=>0===t||n<0&&t>0||n>0&&t<0?new lr(Vn.NUM):Math.pow(n/t,1/e)-1)}sln(e,t){return this.runFunction(e.args,t,this.metadata("SLN"),(e,t,n)=>0===n?new lr(Vn.DIV_BY_ZERO):(e-t)/n)}syd(e,t){return this.runFunction(e.args,t,this.metadata("SYD"),(e,t,n,r)=>r>n?new lr(Vn.NUM):(e-t)*(n-r+1)*2/(n*(n+1)))}tbilleq(e,t){return this.runFunction(e.args,t,this.metadata("TBILLEQ"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Vn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Vn.NUM):365*n/s})}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);if(i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day))return new lr(Vn.NUM);const s=360-n*(t-e);return 0===s?0:s<0?new lr(Vn.NUM):100*(1-n*(t-e)/360)})}tbillyield(e,t){return this.runFunction(e.args,t,this.metadata("TBILLYIELD"),(e,t,n)=>{if(e=Math.round(e),t=Math.round(t),e>=t)return new lr(Vn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),i=this.dateTimeHelper.numberToSimpleDate(t);return i.year>r.year+1||i.year===r.year+1&&(i.month>r.month||i.month===r.month&&i.day>r.day)?new lr(Vn.NUM):360*(100-n)/(n*(t-e))})}fvschedule(e,t){return this.runFunction(e.args,t,this.metadata("FVSCHEDULE"),(e,t)=>{const n=t.valuesFromTopLeftCorner();for(const r of n)if(r instanceof lr)return r;for(const r of n)if(At(r))e*=1+St(r);else if(r!==_t)return new lr(Vn.VALUE,Re.NumberExpected);return e})}npv(e,t){return this.runFunction(e.args,t,this.metadata("NPV"),(e,...t)=>{const n=this.arithmeticHelper.coerceNumbersExactRanges(t);return n instanceof lr?n:Xa(e,n)})}mirr(e,t){return this.runFunction(e.args,t,this.metadata("MIRR"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;let i=!1,s=!1;const o=[],a=[];for(const h of r)h>0?(i=!0,o.push(h),a.push(0)):h<0?(s=!0,a.push(h),o.push(0)):(a.push(0),o.push(0));if(!i||!s)return new lr(Vn.DIV_BY_ZERO);const l=r.length,u=Xa(n,o);if(u instanceof lr)return u;const c=Xa(t,a);return c instanceof lr?c:Math.pow(-u*Math.pow(1+n,l)/c/(1+t),1/(l-1))-1})}pduration(e,t){return this.runFunction(e.args,t,this.metadata("PDURATION"),(e,t,n)=>(Math.log(n)-Math.log(t))/Math.log(1+e))}xnpv(e,t){return this.runFunction(e.args,t,this.metadata("XNPV"),(e,t,n)=>{const r=t.valuesFromTopLeftCorner();for(const u of r)if("number"!==typeof u)return new lr(Vn.VALUE,Re.NumberExpected);const i=r,s=n.valuesFromTopLeftCorner();for(const u of s)if("number"!==typeof u)return new lr(Vn.VALUE,Re.NumberExpected);const o=s;if(o.length!==i.length)return new lr(Vn.NUM,Re.EqualLength);const a=o.length;let l=0;if(o[0]<0)return new lr(Vn.NUM,Re.ValueSmall);for(let u=0;u<a;u++){if(o[u]=Math.floor(o[u]),o[u]<o[0])return new lr(Vn.NUM,Re.ValueSmall);l+=i[u]/Math.pow(1+e,(o[u]-o[0])/365)}return l})}}function Wa(e,t,n,r,i){if(0===e)return(-n-r)/t;{const s=Math.pow(1+e,t);return(r*e+n*e*s)*(i?1/(1+e):1)/(1-s)}}function za(e,t,n,r,i,s){const o=Wa(e,n,r,i,s);return 1===t?e*(s?0:-r):e*(s?Ga(e,t-2,o,r,s)-o:Ga(e,t-1,o,r,s))}function Ga(e,t,n,r,i){if(0===e)return-r-n*t;{const s=Math.pow(1+e,t);return n*(i?1+e:1)*(1-s)/e-r*s}}function Ka(e,t,n,r,i,s){return Wa(e,n,r,i,s)-za(e,t,n,r,i,s)}function Xa(e,t){let n=0;for(let r=t.length-1;r>=0;r--){if(n+=t[r],-1===e){if(0===n)continue;return new lr(Vn.DIV_BY_ZERO)}n/=1+e}return n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Ba.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:0,maxValue:1}],returnNumberType:Lt.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:1},{argumentType:Qr.INTEGER,minValue:0,maxValue:1}],returnNumberType:Lt.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:Lt.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.INTEGER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:Lt.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}],returnNumberType:Lt.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}],returnNumberType:Lt.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0}],returnNumberType:Lt.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:.1}],returnNumberType:Lt.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0}],returnNumberType:Lt.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE}],returnNumberType:Lt.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.ANY}],repeatLastArgs:1,returnNumberType:Lt.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],returnNumberType:Lt.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:Qr.NUMBER,greaterThan:-1},{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]}};class $a extends Zr{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),()=>new lr(Vn.NA,Re.WrongArgNumber),e=>{var t;return null!==(t=this.serialization.getCellFormula(e))&&void 0!==t?t:new lr(Vn.NA,Re.Formula)})}}$a.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:Qr.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class qa extends Zr{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),(t,n)=>(e.hyperlink=t,null!==n&&void 0!==n?n:t))}}qa.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING,optionalArg:!0}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Ja extends Zr{isbinary(e,t){return this.runFunction(e.args,t,this.metadata("ISBINARY"),e=>/^[01]{1,10}$/.test(e))}iserr(e,t){return this.runFunction(e.args,t,this.metadata("ISERR"),e=>e instanceof lr&&e.type!==Vn.NA)}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),e=>e instanceof lr)}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),()=>new lr(Vn.NA,Re.WrongArgNumber),e=>{const t=this.dependencyGraph.addressMapping.getCell(e);return t instanceof Tn})}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),e=>e===_t)}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),e=>e instanceof lr&&e.type==Vn.NA)}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),At)}islogical(e,t){return this.runFunction(e.args,t,this.metadata("ISLOGICAL"),e=>"boolean"===typeof e)}isref(e,t){return this.runFunction(e.args,t,this.metadata("ISREF"),e=>e instanceof lr&&(e.type==Vn.REF||e.type==Vn.CYCLE))}istext(e,t){return this.runFunction(e.args,t,this.metadata("ISTEXT"),e=>"string"===typeof e)}isnontext(e,t){return this.runFunction(e.args,t,this.metadata("ISNONTEXT"),e=>!("string"===typeof e))}column(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("COLUMN"),()=>t.formulaAddress.col+1,e=>e.col+1)}columns(e,t){if(1!==e.args.length)return new lr(Vn.NA,Re.WrongArgNumber);if(e.args.some(e=>e.type===W.EMPTY))return new lr(Vn.NUM,Re.EmptyArg);let n=e.args[0];while(n.type===W.PARENTHESIS)n=n.expression;if(n.type===W.CELL_RANGE||n.type===W.COLUMN_RANGE)return n.end.col-n.start.col+1;if(n.type===W.CELL_REFERENCE)return 1;if(n.type===W.ROW_RANGE)return this.config.maxColumns;{const e=this.evaluateAst(n,t);return e instanceof Ht?e.width():e instanceof lr?e:1}}row(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ROW"),()=>t.formulaAddress.row+1,e=>e.row+1)}rows(e,t){if(1!==e.args.length)return new lr(Vn.NA,Re.WrongArgNumber);if(e.args.some(e=>e.type===W.EMPTY))return new lr(Vn.NUM,Re.EmptyArg);let n=e.args[0];while(n.type===W.PARENTHESIS)n=n.expression;if(n.type===W.CELL_RANGE||n.type===W.ROW_RANGE)return n.end.row-n.start.row+1;if(n.type===W.CELL_REFERENCE)return 1;if(n.type===W.COLUMN_RANGE)return this.config.maxRows;{const e=this.evaluateAst(n,t);return e instanceof Ht?e.height():e instanceof lr?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),(e,t,n)=>{var r,i,s,o,a,l;return n<1||t<1?new lr(Vn.VALUE,Re.LessThanOne):n>e.width()||t>e.height()?new lr(Vn.NUM,Re.ValueLarge):null!==(l=null!==(s=null===(i=null===(r=null===e||void 0===e?void 0:e.data)||void 0===r?void 0:r[t-1])||void 0===i?void 0:i[n-1])&&void 0!==s?s:null===(a=null===(o=null===e||void 0===e?void 0:e.data)||void 0===o?void 0:o[0])||void 0===a?void 0:a[0])&&void 0!==l?l:new lr(Vn.VALUE,Re.CellRangeExpected)})}na(e,t){return new lr(Vn.NA)}sheet(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEET"),()=>t.formulaAddress.sheet+1,e=>e.sheet+1,e=>{const t=this.dependencyGraph.sheetMapping.get(e);return void 0!==t?t+1:new lr(Vn.NA,Re.SheetRef)})}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),()=>this.dependencyGraph.sheetMapping.numberOfSheets(),()=>1,()=>new lr(Vn.VALUE,Re.CellRefExpected))}}Ja.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:Qr.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:Qr.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:Qr.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:Qr.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:Qr.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:Qr.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:Qr.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:Qr.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:Qr.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:Qr.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:Qr.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:Qr.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:Qr.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:Qr.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:Qr.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:Qr.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:Qr.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Qa extends Zr{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),e=>e%2===0)}}Qa.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Za extends Zr{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),e=>e%2===1)}}Za.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class el extends Zr{log10(e,t){return this.runFunction(e.args,t,this.metadata("LOG10"),Math.log10)}log(e,t){return this.runFunction(e.args,t,this.metadata("LOG"),(e,t)=>Math.log(e)/Math.log(t))}ln(e,t){return this.runFunction(e.args,t,this.metadata("LN"),Math.log)}}el.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:Qr.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const tl=parseFloat(Math.PI.toFixed(14));class nl extends Zr{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),()=>tl)}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),e=>Math.sqrt(tl*e))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function rl(e,t){return new ei(t.width,e.height)}function il(e,t,n){return new ei(1+(e.width-t)/n,1+(e.height-t)/n)}nl.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:Qr.NUMBER,minValue:0}]}};class sl extends Zr{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),(e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);if(t.height()!==e.width())return new lr(Vn.VALUE,Re.ArrayDimensions);const n=rl(e.size,t.size),r=this.createKernel((function(e,t,n){let r=0;for(let i=0;i<n;++i)r+=e[this.thread.y][i]*t[i][this.thread.x];return r}),n)(e.rawNumbers(),t.rawNumbers(),e.width());return Ht.onlyNumbers(r)})}mmultArraySize(e,t){if(2!==e.args.length)return ei.error();const n=this.metadata("MMULT"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i,s]=r;return rl(i,s)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let o=0;o<t;o++)for(let n=0;n<t;n++)s=Math.max(s,e[i+o][r+n]);return s}),r)(e.rawNumbers(),t,n);return Ht.onlyNumbers(i)})}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),(e,t,n=t)=>{if(!e.hasOnlyNumbers())return new lr(Vn.VALUE,Re.NumberRange);const r=il(e.size,t,n),i=this.createKernel((function(e,t,n){const r=this.thread.x*n,i=this.thread.y*n;let s=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)s=Math.max(s,e[i+h][r+n]);let o=e[i][r];for(let h=0;h<t;h++)for(let n=0;n<t;n++)o=Math.min(o,e[i+h][r+n]);const a=t*t;let l=o,u=s,c=42;for(let h=0;h<32;h++){const n=(l+u)/2;let s=0;for(let o=0;o<t;o++)for(let a=0;a<t;a++)e[i+o][r+a]>n&&s++;if(t%2===0){if(s===a/2){c=n;break}s>a/2?l=n:u=n}else{if(s===(a-1)/2){c=n;break}s>(a-1)/2?l=n:u=n}}return c}),r)(e.rawNumbers(),t,n);return Ht.onlyNumbers(i)})}maxpoolArraySize(e,t){if(e.args.length<2||e.args.length>3)return ei.error();const n=this.metadata("MAXPOOL"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),i=r[0],s=e.args[1];let o;o=s.type===W.NUMBER?s.value:1;let a=o;if(3===e.args.length){const t=e.args[2];a=t.type===W.NUMBER?t.value:1}return o>i.width||o>i.height||a>o||(i.width-o)%a!==0||(i.height-o)%a!==0?ei.error():il(i,o,a)}medianpoolArraySize(e,t){return this.maxpoolArraySize(e,t)}transpose(e,t){return this.runFunction(e.args,t,this.metadata("TRANSPOSE"),e=>{const t=e.rawData(),n=e.size,r=[];for(let i=0;i<n.width;++i){r[i]=[];for(let e=0;e<n.height;++e)r[i][e]=t[e][i]}return Ht.onlyValues(r)})}transposeArraySize(e,t){if(1!==e.args.length)return ei.error();const n=this.metadata("TRANSPOSE"),r=e.args.map(e=>{var r;return this.arraySizeForAst(e,new Tr(t.formulaAddress,t.arraysFlag||null!==(r=null===n||void 0===n?void 0:n.arrayFunction)&&void 0!==r&&r))}),[i]=r;return new ei(i.height,i.width)}createKernel(e,t){return function(...n){const r=[];for(let i=0;i<t.height;++i){r.push([]);for(let s=0;s<t.width;++s)r[i][s]=e.apply({thread:{x:s,y:i}},n)}return r}}}sl.implementedFunctions={MMULT:{method:"mmult",arraySizeMethod:"mmultArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",arraySizeMethod:"transposeArraySize",parameters:[{argumentType:Qr.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",arraySizeMethod:"maxpoolArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",arraySizeMethod:"medianpoolArraySize",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class ol extends Zr{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?new lr(Vn.NUM,Re.OneValue):(t.sort((e,t)=>e-t),t.length%2===0?(t[t.length/2-1]+t[t.length/2])/2:t[Math.floor(t.length/2)])})}large(e,t){return this.runFunction(e.args,t,this.metadata("LARGE"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Vn.NUM,Re.ValueLarge):n[n.length-t])})}small(e,t){return this.runFunction(e.args,t,this.metadata("SMALL"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());return n instanceof lr?n:(n.sort((e,t)=>e-t),t=Math.trunc(t),t>n.length?new lr(Vn.NUM,Re.ValueLarge):n[t-1])})}}ol.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,minValue:1}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class al extends Zr{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),(e,t)=>0===t?new lr(Vn.DIV_BY_ZERO):e%t)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function ll(e){return At(e)&&!Number.isFinite(St(e))?0:e}al.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]}};class ul{constructor(e,t,n){this.sumsq=e,this.sum=t,this.count=n}static single(e){return new ul(e*e,e,1)}compose(e){return new ul(this.sumsq+e.sumsq,this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}varSValue(){return this.count>1?(this.sumsq-this.sum*this.sum/this.count)/(this.count-1):void 0}varPValue(){return this.count>0?(this.sumsq-this.sum*this.sum/this.count)/this.count:void 0}}ul.empty=new ul(0,0,0);class cl extends Zr{constructor(){super(...arguments),this.addWithEpsilonRaw=(e,t)=>this.arithmeticHelper.addWithEpsilonRaw(e,t)}sum(e,t){return this.doSum(e.args,t)}sumsq(e,t){return this.reduce(e.args,t,0,"SUMSQ",this.addWithEpsilonRaw,e=>Math.pow(St(e),2),hl)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){const n=this.reduce(e.args,t,Number.NEGATIVE_INFINITY,"MAXA",(e,t)=>Math.max(e,t),St,dl);return ll(n)}min(e,t){return this.doMin(e.args,t)}mina(e,t){const n=this.reduce(e.args,t,Number.POSITIVE_INFINITY,"MINA",(e,t)=>Math.min(e,t),St,dl);return ll(n)}count(e,t){return this.doCount(e.args,t)}counta(e,t){return this.doCounta(e.args,t)}average(e,t){return this.doAverage(e.args,t)}averagea(e,t){var n;const r=this.reduce(e.args,t,ul.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>ul.single(St(e)),dl);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}vars(e,t){return this.doVarS(e.args,t)}varp(e,t){return this.doVarP(e.args,t)}vara(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}varpa(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}stdevs(e,t){return this.doStdevS(e.args,t)}stdevp(e,t){return this.doStdevP(e.args,t)}stdeva(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}product(e,t){return this.doProduct(e.args,t)}subtotal(e,t){if(e.args.length<2)return new lr(Vn.NA,Re.WrongArgNumber);const n=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:Qr.NUMBER},t),r=e.args.slice(1);switch(n){case 1:case 101:return this.doAverage(r,t);case 2:case 102:return this.doCount(r,t);case 3:case 103:return this.doCounta(r,t);case 4:case 104:return this.doMax(r,t);case 5:case 105:return this.doMin(r,t);case 6:case 106:return this.doProduct(r,t);case 7:case 107:return this.doStdevS(r,t);case 8:case 108:return this.doStdevP(r,t);case 9:case 109:return this.doSum(r,t);case 10:case 110:return this.doVarS(r,t);case 11:case 111:return this.doVarP(r,t);default:return new lr(Vn.VALUE,Re.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,ul.empty,"_AGGREGATE",(e,t)=>e.compose(t),e=>ul.single(St(e)),hl)}reduceAggregateA(e,t){return this.reduce(e,t,ul.empty,"_AGGREGATE_A",(e,t)=>e.compose(t),e=>ul.single(St(e)),dl)}doAverage(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.averageValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doVarS(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varSValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doVarP(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof lr?r:null!==(n=r.varPValue())&&void 0!==n?n:new lr(Vn.DIV_BY_ZERO)}doStdevS(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varSValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){const n=this.reduceAggregate(e,t);if(n instanceof lr)return n;{const e=n.varPValue();return void 0===e?new lr(Vn.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",(e,t)=>e+t,St,e=>At(e)?1:0)}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",(e,t)=>e+t,St,e=>e===_t?0:1)}doMax(e,t){const n=this.reduce(e,t,Number.NEGATIVE_INFINITY,"MAX",(e,t)=>Math.max(e,t),St,hl);return ll(n)}doMin(e,t){const n=this.reduce(e,t,Number.POSITIVE_INFINITY,"MIN",(e,t)=>Math.min(e,t),St,hl);return ll(n)}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,St,hl)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",(e,t)=>e*t,St,hl)}reduce(e,t,n,r,i,s,o){return e.length<1?new lr(Vn.NA,Re.WrongArgNumber):e.reduce((e,a)=>{if(e instanceof lr)return e;if(a.type===W.CELL_RANGE||a.type===W.COLUMN_RANGE||a.type===W.ROW_RANGE){const l=this.evaluateRange(a,t,n,r,i,s,o);return l instanceof lr?l:i(l,e)}let l;if(l=this.evaluateAst(a,t),l instanceof Ht){const t=Array.from(l.valuesFromTopLeftCorner()).map(o).filter(e=>void 0!==e);return t.map(e=>e instanceof lr?e:s(e)).reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),e)}if(a.type===W.CELL_REFERENCE){if(l=o(l),void 0===l)return e}else if(l=this.coerceScalarToNumberOrError(l),l=o(l),void 0===l)return e;return l instanceof lr?l:i(e,s(l))},n)}evaluateRange(e,t,n,r,i,s,o){let a;try{a=Er.fromAst(e,t.formulaAddress)}catch(c){if(c instanceof $t)return new lr(Vn.REF,Re.RangeManySheets);throw c}const l=this.dependencyGraph.getRange(a.start,a.end);if(void 0===l)throw new Error("Range does not exists in graph");let u=l.getFunctionValue(r);if(void 0===u){const e=this.getRangeValues(r,a,l,s,o);u=e.reduce((e,t)=>e instanceof lr?e:t instanceof lr?t:i(e,t),n),l.setFunctionValue(r,u)}return u}getRangeValues(e,t,n,r,i){const s=[],{smallerRangeVertex:o,restRange:a}=this.dependencyGraph.rangeMapping.findSmallerRange(t);let l;if(void 0!==o&&this.dependencyGraph.existsEdge(o,n)){const t=o.getFunctionValue(e);if(void 0!==t)s.push(t);else for(const e of o.range.addresses(this.dependencyGraph)){const t=i(this.dependencyGraph.getScalarValue(e));t instanceof lr?s.push(t):void 0!==t&&s.push(r(t))}l=a}else l=t;for(const u of l.addresses(this.dependencyGraph)){const e=i(this.dependencyGraph.getScalarValue(u));e instanceof lr?s.push(e):void 0!==e&&s.push(r(e))}return s}}function hl(e){return At(e)||e instanceof lr?e:void 0}function dl(e){return"boolean"===typeof e?kr(e):At(e)||e instanceof lr?e:"string"===typeof e?0:void 0}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */cl.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.ANY}],repeatLastArgs:1}},cl.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class ml extends Zr{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}ml.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class fl extends Zr{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),e=>e*(Math.PI/180))}}fl.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const pl=10,gl=255,yl=2,wl=36,bl="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";class vl extends Zr{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),(e,t)=>Sl(e,2,t))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),(e,t)=>Sl(e,8,t))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),(e,t)=>Sl(e,16,t))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),e=>{const t=_l(e,2,pl);return void 0===t?new lr(Vn.NUM,Re.NotBinary):Rl(t,2)})}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),(e,t)=>{const n=_l(e,2,pl);return void 0===n?new lr(Vn.NUM,Re.NotBinary):Sl(Rl(n,2),8,t)})}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),(e,t)=>{const n=_l(e,2,pl);return void 0===n?new lr(Vn.NUM,Re.NotBinary):Sl(Rl(n,2),16,t)})}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),e=>{const t=_l(e,8,pl);return void 0===t?new lr(Vn.NUM,Re.NotOctal):Rl(t,8)})}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),(e,t)=>{const n=_l(e,8,pl);return void 0===n?new lr(Vn.NUM,Re.NotOctal):Sl(Rl(n,8),2,t)})}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),(e,t)=>{const n=_l(e,8,pl);return void 0===n?new lr(Vn.NUM,Re.NotOctal):Sl(Rl(n,8),16,t)})}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),e=>{const t=_l(e,16,pl);return void 0===t?new lr(Vn.NUM,Re.NotHex):Rl(t,16)})}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),(e,t)=>{const n=_l(e,16,pl);return void 0===n?new lr(Vn.NUM,Re.NotHex):Sl(Rl(n,16),2,t)})}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),(e,t)=>{const n=_l(e,16,pl);return void 0===n?new lr(Vn.NUM,Re.NotHex):Sl(Rl(n,16),8,t)})}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),Ml)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),(e,t)=>{const n=_l(e,t,gl);return void 0===n?new lr(Vn.NUM,Re.NotHex):parseInt(n,t)})}}function _l(e,t,n){const r=bl.substr(0,t),i=new RegExp(`^[${r}]+$`);if(!(e.length>n)&&i.test(e))return e}function Sl(e,t,n){if(e>Cl(t))return new lr(Vn.NUM,Re.ValueBaseLarge);if(e<El(t))return new lr(Vn.NUM,Re.ValueBaseSmall);const r=Tl(e,t);return void 0===n||e<0?r:r.length>n?new lr(Vn.NUM,Re.ValueBaseLong):ns(r,n)}function El(e){return-Math.pow(e,pl)/2}function Cl(e){return-El(e)-1}function Ml(e,t,n){const r=Tl(e,t);return void 0!==n&&n>r.length?ns(r,n):r}function Tl(e,t){const n=e<0?Math.pow(t,pl):0;return(e+n).toString(t).toUpperCase()}function Rl(e,t){const n=parseInt(e,t),r=Math.pow(t,pl);return n>=r/2?n-r:n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */vl.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:Qr.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:Qr.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:Qr.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:pl}]},DECIMAL:{method:"decimal",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,minValue:yl,maxValue:wl}]},BASE:{method:"base",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:yl,maxValue:wl},{argumentType:Qr.NUMBER,optionalArg:!0,minValue:0,maxValue:gl}]}};class Ol extends Zr{rand(e,t){return this.runFunction(e.args,t,this.metadata("RAND"),Math.random)}randbetween(e,t){return this.runFunction(e.args,t,this.metadata("RANDBETWEEN"),(e,t)=>t<e?new lr(Vn.NUM,Re.WrongOrder):(e=Math.ceil(e),t=Math.floor(t)+1,e===t&&(t+=1),e+Math.floor(Math.random()*(t-e))))}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function Nl(e){const t=Math.ceil(e);return t%2===1?t:t+1}function Al(e){const t=Math.ceil(e);return t%2===0?t:t+1}Ol.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}],isVolatile:!0}};class Ll extends Zr{roundup(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.ceil(-e*n)/n:Math.ceil(e*n)/n})}rounddown(e,t){return this.runFunction(e.args,t,this.metadata("ROUNDDOWN"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.floor(-e*n)/n:Math.floor(e*n)/n})}round(e,t){return this.runFunction(e.args,t,this.metadata("ROUND"),(e,t)=>{const n=Math.pow(10,t);return e<0?-Math.round(-e*n)/n:Math.round(e*n)/n})}intFunc(e,t){return this.runFunction(e.args,t,this.metadata("INT"),e=>e<0?-Math.floor(-e):Math.floor(e))}even(e,t){return this.runFunction(e.args,t,this.metadata("EVEN"),e=>e<0?-Al(-e):Al(e))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),e=>e<0?-Nl(-e):Nl(e))}ceilingmath(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t=-t),Math.ceil(e/t)*t))}ceiling(e,t){return this.runFunction(e.args,t,this.metadata("CEILING"),(e,t)=>0===e?0:0===t?new lr(Vn.DIV_BY_ZERO):e>0&&t<0?new lr(Vn.NUM,Re.DistinctSigns):Math.ceil(e/t)*t)}ceilingprecise(e,t){return this.runFunction(e.args,t,this.metadata("CEILING.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.ceil(e/t)*t))}floormath(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.MATH"),(e,t,n)=>0===t||0===e?0:(t=Math.abs(t),1===n&&e<0&&(t*=-1),Math.floor(e/t)*t))}floor(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR"),(e,t)=>0===e?0:0===t?new lr(Vn.DIV_BY_ZERO):e>0&&t<0?new lr(Vn.NUM,Re.DistinctSigns):Math.floor(e/t)*t)}floorprecise(e,t){return this.runFunction(e.args,t,this.metadata("FLOOR.PRECISE"),(e,t)=>0===t||0===e?0:(t=Math.abs(t),Math.floor(e/t)*t))}}Ll.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:Qr.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:Qr.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:Qr.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1},{argumentType:Qr.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1},{argumentType:Qr.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,defaultValue:1}]}},Ll.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Il extends Zr{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- function*kl(){}function xl(e){const t=e[Symbol.iterator](),{done:n,value:r}=t.next();return n?{rest:kl()}:{value:r,rest:t}}Il.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- const Dl=(e,t,n)=>{if(n.end.row>n.start.row){const r=mr(n.end.sheet,n.end.col,n.end.row-1),i=e.getRange(n.start,r);if(void 0!==i)return{smallerRangeVertex:i,restValuesRange:n.withStart(mr(n.start.sheet,n.start.col,n.end.row)),restConditionRanges:t.map(e=>e.withStart(mr(e.start.sheet,e.start.col,e.end.row)))}}return{restValuesRange:n,restConditionRanges:t}};class Hl{constructor(e,t,n,r,i){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=n,this.composeFunction=r,this.mapFunction=i,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(const i of t)if(!i.conditionRange.sameDimensionsAs(e))return new lr(Vn.VALUE,Re.EqualLength);const n=this.tryToGetRangeVertexForRangeValue(e),r=t.map(e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange));if(n&&r.every(e=>void 0!==e)){const i=t.map(e=>e.criterionPackage.raw).join(","),s=this.findAlreadyComputedValueInCache(n,this.cacheKey(t),i);if(void 0!==s)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),s;const o=this.buildNewCriterionCache(this.cacheKey(t),t.map(e=>e.conditionRange.range),e.range);return o.has(i)||o.set(i,[this.evaluateRangeValue(e,t),t.map(e=>e.criterionPackage.lambda)]),n.setCriterionFunctionValues(this.cacheKey(t),o),r.forEach(e=>{void 0!==e&&e.addDependentCacheRange(n)}),o.get(i)[0]}return this.evaluateRangeValue(e,t)}tryToGetRangeVertexForRangeValue(e){const t=e.range;return void 0===t?void 0:this.dependencyGraph.getRange(t.start,t.end)}reduceFunction(e){let t=this.reduceInitialValue;for(const n of e)t=this.composeFunction(t,n);return t}findAlreadyComputedValueInCache(e,t,n){return e.getCriterionFunctionValue(t,n)}evaluateRangeValue(e,t){const n=t.map(e=>e.criterionPackage.lambda),r=Array.from(e.valuesFromTopLeftCorner()).map(this.mapFunction)[Symbol.iterator](),i=t.map(e=>e.conditionRange.iterateValuesFromTopLeftCorner()),s=Fl(n,i,r);return this.reduceFunction(s)}buildNewCriterionCache(e,t,n){const r=this.dependencyGraph.getRange(n.start,n.end),{smallerRangeVertex:i,restConditionRanges:s,restValuesRange:o}=Dl(this.dependencyGraph,t,n);let a;a=void 0!==i&&this.dependencyGraph.existsEdge(i,r)?i.getCriterionFunctionValues(e):new Map;const l=new Map;return a.forEach(([e,t],n)=>{const r=Fl(t,s.map(e=>jl(this.dependencyGraph,e)),Array.from(jl(this.dependencyGraph,o)).map(this.mapFunction)[Symbol.iterator]()),i=this.composeFunction(e,this.reduceFunction(r));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(n,[i,t])}),l}}class Pl{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*jl(e,t){for(const n of t.addresses(e))yield St(e.getScalarValue(n))}function*Fl(e,t,n){for(const r of n){const n=t.map(e=>xl(e));if(!n.every(e=>Object.prototype.hasOwnProperty.call(e,"value")))return;const i=n.map(e=>St(e.value));Yl(i,e).every(([e,t])=>t(e))&&(yield r),t=n.map(e=>e.rest)}}function Yl(e,t){const n=[];for(let r=0;r<Math.min(e.length,t.length);r++)n.push([e[r],t[r]]);return n}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ul{constructor(e,t){this.sum=e,this.count=t}static single(e){return new Ul(e,1)}compose(e){return new Ul(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function Vl(e){return t=>{const n=t.map(e=>`${e.conditionRange.range.sheet},${e.conditionRange.range.start.col},${e.conditionRange.range.start.row}`);return[e,...n].join(",")}}function Bl(e){return At(e)&&!Number.isFinite(St(e))?0:e}function Wl(e){return e instanceof lr?e:At(e)?St(e):void 0}Ul.empty=new Ul(0,0);class zl extends Zr{sumif(e,t){const n="SUMIF",r=(e,t,r)=>this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),Wl);return this.runFunction(e.args,t,this.metadata(n),r)}sumifs(e,t){const n="SUMIFS",r=(e,...t)=>this.computeConditionalAggregationFunction(e,t,n,0,(e,t)=>this.arithmeticHelper.nonstrictadd(e,t),Wl);return this.runFunction(e.args,t,this.metadata(n),r)}averageif(e,t){const n="AVERAGEIF",r=(e,t,r)=>{const i=this.computeConditionalAggregationFunction(null!==r&&void 0!==r?r:e,[e,t],n,Ul.empty,(e,t)=>e.compose(t),e=>At(e)?Ul.single(St(e)):Ul.empty);return i instanceof lr?i:i.averageValue()||new lr(Vn.DIV_BY_ZERO)};return this.runFunction(e.args,t,this.metadata(n),r)}countif(e,t){const n="COUNTIF",r=(e,t)=>this.computeConditionalAggregationFunction(e,[e,t],n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}countifs(e,t){const n="COUNTIFS",r=(...e)=>this.computeConditionalAggregationFunction(e[0],e,n,0,(e,t)=>e+t,()=>1);return this.runFunction(e.args,t,this.metadata(n),r)}minifs(e,t){const n="MINIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.POSITIVE_INFINITY,r,Wl);return Bl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}maxifs(e,t){const n="MAXIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t),i=(e,...t)=>{const i=this.computeConditionalAggregationFunction(e,t,n,Number.NEGATIVE_INFINITY,r,Wl);return Bl(i)};return this.runFunction(e.args,t,this.metadata(n),i)}computeConditionalAggregationFunction(e,t,n,r,i,s){const o=[];for(let a=0;a<t.length;a+=2){const e=t[a],n=this.interpreter.criterionBuilder.fromCellValue(t[a+1],this.arithmeticHelper);if(void 0===n)return new lr(Vn.VALUE,Re.BadCriterion);o.push(new Pl(e,n))}return new Hl(this.interpreter,Vl(n),r,i,s).compute(e,o)}}zl.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.NOERROR}],repeatLastArgs:2}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Gl extends Zr{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),(...e)=>{const t=e[0].width(),n=e[0].height();for(const s of e)if(s.width()!==t||s.height()!==n)return new lr(Vn.VALUE,Re.EqualLength);let r=0;const i=e.map(e=>e.iterateValuesFromTopLeftCorner());for(let s=0;s<t*n;s++){let e=1;for(const t of i){const n=t.next().value;if(n instanceof lr)return n;const r=this.coerceScalarToNumberOrError(n);At(r)?e*=St(r):e=0}r+=e}return r})}}Gl.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:Qr.RANGE}],repeatLastArgs:1}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Kl extends Zr{concatenate(e,t){return this.runFunction(e.args,t,this.metadata("CONCATENATE"),(...e)=>"".concat(...e))}split(e,t){return this.runFunction(e.args,t,this.metadata("SPLIT"),(e,t)=>{const n=e.split(" ");return t>=n.length||t<0?new lr(Vn.VALUE,Re.IndexBounds):n[t]})}len(e,t){return this.runFunction(e.args,t,this.metadata("LEN"),e=>e.length)}lower(e,t){return this.runFunction(e.args,t,this.metadata("LOWER"),e=>e.toLowerCase())}trim(e,t){return this.runFunction(e.args,t,this.metadata("TRIM"),e=>e.replace(/^ +| +$/g,"").replace(/ +/g," "))}proper(e,t){return this.runFunction(e.args,t,this.metadata("PROPER"),e=>e.replace(/\p{L}+/gu,e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()))}clean(e,t){return this.runFunction(e.args,t,this.metadata("CLEAN"),e=>e.replace(/[\u0000-\u001F]/g,""))}exact(e,t){return this.runFunction(e.args,t,this.metadata("EXACT"),(e,t)=>e===t)}rept(e,t){return this.runFunction(e.args,t,this.metadata("REPT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeCount):e.repeat(t))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeLength):0===t?"":e.slice(-t))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),(e,t)=>t<0?new lr(Vn.VALUE,Re.NegativeLength):e.slice(0,t))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),(e,t,n)=>t<1?new lr(Vn.VALUE,Re.LessThanOne):n<0?new lr(Vn.VALUE,Re.NegativeLength):e.substring(t-1,t+n-1))}replace(e,t){return this.runFunction(e.args,t,this.metadata("REPLACE"),(e,t,n,r)=>t<1?new lr(Vn.VALUE,Re.LessThanOne):n<0?new lr(Vn.VALUE,Re.NegativeLength):e.substring(0,t-1)+r+e.substring(t+n-1))}search(e,t){return this.runFunction(e.args,t,this.metadata("SEARCH"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Vn.VALUE,Re.LengthBounds);const r=e.toLowerCase(),i=t.substring(n-1).toLowerCase(),s=this.arithmeticHelper.requiresRegex(r)?this.arithmeticHelper.searchString(r,i):i.indexOf(r);return s>-1?s+n:new lr(Vn.VALUE,Re.PatternNotFound)})}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),(e,t,n,r)=>{const i=this.escapeRegExpSpecialCharacters(t),s=new RegExp(i,"g");if(void 0===r)return e.replace(s,n);if(r<1)return new lr(Vn.VALUE,Re.LessThanOne);let o,a=0;while(null!==(o=s.exec(e)))if(r===++a)return e.substring(0,o.index)+n+e.substring(s.lastIndex);return e})}find(e,t){return this.runFunction(e.args,t,this.metadata("FIND"),(e,t,n)=>{if(n<1||n>t.length)return new lr(Vn.VALUE,Re.IndexBounds);const r=t.substring(n-1),i=r.indexOf(e)+n;return i>0?i:new lr(Vn.VALUE,Re.PatternNotFound)})}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),e=>e instanceof lr||"string"===typeof e?e:"")}upper(e,t){return this.runFunction(e.args,t,this.metadata("UPPER"),e=>e.toUpperCase())}escapeRegExpSpecialCharacters(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}}Kl.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:Qr.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:Qr.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:Qr.STRING}]},MID:{method:"mid",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:Qr.STRING}]},T:{method:"t",parameters:[{argumentType:Qr.SCALAR}]},PROPER:{method:"proper",parameters:[{argumentType:Qr.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:Qr.STRING}]},REPT:{method:"rept",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:Qr.STRING},{argumentType:Qr.STRING},{argumentType:Qr.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:Qr.STRING}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Xl extends Zr{acos(e,t){return this.runFunction(e.args,t,this.metadata("ACOS"),Math.acos)}asin(e,t){return this.runFunction(e.args,t,this.metadata("ASIN"),Math.asin)}cos(e,t){return this.runFunction(e.args,t,this.metadata("COS"),Math.cos)}sin(e,t){return this.runFunction(e.args,t,this.metadata("SIN"),Math.sin)}tan(e,t){return this.runFunction(e.args,t,this.metadata("TAN"),Math.tan)}atan(e,t){return this.runFunction(e.args,t,this.metadata("ATAN"),Math.atan)}atan2(e,t){return this.runFunction(e.args,t,this.metadata("ATAN2"),(e,t)=>0===e&&0===t?new lr(Vn.DIV_BY_ZERO):Math.atan2(t,e))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.tan(e))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),e=>0===e?tl/2:Math.atan(1/e))}sec(e,t){return this.runFunction(e.args,t,this.metadata("SEC"),e=>1/Math.cos(e))}csc(e,t){return this.runFunction(e.args,t,this.metadata("CSC"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.sin(e))}sinh(e,t){return this.runFunction(e.args,t,this.metadata("SINH"),Math.sinh)}asinh(e,t){return this.runFunction(e.args,t,this.metadata("ASINH"),Math.asinh)}cosh(e,t){return this.runFunction(e.args,t,this.metadata("COSH"),Math.cosh)}acosh(e,t){return this.runFunction(e.args,t,this.metadata("ACOSH"),Math.acosh)}tanh(e,t){return this.runFunction(e.args,t,this.metadata("TANH"),Math.tanh)}atanh(e,t){return this.runFunction(e.args,t,this.metadata("ATANH"),Math.atanh)}coth(e,t){return this.runFunction(e.args,t,this.metadata("COTH"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.tanh(e))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),e=>0===e?new lr(Vn.NUM,Re.NonZero):Math.atanh(1/e))}sech(e,t){return this.runFunction(e.args,t,this.metadata("SECH"),e=>1/Math.cosh(e))}csch(e,t){return this.runFunction(e.args,t,this.metadata("CSCH"),e=>0===e?new lr(Vn.DIV_BY_ZERO):1/Math.sinh(e))}}Xl.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:Qr.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:Qr.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:Qr.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:Qr.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:Qr.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:Qr.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:Qr.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:Qr.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:Qr.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:Qr.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:Qr.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:Qr.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:Qr.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:Qr.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:Qr.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:Qr.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:Qr.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:Qr.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:Qr.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:Qr.NUMBER}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class $l extends Qo{constructor(e){super(e),this.dependencyGraph=e}find(e,t,n){return this.basicFind(e,t,"col",n)}}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class ql extends Zr{constructor(){super(...arguments),this.rowSearch=new $l(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Vn.VALUE,Re.WrongType):n<1?new lr(Vn.VALUE,Re.LessThanOne):n>i.width()?new lr(Vn.REF,Re.IndexLarge):this.doVlookup(Pr(e),t,n-1,r)})}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),(e,t,n,r)=>{const i=t.range;return void 0===i?new lr(Vn.VALUE,Re.WrongType):n<1?new lr(Vn.VALUE,Re.LessThanOne):n>i.height()?new lr(Vn.REF,Re.IndexLarge):this.doHlookup(Pr(e),t,n-1,r)})}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),(e,t,n)=>this.doMatch(Pr(e),t,n))}searchInRange(e,t,n,r){if(!n&&"string"===typeof e&&this.arithmeticHelper.requiresRegex(e))return r.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t);{const i=n?{ordering:"asc"}:{ordering:"none",matchExactly:!0};return r.find(e,t,i)}}doVlookup(e,t,n,r){this.dependencyGraph.stats.start(It.VLOOKUP);const i=t.range;let s;s=void 0===i?Ht.onlyValues(t.data.map(e=>[e[0]])):Ht.onlyRange(Er.spanFrom(i.start,1,i.height()),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.columnSearch);if(this.dependencyGraph.stats.end(It.VLOOKUP),-1===o)return new lr(Vn.NA,Re.ValueNotFound);let a;if(void 0===i)a=t.data[o][n];else{const e=mr(i.sheet,i.start.col+n,i.start.row+o);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ht?new lr(Vn.VALUE,Re.WrongType):a}doHlookup(e,t,n,r){const i=t.range;let s;s=void 0===i?Ht.onlyValues([t.data[0]]):Ht.onlyRange(Er.spanFrom(i.start,i.width(),1),this.dependencyGraph);const o=this.searchInRange(e,s,r,this.rowSearch);if(-1===o)return new lr(Vn.NA,Re.ValueNotFound);let a;if(void 0===i)a=t.data[n][o];else{const e=mr(i.sheet,i.start.col+o,i.start.row+n);a=this.dependencyGraph.getCellValue(e)}return a instanceof Ht?new lr(Vn.VALUE,Re.WrongType):a}doMatch(e,t,n){if(![-1,0,1].includes(n))return new lr(Vn.VALUE,Re.BadMode);if(t.width()>1&&t.height()>1)return new lr(Vn.NA);const r=1===t.width()?this.columnSearch:this.rowSearch,i=0===n?{ordering:"none",matchExactly:!0}:{ordering:-1===n?"desc":"asc"},s=r.find(e,t,i);return-1===s?new lr(Vn.NA,Re.ValueNotFound):s+1}}ql.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN,defaultValue:!0}]},MATCH:{method:"match",parameters:[{argumentType:Qr.NOERROR},{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER,defaultValue:1}]}};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Jl extends Zr{roman(e,t){return this.runFunction(e.args,t,this.metadata("ROMAN"),(e,t)=>(e=Math.trunc(e),!1===t?t=4:!0===t&&(t=0),t=St(this.coerceScalarToNumberOrError(t)),t instanceof lr?t:(t=Math.trunc(t),t<0?new lr(Vn.VALUE,Re.ValueSmall):t>4?new lr(Vn.VALUE,Re.ValueLarge):Zl(e,t))))}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),e=>{e=e.trim().toUpperCase();let t=!1;if(e.startsWith("-")&&(e=e.slice(1),t=!0,""===e))return new lr(Vn.VALUE,Re.InvalidRoman);const n={input:e,acc:0};return Ql(n,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),Ql(n,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),Ql(n,{token:"D",val:500},{token:"ID",val:499},{token:"VD",val:495},{token:"XD",val:490},{token:"LD",val:450},{token:"CD",val:400}),Ql(n,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),Ql(n,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),Ql(n,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),Ql(n,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),Ql(n,{token:"IX",val:9}),Ql(n,{token:"V",val:5},{token:"IV",val:4}),Ql(n,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==n.input?new lr(Vn.VALUE,Re.InvalidRoman):t?-n.acc:n.acc})}}function Ql(e,...t){for(const n of t)if(e.input.startsWith(n.token)){e.input=e.input.slice(n.token.length),e.acc+=n.val;break}}function Zl(e,t){const n={val:e%1e3,acc:"M".repeat(Math.floor(e/1e3))};return 4===t&&(eu(n,"IM",999,1e3),eu(n,"ID",499,500)),t>=3&&(eu(n,"VM",995,1e3),eu(n,"VD",495,500)),t>=2&&(eu(n,"XM",990,1e3),eu(n,"XD",490,500)),t>=1&&(eu(n,"LM",950,1e3),eu(n,"LD",450,500)),eu(n,"CM",900,1e3),eu(n,"CD",400,500),eu(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(eu(n,"IC",99,100),eu(n,"IL",49,50)),t>=1&&(eu(n,"VC",95,100),eu(n,"VL",45,50)),eu(n,"XC",90,100),eu(n,"XL",40,50),eu(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,eu(n,"IX",9,10),eu(n,"IV",4,5),eu(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}function eu(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Jl.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:Qr.NUMBER,minValue:1,lessThan:4e3},{argumentType:Qr.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:Qr.STRING}]}};class tu extends Zr{add(e,t){return this.runFunction(e.args,t,this.metadata("HF.ADD"),this.arithmeticHelper.addWithEpsilon)}concat(e,t){return this.runFunction(e.args,t,this.metadata("HF.CONCAT"),this.arithmeticHelper.concat)}divide(e,t){return this.runFunction(e.args,t,this.metadata("HF.DIVIDE"),this.arithmeticHelper.divide)}eq(e,t){return this.runFunction(e.args,t,this.metadata("HF.EQ"),this.arithmeticHelper.eq)}gt(e,t){return this.runFunction(e.args,t,this.metadata("HF.GT"),this.arithmeticHelper.gt)}gte(e,t){return this.runFunction(e.args,t,this.metadata("HF.GTE"),this.arithmeticHelper.geq)}lt(e,t){return this.runFunction(e.args,t,this.metadata("HF.LT"),this.arithmeticHelper.lt)}lte(e,t){return this.runFunction(e.args,t,this.metadata("HF.LTE"),this.arithmeticHelper.leq)}minus(e,t){return this.runFunction(e.args,t,this.metadata("HF.MINUS"),this.arithmeticHelper.subtract)}multiply(e,t){return this.runFunction(e.args,t,this.metadata("HF.MULTIPLY"),this.arithmeticHelper.multiply)}ne(e,t){return this.runFunction(e.args,t,this.metadata("HF.NE"),this.arithmeticHelper.neq)}pow(e,t){return this.runFunction(e.args,t,this.metadata("HF.POW"),this.arithmeticHelper.pow)}uminus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UMINUS"),this.arithmeticHelper.unaryMinus)}upercent(e,t){return this.runFunction(e.args,t,this.metadata("HF.UNARY_PERCENT"),this.arithmeticHelper.unaryPercent)}uplus(e,t){return this.runFunction(e.args,t,this.metadata("HF.UPLUS"),this.arithmeticHelper.unaryPlus)}}tu.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:Qr.STRING,passSubtype:!0},{argumentType:Qr.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:Qr.NOERROR,passSubtype:!0},{argumentType:Qr.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0},{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:Qr.NUMBER,passSubtype:!0}]}};
- /**
- * @license
- bessel.js (C) 2013-present SheetJS -- http://sheetjs.com
- Apache License
- Version 2.0, January 2004
- http://www.apache.org/licenses/
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
- 1. Definitions.
- "License" shall mean the terms and conditions for use, reproduction,
- and distribution as defined by Sections 1 through 9 of this document.
- "Licensor" shall mean the copyright owner or entity authorized by
- the copyright owner that is granting the License.
- "Legal Entity" shall mean the union of the acting entity and all
- other entities that control, are controlled by, or are under common
- control with that entity. For the purposes of this definition,
- "control" means (i) the power, direct or indirect, to cause the
- direction or management of such entity, whether by contract or
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
- outstanding shares, or (iii) beneficial ownership of such entity.
- "You" (or "Your") shall mean an individual or Legal Entity
- exercising permissions granted by this License.
- "Source" form shall mean the preferred form for making modifications,
- including but not limited to software source code, documentation
- source, and configuration files.
- "Object" form shall mean any form resulting from mechanical
- transformation or translation of a Source form, including but
- not limited to compiled object code, generated documentation,
- and conversions to other media types.
- "Work" shall mean the work of authorship, whether in Source or
- Object form, made available under the License, as indicated by a
- copyright notice that is included in or attached to the work
- (an example is provided in the Appendix below).
- "Derivative Works" shall mean any work, whether in Source or Object
- form, that is based on (or derived from) the Work and for which the
- editorial revisions, annotations, elaborations, or other modifications
- represent, as a whole, an original work of authorship. For the purposes
- of this License, Derivative Works shall not include works that remain
- separable from, or merely link (or bind by name) to the interfaces of,
- the Work and Derivative Works thereof.
- "Contribution" shall mean any work of authorship, including
- the original version of the Work and any modifications or additions
- to that Work or Derivative Works thereof, that is intentionally
- submitted to Licensor for inclusion in the Work by the copyright owner
- or by an individual or Legal Entity authorized to submit on behalf of
- the copyright owner. For the purposes of this definition, "submitted"
- means any form of electronic, verbal, or written communication sent
- to the Licensor or its representatives, including but not limited to
- communication on electronic mailing lists, source code control systems,
- and issue tracking systems that are managed by, or on behalf of, the
- Licensor for the purpose of discussing and improving the Work, but
- excluding communication that is conspicuously marked or otherwise
- designated in writing by the copyright owner as "Not a Contribution."
- "Contributor" shall mean Licensor and any individual or Legal Entity
- on behalf of whom a Contribution has been received by Licensor and
- subsequently incorporated within the Work.
- 2. Grant of Copyright License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- copyright license to reproduce, prepare Derivative Works of,
- publicly display, publicly perform, sublicense, and distribute the
- Work and such Derivative Works in Source or Object form.
- 3. Grant of Patent License. Subject to the terms and conditions of
- this License, each Contributor hereby grants to You a perpetual,
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
- (except as stated in this section) patent license to make, have made,
- use, offer to sell, sell, import, and otherwise transfer the Work,
- where such license applies only to those patent claims licensable
- by such Contributor that are necessarily infringed by their
- Contribution(s) alone or by combination of their Contribution(s)
- with the Work to which such Contribution(s) was submitted. If You
- institute patent litigation against any entity (including a
- cross-claim or counterclaim in a lawsuit) alleging that the Work
- or a Contribution incorporated within the Work constitutes direct
- or contributory patent infringement, then any patent licenses
- granted to You under this License for that Work shall terminate
- as of the date such litigation is filed.
- 4. Redistribution. You may reproduce and distribute copies of the
- Work or Derivative Works thereof in any medium, with or without
- modifications, and in Source or Object form, provided that You
- meet the following conditions:
- (a) You must give any other recipients of the Work or
- Derivative Works a copy of this License; and
- (b) You must cause any modified files to carry prominent notices
- stating that You changed the files; and
- (c) You must retain, in the Source form of any Derivative Works
- that You distribute, all copyright, patent, trademark, and
- attribution notices from the Source form of the Work,
- excluding those notices that do not pertain to any part of
- the Derivative Works; and
- (d) If the Work includes a "NOTICE" text file as part of its
- distribution, then any Derivative Works that You distribute must
- include a readable copy of the attribution notices contained
- within such NOTICE file, excluding those notices that do not
- pertain to any part of the Derivative Works, in at least one
- of the following places: within a NOTICE text file distributed
- as part of the Derivative Works; within the Source form or
- documentation, if provided along with the Derivative Works; or,
- within a display generated by the Derivative Works, if and
- wherever such third-party notices normally appear. The contents
- of the NOTICE file are for informational purposes only and
- do not modify the License. You may add Your own attribution
- notices within Derivative Works that You distribute, alongside
- or as an addendum to the NOTICE text from the Work, provided
- that such additional attribution notices cannot be construed
- as modifying the License.
- You may add Your own copyright statement to Your modifications and
- may provide additional or different license terms and conditions
- for use, reproduction, or distribution of Your modifications, or
- for any such Derivative Works as a whole, provided Your use,
- reproduction, and distribution of the Work otherwise complies with
- the conditions stated in this License.
- 5. Submission of Contributions. Unless You explicitly state otherwise,
- any Contribution intentionally submitted for inclusion in the Work
- by You to the Licensor shall be under the terms and conditions of
- this License, without any additional terms or conditions.
- Notwithstanding the above, nothing herein shall supersede or modify
- the terms of any separate license agreement you may have executed
- with Licensor regarding such Contributions.
- 6. Trademarks. This License does not grant permission to use the trade
- names, trademarks, service marks, or product names of the Licensor,
- except as required for reasonable and customary use in describing the
- origin of the Work and reproducing the content of the NOTICE file.
- 7. Disclaimer of Warranty. Unless required by applicable law or
- agreed to in writing, Licensor provides the Work (and each
- Contributor provides its Contributions) on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
- implied, including, without limitation, any warranties or conditions
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
- PARTICULAR PURPOSE. You are solely responsible for determining the
- appropriateness of using or redistributing the Work and assume any
- risks associated with Your exercise of permissions under this License.
- 8. Limitation of Liability. In no event and under no legal theory,
- whether in tort (including negligence), contract, or otherwise,
- unless required by applicable law (such as deliberate and grossly
- negligent acts) or agreed to in writing, shall any Contributor be
- liable to You for damages, including any direct, indirect, special,
- incidental, or consequential damages of any character arising as a
- result of this License or out of the use or inability to use the
- Work (including but not limited to damages for loss of goodwill,
- work stoppage, computer failure or malfunction, or any and all
- other commercial damages or losses), even if such Contributor
- has been advised of the possibility of such damages.
- 9. Accepting Warranty or Additional Liability. While redistributing
- the Work or Derivative Works thereof, You may choose to offer,
- and charge a fee for, acceptance of support, warranty, indemnity,
- or other liability obligations and/or rights consistent with this
- License. However, in accepting such obligations, You may act only
- on Your own behalf and on Your sole responsibility, not on behalf
- of any other Contributor, and only if You agree to indemnify,
- defend, and hold each Contributor harmless for any liability
- incurred by, or claims asserted against, such Contributor by reason
- of your accepting any such warranty or additional liability.
- END OF TERMS AND CONDITIONS
- APPENDIX: How to apply the Apache License to your work.
- To apply the Apache License to your work, attach the following
- boilerplate notice, with the fields enclosed by brackets "{}"
- replaced with your own identifying information. (Don't include
- the brackets!) The text should be enclosed in the appropriate
- comment syntax for the file format. We also recommend that a
- file or class name and description of purpose be included on the
- same "printed page" as the copyright notice for easier
- identification within third-party archives.
- Copyright (C) 2013-present SheetJS LLC
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- */
- var nu=Math;function ru(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function iu(e,t,n,r,i){if(0===t)return n;if(1===t)return r;for(var s=2/e,o=r,a=1;a<t;++a)o=r*a*s+i*n,n=r,r=o;return o}function su(e,t,n,r,i){return function(n,s){if(r){if(0===n)return 1==r?-1/0:1/0;if(n<0)return NaN}if(0===s)return e(n);if(1===s)return t(n);if(s<0)return NaN;s|=0;var o=e(n),a=t(n);return iu(n,s,o,a,i)}}var ou=function(){var e=.636619772,t=[57568490574,-13362590354,651619640.7,-11214424.18,77392.33017,-184.9052456].reverse(),n=[57568490411,1029532985,9494680.718,59272.64853,267.8532712,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse();function s(s){var o=0,a=0,l=0,u=s*s;if(s<8)a=ru(t,u),l=ru(n,u),o=a/l;else{var c=s-.785398164;u=64/u,a=ru(r,u),l=ru(i,u),o=nu.sqrt(e/s)*(nu.cos(c)*a-nu.sin(c)*l*8/s)}return o}var o=[72362614232,-7895059235,242396853.1,-2972611.439,15704.4826,-30.16036606].reverse(),a=[144725228442,2300535178,18583304.74,99447.43394,376.9991397,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),u=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function c(t){var n=0,r=0,i=0,s=t*t,c=nu.abs(t)-2.356194491;return Math.abs(t)<8?(r=t*ru(o,s),i=ru(a,s),n=r/i):(s=64/s,r=ru(l,s),i=ru(u,s),n=nu.sqrt(e/nu.abs(t))*(nu.cos(c)*r-nu.sin(c)*i*8/nu.abs(t)),t<0&&(n=-n)),n}return function e(t,n){if(n=Math.round(n),!isFinite(t))return isNaN(t)?t:0;if(n<0)return(n%2?-1:1)*e(t,-n);if(t<0)return(n%2?-1:1)*e(-t,n);if(0===n)return s(t);if(1===n)return c(t);if(0===t)return 0;var r=0;if(t>n)r=iu(t,n,s(t),c(t),-1);else{for(var i=2*nu.floor((n+nu.floor(nu.sqrt(40*n)))/2),o=!1,a=0,l=0,u=1,h=0,d=2/t,m=i;m>0;m--)h=m*d*u-a,a=u,u=h,nu.abs(u)>1e10&&(u*=1e-10,a*=1e-10,r*=1e-10,l*=1e-10),o&&(l+=u),o=!o,m==n&&(r=a);l=2*l-u,r/=l}return r}}(),au=function(){var e=.636619772,t=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),n=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),r=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),i=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse();function s(s){var o=0,a=0,l=0,u=s*s,c=s-.785398164;return s<8?(a=ru(t,u),l=ru(n,u),o=a/l+e*ou(s,0)*nu.log(s)):(u=64/u,a=ru(r,u),l=ru(i,u),o=nu.sqrt(e/s)*(nu.sin(c)*a+nu.cos(c)*l*8/s)),o}var o=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),a=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),l=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),u=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse();function c(t){var n=0,r=0,i=0,s=t*t,c=t-2.356194491;return t<8?(r=t*ru(o,s),i=ru(a,s),n=r/i+e*(ou(t,1)*nu.log(t)-1/t)):(s=64/s,r=ru(l,s),i=ru(u,s),n=nu.sqrt(e/t)*(nu.sin(c)*r+nu.cos(c)*i*8/t)),n}return su(s,c,"BESSELY",1,-1)}(),lu=function(){var e=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),t=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse();function n(n){return n<=3.75?ru(e,n*n/14.0625):nu.exp(nu.abs(n))/nu.sqrt(nu.abs(n))*ru(t,3.75/nu.abs(n))}var r=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),i=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse();function s(e){return e<3.75?e*ru(r,e*e/14.0625):(e<0?-1:1)*nu.exp(nu.abs(e))/nu.sqrt(nu.abs(e))*ru(i,3.75/nu.abs(e))}return function e(t,r){if(r=Math.round(r),0===r)return n(t);if(1===r)return s(t);if(r<0)return NaN;if(0===nu.abs(t))return 0;if(t==1/0)return 1/0;var i,o=0,a=2/nu.abs(t),l=0,u=1,c=0,h=2*nu.round((r+nu.round(nu.sqrt(40*r)))/2);for(i=h;i>0;i--)c=i*a*u+l,l=u,u=c,nu.abs(u)>1e10&&(u*=1e-10,l*=1e-10,o*=1e-10),i==r&&(o=l);return o*=e(t,0)/u,t<0&&r%2?-o:o}}(),uu=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse();function n(n){return n<=2?-nu.log(n/2)*lu(n,0)+ru(e,n*n/4):nu.exp(-n)/nu.sqrt(n)*ru(t,2/n)}var r=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),i=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();function s(e){return e<=2?nu.log(e/2)*lu(e,1)+1/e*ru(r,e*e/4):nu.exp(-e)/nu.sqrt(e)*ru(i,2/e)}return su(n,s,"BESSELK",2,1)}();
- /**
- * @license
- Copyright (c) 2013 jStat
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
- */
- function cu(e){const t=[-1.3026537197817094,.6419697923564902,.019476473204185836,-.00956151478680863,-.000946595344482036,.000366839497852761,42523324806907e-18,-20278578112534e-18,-1624290004647e-18,130365583558e-17,1.5626441722e-8,-8.5238095915e-8,6.529054439e-9,5.059343495e-9,-9.91364156e-10,-2.27365122e-10,96467911e-18,2394038e-18,-6886027e-18,894487e-18,313092e-18,-112708e-18,381e-18,7106e-18,-1523e-18,-94e-18,121e-18,-28e-18];let n,r,i,s,o=t.length-1,a=!1,l=0,u=0;if(0===e)return 0;for(e<0&&(e=-e,a=!0),n=2/(2+e),r=4*n-2;o>0;o--)i=l,l=r*l-u+t[o],u=i;return s=n*Math.exp(-e*e+.5*(t[0]+r*l)-u),a?s-1:1-s}function hu(e){return 1-cu(e)}function du(e){let t,n,r,i,s=0;if(e>=2)return-100;if(e<=0)return 100;for(i=e<1?e:2-e,r=Math.sqrt(-2*Math.log(i/2)),t=-.70711*((2.30753+.27061*r)/(1+r*(.99229+.04481*r))-r);s<2;s++)n=hu(t)-i,t+=n/(1.1283791670955126*Math.exp(-t*t)-t*n);return e<1?t:-t}const mu={pdf:(e,t)=>e<0?0:t*Math.exp(-t*e),cdf:(e,t)=>e<0?0:1-Math.exp(-t*e)};function fu(e){const t=[-1.716185138865495,24.76565080557592,-379.80425647094563,629.3311553128184,866.9662027904133,-31451.272968848367,-36144.413418691176,66456.14382024054],n=[-30.8402300119739,315.35062697960416,-1015.1563674902192,-3107.771671572311,22538.11842098015,4755.846277527881,-134659.9598649693,-115132.2596755535];let r,i,s,o,a=!1,l=0,u=0,c=0,h=e;if(e>171.6243769536076)return 1/0;if(h<=0){if(o=h%1,!o)return 1/0;a=(1&h?-1:1)*Math.PI/Math.sin(Math.PI*o),h=1-h}for(s=h,i=h<1?h++:(h-=l=(0|h)-1)-1,r=0;r<8;++r)c=(c+t[r])*i,u=u*i+n[r];if(o=c/u+1,s<h)o/=s;else if(s>h)for(r=0;r<l;++r)o*=h,h++;return a&&(o=a/o),o}const pu={pdf:function(e,t,n){return e<0?0:0===e&&1===t?1/n:Math.exp((t-1)*Math.log(e)-e/n-gu(t)-t*Math.log(n))},cdf:function(e,t,n){return e<0?0:yu(t,e/n)},inv:function(e,t,n){return wu(e,t)*n}};function gu(e){let t=0;const n=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];let r,i,s,o=1.000000000190015;for(s=(i=r=e)+5.5,s-=(r+.5)*Math.log(s);t<6;t++)o+=n[t]/++i;return Math.log(2.5066282746310007*o/r)-s}function yu(e,t){const n=gu(e);let r=e,i=1/e,s=i,o=t+1-e,a=1/1e-30,l=1/o,u=l,c=1;const h=-~(8.5*Math.log(e>=1?e:1/e)+.4*e+17);let d;if(t<0||e<=0)return NaN;if(t<e+1){for(;c<=h;c++)i+=s*=t/++r;return i*Math.exp(-t+e*Math.log(t)-n)}for(;c<=h;c++)d=-c*(c-e),o+=2,l=d*l+o,a=o+d/a,l=1/l,u*=l*a;return 1-u*Math.exp(-t+e*Math.log(t)-n)}function wu(e,t){let n=0;const r=t-1,i=1e-8,s=gu(t);let o,a,l,u,c,h,d;if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(h=Math.log(r),d=Math.exp(r*(h-1)-s),c=e<.5?e:1-e,l=Math.sqrt(-2*Math.log(c)),o=(2.30753+.27061*l)/(1+l*(.99229+.04481*l))-l,e<.5&&(o=-o),o=Math.max(.001,t*Math.pow(1-1/(9*t)-o/(3*Math.sqrt(t)),3))):(l=1-t*(.253+.12*t),o=e<l?Math.pow(e/l,1/t):1-Math.log(1-(e-l)/(1-l)));n<12;n++){if(o<=0)return 0;if(a=yu(t,o)-e,l=t>1?d*Math.exp(-(o-r)+r*(Math.log(o)-h)):Math.exp(-o+r*Math.log(o)-s),u=a/l,o-=l=u/(1-.5*Math.min(1,u*((t-1)/o-1))),o<=0&&(o=.5*(o+l)),Math.abs(l)<i*o)break}return o}const bu={pdf:function(e,t,n){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(e-t,2)/(2*n*n))},cdf:function(e,t,n){return.5*(1+cu((e-t)/Math.sqrt(2*n*n)))},inv:function(e,t,n){return-1.4142135623730951*n*du(2*e)+t}},vu={pdf:function(e,t,n){return e>1||e<0?0:1==t&&1==n?1:t<512&&n<512?Math.pow(e,t-1)*Math.pow(1-e,n-1)/_u(t,n):Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-Su(t,n))},cdf:function(e,t,n){return e>1||e<0?+(e>1):Cu(e,t,n)},inv:function(e,t,n){return Eu(e,t,n)}};function _u(e,t){if(!(e<=0||t<=0))return e+t>170?Math.exp(Su(e,t)):fu(e)*fu(t)/fu(e+t)}function Su(e,t){return gu(e)+gu(t)-gu(e+t)}function Eu(e,t,n){var r,i,s,o,a,l,u,c,h,d,m,f=1e-8,p=t-1,g=n-1,y=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(s=e<.5?e:1-e,o=Math.sqrt(-2*Math.log(s)),u=(2.30753+.27061*o)/(1+o*(.99229+.04481*o))-o,e<.5&&(u=-u),c=(u*u-3)/6,h=2/(1/(2*t-1)+1/(2*n-1)),d=u*Math.sqrt(c+h)/h-(1/(2*n-1)-1/(2*t-1))*(c+5/6-2/(3*h)),u=t/(t+n*Math.exp(2*d))):(r=Math.log(t/(t+n)),i=Math.log(n/(t+n)),o=Math.exp(t*r)/t,a=Math.exp(n*i)/n,d=o+a,u=e<o/d?Math.pow(t*d*e,1/t):1-Math.pow(n*d*(1-e),1/n)),m=-gu(t)-gu(n)+gu(t+n);y<10;y++){if(0===u||1===u)return u;if(l=Cu(u,t,n)-e,o=Math.exp(p*Math.log(u)+g*Math.log(1-u)+m),a=l/o,u-=o=a/(1-.5*Math.min(1,a*(p/u-g/(1-u)))),u<=0&&(u=.5*(u+o)),u>=1&&(u=.5*(u+o+1)),Math.abs(o)<f*u&&y>0)break}return u}function Cu(e,t,n){var r=0===e||1===e?0:Math.exp(gu(t+n)-gu(t)-gu(n)+t*Math.log(e)+n*Math.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*Mu(e,t,n)/t:1-r*Mu(1-e,n,t)/n)}function Mu(e,t,n){var r,i,s,o,a=1e-30,l=1,u=t+n,c=t+1,h=t-1,d=1,m=1-u*e/c;for(Math.abs(m)<a&&(m=a),m=1/m,o=m;l<=100;l++)if(r=2*l,i=l*(n-l)*e/((h+r)*(t+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,o*=m*d,i=-(t+l)*(u+l)*e/((t+r)*(c+r)),m=1+i*m,Math.abs(m)<a&&(m=a),d=1+i/d,Math.abs(d)<a&&(d=a),m=1/m,s=m*d,o*=s,Math.abs(s-1)<3e-7)break;return o}const Tu={pdf:function(e,t,n){return 0===n||1===n?t*n===e?1:0:Ou(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)},cdf:function(e,t,n){var r,i=1e-10;if(e<0)return 0;if(e>=t)return 1;if(n<0||n>1||t<=0)return NaN;e=Math.floor(e);var s=n,o=e+1,a=t-e,l=o+a,u=Math.exp(gu(l)-gu(a)-gu(o)+o*Math.log(s)+a*Math.log(1-s));return r=s<(o+1)/(l+2)?u*Ru(s,o,a,i):1-u*Ru(1-s,a,o,i),Math.round(1/i*(1-r))/(1/i)}};function Ru(e,t,n,r){var i,s=0,o=1,a=1,l=1,u=0,c=0;while(Math.abs((a-c)/a)>r)c=a,i=-(t+u)*(t+n+u)*e/(t+2*u)/(t+2*u+1),s=a+i*s,o=l+i*o,u+=1,i=u*(n-u)*e/(t+2*u-1)/(t+2*u),a=s+i*a,l=o+i*l,s/=l,o/=l,a/=l,l=1;return a/t}function Ou(e,t){return e>170||t>170?Math.exp(Nu(e,t)):Lu(e)/Lu(t)/Lu(e-t)}function Nu(e,t){return Au(e)-Au(t)-Au(e-t)}function Au(e){return e<0?NaN:gu(e+1)}function Lu(e){return e<0?NaN:fu(e+1)}const Iu={pdf:function(e,t){return e<0?0:0===e&&2===t?.5:Math.exp((t/2-1)*Math.log(e)-e/2-t/2*Math.log(2)-gu(t/2))},cdf:function(e,t){return e<0?0:yu(t/2,e/2)},inv:function(e,t){return 2*wu(e,.5*t)}},ku={pdf:function(e,t,n){var r,i,s;return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/_u(t/2,n/2)*Math.pow(t/n,t/2)*Math.pow(e,t/2-1)*Math.pow(1+t/n*e,-(t+n)/2):(r=t*e/(n+e*t),i=n/(n+e*t),s=t*i/2,s*Tu.pdf((t-2)/2,(t+n-2)/2,r))},cdf:function(e,t,n){return e<0?0:Cu(t*e/(t*e+n),t/2,n/2)},inv:function(e,t,n){return n/(t*(1/Eu(e,t/2,n/2)-1))}},xu={pdf:function(e,t,n){return e<0||t<0||n<0?0:n/t*Math.pow(e/t,n-1)*Math.exp(-Math.pow(e/t,n))},cdf:function(e,t,n){return e<0?0:1-Math.exp(-Math.pow(e/t,n))}},Du={pdf:function(e,t){return t<0||e%1!==0||e<0?0:Math.pow(t,e)*Math.exp(-t)/Lu(e)},cdf:function(e,t){var n=0;if(e<0)return 0;for(var r=0;n<=e;n++)r+=Du.pdf(n,t);return r}},Hu={pdf:function(e,t,n,r){if(e<0||e<n-(t-r))return 0;if(e>r||e>n)return 0;if(2*n>t)return 2*r>t?Hu.pdf(t-n-r+e,t,t-n,t-r):Hu.pdf(r-e,t,t-n,r);if(2*r>t)return Hu.pdf(n-e,t,n,t-r);if(n<r)return Hu.pdf(e,t,r,n);for(var i=1,s=0,o=0;o<e;o++){while(i>1&&s<r)i*=1-n/(t-s),s++;i*=(r-o)*(n-o)/((o+1)*(t-n-r+o+1))}for(;s<r;s++)i*=1-n/(t-s);return Math.min(1,Math.max(0,i))},cdf:function e(t,n,r,i){if(t<0||t<r-(n-i))return 0;if(t>=i||t>=r)return 1;if(2*r>n)return 2*i>n?e(n-r-i+t,n,n-r,n-i):1-Hu.cdf(i-t-1,n,n-r,i);if(2*i>n)return 1-Hu.cdf(r-t-1,n,r,n-i);if(r<i)return Hu.cdf(t,n,i,r);for(var s=1,o=1,a=0,l=0;l<t;l++){while(s>1&&a<i){var u=1-r/(n-a);o*=u,s*=u,a++}o*=(i-l)*(r-l)/((l+1)*(n-r-i+l+1)),s+=o}for(;a<i;a++)s*=1-r/(n-a);return Math.min(1,Math.max(0,s))}},Pu={pdf:function(e,t){return t=t>1e100?1e100:t,1/(Math.sqrt(t)*_u(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)},cdf:function(e,t){var n=t/2;return Cu((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),n,n)},inv:function(e,t){var n=Eu(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n}},ju={pdf:function(e,t,n){return e<=0?0:Math.exp(-Math.log(e)-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(Math.log(e)-t,2)/(2*n*n))},cdf:function(e,t,n){return e<0?0:.5+.5*cu((Math.log(e)-t)/Math.sqrt(2*n*n))},inv:function(e,t,n){return Math.exp(-1.4142135623730951*n*du(2*e)+t)}},Fu={pdf:function(e,t,n){return e===e>>>0&&(e<0?0:Ou(e+t-1,t-1)*Math.pow(1-n,e)*Math.pow(n,t))},cdf:function(e,t,n){var r=0,i=0;if(e<0)return 0;for(;i<=e;i++)r+=Fu.pdf(i,t,n);return r}};function Yu(e){var t=0,n=e.length;while(--n>=0)t+=e[n];return t}function Uu(e){return Yu(e)/e.length}function Vu(e){var t,n=Uu(e),r=0,i=e.length;while(--i>=0)t=e[i]-n,r+=t*t;return r}function Bu(e,t){return Vu(e)/(e.length-(t?1:0))}function Wu(e,t){return Math.sqrt(Bu(e,t))}function zu(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(bu.inv(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(bu.inv(t[1]/2,0,1)*Wu(t[2])/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Gu(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Pu.inv(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(Pu.inv(t[1]/2,t[2].length-1)*Wu(t[2],!0)/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}function Ku(e){var t=1,n=e.length;while(--n>=0)t*=e[n];return t}function Xu(e){return Math.pow(Ku(e),1/e.length)}function $u(e,t){var n,r=Uu(e),i=Uu(t),s=e.length,o=new Array(s);for(n=0;n<s;n++)o[n]=(e[n]-r)*(t[n]-i);return Yu(o)/(s-1)}function qu(e,t){return $u(e,t)/Wu(e,1)/Wu(t,1)}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */class Ju extends Zr{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),(e,t)=>void 0===t?cu(e):cu(t)-cu(e))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),hu)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),(e,t,n)=>n?mu.cdf(e,t):mu.pdf(e,t))}fisher(e,t){return this.runFunction(e.args,t,this.metadata("FISHER"),e=>Math.log((1+e)/(1-e))/2)}fisherinv(e,t){return this.runFunction(e.args,t,this.metadata("FISHERINV"),e=>1-2/(Math.exp(2*e)+1))}gamma(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA"),fu)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),(e,t,n,r)=>r?pu.cdf(e,t,n):pu.pdf(e,t,n))}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),gu)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),pu.inv)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),e=>bu.cdf(e,0,1)-.5)}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),(e,t,n,r,i,s)=>e<=i?new lr(Vn.NUM,Re.ValueSmall):e>=s?new lr(Vn.NUM,Re.ValueLarge):(e=(e-i)/(s-i),r?vu.cdf(e,t,n):vu.pdf(e,t,n)))}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),(e,t,n,r,i)=>r>=i?new lr(Vn.NUM,Re.WrongOrder):vu.inv(e,t,n)*(i-r)+r)}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),(e,t,n,r)=>e>t?new lr(Vn.NUM,Re.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),r?Tu.cdf(e,t,n):Tu.pdf(e,t,n)))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),(e,t,n)=>{e=Math.trunc(e);let r=-1,i=e;while(i>r+1){const s=Math.trunc((r+i)/2);Tu.cdf(s,e,t)>=n?i=s:r=s}return i})}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),(e,t)=>lu(e,Math.trunc(t)))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),(e,t)=>ou(e,Math.trunc(t)))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),(e,t)=>uu(e,Math.trunc(t)))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),(e,t)=>au(e,Math.trunc(t)))}chisqdist(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Iu.cdf(e,t):Iu.pdf(e,t)))}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),(e,t)=>1-Iu.cdf(e,Math.trunc(t)))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),(e,t)=>Iu.inv(e,Math.trunc(t)))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),(e,t)=>Iu.inv(1-e,Math.trunc(t)))}fdist(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST"),(e,t,n,r)=>(t=Math.trunc(t),n=Math.trunc(n),r?ku.cdf(e,t,n):ku.pdf(e,t,n)))}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),(e,t,n)=>1-ku.cdf(e,Math.trunc(t),Math.trunc(n)))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),(e,t,n)=>ku.inv(e,Math.trunc(t),Math.trunc(n)))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),(e,t,n)=>ku.inv(1-e,Math.trunc(t),Math.trunc(n)))}weibulldist(e,t){return this.runFunction(e.args,t,this.metadata("WEIBULL.DIST"),(e,t,n,r)=>r?xu.cdf(e,n,t):xu.pdf(e,n,t))}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),(e,t,n)=>(e=Math.trunc(e),n?Du.cdf(e,t):Du.pdf(e,t)))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),(e,t,n,r,i)=>e>t||e>n||t>r||n>r||e+r<n+t?new lr(Vn.NUM,Re.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),n=Math.trunc(n),r=Math.trunc(r),i?Hu.cdf(e,r,n,t):Hu.pdf(e,r,n,t)))}tdist(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST"),(e,t,n)=>(t=Math.trunc(t),n?Pu.cdf(e,t):Pu.pdf(e,t)))}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),(e,t)=>2*(1-Pu.cdf(e,Math.trunc(t))))}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),(e,t)=>1-Pu.cdf(e,Math.trunc(t)))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),(e,t,n)=>n*(1-Pu.cdf(e,Math.trunc(t))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),(e,t)=>Pu.inv(e,Math.trunc(t)))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),(e,t)=>Pu.inv(1-e/2,Math.trunc(t)))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),(e,t,n,r)=>r?ju.cdf(e,t,n):ju.pdf(e,t,n))}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),(e,t,n)=>ju.inv(e,t,n))}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),(e,t,n,r)=>r?bu.cdf(e,t,n):bu.pdf(e,t,n))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),(e,t,n)=>bu.inv(e,t,n))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),(e,t)=>t?bu.cdf(e,0,1):bu.pdf(e,0,1))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),e=>bu.inv(e,0,1))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),e=>bu.pdf(e,0,1))}negbinomdist(e,t){return this.runFunction(e.args,t,this.metadata("NEGBINOM.DIST"),(e,t,n,r)=>(e=Math.trunc(e),t=Math.trunc(t),r?Fu.cdf(e,t,n):Fu.pdf(e,t,n)))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),(e,t,n)=>zu(1,e,t,Math.trunc(n))[1]-1)}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),(e,t,n)=>(n=Math.trunc(n),1===n?new lr(Vn.DIV_BY_ZERO):Gu(1,e,t,n)[1]-1))}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),(e,t,n)=>(e-t)/n)}}Ju.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:Qr.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:Qr.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:Qr.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:Qr.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:Qr.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:Qr.NUMBER,minValue:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:Qr.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,maxValue:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,defaultValue:0},{argumentType:Qr.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10},{argumentType:Qr.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,maxValue:1},{argumentType:Qr.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:Qr.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:1},{argumentType:Qr.NUMBER,minValue:0,maxValue:1},{argumentType:Qr.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:Qr.NUMBER,greaterThan:0,lessThan:1},{argumentType:Qr.NUMBER,greaterThan:0},{argumentType:Qr.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,greaterThan:0}]}},Ju.aliases={NEGBINOMDIST:"NEGBINOM.DIST",EXPONDIST:"EXPON.DIST",BETADIST:"BETA.DIST",NORMDIST:"NORM.DIST",NORMINV:"NORM.INV",NORMSDIST:"NORM.S.DIST",NORMSINV:"NORM.S.INV",LOGNORMDIST:"LOGNORM.DIST",LOGINV:"LOGNORM.INV",TINV:"T.INV.2T",HYPGEOMDIST:"HYPGEOM.DIST",POISSON:"POISSON.DIST",WEIBULL:"WEIBULL.DIST",FINV:"F.INV.RT",FDIST:"F.DIST.RT",CHIDIST:"CHISQ.DIST.RT",CHIINV:"CHISQ.INV.RT",GAMMADIST:"GAMMA.DIST","GAMMALN.PRECISE":"GAMMALN",GAMMAINV:"GAMMA.INV",BETAINV:"BETA.INV",BINOMDIST:"BINOM.DIST",CONFIDENCE:"CONFIDENCE.NORM",CRITBINOM:"BINOM.INV",WEIBULLDIST:"WEIBULL.DIST",TINV2T:"T.INV.2T",TDISTRT:"T.DIST.RT",TDIST2T:"T.DIST.2T",FINVRT:"F.INV.RT",FDISTRT:"F.DIST.RT",CHIDISTRT:"CHISQ.DIST.RT",CHIINVRT:"CHISQ.INV.RT",LOGNORMINV:"LOGNORM.INV",POISSONDIST:"POISSON.DIST"};
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- class Qu extends Zr{fact(e,t){return this.runFunction(e.args,t,this.metadata("FACT"),e=>{e=Math.trunc(e);let t=1;for(let n=1;n<=e;n++)t*=n;return t})}factdouble(e,t){return this.runFunction(e.args,t,this.metadata("FACTDOUBLE"),e=>{e=Math.trunc(e);let t=1;for(let n=e;n>=1;n-=2)t*=n;return t})}combin(e,t){return this.runFunction(e.args,t,this.metadata("COMBIN"),(e,t)=>t>e?new lr(Vn.NUM,Re.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),Zu(e,t)))}combina(e,t){return this.runFunction(e.args,t,this.metadata("COMBINA"),(e,t)=>(e=Math.trunc(e),t=Math.trunc(t),e+t-1>=1030?new lr(Vn.NUM,Re.ValueLarge):0===e&&0===t?1:Zu(e+t-1,t)))}gcd(e,t){return this.runFunction(e.args,t,this.metadata("GCD"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=0;for(const r of t){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);n=ec(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Vn.NUM,Re.ValueLarge):n})}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof lr)return t;let n=1;for(const r of t){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);n=tc(n,Math.trunc(r))}return n>Number.MAX_SAFE_INTEGER?new lr(Vn.NUM,Re.ValueLarge):n})}mround(e,t){return this.runFunction(e.args,t,this.metadata("MROUND"),(e,t)=>0===t?0:e>0&&t<0||e<0&&t>0?new lr(Vn.NUM,Re.DistinctSigns):Math.round(e/t)*t)}multinomial(e,t){return this.runFunction(e.args,t,this.metadata("MULTINOMIAL"),(...e)=>{let t=0,n=1;for(let r of e){if(r<0)return new lr(Vn.NUM,Re.ValueSmall);r=Math.trunc(r);for(let e=1;e<=r;e++)n*=(t+e)/e;t+=r}return Math.round(n)})}quotient(e,t){return this.runFunction(e.args,t,this.metadata("QUOTIENT"),(e,t)=>0===t?new lr(Vn.DIV_BY_ZERO):Math.trunc(e/t))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToOnlyNumbersDropNulls(r.valuesFromTopLeftCorner());if(i instanceof lr)return i;let s=0;i.reverse();for(const o of i)s*=Math.pow(e,n),s+=o;return s*Math.pow(e,t)})}sign(e,t){return this.runFunction(e.args,t,this.metadata("SIGN"),e=>e>0?1:e<0?-1:0)}sumx2my2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2MY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)-Math.pow(t,2))}return s})}sumx2py2(e,t){return this.runFunction(e.args,t,this.metadata("SUMX2PY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e,2)+Math.pow(t,2))}return s})}sumxmy2(e,t){return this.runFunction(e.args,t,this.metadata("SUMXMY2"),(e,t)=>{const n=e.valuesFromTopLeftCorner(),r=t.valuesFromTopLeftCorner();if(n.length!==r.length)return new lr(Vn.NA,Re.EqualLength);const i=n.length;let s=0;for(let o=0;o<i;o++){const e=n[o],t=r[o];if(e instanceof lr)return e;if(t instanceof lr)return t;"number"===typeof e&&"number"===typeof t&&(s+=Math.pow(e-t,2))}return s})}}function Zu(e,t){2*t>e&&(t=e-t);let n=1;for(let r=1;r<=t;r++)n*=(e-t+r)/r;return Math.round(n)}function ec(e,t){e<t&&([e,t]=[t,e]);while(t>0)[e,t]=[t,e%t];return e}function tc(e,t){return 0===e||0===t?0:e*(t/ec(e,t))}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */Qu.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:Qr.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:Qr.NUMBER,minValue:0,lessThan:1030},{argumentType:Qr.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:Qr.NUMBER,minValue:0},{argumentType:Qr.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:Qr.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:Qr.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]}};class nc extends Zr{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),(e,t,n)=>"i"!==n&&"j"!==n?new lr(Vn.VALUE,Re.ShouldBeIorJ):Lr([e,t],n))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),dc)}imaginary(e,t){return this.runFunction(e.args,t,this.metadata("IMAGINARY"),([e,t])=>t)}imreal(e,t){return this.runFunction(e.args,t,this.metadata("IMREAL"),([e,t])=>e)}imargument(e,t){return this.runFunction(e.args,t,this.metadata("IMARGUMENT"),([e,t])=>0===e&&0===t?new lr(Vn.DIV_BY_ZERO):Math.atan2(t,e))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),([e,t])=>Lr([e,-t]))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),e=>Lr(ac(e)))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),e=>Lr(lc(e)))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),e=>Lr(oc(ac(e),uc(e))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),e=>Lr(oc([1,0],uc(e))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),e=>Lr(oc([1,0],cc(e))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),e=>Lr(oc([1,0],ac(e))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),e=>Lr(oc([1,0],lc(e))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),e=>Lr(uc(e)))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),e=>Lr(cc(e)))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),e=>Lr(oc(uc(e),ac(e))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),(e,t)=>Lr(oc(e,t)))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[1,0];for(const r of t)n=sc(n,r);return Lr(n)})}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),(...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof lr)return t;let n=[0,0];for(const r of t)n=rc(n,r);return Lr(n)})}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),(e,t)=>Lr(ic(e,t)))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),e=>Lr(hc(e)))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),e=>Lr(mc(e)))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),e=>{const[t,n]=mc(e),r=Math.log(10);return Lr([t/r,n/r])})}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),e=>{const[t,n]=mc(e),r=Math.log(2);return Lr([t/r,n/r])})}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),(e,t)=>Lr(fc(e,t)))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),e=>Lr(fc(e,.5)))}}function rc([e,t],[n,r]){return[e+n,t+r]}function ic([e,t],[n,r]){return[e-n,t-r]}function sc([e,t],[n,r]){return[e*n-t*r,e*r+n*t]}function oc([e,t],[n,r]){const i=Math.pow(n,2)+Math.pow(r,2),[s,o]=sc([e,t],[n,-r]);return[s/i,o/i]}function ac([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function lc([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function uc([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function cc([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function hc([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function dc([e,t]){return Math.sqrt(e*e+t*t)}function mc([e,t]){return[Math.log(dc([e,t])),Math.atan2(t,e)]}function fc(e,t){const[n,r]=mc(e);return hc([t*n,t*r])}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */nc.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER},{argumentType:Qr.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:Qr.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:Qr.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:Qr.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:Qr.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:Qr.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:Qr.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:Qr.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:Qr.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:Qr.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:Qr.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:Qr.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:Qr.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:Qr.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:Qr.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:Qr.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:Qr.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:Qr.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:Qr.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:Qr.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:Qr.COMPLEX},{argumentType:Qr.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:Qr.COMPLEX}]}};class pc extends Zr{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.DIV_BY_ZERO);const n=Uu(t);return t.reduce((e,t)=>e+Math.abs(t-n),0)/t.length})}devsq(e,t){return this.runFunction(e.args,t,this.metadata("DEVSQ"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof lr?t:0===t.length?0:Vu(t)})}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.NUM,Re.OneValue);for(const n of t)if(n<=0)return new lr(Vn.NUM,Re.ValueSmall);return Xu(t)})}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;if(0===t.length)return new lr(Vn.NUM,Re.OneValue);for(const n of t)if(n<=0)return new lr(Vn.NUM,Re.ValueSmall);return t.length/t.reduce((e,t)=>e+1/t,0)})}correl(e,t){return this.runFunction(e.args,t,this.metadata("CORREL"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):qu(n[0],n[1])})}rsq(e,t){return this.runFunction(e.args,t,this.metadata("RSQ"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):Math.pow(qu(n[0],n[1]),2)})}covariancep(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.P"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<1?new lr(Vn.DIV_BY_ZERO,Re.OneValue):1===r?0:$u(n[0],n[1])*(r-1)/r})}covariances(e,t){return this.runFunction(e.args,t,this.metadata("COVARIANCE.S"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$u(n[0],n[1])})}ztest(e,t){return this.runFunction(e.args,t,this.metadata("Z.TEST"),(e,t,n)=>{const r=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner());if(r instanceof lr)return r;const i=r.length;if(void 0===n){if(i<2)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);n=Wu(r,!0)}return i<1?new lr(Vn.NA,Re.OneValue):0===n?new lr(Vn.DIV_BY_ZERO):1-bu.cdf((Uu(r)-t)/(n/Math.sqrt(i)),0,1)})}ftest(e,t){return this.runFunction(e.args,t,this.metadata("F.TEST"),(e,t)=>{const n=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),r=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(n instanceof lr)return n;if(r instanceof lr)return r;if(n.length<=1||r.length<=1)return new lr(Vn.DIV_BY_ZERO);const i=Bu(n,!0),s=Bu(r,!0);if(0===i||0===s)return new lr(Vn.DIV_BY_ZERO);const o=i/s,a=ku.cdf(o,n.length-1,r.length-1);return 2*Math.min(a,1-a)})}steyx(e,t){return this.runFunction(e.args,t,this.metadata("STEYX"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=2?new lr(Vn.DIV_BY_ZERO,Re.ThreeValues):Math.sqrt((Vu(n[0])-Math.pow($u(n[0],n[1])*(r-1),2)/Vu(n[1]))/(r-2))})}slope(e,t){return this.runFunction(e.args,t,this.metadata("SLOPE"),(e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new lr(Vn.NA,Re.EqualLength);const n=gc(e,t);if(n instanceof lr)return n;const r=n[0].length;return r<=1?new lr(Vn.DIV_BY_ZERO,Re.TwoValues):$u(n[0],n[1])*(r-1)/Vu(n[1])})}chisqtest(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.TEST"),(e,t)=>{const n=e.height(),r=e.width();if(t.height()!==n||t.width()!==r)return new lr(Vn.NA,Re.EqualLength);const i=gc(e,t);if(i instanceof lr)return i;if(i[0].length<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);let s=0;for(let o=0;o<i[0].length;o++){if(0===i[1][o])return new lr(Vn.DIV_BY_ZERO);s+=Math.pow(i[0][o]-i[1][o],2)/i[1][o]}return s<0?new lr(Vn.NUM,Re.NaN):1-Iu.cdf(s,n>1&&r>1?(n-1)*(r-1):n*r-1)})}ttest(e,t){return this.runFunction(e.args,t,this.metadata("T.TEST"),(e,t,n,r)=>{const i=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),s=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(i instanceof lr)return i;if(s instanceof lr)return s;const o=i.length,a=s.length;if(1===r){if(a!==o)return new lr(Vn.NA,Re.EqualLength);if(o<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=Array(o);for(let n=0;n<o;n++)e[n]=i[n]-s[n];const t=Wu(e,!0);if(0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs(Math.sqrt(o)*Uu(e)/t);return n*(1-Pu.cdf(r,o-1))}if(2===r){if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=(Vu(i)+Vu(s))/(o+a-2);if(0===e)return new lr(Vn.DIV_BY_ZERO);const t=Math.abs((Uu(i)-Uu(s))/Math.sqrt(e*(1/o+1/a)));return n*(1-Pu.cdf(t,o+a-2))}{if(o<=1||a<=1)return new lr(Vn.DIV_BY_ZERO,Re.TwoValues);const e=Bu(i,!0),t=Bu(s,!0);if(0===e&&0===t)return new lr(Vn.DIV_BY_ZERO);const r=Math.abs((Uu(i)-Uu(s))/Math.sqrt(e/o+t/a)),l=Math.pow(e/o+t/a,2)/(Math.pow(e/o,2)/(o-1)+Math.pow(t/a,2)/(a-1));return n*(1-Pu.cdf(r,l))}})}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Vn.DIV_BY_ZERO,Re.ThreeValues);const r=Uu(t),i=Wu(t,!0);return 0===i?new lr(Vn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)*n/(n-1)/(n-2)})}skewp(e,t){return this.runFunction(e.args,t,this.metadata("SKEW.P"),(...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof lr)return t;const n=t.length;if(n<3)return new lr(Vn.DIV_BY_ZERO,Re.ThreeValues);const r=Uu(t),i=Wu(t,!1);return 0===i?new lr(Vn.DIV_BY_ZERO):t.reduce((e,t)=>e+Math.pow((t-r)/i,3),0)/n})}}function gc(e,t){const n=e.iterateValuesFromTopLeftCorner(),r=t.iterateValuesFromTopLeftCorner();let i,s;const o=[],a=[];while(i=n.next(),s=r.next(),!i.done&&!s.done){const e=i.value,t=s.value;if(e instanceof lr)return e;if(t instanceof lr)return t;At(e)&&At(t)&&(o.push(St(e)),a.push(St(t)))}return[o,a]}
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */
- /**
- * @license
- * Copyright (c) 2024 Handsoncode. All rights reserved.
- */pc.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.NUMBER},{argumentType:Qr.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:Qr.RANGE},{argumentType:Qr.RANGE},{argumentType:Qr.INTEGER,minValue:1,maxValue:2},{argumentType:Qr.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:Qr.ANY}],repeatLastArgs:1}},pc.aliases={COVAR:"COVARIANCE.P",FTEST:"F.TEST",PEARSON:"CORREL",ZTEST:"Z.TEST",CHITEST:"CHISQ.TEST",TTEST:"T.TEST",COVARIANCEP:"COVARIANCE.P",COVARIANCES:"COVARIANCE.S",SKEWP:"SKEW.P"};class yc extends ha{}yc.HyperFormula=ha,yc.ErrorType=Vn,yc.CellError=lr,yc.CellType=Bn,yc.CellValueType=nr,yc.CellValueDetailedType=rr,yc.DetailedCellError=ii,yc.ExportedCellChange=Ro,yc.ExportedNamedExpressionChange=Oo,yc.ConfigValueTooBigError=ln,yc.ConfigValueTooSmallError=an,yc.EvaluationSuspendedError=cn,yc.ExpectedOneOfValuesError=un,yc.ExpectedValueOfTypeError=sn,yc.ArraySize=ei,yc.SimpleRangeValue=Ht,yc.EmptyValue=_t,yc.FunctionPlugin=Zr,yc.FunctionArgumentType=Qr,yc.FunctionPluginValidationError=pn,yc.InvalidAddressError=Kt,yc.InvalidArgumentsError=Xt,yc.LanguageNotRegisteredError=mn,yc.LanguageAlreadyRegisteredError=fn,yc.MissingTranslationError=hn,yc.NamedExpressionDoesNotExistError=Qt,yc.NamedExpressionNameIsAlreadyTakenError=qt,yc.NamedExpressionNameIsInvalidError=Jt,yc.NoOperationToRedoError=en,yc.NoOperationToUndoError=Zt,yc.NoRelativeAddressesAllowedError=bn,yc.NoSheetWithIdError=Vt,yc.NoSheetWithNameError=Bt,yc.NotAFormulaError=Gt,yc.NothingToPasteError=tn,yc.ProtectedFunctionTranslationError=dn,yc.SheetNameAlreadyTakenError=Wt,yc.SheetSizeLimitExceededError=zt,yc.SourceLocationHasArrayError=yn,yc.TargetLocationHasArrayError=wn,yc.UnableToParseError=rn;const wc=ma.defaultConfig.language;ha.registerLanguage(wc,wa),ha.languages[wa.langCode]=wa;for(const bc of Object.getOwnPropertyNames(s))bc.startsWith("_")||ha.registerFunctionPlugin(s[bc])},cef7:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n("d06e");var r=n("9f10"),i=n("81ea");class s extends r["a"]{constructor(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];super(e)}getHiddenIndexes(){return Object(i["arrayReduce"])(this.getValues(),(e,t,n)=>(t&&e.push(n),e),[])}}},cf1e9:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={words:{ss:["sekunda","sekunde","sekundi"],m:["jedan minut","jednog minuta"],mm:["minut","minuta","minuta"],h:["jedan sat","jednog sata"],hh:["sat","sata","sati"],d:["jedan dan","jednog dana"],dd:["dan","dana","dana"],M:["jedan mesec","jednog meseca"],MM:["mesec","meseca","meseci"],y:["jednu godinu","jedne godine"],yy:["godinu","godine","godina"]},correctGrammaticalCase:function(e,t){return e%10>=1&&e%10<=4&&(e%100<10||e%100>=20)?e%10===1?t[0]:t[1]:t[2]},translate:function(e,n,r,i){var s,o=t.words[r];return 1===r.length?"y"===r&&n?"jedna godina":i||n?o[0]:o[1]:(s=t.correctGrammaticalCase(e,o),"yy"===r&&n&&"godinu"===s?e+" godina":e+" "+s)}},n=e.defineLocale("sr",{months:"januar_februar_mart_april_maj_jun_jul_avgust_septembar_oktobar_novembar_decembar".split("_"),monthsShort:"jan._feb._mar._apr._maj_jun_jul_avg._sep._okt._nov._dec.".split("_"),monthsParseExact:!0,weekdays:"nedelja_ponedeljak_utorak_sreda_četvrtak_petak_subota".split("_"),weekdaysShort:"ned._pon._uto._sre._čet._pet._sub.".split("_"),weekdaysMin:"ne_po_ut_sr_če_pe_su".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"D. M. YYYY.",LL:"D. MMMM YYYY.",LLL:"D. MMMM YYYY. H:mm",LLLL:"dddd, D. MMMM YYYY. H:mm"},calendar:{sameDay:"[danas u] LT",nextDay:"[sutra u] LT",nextWeek:function(){switch(this.day()){case 0:return"[u] [nedelju] [u] LT";case 3:return"[u] [sredu] [u] LT";case 6:return"[u] [subotu] [u] LT";case 1:case 2:case 4:case 5:return"[u] dddd [u] LT"}},lastDay:"[juče u] LT",lastWeek:function(){var e=["[prošle] [nedelje] [u] LT","[prošlog] [ponedeljka] [u] LT","[prošlog] [utorka] [u] LT","[prošle] [srede] [u] LT","[prošlog] [četvrtka] [u] LT","[prošlog] [petka] [u] LT","[prošle] [subote] [u] LT"];return e[this.day()]},sameElse:"L"},relativeTime:{future:"za %s",past:"pre %s",s:"nekoliko sekundi",ss:t.translate,m:t.translate,mm:t.translate,h:t.translate,hh:t.translate,d:t.translate,dd:t.translate,M:t.translate,MM:t.translate,y:t.translate,yy:t.translate},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:7}});return n}))},cf36:function(e,t,n){"use strict";var r=n("b343"),i=n("1caf");e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",i(1,7)),7!==e.stack)}))},cf51:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("tzl",{months:"Januar_Fevraglh_Març_Avrïu_Mai_Gün_Julia_Guscht_Setemvar_Listopäts_Noemvar_Zecemvar".split("_"),monthsShort:"Jan_Fev_Mar_Avr_Mai_Gün_Jul_Gus_Set_Lis_Noe_Zec".split("_"),weekdays:"Súladi_Lúneçi_Maitzi_Márcuri_Xhúadi_Viénerçi_Sáturi".split("_"),weekdaysShort:"Súl_Lún_Mai_Már_Xhú_Vié_Sát".split("_"),weekdaysMin:"Sú_Lú_Ma_Má_Xh_Vi_Sá".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD.MM.YYYY",LL:"D. MMMM [dallas] YYYY",LLL:"D. MMMM [dallas] YYYY HH.mm",LLLL:"dddd, [li] D. MMMM [dallas] YYYY HH.mm"},meridiemParse:/d\'o|d\'a/i,isPM:function(e){return"d'o"===e.toLowerCase()},meridiem:function(e,t,n){return e>11?n?"d'o":"D'O":n?"d'a":"D'A"},calendar:{sameDay:"[oxhi à] LT",nextDay:"[demà à] LT",nextWeek:"dddd [à] LT",lastDay:"[ieiri à] LT",lastWeek:"[sür el] dddd [lasteu à] LT",sameElse:"L"},relativeTime:{future:"osprei %s",past:"ja%s",s:n,ss:n,m:n,mm:n,h:n,hh:n,d:n,dd:n,M:n,MM:n,y:n,yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});function n(e,t,n,r){var i={s:["viensas secunds","'iensas secunds"],ss:[e+" secunds",e+" secunds"],m:["'n míut","'iens míut"],mm:[e+" míuts",e+" míuts"],h:["'n þora","'iensa þora"],hh:[e+" þoras",e+" þoras"],d:["'n ziua","'iensa ziua"],dd:[e+" ziuas",e+" ziuas"],M:["'n mes","'iens mes"],MM:[e+" mesen",e+" mesen"],y:["'n ar","'iens ar"],yy:[e+" ars",e+" ars"]};return r||t?i[n][0]:i[n][1]}return t}))},cf75:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"leS":-1!==e.indexOf("jar")?t.slice(0,-3)+"waQ":-1!==e.indexOf("DIS")?t.slice(0,-3)+"nem":t+" pIq",t}function r(e){var t=e;return t=-1!==e.indexOf("jaj")?t.slice(0,-3)+"Hu’":-1!==e.indexOf("jar")?t.slice(0,-3)+"wen":-1!==e.indexOf("DIS")?t.slice(0,-3)+"ben":t+" ret",t}function i(e,t,n,r){var i=s(e);switch(n){case"ss":return i+" lup";case"mm":return i+" tup";case"hh":return i+" rep";case"dd":return i+" jaj";case"MM":return i+" jar";case"yy":return i+" DIS"}}function s(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),i=e%10,s="";return n>0&&(s+=t[n]+"vatlh"),r>0&&(s+=(""!==s?" ":"")+t[r]+"maH"),i>0&&(s+=(""!==s?" ":"")+t[i]),""===s?"pagh":s}var o=e.defineLocale("tlh",{months:"tera’ jar wa’_tera’ jar cha’_tera’ jar wej_tera’ jar loS_tera’ jar vagh_tera’ jar jav_tera’ jar Soch_tera’ jar chorgh_tera’ jar Hut_tera’ jar wa’maH_tera’ jar wa’maH wa’_tera’ jar wa’maH cha’".split("_"),monthsShort:"jar wa’_jar cha’_jar wej_jar loS_jar vagh_jar jav_jar Soch_jar chorgh_jar Hut_jar wa’maH_jar wa’maH wa’_jar wa’maH cha’".split("_"),monthsParseExact:!0,weekdays:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysShort:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),weekdaysMin:"lojmItjaj_DaSjaj_povjaj_ghItlhjaj_loghjaj_buqjaj_ghInjaj".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[DaHjaj] LT",nextDay:"[wa’leS] LT",nextWeek:"LLL",lastDay:"[wa’Hu’] LT",lastWeek:"LLL",sameElse:"L"},relativeTime:{future:n,past:r,s:"puS lup",ss:i,m:"wa’ tup",mm:i,h:"wa’ rep",hh:i,d:"wa’ jaj",dd:i,M:"wa’ jar",MM:i,y:"wa’ DIS",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return o}))},d0617:function(e,t,n){"use strict";var r=n("b343");e.exports=!r((function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e}))},d06e:function(e,t,n){"use strict";var r=n("ac4f"),i=n("fc2d"),s=n("7dcf4"),o=n("2349"),a=n("ae20"),l=n("b343"),u=l((function(){return 4294967297!==[].push.call({length:4294967296},1)})),c=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}},h=u||!c();r({target:"Array",proto:!0,arity:1,forced:h},{push:function(e){var t=i(this),n=s(t),r=arguments.length;a(n+r);for(var l=0;l<r;l++)t[n]=arguments[l],n++;return o(t,n),n}})},d128:function(e,t,n){"use strict";var r=n("b343");e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},d26a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"},r=e.defineLocale("bo",{months:"ཟླ་བ་དང་པོ_ཟླ་བ་གཉིས་པ_ཟླ་བ་གསུམ་པ_ཟླ་བ་བཞི་པ_ཟླ་བ་ལྔ་པ_ཟླ་བ་དྲུག་པ_ཟླ་བ་བདུན་པ_ཟླ་བ་བརྒྱད་པ_ཟླ་བ་དགུ་པ_ཟླ་བ་བཅུ་པ_ཟླ་བ་བཅུ་གཅིག་པ_ཟླ་བ་བཅུ་གཉིས་པ".split("_"),monthsShort:"ཟླ་1_ཟླ་2_ཟླ་3_ཟླ་4_ཟླ་5_ཟླ་6_ཟླ་7_ཟླ་8_ཟླ་9_ཟླ་10_ཟླ་11_ཟླ་12".split("_"),monthsShortRegex:/^(ཟླ་\d{1,2})/,monthsParseExact:!0,weekdays:"གཟའ་ཉི་མ་_གཟའ་ཟླ་བ་_གཟའ་མིག་དམར་_གཟའ་ལྷག་པ་_གཟའ་ཕུར་བུ_གཟའ་པ་སངས་_གཟའ་སྤེན་པ་".split("_"),weekdaysShort:"ཉི་མ་_ཟླ་བ་_མིག་དམར་_ལྷག་པ་_ཕུར་བུ_པ་སངས་_སྤེན་པ་".split("_"),weekdaysMin:"ཉི_ཟླ_མིག_ལྷག_ཕུར_སངས_སྤེན".split("_"),longDateFormat:{LT:"A h:mm",LTS:"A h:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm",LLLL:"dddd, D MMMM YYYY, A h:mm"},calendar:{sameDay:"[དི་རིང] LT",nextDay:"[སང་ཉིན] LT",nextWeek:"[བདུན་ཕྲག་རྗེས་མ], LT",lastDay:"[ཁ་སང] LT",lastWeek:"[བདུན་ཕྲག་མཐའ་མ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ལ་",past:"%s སྔན་ལ",s:"ལམ་སང",ss:"%d སྐར་ཆ།",m:"སྐར་མ་གཅིག",mm:"%d སྐར་མ",h:"ཆུ་ཚོད་གཅིག",hh:"%d ཆུ་ཚོད",d:"ཉིན་གཅིག",dd:"%d ཉིན་",M:"ཟླ་བ་གཅིག",MM:"%d ཟླ་བ",y:"ལོ་གཅིག",yy:"%d ལོ"},preparse:function(e){return e.replace(/[༡༢༣༤༥༦༧༨༩༠]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/མཚན་མོ|ཞོགས་ཀས|ཉིན་གུང|དགོང་དག|མཚན་མོ/,meridiemHour:function(e,t){return 12===e&&(e=0),"མཚན་མོ"===t&&e>=4||"ཉིན་གུང"===t&&e<5||"དགོང་དག"===t?e+12:e},meridiem:function(e,t,n){return e<4?"མཚན་མོ":e<10?"ཞོགས་ཀས":e<17?"ཉིན་གུང":e<20?"དགོང་དག":"མཚན་མོ"},week:{dow:0,doy:6}});return r}))},d2d4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt-br",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"domingo_segunda-feira_terça-feira_quarta-feira_quinta-feira_sexta-feira_sábado".split("_"),weekdaysShort:"dom_seg_ter_qua_qui_sex_sáb".split("_"),weekdaysMin:"do_2ª_3ª_4ª_5ª_6ª_sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY [às] HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY [às] HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"poucos segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",invalidDate:"Data inválida"});return t}))},d2e4:function(e,t,n){"use strict";var r,i,s,o,a=n("54adf"),l=n("0204"),u=n("7d61"),c=n("73fa"),h=n("69ba"),d=n("b343"),m=n("f808"),f=n("9674"),p=n("2179"),g=n("6038"),y=n("b4f5"),w=n("911c"),b=a.setImmediate,v=a.clearImmediate,_=a.process,S=a.Dispatch,E=a.Function,C=a.MessageChannel,M=a.String,T=0,R={},O="onreadystatechange";d((function(){r=a.location}));var N=function(e){if(h(R,e)){var t=R[e];delete R[e],t()}},A=function(e){return function(){N(e)}},L=function(e){N(e.data)},I=function(e){a.postMessage(M(e),r.protocol+"//"+r.host)};b&&v||(b=function(e){g(arguments.length,1);var t=c(e)?e:E(e),n=f(arguments,1);return R[++T]=function(){l(t,void 0,n)},i(T),T},v=function(e){delete R[e]},w?i=function(e){_.nextTick(A(e))}:S&&S.now?i=function(e){S.now(A(e))}:C&&!y?(s=new C,o=s.port2,s.port1.onmessage=L,i=u(o.postMessage,o)):a.addEventListener&&c(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!d(I)?(i=I,a.addEventListener("message",L,!1)):i=O in p("script")?function(e){m.appendChild(p("script"))[O]=function(){m.removeChild(this),N(e)}}:function(e){setTimeout(A(e),0)}),e.exports={set:b,clear:v}},d3c5:function(e,t,n){"use strict";n.d(t,"a",(function(){return M}));n("7a89"),n("d06e");var r=n("351d"),i=n("81ea"),s=n("24b5"),o=n("76ab"),a=n("491c"),l=n("3d76"),u=n("169f"),c=n("87d6");function h(e,t){m(e,t),t.add(e)}function d(e,t,n){m(e,t),t.set(e,n)}function m(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function f(e,t,n){return(t=p(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e){var t=g(e,"string");return"symbol"==typeof t?t:t+""}function g(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function y(e,t){return e.get(w(e,t))}function w(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}const b=new Map([["plugin",s["c"]],["cell-type",o["c"]],["editor",a["d"]],["renderer",l["c"]],["validator",u["c"]]]),v="base",_=[];let S=null;var E=new WeakMap,C=new WeakSet;class M{static get PLUGIN_KEY(){return v}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}constructor(e){h(this,C),f(this,"eventManager",new c["a"](this)),f(this,"pluginName",null),f(this,"pluginsInitializedCallbacks",[]),f(this,"isPluginsReady",!1),f(this,"enabled",!1),f(this,"initialized",!1),d(this,E,{}),Object(r["defineGetter"])(this,"hot",e,{writable:!1}),S=null,this.hot.addHook("afterPluginsInitialized",()=>this.onAfterPluginsInitialized()),this.hot.addHook("afterUpdateSettings",e=>this.onUpdateSettings(e)),this.hot.addHook("beforeInit",()=>this.init())}init(){this.pluginName=this.hot.getPluginName(this);const e=this.constructor.PLUGIN_DEPS,t=Array.isArray(e)?e:[];if(t.length>0){const e=[];if(t.forEach(t=>{const[n,r]=t.split(":");if(!b.has(n))throw new Error(`Unknown plugin dependency type "${n}" was found.`);b.get(n)(r)||e.push(` - ${r} (${n})`)}),e.length>0){const t=[`The ${this.pluginName} plugin requires the following modules:\n`,e.join("\n")+"\n"].join("");_.push(t)}}S||(S=Object(s["b"])()),S.indexOf("UndoRedo")>=0&&S.splice(S.indexOf("UndoRedo"),1),S.indexOf(this.pluginName)>=0&&S.splice(S.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()});const n=0===S.length;if(n){if(_.length>0){const e=[_.join("\n")+"\n","You have to import and register them manually."].join("");throw new Error(e)}this.hot.runHooks("afterPluginsInitialized")}this.initialized=!0}enablePlugin(){this.enabled=!0}disablePlugin(){var e;null===(e=this.eventManager)||void 0===e||e.clear(),this.clearHooks(),this.enabled=!1}addHook(e,t,n){y(E,this)[e]=y(E,this)[e]||[];const r=y(E,this)[e];this.hot.addHook(e,t,n),r.push(t),y(E,this)[e]=r}removeHooks(e){Object(i["arrayEach"])(y(E,this)[e]||[],t=>{this.hot.removeHook(e,t)})}clearHooks(){const e=y(E,this);Object(r["objectEach"])(e,(e,t)=>this.removeHooks(t)),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){Object(i["arrayEach"])(this.pluginsInitializedCallbacks,e=>e()),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=w(C,this,T).call(this,e);this.isEnabled&&(this.enabled&&!this.isEnabled()&&this.disablePlugin(),!this.enabled&&this.isEnabled()&&this.enablePlugin(),this.enabled&&this.isEnabled()&&t&&this.updatePlugin(e))}updatePlugin(){}destroy(){var e;null===(e=this.eventManager)||void 0===e||e.destroy(),this.clearHooks(),Object(r["objectEach"])(this,(e,t)=>{"hot"!==t&&(this[t]=null)}),delete this.t,delete this.hot}}function T(e){if(!e)return!1;const t=this.constructor.SETTING_KEYS;if("boolean"===typeof t)return t;for(let n=0;n<t.length;n++)if(void 0!==e[t[n]])return!0;return!1}},d3e6:function(e,t,n){"use strict";var r=n("7d61"),i=n("7b69"),s=n("088f"),o=n("71ca"),a=n("cbf2"),l=n("7dcf4"),u=n("1e92"),c=n("bb2a"),h=n("9582"),d=n("142d"),m=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;e.exports=function(e,t,n){var g,y,w,b,v,_,S,E=n&&n.that,C=!(!n||!n.AS_ENTRIES),M=!(!n||!n.IS_RECORD),T=!(!n||!n.IS_ITERATOR),R=!(!n||!n.INTERRUPTED),O=r(t,E),N=function(e){return g&&d(g,"normal"),new f(!0,e)},A=function(e){return C?(s(e),R?O(e[0],e[1],N):O(e[0],e[1])):R?O(e,N):O(e)};if(M)g=e.iterator;else if(T)g=e;else{if(y=h(e),!y)throw new m(o(e)+" is not iterable");if(a(y)){for(w=0,b=l(e);b>w;w++)if(v=A(e[w]),v&&u(p,v))return v;return new f(!1)}g=c(e,y)}_=M?e.next:g.next;while(!(S=i(_,g)).done){try{v=A(S.value)}catch(L){d(g,"throw",L)}if("object"==typeof v&&v&&u(p,v))return v}return new f(!1)}},d435:function(e,t,n){"use strict";var r=n("d128"),i=n("b343"),s=n("2179");e.exports=!r&&!i((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},d62b:function(e,t,n){"use strict";e.exports=!1},d69a:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fil",{months:"Enero_Pebrero_Marso_Abril_Mayo_Hunyo_Hulyo_Agosto_Setyembre_Oktubre_Nobyembre_Disyembre".split("_"),monthsShort:"Ene_Peb_Mar_Abr_May_Hun_Hul_Ago_Set_Okt_Nob_Dis".split("_"),weekdays:"Linggo_Lunes_Martes_Miyerkules_Huwebes_Biyernes_Sabado".split("_"),weekdaysShort:"Lin_Lun_Mar_Miy_Huw_Biy_Sab".split("_"),weekdaysMin:"Li_Lu_Ma_Mi_Hu_Bi_Sab".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"MM/D/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY HH:mm",LLLL:"dddd, MMMM DD, YYYY HH:mm"},calendar:{sameDay:"LT [ngayong araw]",nextDay:"[Bukas ng] LT",nextWeek:"LT [sa susunod na] dddd",lastDay:"LT [kahapon]",lastWeek:"LT [noong nakaraang] dddd",sameElse:"L"},relativeTime:{future:"sa loob ng %s",past:"%s ang nakalipas",s:"ilang segundo",ss:"%d segundo",m:"isang minuto",mm:"%d minuto",h:"isang oras",hh:"%d oras",d:"isang araw",dd:"%d araw",M:"isang buwan",MM:"%d buwan",y:"isang taon",yy:"%d taon"},dayOfMonthOrdinalParse:/\d{1,2}/,ordinal:function(e){return e},week:{dow:1,doy:4}});return t}))},d6b6:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("hy-am",{months:{format:"հունվարի_փետրվարի_մարտի_ապրիլի_մայիսի_հունիսի_հուլիսի_օգոստոսի_սեպտեմբերի_հոկտեմբերի_նոյեմբերի_դեկտեմբերի".split("_"),standalone:"հունվար_փետրվար_մարտ_ապրիլ_մայիս_հունիս_հուլիս_օգոստոս_սեպտեմբեր_հոկտեմբեր_նոյեմբեր_դեկտեմբեր".split("_")},monthsShort:"հնվ_փտր_մրտ_ապր_մյս_հնս_հլս_օգս_սպտ_հկտ_նմբ_դկտ".split("_"),weekdays:"կիրակի_երկուշաբթի_երեքշաբթի_չորեքշաբթի_հինգշաբթի_ուրբաթ_շաբաթ".split("_"),weekdaysShort:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),weekdaysMin:"կրկ_երկ_երք_չրք_հնգ_ուրբ_շբթ".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"D MMMM YYYY թ.",LLL:"D MMMM YYYY թ., HH:mm",LLLL:"dddd, D MMMM YYYY թ., HH:mm"},calendar:{sameDay:"[այսօր] LT",nextDay:"[վաղը] LT",lastDay:"[երեկ] LT",nextWeek:function(){return"dddd [օրը ժամը] LT"},lastWeek:function(){return"[անցած] dddd [օրը ժամը] LT"},sameElse:"L"},relativeTime:{future:"%s հետո",past:"%s առաջ",s:"մի քանի վայրկյան",ss:"%d վայրկյան",m:"րոպե",mm:"%d րոպե",h:"ժամ",hh:"%d ժամ",d:"օր",dd:"%d օր",M:"ամիս",MM:"%d ամիս",y:"տարի",yy:"%d տարի"},meridiemParse:/գիշերվա|առավոտվա|ցերեկվա|երեկոյան/,isPM:function(e){return/^(ցերեկվա|երեկոյան)$/.test(e)},meridiem:function(e){return e<4?"գիշերվա":e<12?"առավոտվա":e<17?"ցերեկվա":"երեկոյան"},dayOfMonthOrdinalParse:/\d{1,2}|\d{1,2}-(ին|րդ)/,ordinal:function(e,t){switch(t){case"DDD":case"w":case"W":case"DDDo":return 1===e?e+"-ին":e+"-րդ";default:return e}},week:{dow:1,doy:7}});return t}))},d7167:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ca",{months:{standalone:"gener_febrer_març_abril_maig_juny_juliol_agost_setembre_octubre_novembre_desembre".split("_"),format:"de gener_de febrer_de març_d'abril_de maig_de juny_de juliol_d'agost_de setembre_d'octubre_de novembre_de desembre".split("_"),isFormat:/D[oD]?(\s)+MMMM/},monthsShort:"gen._febr._març_abr._maig_juny_jul._ag._set._oct._nov._des.".split("_"),monthsParseExact:!0,weekdays:"diumenge_dilluns_dimarts_dimecres_dijous_divendres_dissabte".split("_"),weekdaysShort:"dg._dl._dt._dc._dj._dv._ds.".split("_"),weekdaysMin:"dg_dl_dt_dc_dj_dv_ds".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM [de] YYYY",ll:"D MMM YYYY",LLL:"D MMMM [de] YYYY [a les] H:mm",lll:"D MMM YYYY, H:mm",LLLL:"dddd D MMMM [de] YYYY [a les] H:mm",llll:"ddd D MMM YYYY, H:mm"},calendar:{sameDay:function(){return"[avui a "+(1!==this.hours()?"les":"la")+"] LT"},nextDay:function(){return"[demà a "+(1!==this.hours()?"les":"la")+"] LT"},nextWeek:function(){return"dddd [a "+(1!==this.hours()?"les":"la")+"] LT"},lastDay:function(){return"[ahir a "+(1!==this.hours()?"les":"la")+"] LT"},lastWeek:function(){return"[el] dddd [passat a "+(1!==this.hours()?"les":"la")+"] LT"},sameElse:"L"},relativeTime:{future:"d'aquí %s",past:"fa %s",s:"uns segons",ss:"%d segons",m:"un minut",mm:"%d minuts",h:"una hora",hh:"%d hores",d:"un dia",dd:"%d dies",M:"un mes",MM:"%d mesos",y:"un any",yy:"%d anys"},dayOfMonthOrdinalParse:/\d{1,2}(r|n|t|è|a)/,ordinal:function(e,t){var n=1===e?"r":2===e?"n":3===e?"r":4===e?"t":"è";return"w"!==t&&"W"!==t||(n="a"),e+n},week:{dow:1,doy:4}});return t}))},d852:function(e,t,n){"use strict";n("7a89"),n("d06e");var r=n("0716");function i(e,t,n){s(e,t),t.set(e,n)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function o(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){var t=l(e,"string");return"symbol"==typeof t?t:t+""}function l(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function u(e,t){return e.get(h(e,t))}function c(e,t,n){return e.set(h(e,t),n),n}function h(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}var d=new WeakMap;class m{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];o(this,"highlight",null),o(this,"from",null),o(this,"to",null),i(this,d,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=n.clone(),c(d,this,r)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}isValid(e){return this.from.isValid(e)&&this.to.isValid(e)}isSingle(){return this.isSingleCell()||this.isSingleHeader()}isSingleCell(){return this.from.row>=0&&this.from.row===this.to.row&&this.from.col>=0&&this.from.col===this.to.col}isSingleHeader(){return(this.from.row<0||this.from.col<0)&&this.from.row===this.to.row&&this.from.col===this.to.col}isHeader(){return!(!this.from.isHeader()||!this.to.isHeader())||(this.from.col<0&&this.to.col<0||this.from.row<0&&this.to.row<0)}containsHeaders(){return this.from.isHeader()||this.to.isHeader()}getOuterHeight(){return Math.max(this.from.row,this.to.row)-Math.min(this.from.row,this.to.row)+1}getOuterWidth(){return Math.max(this.from.col,this.to.col)-Math.min(this.from.col,this.to.col)+1}getHeight(){if(this.from.row<0&&this.to.row<0)return 0;const e=Math.max(this.from.row,0),t=Math.max(this.to.row,0);return Math.max(e,t)-Math.min(e,t)+1}getWidth(){if(this.from.col<0&&this.to.col<0)return 0;const e=Math.max(this.from.col,0),t=Math.max(this.to.col,0);return Math.max(e,t)-Math.min(e,t)+1}getCellsCount(){return this.getWidth()*this.getHeight()}includes(e){const{row:t,col:n}=e,r=this.getOuterTopStartCorner(),i=this.getOuterBottomEndCorner();return r.row<=t&&i.row>=t&&r.col<=n&&i.col>=n}includesRange(e){return this.includes(e.getOuterTopStartCorner())&&this.includes(e.getOuterBottomEndCorner())}isEqual(e){return Math.min(this.from.row,this.to.row)===Math.min(e.from.row,e.to.row)&&Math.max(this.from.row,this.to.row)===Math.max(e.from.row,e.to.row)&&Math.min(this.from.col,this.to.col)===Math.min(e.from.col,e.to.col)&&Math.max(this.from.col,this.to.col)===Math.max(e.from.col,e.to.col)}overlaps(e){return e.isSouthEastOf(this.getOuterTopLeftCorner())&&e.isNorthWestOf(this.getOuterBottomRightCorner())}isSouthEastOf(e){return this.getOuterTopLeftCorner().isSouthEastOf(e)||this.getOuterBottomRightCorner().isSouthEastOf(e)}isNorthWestOf(e){return this.getOuterTopLeftCorner().isNorthWestOf(e)||this.getOuterBottomRightCorner().isNorthWestOf(e)}isOverlappingHorizontally(e){return this.getOuterTopEndCorner().col>=e.getOuterTopStartCorner().col&&this.getOuterTopEndCorner().col<=e.getOuterTopEndCorner().col||this.getOuterTopStartCorner().col<=e.getOuterTopEndCorner().col&&this.getOuterTopStartCorner().col>=e.getOuterTopStartCorner().col}isOverlappingVertically(e){return this.getOuterBottomStartCorner().row>=e.getOuterTopRightCorner().row&&this.getOuterBottomStartCorner().row<=e.getOuterBottomStartCorner().row||this.getOuterTopEndCorner().row<=e.getOuterBottomStartCorner().row&&this.getOuterTopEndCorner().row>=e.getOuterTopRightCorner().row}expand(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();return(e.row<t.row||e.col<t.col||e.row>n.row||e.col>n.col)&&(this.from=this._createCellCoords(Math.min(t.row,e.row),Math.min(t.col,e.col)),this.to=this._createCellCoords(Math.max(n.row,e.row),Math.max(n.col,e.col)),!0)}expandByRange(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.includesRange(e)||!this.overlaps(e))return!1;const n=this.getOuterTopStartCorner(),r=this.getOuterBottomEndCorner(),i=this.getDirection(),s=e.getOuterTopStartCorner(),o=e.getOuterBottomEndCorner(),a=Math.min(n.row,s.row),l=Math.min(n.col,s.col),u=Math.max(r.row,o.row),c=Math.max(r.col,o.col),h=this._createCellCoords(a,l),d=this._createCellCoords(u,c);return this.from=h,this.to=d,this.setDirection(i),t&&(this.highlight.row===this.getOuterBottomRightCorner().row&&"N-S"===this.getVerticalDirection()&&this.flipDirectionVertically(),this.highlight.col===this.getOuterTopRightCorner().col&&"W-E"===this.getHorizontalDirection()&&this.flipDirectionHorizontally()),!0}getDirection(){return this.from.isNorthWestOf(this.to)?"NW-SE":this.from.isNorthEastOf(this.to)?"NE-SW":this.from.isSouthEastOf(this.to)?"SE-NW":this.from.isSouthWestOf(this.to)?"SW-NE":void 0}setDirection(e){switch(e){case"NW-SE":[this.from,this.to]=[this.getOuterTopLeftCorner(),this.getOuterBottomRightCorner()];break;case"NE-SW":[this.from,this.to]=[this.getOuterTopRightCorner(),this.getOuterBottomLeftCorner()];break;case"SE-NW":[this.from,this.to]=[this.getOuterBottomRightCorner(),this.getOuterTopLeftCorner()];break;case"SW-NE":[this.from,this.to]=[this.getOuterBottomLeftCorner(),this.getOuterTopRightCorner()];break;default:break}}getVerticalDirection(){return["NE-SW","NW-SE"].indexOf(this.getDirection())>-1?"N-S":"S-N"}getHorizontalDirection(){return["NW-SE","SW-NE"].indexOf(this.getDirection())>-1?"W-E":"E-W"}flipDirectionVertically(){const e=this.getDirection();switch(e){case"NW-SE":this.setDirection("SW-NE");break;case"NE-SW":this.setDirection("SE-NW");break;case"SE-NW":this.setDirection("NE-SW");break;case"SW-NE":this.setDirection("NW-SE");break;default:break}}flipDirectionHorizontally(){const e=this.getDirection();switch(e){case"NW-SE":this.setDirection("NE-SW");break;case"NE-SW":this.setDirection("NW-SE");break;case"SE-NW":this.setDirection("SW-NE");break;case"SW-NE":this.setDirection("SE-NW");break;default:break}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return u(d,this)?this.getTopEndCorner():this.getTopStartCorner()}getBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getBottomRightCorner(){return u(d,this)?this.getBottomStartCorner():this.getBottomEndCorner()}getTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col)).normalize()}getTopRightCorner(){return u(d,this)?this.getTopStartCorner():this.getTopEndCorner()}getBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getBottomLeftCorner(){return u(d,this)?this.getBottomEndCorner():this.getBottomStartCorner()}getOuterTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterTopLeftCorner(){return u(d,this)?this.getOuterTopEndCorner():this.getOuterTopStartCorner()}getOuterBottomEndCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterBottomRightCorner(){return u(d,this)?this.getOuterBottomStartCorner():this.getOuterBottomEndCorner()}getOuterTopEndCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))}getOuterTopRightCorner(){return u(d,this)?this.getOuterTopStartCorner():this.getOuterTopEndCorner()}getOuterBottomStartCorner(){return this._createCellCoords(Math.max(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))}getOuterBottomLeftCorner(){return u(d,this)?this.getOuterBottomEndCorner():this.getOuterBottomStartCorner()}isCorner(e){return e.isEqual(this.getOuterTopLeftCorner())||e.isEqual(this.getOuterTopRightCorner())||e.isEqual(this.getOuterBottomLeftCorner())||e.isEqual(this.getOuterBottomRightCorner())}getOppositeCorner(e){return e instanceof r["a"]&&(e.isEqual(this.getOuterBottomEndCorner())?this.getOuterTopStartCorner():e.isEqual(this.getOuterTopStartCorner())?this.getOuterBottomEndCorner():e.isEqual(this.getOuterTopEndCorner())?this.getOuterBottomStartCorner():e.isEqual(this.getOuterBottomStartCorner())?this.getOuterTopEndCorner():void 0)}getBordersSharedWith(e){if(!this.includesRange(e))return[];const t={top:Math.min(this.from.row,this.to.row),bottom:Math.max(this.from.row,this.to.row),left:Math.min(this.from.col,this.to.col),right:Math.max(this.from.col,this.to.col)},n={top:Math.min(e.from.row,e.to.row),bottom:Math.max(e.from.row,e.to.row),left:Math.min(e.from.col,e.to.col),right:Math.max(e.from.col,e.to.col)},r=[];return t.top===n.top&&r.push("top"),t.right===n.right&&r.push(u(d,this)?"left":"right"),t.bottom===n.bottom&&r.push("bottom"),t.left===n.left&&r.push(u(d,this)?"right":"left"),r}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)this.from.row===r&&this.from.col===i||this.to.row===r&&this.to.col===i||n.push(this._createCellCoords(r,i));return n}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let i=e.col;i<=t.col;i++)e.row===r&&e.col===i?n.push(e):t.row===r&&t.col===i?n.push(t):n.push(this._createCellCoords(r,i));return n}forAll(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();for(let r=t.row;r<=n.row;r++)for(let i=t.col;i<=n.col;i++){const t=e(r,i);if(!1===t)return}}clone(){return new m(this.highlight,this.from,this.to,u(d,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new r["a"](e,t,u(d,this))}}t["a"]=m},d9f8:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("fr-ca",{months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),monthsParseExact:!0,weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Aujourd’hui à] LT",nextDay:"[Demain à] LT",nextWeek:"dddd [à] LT",lastDay:"[Hier à] LT",lastWeek:"dddd [dernier à] LT",sameElse:"L"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",ss:"%d secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},dayOfMonthOrdinalParse:/\d{1,2}(er|e)/,ordinal:function(e,t){switch(t){default:case"M":case"Q":case"D":case"DDD":case"d":return e+(1===e?"er":"e");case"w":case"W":return e+(1===e?"re":"e")}}});return t}))},db29:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl-be",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},dc4d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"},r=[/^जन/i,/^फ़र|फर/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सितं|सित/i,/^अक्टू/i,/^नव|नवं/i,/^दिसं|दिस/i],i=[/^जन/i,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/i],s=e.defineLocale("hi",{months:{format:"जनवरी_फ़रवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितम्बर_अक्टूबर_नवम्बर_दिसम्बर".split("_"),standalone:"जनवरी_फरवरी_मार्च_अप्रैल_मई_जून_जुलाई_अगस्त_सितंबर_अक्टूबर_नवंबर_दिसंबर".split("_")},monthsShort:"जन._फ़र._मार्च_अप्रै._मई_जून_जुल._अग._सित._अक्टू._नव._दिस.".split("_"),weekdays:"रविवार_सोमवार_मंगलवार_बुधवार_गुरूवार_शुक्रवार_शनिवार".split("_"),weekdaysShort:"रवि_सोम_मंगल_बुध_गुरू_शुक्र_शनि".split("_"),weekdaysMin:"र_सो_मं_बु_गु_शु_श".split("_"),longDateFormat:{LT:"A h:mm बजे",LTS:"A h:mm:ss बजे",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm बजे",LLLL:"dddd, D MMMM YYYY, A h:mm बजे"},monthsParse:r,longMonthsParse:r,shortMonthsParse:i,monthsRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsShortRegex:/^(जनवरी|जन\.?|फ़रवरी|फरवरी|फ़र\.?|मार्च?|अप्रैल|अप्रै\.?|मई?|जून?|जुलाई|जुल\.?|अगस्त|अग\.?|सितम्बर|सितंबर|सित\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर|नव\.?|दिसम्बर|दिसंबर|दिस\.?)/i,monthsStrictRegex:/^(जनवरी?|फ़रवरी|फरवरी?|मार्च?|अप्रैल?|मई?|जून?|जुलाई?|अगस्त?|सितम्बर|सितंबर|सित?\.?|अक्टूबर|अक्टू\.?|नवम्बर|नवंबर?|दिसम्बर|दिसंबर?)/i,monthsShortStrictRegex:/^(जन\.?|फ़र\.?|मार्च?|अप्रै\.?|मई?|जून?|जुल\.?|अग\.?|सित\.?|अक्टू\.?|नव\.?|दिस\.?)/i,calendar:{sameDay:"[आज] LT",nextDay:"[कल] LT",nextWeek:"dddd, LT",lastDay:"[कल] LT",lastWeek:"[पिछले] dddd, LT",sameElse:"L"},relativeTime:{future:"%s में",past:"%s पहले",s:"कुछ ही क्षण",ss:"%d सेकंड",m:"एक मिनट",mm:"%d मिनट",h:"एक घंटा",hh:"%d घंटे",d:"एक दिन",dd:"%d दिन",M:"एक महीने",MM:"%d महीने",y:"एक वर्ष",yy:"%d वर्ष"},preparse:function(e){return e.replace(/[१२३४५६७८९०]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/रात|सुबह|दोपहर|शाम/,meridiemHour:function(e,t){return 12===e&&(e=0),"रात"===t?e<4?e:e+12:"सुबह"===t?e:"दोपहर"===t?e>=10?e:e+12:"शाम"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"रात":e<10?"सुबह":e<17?"दोपहर":e<20?"शाम":"रात"},week:{dow:0,doy:6}});return s}))},dce9:function(e,t,n){"use strict";var r=n("ac4f"),i=n("fd18"),s=n("bf78"),o=n("9e75"),a=n("2408"),l=n("b343"),u=i("".charAt),c=l((function(){return"\ud842"!=="𠮷".at(-2)}));r({target:"String",proto:!0,forced:c},{at:function(e){var t=a(s(this)),n=t.length,r=o(e),i=r>=0?r:n+r;return i<0||i>=n?void 0:u(t,i)}})},dd49:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n("a357c"),i=n("5d7f"),s=n("7b9c");const o="text";function a(e,t,n,o,a,l,u){r["a"].apply(this,[e,t,n,o,a,l,u]);let c=l;if(!c&&u.placeholder&&(c=u.placeholder),c=Object(s["stringify"])(c),u.trimWhitespace&&(c=c.trim()),u.rendererTemplate){Object(i["empty"])(t);const r=e.rootDocument.createElement("TEMPLATE");r.setAttribute("bind","{{}}"),r.innerHTML=u.rendererTemplate,HTMLTemplateElement.decorate(r),r.model=e.getSourceDataAtRow(n),t.appendChild(r)}else Object(i["fastInnerText"])(t,c)}a.RENDERER_TYPE=o},de26:function(e,t,n){"use strict";var r=n("54d7");e.exports=function(e,t){return r[e]||(r[e]=t||{})}},de3b:function(e,t,n){"use strict";function r(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function i(e){return!1===e.isImmediatePropagationEnabled}function s(e){return 2===e.button}function o(e){return 0===e.button}function a(e){return e instanceof TouchEvent}function l(e,t){const n={x:e.offsetX,y:e.offsetY};let r=e.target;if(!(t instanceof HTMLElement)||r!==t&&r.contains(t))return n;while(r!==t)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;return n}n.r(t),n.d(t,"stopImmediatePropagation",(function(){return r})),n.d(t,"isImmediatePropagationStopped",(function(){return i})),n.d(t,"isRightClick",(function(){return s})),n.d(t,"isLeftClick",(function(){return o})),n.d(t,"isTouchEvent",(function(){return a})),n.d(t,"offsetRelativeTo",(function(){return l}))},e0c5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"},r=e.defineLocale("gu",{months:"જાન્યુઆરી_ફેબ્રુઆરી_માર્ચ_એપ્રિલ_મે_જૂન_જુલાઈ_ઑગસ્ટ_સપ્ટેમ્બર_ઑક્ટ્બર_નવેમ્બર_ડિસેમ્બર".split("_"),monthsShort:"જાન્યુ._ફેબ્રુ._માર્ચ_એપ્રિ._મે_જૂન_જુલા._ઑગ._સપ્ટે._ઑક્ટ્._નવે._ડિસે.".split("_"),monthsParseExact:!0,weekdays:"રવિવાર_સોમવાર_મંગળવાર_બુધ્વાર_ગુરુવાર_શુક્રવાર_શનિવાર".split("_"),weekdaysShort:"રવિ_સોમ_મંગળ_બુધ્_ગુરુ_શુક્ર_શનિ".split("_"),weekdaysMin:"ર_સો_મં_બુ_ગુ_શુ_શ".split("_"),longDateFormat:{LT:"A h:mm વાગ્યે",LTS:"A h:mm:ss વાગ્યે",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm વાગ્યે",LLLL:"dddd, D MMMM YYYY, A h:mm વાગ્યે"},calendar:{sameDay:"[આજ] LT",nextDay:"[કાલે] LT",nextWeek:"dddd, LT",lastDay:"[ગઇકાલે] LT",lastWeek:"[પાછલા] dddd, LT",sameElse:"L"},relativeTime:{future:"%s મા",past:"%s પહેલા",s:"અમુક પળો",ss:"%d સેકંડ",m:"એક મિનિટ",mm:"%d મિનિટ",h:"એક કલાક",hh:"%d કલાક",d:"એક દિવસ",dd:"%d દિવસ",M:"એક મહિનો",MM:"%d મહિનો",y:"એક વર્ષ",yy:"%d વર્ષ"},preparse:function(e){return e.replace(/[૧૨૩૪૫૬૭૮૯૦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/રાત|બપોર|સવાર|સાંજ/,meridiemHour:function(e,t){return 12===e&&(e=0),"રાત"===t?e<4?e:e+12:"સવાર"===t?e:"બપોર"===t?e>=10?e:e+12:"સાંજ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"રાત":e<10?"સવાર":e<17?"બપોર":e<20?"સાંજ":"રાત"},week:{dow:0,doy:6}});return r}))},e156:function(e,t,n){"use strict";var r=n("12e9"),i=n("73fa"),s=n("939b"),o=n("80dd"),a=o("toStringTag"),l=Object,u="Arguments"===s(function(){return arguments}()),c=function(e,t){try{return e[t]}catch(n){}};e.exports=r?s:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=c(t=l(e),a))?n:u?s(t):"Object"===(r=s(t))&&i(t.callee)?"Arguments":r}},e1c6:function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},e1d3:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-ie",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},e437:function(e,t,n){"use strict";var r=n("c0d8"),i=n("8c7e"),s=n("87d6"),o=n("c5cd");n("7a89");function a(e){const t="undefined"!==typeof window&&window.jQuery;t&&(t.fn.handsontable=function(t){const n=this.first();let r,i=n.data("handsontable");if("string"!==typeof t){const r=t||{};return i?i.updateSettings(r):(i=new e.Core(n[0],r),n.data("handsontable",i),i.init()),n}if(i){if("undefined"===typeof i[t])throw new Error("Handsontable do not provide action: "+t);for(var s=arguments.length,o=new Array(s>1?s-1:0),a=1;a<s;a++)o[a-1]=arguments[a];r=i[t].call(i,...o),"destroy"===t&&n.removeData()}return r})}var l,u,c,h,d,m=n("220a"),f=n("a776"),p=n("81ea"),g=n("63d8"),y=n("480c"),w=n("3eb5"),b=n("7dd09"),v=n("97b9"),_=n("7b9c"),S=n("ffec"),E=n("351d"),C=n("29b0"),M=n("f938"),T=n("5d7f"),R=n("de3b"),O=n("491c"),N=n("3d76"),A=n("169f"),L=n("76ab"),I=n("24b5"),k=n("d3c5");Object(i["a"])(),a(r["a"]),r["a"].__GhostTable=m["a"],r["a"]._getListenersCounter=s["b"],r["a"]._getRegisteredMapsCounter=o["b"],r["a"].EventManager=s["a"];const x=[p,g,y,w,b,v,_,S,E,C,M,f],D=[T,R];r["a"].helper={},r["a"].dom={},p["arrayEach"](x,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].helper[t]=e[t])})}),p["arrayEach"](D,e=>{p["arrayEach"](Object.getOwnPropertyNames(e),t=>{"_"!==t.charAt(0)&&(r["a"].dom[t]=e[t])})}),r["a"].cellTypes=null!==(l=r["a"].cellTypes)&&void 0!==l?l:{},p["arrayEach"](Object(L["b"])(),e=>{r["a"].cellTypes[e]=Object(L["a"])(e)}),r["a"].cellTypes.registerCellType=L["d"],r["a"].cellTypes.getCellType=L["a"],r["a"].editors=null!==(u=r["a"].editors)&&void 0!==u?u:{},p["arrayEach"](Object(O["c"])(),e=>{r["a"].editors[C["toUpperCaseFirst"](e)+"Editor"]=Object(O["a"])(e)}),r["a"].editors.registerEditor=O["e"],r["a"].editors.getEditor=O["a"],r["a"].renderers=null!==(c=r["a"].renderers)&&void 0!==c?c:{},p["arrayEach"](Object(N["a"])(),e=>{const t=Object(N["b"])(e);"base"===e&&(r["a"].renderers.cellDecorator=t),r["a"].renderers[C["toUpperCaseFirst"](e)+"Renderer"]=t}),r["a"].renderers.registerRenderer=N["d"],r["a"].renderers.getRenderer=N["b"],r["a"].validators=null!==(h=r["a"].validators)&&void 0!==h?h:{},p["arrayEach"](Object(A["a"])(),e=>{r["a"].validators[C["toUpperCaseFirst"](e)+"Validator"]=Object(A["b"])(e)}),r["a"].validators.registerValidator=A["d"],r["a"].validators.getValidator=A["b"],r["a"].plugins=null!==(d=r["a"].plugins)&&void 0!==d?d:{},p["arrayEach"](Object(I["b"])(),e=>{r["a"].plugins[e]=Object(I["a"])(e)}),r["a"].plugins[C["toUpperCaseFirst"](k["a"].PLUGIN_KEY)+"Plugin"]=k["a"],r["a"].plugins.registerPlugin=I["d"],r["a"].plugins.getPlugin=I["a"];t["a"]=r["a"]},e81d:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"},r=e.defineLocale("km",{months:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),monthsShort:"មករា_កុម្ភៈ_មីនា_មេសា_ឧសភា_មិថុនា_កក្កដា_សីហា_កញ្ញា_តុលា_វិច្ឆិកា_ធ្នូ".split("_"),weekdays:"អាទិត្យ_ច័ន្ទ_អង្គារ_ពុធ_ព្រហស្បតិ៍_សុក្រ_សៅរ៍".split("_"),weekdaysShort:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysMin:"អា_ច_អ_ព_ព្រ_សុ_ស".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},meridiemParse:/ព្រឹក|ល្ងាច/,isPM:function(e){return"ល្ងាច"===e},meridiem:function(e,t,n){return e<12?"ព្រឹក":"ល្ងាច"},calendar:{sameDay:"[ថ្ងៃនេះ ម៉ោង] LT",nextDay:"[ស្អែក ម៉ោង] LT",nextWeek:"dddd [ម៉ោង] LT",lastDay:"[ម្សិលមិញ ម៉ោង] LT",lastWeek:"dddd [សប្តាហ៍មុន] [ម៉ោង] LT",sameElse:"L"},relativeTime:{future:"%sទៀត",past:"%sមុន",s:"ប៉ុន្មានវិនាទី",ss:"%d វិនាទី",m:"មួយនាទី",mm:"%d នាទី",h:"មួយម៉ោង",hh:"%d ម៉ោង",d:"មួយថ្ងៃ",dd:"%d ថ្ងៃ",M:"មួយខែ",MM:"%d ខែ",y:"មួយឆ្នាំ",yy:"%d ឆ្នាំ"},dayOfMonthOrdinalParse:/ទី\d{1,2}/,ordinal:"ទី%d",preparse:function(e){return e.replace(/[១២៣៤៥៦៧៨៩០]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},week:{dow:1,doy:4}});return r}))},e90f:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var r=n("97b9"),i=n("81ea");function s(e,t,n,i){const s=n.length?n[0]:void 0;return[...e.slice(0,s),...n.map((e,t)=>Object(r["isFunction"])(i)?i(e,t):i),...void 0===s?[]:e.slice(s)]}function o(e,t){return Object(i["arrayFilter"])(e,(e,n)=>!1===t.includes(n))}},eb36:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));n("7a89"),n("d06e");var r=n("5714");function i(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e){var t=o(e,"string");return"symbol"==typeof t?t:t+""}function o(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}const a=23;class l extends r["a"]{constructor(e){let{calculationTypes:t,viewportHeight:n,scrollOffset:r,totalRows:s,rowHeightFn:o,overrideFn:a,horizontalScrollbarHeight:l}=e;super(t),i(this,"viewportHeight",0),i(this,"scrollOffset",0),i(this,"zeroBasedScrollOffset",0),i(this,"totalRows",0),i(this,"rowHeightFn",null),i(this,"rowHeight",0),i(this,"overrideFn",null),i(this,"horizontalScrollbarHeight",0),i(this,"innerViewportHeight",0),i(this,"totalCalculatedHeight",0),i(this,"startPositions",[]),i(this,"needReverse",!0),this.viewportHeight=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalRows=s,this.rowHeightFn=o,this.overrideFn=a,this.horizontalScrollbarHeight=null!==l&&void 0!==l?l:0,this.innerViewportHeight=this.zeroBasedScrollOffset+this.viewportHeight-this.horizontalScrollbarHeight,this.calculate()}calculate(){this._initialize(this);for(let e=0;e<this.totalRows;e++)if(this.rowHeight=this.getRowHeight(e),this._process(e,this),this.startPositions.push(this.totalCalculatedHeight),this.totalCalculatedHeight+=this.rowHeight,this.totalCalculatedHeight>=this.innerViewportHeight){this.needReverse=!1;break}this._finalize(this)}getRowHeight(e){const t=this.rowHeightFn(e);return isNaN(t)?a:t}}},ebe4:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("ms",{months:"Januari_Februari_Mac_April_Mei_Jun_Julai_Ogos_September_Oktober_November_Disember".split("_"),monthsShort:"Jan_Feb_Mac_Apr_Mei_Jun_Jul_Ogs_Sep_Okt_Nov_Dis".split("_"),weekdays:"Ahad_Isnin_Selasa_Rabu_Khamis_Jumaat_Sabtu".split("_"),weekdaysShort:"Ahd_Isn_Sel_Rab_Kha_Jum_Sab".split("_"),weekdaysMin:"Ah_Is_Sl_Rb_Km_Jm_Sb".split("_"),longDateFormat:{LT:"HH.mm",LTS:"HH.mm.ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY [pukul] HH.mm",LLLL:"dddd, D MMMM YYYY [pukul] HH.mm"},meridiemParse:/pagi|tengahari|petang|malam/,meridiemHour:function(e,t){return 12===e&&(e=0),"pagi"===t?e:"tengahari"===t?e>=11?e:e+12:"petang"===t||"malam"===t?e+12:void 0},meridiem:function(e,t,n){return e<11?"pagi":e<15?"tengahari":e<19?"petang":"malam"},calendar:{sameDay:"[Hari ini pukul] LT",nextDay:"[Esok pukul] LT",nextWeek:"dddd [pukul] LT",lastDay:"[Kelmarin pukul] LT",lastWeek:"dddd [lepas pukul] LT",sameElse:"L"},relativeTime:{future:"dalam %s",past:"%s yang lepas",s:"beberapa saat",ss:"%d saat",m:"seminit",mm:"%d minit",h:"sejam",hh:"%d jam",d:"sehari",dd:"%d hari",M:"sebulan",MM:"%d bulan",y:"setahun",yy:"%d tahun"},week:{dow:1,doy:7}});return t}))},ec18:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- function t(e,t,n,r){var i={s:["mõne sekundi","mõni sekund","paar sekundit"],ss:[e+"sekundi",e+"sekundit"],m:["ühe minuti","üks minut"],mm:[e+" minuti",e+" minutit"],h:["ühe tunni","tund aega","üks tund"],hh:[e+" tunni",e+" tundi"],d:["ühe päeva","üks päev"],M:["kuu aja","kuu aega","üks kuu"],MM:[e+" kuu",e+" kuud"],y:["ühe aasta","aasta","üks aasta"],yy:[e+" aasta",e+" aastat"]};return t?i[n][2]?i[n][2]:i[n][1]:r?i[n][0]:i[n][1]}var n=e.defineLocale("et",{months:"jaanuar_veebruar_märts_aprill_mai_juuni_juuli_august_september_oktoober_november_detsember".split("_"),monthsShort:"jaan_veebr_märts_apr_mai_juuni_juuli_aug_sept_okt_nov_dets".split("_"),weekdays:"pühapäev_esmaspäev_teisipäev_kolmapäev_neljapäev_reede_laupäev".split("_"),weekdaysShort:"P_E_T_K_N_R_L".split("_"),weekdaysMin:"P_E_T_K_N_R_L".split("_"),longDateFormat:{LT:"H:mm",LTS:"H:mm:ss",L:"DD.MM.YYYY",LL:"D. MMMM YYYY",LLL:"D. MMMM YYYY H:mm",LLLL:"dddd, D. MMMM YYYY H:mm"},calendar:{sameDay:"[Täna,] LT",nextDay:"[Homme,] LT",nextWeek:"[Järgmine] dddd LT",lastDay:"[Eile,] LT",lastWeek:"[Eelmine] dddd LT",sameElse:"L"},relativeTime:{future:"%s pärast",past:"%s tagasi",s:t,ss:t,m:t,mm:t,h:t,hh:t,d:t,dd:"%d päeva",M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return n}))},ec2e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("en-in",{months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),longDateFormat:{LT:"h:mm A",LTS:"h:mm:ss A",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY h:mm A",LLLL:"dddd, D MMMM YYYY h:mm A"},calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},dayOfMonthOrdinalParse:/\d{1,2}(st|nd|rd|th)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:0,doy:6}});return t}))},eda5:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("si",{months:"ජනවාරි_පෙබරවාරි_මාර්තු_අප්රේල්_මැයි_ජූනි_ජූලි_අගෝස්තු_සැප්තැම්බර්_ඔක්තෝබර්_නොවැම්බර්_දෙසැම්බර්".split("_"),monthsShort:"ජන_පෙබ_මාර්_අප්_මැයි_ජූනි_ජූලි_අගෝ_සැප්_ඔක්_නොවැ_දෙසැ".split("_"),weekdays:"ඉරිදා_සඳුදා_අඟහරුවාදා_බදාදා_බ්රහස්පතින්දා_සිකුරාදා_සෙනසුරාදා".split("_"),weekdaysShort:"ඉරි_සඳු_අඟ_බදා_බ්රහ_සිකු_සෙන".split("_"),weekdaysMin:"ඉ_ස_අ_බ_බ්ර_සි_සෙ".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"a h:mm",LTS:"a h:mm:ss",L:"YYYY/MM/DD",LL:"YYYY MMMM D",LLL:"YYYY MMMM D, a h:mm",LLLL:"YYYY MMMM D [වැනි] dddd, a h:mm:ss"},calendar:{sameDay:"[අද] LT[ට]",nextDay:"[හෙට] LT[ට]",nextWeek:"dddd LT[ට]",lastDay:"[ඊයේ] LT[ට]",lastWeek:"[පසුගිය] dddd LT[ට]",sameElse:"L"},relativeTime:{future:"%sකින්",past:"%sකට පෙර",s:"තත්පර කිහිපය",ss:"තත්පර %d",m:"මිනිත්තුව",mm:"මිනිත්තු %d",h:"පැය",hh:"පැය %d",d:"දිනය",dd:"දින %d",M:"මාසය",MM:"මාස %d",y:"වසර",yy:"වසර %d"},dayOfMonthOrdinalParse:/\d{1,2} වැනි/,ordinal:function(e){return e+" වැනි"},meridiemParse:/පෙර වරු|පස් වරු|පෙ.ව|ප.ව./,isPM:function(e){return"ප.ව."===e||"පස් වරු"===e},meridiem:function(e,t,n){return e>11?n?"ප.ව.":"පස් වරු":n?"පෙ.ව.":"පෙර වරු"}});return t}))},ef07:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n("03529"),i=n("dd49");const s="text",o={CELL_TYPE:s,editor:r["a"],renderer:i["a"]}},f072:function(e,t,n){"use strict";var r=n("fd18"),i=n("73fa"),s=n("54d7"),o=r(Function.toString);i(s.inspectSource)||(s.inspectSource=function(e){return o(e)}),e.exports=s.inspectSource},f260:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("pt",{months:"janeiro_fevereiro_março_abril_maio_junho_julho_agosto_setembro_outubro_novembro_dezembro".split("_"),monthsShort:"jan_fev_mar_abr_mai_jun_jul_ago_set_out_nov_dez".split("_"),weekdays:"Domingo_Segunda-feira_Terça-feira_Quarta-feira_Quinta-feira_Sexta-feira_Sábado".split("_"),weekdaysShort:"Dom_Seg_Ter_Qua_Qui_Sex_Sáb".split("_"),weekdaysMin:"Do_2ª_3ª_4ª_5ª_6ª_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D [de] MMMM [de] YYYY",LLL:"D [de] MMMM [de] YYYY HH:mm",LLLL:"dddd, D [de] MMMM [de] YYYY HH:mm"},calendar:{sameDay:"[Hoje às] LT",nextDay:"[Amanhã às] LT",nextWeek:"dddd [às] LT",lastDay:"[Ontem às] LT",lastWeek:function(){return 0===this.day()||6===this.day()?"[Último] dddd [às] LT":"[Última] dddd [às] LT"},sameElse:"L"},relativeTime:{future:"em %s",past:"há %s",s:"segundos",ss:"%d segundos",m:"um minuto",mm:"%d minutos",h:"uma hora",hh:"%d horas",d:"um dia",dd:"%d dias",w:"uma semana",ww:"%d semanas",M:"um mês",MM:"%d meses",y:"um ano",yy:"%d anos"},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:"%dº",week:{dow:1,doy:4}});return t}))},f3ff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"},r=e.defineLocale("pa-in",{months:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),monthsShort:"ਜਨਵਰੀ_ਫ਼ਰਵਰੀ_ਮਾਰਚ_ਅਪ੍ਰੈਲ_ਮਈ_ਜੂਨ_ਜੁਲਾਈ_ਅਗਸਤ_ਸਤੰਬਰ_ਅਕਤੂਬਰ_ਨਵੰਬਰ_ਦਸੰਬਰ".split("_"),weekdays:"ਐਤਵਾਰ_ਸੋਮਵਾਰ_ਮੰਗਲਵਾਰ_ਬੁਧਵਾਰ_ਵੀਰਵਾਰ_ਸ਼ੁੱਕਰਵਾਰ_ਸ਼ਨੀਚਰਵਾਰ".split("_"),weekdaysShort:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),weekdaysMin:"ਐਤ_ਸੋਮ_ਮੰਗਲ_ਬੁਧ_ਵੀਰ_ਸ਼ੁਕਰ_ਸ਼ਨੀ".split("_"),longDateFormat:{LT:"A h:mm ਵਜੇ",LTS:"A h:mm:ss ਵਜੇ",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY, A h:mm ਵਜੇ",LLLL:"dddd, D MMMM YYYY, A h:mm ਵਜੇ"},calendar:{sameDay:"[ਅਜ] LT",nextDay:"[ਕਲ] LT",nextWeek:"[ਅਗਲਾ] dddd, LT",lastDay:"[ਕਲ] LT",lastWeek:"[ਪਿਛਲੇ] dddd, LT",sameElse:"L"},relativeTime:{future:"%s ਵਿੱਚ",past:"%s ਪਿਛਲੇ",s:"ਕੁਝ ਸਕਿੰਟ",ss:"%d ਸਕਿੰਟ",m:"ਇਕ ਮਿੰਟ",mm:"%d ਮਿੰਟ",h:"ਇੱਕ ਘੰਟਾ",hh:"%d ਘੰਟੇ",d:"ਇੱਕ ਦਿਨ",dd:"%d ਦਿਨ",M:"ਇੱਕ ਮਹੀਨਾ",MM:"%d ਮਹੀਨੇ",y:"ਇੱਕ ਸਾਲ",yy:"%d ਸਾਲ"},preparse:function(e){return e.replace(/[੧੨੩੪੫੬੭੮੯੦]/g,(function(e){return n[e]}))},postformat:function(e){return e.replace(/\d/g,(function(e){return t[e]}))},meridiemParse:/ਰਾਤ|ਸਵੇਰ|ਦੁਪਹਿਰ|ਸ਼ਾਮ/,meridiemHour:function(e,t){return 12===e&&(e=0),"ਰਾਤ"===t?e<4?e:e+12:"ਸਵੇਰ"===t?e:"ਦੁਪਹਿਰ"===t?e>=10?e:e+12:"ਸ਼ਾਮ"===t?e+12:void 0},meridiem:function(e,t,n){return e<4?"ਰਾਤ":e<10?"ਸਵੇਰ":e<17?"ਦੁਪਹਿਰ":e<20?"ਸ਼ਾਮ":"ਰਾਤ"},week:{dow:0,doy:6}});return r}))},f41c:function(e,t,n){"use strict";var r=n("80dd"),i=n("0ad8"),s=n("a60d").f,o=r("unscopables"),a=Array.prototype;void 0===a[o]&&s(a,o,{configurable:!0,value:i(null)}),e.exports=function(e){a[o][e]=!0}},f448:function(e,t,n){"use strict";var r=n("ac4f"),i=n("b343"),s=n("1fc8"),o=n("88c5"),a=!o("intersection",(function(e){return 2===e.size&&e.has(1)&&e.has(2)}))||i((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}));r({target:"Set",proto:!0,real:!0,forced:a},{intersection:s})},f4db:function(e,t,n){"use strict";n("0eec"),n("59a2")},f6b46:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=["Am Faoilleach","An Gearran","Am Màrt","An Giblean","An Cèitean","An t-Ògmhios","An t-Iuchar","An Lùnastal","An t-Sultain","An Dàmhair","An t-Samhain","An Dùbhlachd"],n=["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],r=["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],i=["Did","Dil","Dim","Dic","Dia","Dih","Dis"],s=["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],o=e.defineLocale("gd",{months:t,monthsShort:n,monthsParseExact:!0,weekdays:r,weekdaysShort:i,weekdaysMin:s,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[An-diugh aig] LT",nextDay:"[A-màireach aig] LT",nextWeek:"dddd [aig] LT",lastDay:"[An-dè aig] LT",lastWeek:"dddd [seo chaidh] [aig] LT",sameElse:"L"},relativeTime:{future:"ann an %s",past:"bho chionn %s",s:"beagan diogan",ss:"%d diogan",m:"mionaid",mm:"%d mionaidean",h:"uair",hh:"%d uairean",d:"latha",dd:"%d latha",M:"mìos",MM:"%d mìosan",y:"bliadhna",yy:"%d bliadhna"},dayOfMonthOrdinalParse:/\d{1,2}(d|na|mh)/,ordinal:function(e){var t=1===e?"d":e%10===2?"na":"mh";return e+t},week:{dow:1,doy:4}});return o}))},f6cb:function(e,t,n){"use strict";var r=n("54adf"),i=n("0204"),s=n("73fa"),o=n("6269"),a=n("c9a1"),l=n("9674"),u=n("6038"),c=r.Function,h=/MSIE .\./.test(a)||"BUN"===o&&function(){var e=r.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}();e.exports=function(e,t){var n=t?2:1;return h?function(r,o){var a=u(arguments.length,1)>n,h=s(r)?r:c(r),d=a?l(arguments,n):[],m=a?function(){i(h,this,d)}:h;return t?e(m,o):e(m)}:e}},f808:function(e,t,n){"use strict";var r=n("0227");e.exports=r("document","documentElement")},f86b:function(e,t,n){"use strict";var r=n("ac4f"),i=n("09d4"),s=n("88c5"),o=!s("isSupersetOf",(function(e){return!e}));r({target:"Set",proto:!0,real:!0,forced:o},{isSupersetOf:i})},f938:function(e,t,n){"use strict";n.r(t),n.d(t,"KEY_CODES",(function(){return s})),n.d(t,"isPrintableChar",(function(){return a})),n.d(t,"isFunctionKey",(function(){return l})),n.d(t,"isCtrlKey",(function(){return u})),n.d(t,"isCtrlMetaKey",(function(){return c})),n.d(t,"isKey",(function(){return h}));n("d06e");var r=n("81ea"),i=n("63d8");const s={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:Object(i["isFirefox"])()?182:174,AUDIO_MUTE:Object(i["isFirefox"])()?181:173,AUDIO_UP:Object(i["isFirefox"])()?183:175,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND_LEFT:91,COMMAND_RIGHT:93,COMMAND_FIREFOX:224,CONTROL:17,DELETE:46,END:35,ENTER:13,ESCAPE:27,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,F13:124,F14:125,F15:126,F16:127,F17:128,F18:129,F19:130,HOME:36,INSERT:45,MEDIA_NEXT:176,MEDIA_PLAY_PAUSE:179,MEDIA_PREV:177,MEDIA_STOP:178,NULL:0,NUM_LOCK:144,PAGE_DOWN:34,PAGE_UP:33,PAUSE:19,PERIOD:190,SCROLL_LOCK:145,SHIFT:16,SPACE:32,TAB:9,A:65,C:67,D:68,F:70,L:76,O:79,P:80,S:83,V:86,X:88,Y:89,Z:90},o=[s.ALT,s.ARROW_DOWN,s.ARROW_LEFT,s.ARROW_RIGHT,s.ARROW_UP,s.AUDIO_DOWN,s.AUDIO_MUTE,s.AUDIO_UP,s.BACKSPACE,s.CAPS_LOCK,s.DELETE,s.END,s.ENTER,s.ESCAPE,s.F1,s.F2,s.F3,s.F4,s.F5,s.F6,s.F7,s.F8,s.F9,s.F10,s.F11,s.F12,s.F13,s.F14,s.F15,s.F16,s.F17,s.F18,s.F19,s.HOME,s.INSERT,s.MEDIA_NEXT,s.MEDIA_PLAY_PAUSE,s.MEDIA_PREV,s.MEDIA_STOP,s.NULL,s.NUM_LOCK,s.PAGE_DOWN,s.PAGE_UP,s.PAUSE,s.SCROLL_LOCK,s.SHIFT,s.TAB];function a(e){return 32===e||e>=48&&e<=57||e>=96&&e<=111||e>=186&&e<=192||e>=219&&e<=222||e>=226||e>=65&&e<=90}function l(e){return o.includes(e)}function u(e){const t=[];return Object(i["isMacOS"])()?t.push(s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX):t.push(s.CONTROL),t.includes(e)}function c(e){return[s.CONTROL,s.COMMAND_LEFT,s.COMMAND_RIGHT,s.COMMAND_FIREFOX].includes(e)}function h(e,t){const n=t.split("|");let i=!1;return Object(r["arrayEach"])(n,t=>{if(e===s[t])return i=!0,!1}),i}},fa83:function(e,t,n){"use strict";n.r(t),n.d(t,"VERSION",(function(){return r})),n.d(t,"Parser",(function(){return qr})),n.d(t,"CstParser",(function(){return Jr})),n.d(t,"EmbeddedActionsParser",(function(){return Qr})),n.d(t,"ParserDefinitionErrorType",(function(){return Gr})),n.d(t,"EMPTY_ALT",(function(){return $r})),n.d(t,"Lexer",(function(){return Ee})),n.d(t,"LexerDefinitionErrorType",(function(){return ve})),n.d(t,"createToken",(function(){return He})),n.d(t,"createTokenInstance",(function(){return Fe})),n.d(t,"EOF",(function(){return je})),n.d(t,"tokenLabel",(function(){return Ce})),n.d(t,"tokenMatcher",(function(){return Ye})),n.d(t,"tokenName",(function(){return Me})),n.d(t,"defaultGrammarResolverErrorProvider",(function(){return Bn})),n.d(t,"defaultGrammarValidatorErrorProvider",(function(){return Wn})),n.d(t,"defaultParserErrorProvider",(function(){return Vn})),n.d(t,"EarlyExitException",(function(){return or})),n.d(t,"isRecognitionException",(function(){return nr})),n.d(t,"MismatchedTokenException",(function(){return rr})),n.d(t,"NotAllInputParsedException",(function(){return sr})),n.d(t,"NoViableAltException",(function(){return ir})),n.d(t,"defaultLexerErrorProvider",(function(){return _e})),n.d(t,"Alternation",(function(){return Je})),n.d(t,"Flat",(function(){return ze})),n.d(t,"NonTerminal",(function(){return Be})),n.d(t,"Option",(function(){return Ge})),n.d(t,"Repetition",(function(){return $e})),n.d(t,"RepetitionMandatory",(function(){return Ke})),n.d(t,"RepetitionMandatoryWithSeparator",(function(){return Xe})),n.d(t,"RepetitionWithSeparator",(function(){return qe})),n.d(t,"Rule",(function(){return We})),n.d(t,"Terminal",(function(){return Qe})),n.d(t,"serializeGrammar",(function(){return Ze})),n.d(t,"serializeProduction",(function(){return et})),n.d(t,"GAstVisitor",(function(){return rt})),n.d(t,"assignOccurrenceIndices",(function(){return qn})),n.d(t,"resolveGrammar",(function(){return Xn})),n.d(t,"validateGrammar",(function(){return $n})),n.d(t,"clearCache",(function(){return yi})),n.d(t,"createSyntaxDiagramsCode",(function(){return Zr})),n.d(t,"generateParserFactory",(function(){return pi})),n.d(t,"generateParserModule",(function(){return gi}));var r="6.5.0",i=n("77aa"),s=n("890f"),o={},a=new s["RegExpParser"];function l(e){var t=e.toString();if(o.hasOwnProperty(t))return o[t];var n=a.pattern(t);return o[t]=n,n}function u(){o={}}var c=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),h="Complement Sets are not supported for first char optimization",d='Unable to use "first char" lexer optimizations:\n';function m(e,t){void 0===t&&(t=!1);try{var n=l(e),r=f(n.value,{},n.flags.ignoreCase);return r}catch(a){if(a.message===h)t&&Object(i["d"])(d+"\tUnable to optimize: < "+e.toString()+" >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.");else{var o="";t&&(o="\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."),Object(i["c"])(d+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+s["VERSION"]+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+o)}}return[]}function f(e,t,n){switch(e.type){case"Disjunction":for(var r=0;r<e.value.length;r++)f(e.value[r],t,n);break;case"Alternative":var s=e.value;for(r=0;r<s.length;r++){var o=s[r];switch(o.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=o;switch(a.type){case"Character":p(a.value,t,n);break;case"Set":if(!0===a.complement)throw Error(h);Object(i["u"])(a.value,(function(e){if("number"===typeof e)p(e,t,n);else{var r=e;if(!0===n)for(var i=r.from;i<=r.to;i++)p(i,t,n);else{for(i=r.from;i<=r.to&&i<te;i++)p(i,t,n);if(r.to>=te)for(var s=r.from>=te?r.from:te,o=r.to,a=ne(s),l=ne(o),u=a;u<=l;u++)t[u]=u}}}));break;case"Group":f(a.value,t,n);break;default:throw Error("Non Exhaustive Match")}var l=void 0!==a.quantifier&&0===a.quantifier.atLeast;if("Group"===a.type&&!1===w(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return Object(i["U"])(t)}function p(e,t,n){var r=ne(e);t[r]=r,!0===n&&g(e,t)}function g(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=ne(r.charCodeAt(0));t[i]=i}else{var s=n.toLowerCase();if(s!==n){i=ne(s.charCodeAt(0));t[i]=i}}}function y(e,t){return Object(i["q"])(e.value,(function(e){if("number"===typeof e)return Object(i["j"])(t,e);var n=e;return void 0!==Object(i["q"])(t,(function(e){return n.from<=e&&e<=n.to}))}))}function w(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&(Object(i["y"])(e.value)?Object(i["o"])(e.value,w):w(e.value))}var b=function(e){function t(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return c(t,e),t.prototype.visitChildren=function(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}e.prototype.visitChildren.call(this,t)}},t.prototype.visitCharacter=function(e){Object(i["j"])(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===y(e,this.targetCharCodes)&&(this.found=!0):void 0!==y(e,this.targetCharCodes)&&(this.found=!0)},t}(s["BaseRegExpVisitor"]);function v(e,t){if(t instanceof RegExp){var n=l(t),r=new b(e);return r.visit(n),r.found}return void 0!==Object(i["q"])(t,(function(t){return Object(i["j"])(e,t.charCodeAt(0))}))}var _=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),S="PATTERN",E="defaultMode",C="modes",M="boolean"===typeof new RegExp("(?:)").sticky;function T(e,t){t=Object(i["k"])(t,{useSticky:M,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}});var n,r=t.tracer;r("initCharCodeToOptimizedIndexMap",(function(){ie()})),r("Reject Lexer.NA",(function(){n=Object(i["P"])(e,(function(e){return e[S]===Ee.NA}))}));var s,o,a,l,u,c,h,f,p,g,y,w=!1;r("Transform Patterns",(function(){w=!1,s=Object(i["I"])(n,(function(e){var n=e[S];if(Object(i["D"])(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||Object(i["j"])(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?W(n):B(n):r[1]}if(Object(i["B"])(n))return w=!0,{exec:n};if(Object(i["w"])(n,"exec"))return w=!0,n;if("string"===typeof n){if(1===n.length)return n;var s=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),o=new RegExp(s);return t.useSticky?W(o):B(o)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){o=Object(i["I"])(n,(function(e){return e.tokenTypeIdx})),a=Object(i["I"])(n,(function(e){var t=e.GROUP;if(t!==Ee.SKIPPED){if(Object(i["E"])(t))return t;if(Object(i["F"])(t))return!1;throw Error("non exhaustive match")}})),l=Object(i["I"])(n,(function(e){var t=e.LONGER_ALT;if(t){var r=Object(i["x"])(n,t);return r}})),u=Object(i["I"])(n,(function(e){return e.PUSH_MODE})),c=Object(i["I"])(n,(function(e){return Object(i["w"])(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=Z(t.lineTerminatorCharacters);h=Object(i["I"])(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(h=Object(i["I"])(n,(function(t){return Object(i["w"])(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===J(t,e)?v(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){f=Object(i["I"])(n,X),p=Object(i["I"])(s,$),g=Object(i["O"])(n,(function(e,t){var n=t.GROUP;return Object(i["E"])(n)&&n!==Ee.SKIPPED&&(e[n]=[]),e}),{}),y=Object(i["I"])(s,(function(e,t){return{pattern:s[t],longerAlt:l[t],canLineTerminator:h[t],isCustom:f[t],short:p[t],group:a[t],push:u[t],pop:c[t],tokenTypeIdx:o[t],tokenType:n[t]}}))}));var b=!0,_=[];return t.safeMode||r("First Char Optimization",(function(){_=Object(i["O"])(n,(function(e,n,r){if("string"===typeof n.PATTERN){var s=n.PATTERN.charCodeAt(0),o=ne(s);ee(e,o,y[r])}else if(Object(i["y"])(n.START_CHARS_HINT)){var a;Object(i["u"])(n.START_CHARS_HINT,(function(t){var n="string"===typeof t?t.charCodeAt(0):t,i=ne(n);a!==i&&(a=i,ee(e,i,y[r]))}))}else if(Object(i["D"])(n.PATTERN))if(n.PATTERN.unicode)b=!1,t.ensureOptimizations&&Object(i["c"])(d+"\tUnable to analyze < "+n.PATTERN.toString()+" > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE");else{var l=m(n.PATTERN,t.ensureOptimizations);Object(i["A"])(l)&&(b=!1),Object(i["u"])(l,(function(t){ee(e,t,y[r])}))}else t.ensureOptimizations&&Object(i["c"])(d+"\tTokenType: <"+n.name+"> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE"),b=!1;return e}),[])})),r("ArrayPacking",(function(){_=Object(i["L"])(_)})),{emptyGroups:g,patternIdxToConfig:y,charCodeToPatternIdxToConfig:_,hasCustom:w,canBeOptimized:b}}function R(e,t){var n=[],r=N(e);n=n.concat(r.errors);var i=A(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(O(s)),n=n.concat(j(s)),n=n.concat(F(s,t)),n=n.concat(Y(s)),n}function O(e){var t=[],n=Object(i["p"])(e,(function(e){return Object(i["D"])(e[S])}));return t=t.concat(I(n)),t=t.concat(D(n)),t=t.concat(H(n)),t=t.concat(P(n)),t=t.concat(k(n)),t}function N(e){var t=Object(i["p"])(e,(function(e){return!Object(i["w"])(e,S)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:ve.MISSING_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}function A(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return!Object(i["D"])(t)&&!Object(i["B"])(t)&&!Object(i["w"])(t,"exec")&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:ve.INVALID_PATTERN,tokenTypes:[e]}})),r=Object(i["l"])(e,t);return{errors:n,valid:r}}var L=/[^\\][\$]/;function I(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return _(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[S];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return L.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain end of input anchor '$'\n\tSee sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:ve.EOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function k(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return t.test("")})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:ve.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}));return n}var x=/[^\\[][\^]|^\^/;function D(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return _(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}(s["BaseRegExpVisitor"]),n=Object(i["p"])(e,(function(e){var n=e[S];try{var r=l(n),i=new t;return i.visit(r),i.found}catch(s){return x.test(n.source)}})),r=Object(i["I"])(n,(function(e){return{message:"Unexpected RegExp Anchor Error:\n\tToken Type: ->"+e.name+"<- static 'PATTERN' cannot contain start of input anchor '^'\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#ANCHORS\tfor details.",type:ve.SOI_ANCHOR_FOUND,tokenTypes:[e]}}));return r}function H(e){var t=Object(i["p"])(e,(function(e){var t=e[S];return t instanceof RegExp&&(t.multiline||t.global)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:ve.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}));return n}function P(e){var t=[],n=Object(i["I"])(e,(function(n){return Object(i["O"])(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||Object(i["j"])(t,r)||r.PATTERN===Ee.NA||(t.push(r),e.push(r)),e}),[])}));n=Object(i["i"])(n);var r=Object(i["p"])(n,(function(e){return e.length>1})),s=Object(i["I"])(r,(function(e){var t=Object(i["I"])(e,(function(e){return e.name})),n=Object(i["s"])(e).PATTERN;return{message:"The same RegExp pattern ->"+n+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:ve.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}));return s}function j(e){var t=Object(i["p"])(e,(function(e){if(!Object(i["w"])(e,"GROUP"))return!1;var t=e.GROUP;return t!==Ee.SKIPPED&&t!==Ee.NA&&!Object(i["E"])(t)})),n=Object(i["I"])(t,(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:ve.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}));return n}function F(e,t){var n=Object(i["p"])(e,(function(e){return void 0!==e.PUSH_MODE&&!Object(i["j"])(t,e.PUSH_MODE)})),r=Object(i["I"])(n,(function(e){var t="Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist";return{message:t,type:ve.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}));return r}function Y(e){var t=[],n=Object(i["O"])(e,(function(e,t,n){var r=t.PATTERN;return r===Ee.NA||(Object(i["E"])(r)?e.push({str:r,idx:n,tokenType:t}):Object(i["D"])(r)&&V(r)&&e.push({str:r.source,idx:n,tokenType:t})),e}),[]);return Object(i["u"])(e,(function(e,r){Object(i["u"])(n,(function(n){var i=n.str,s=n.idx,o=n.tokenType;if(r<s&&U(i,e.PATTERN)){var a="Token: ->"+o.name+"<- can never be matched.\nBecause it appears AFTER the Token Type ->"+e.name+"<-in the lexer's definition.\nSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#UNREACHABLE";t.push({message:a,type:ve.UNREACHABLE_PATTERN,tokenTypes:[e,o]})}}))})),t}function U(e,t){if(Object(i["D"])(t)){var n=t.exec(e);return null!==n&&0===n.index}if(Object(i["B"])(t))return t(e,0,[],{});if(Object(i["w"])(t,"exec"))return t.exec(e,0,[],{});if("string"===typeof t)return t===e;throw Error("non exhaustive match")}function V(e){var t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return void 0===Object(i["q"])(t,(function(t){return-1!==e.source.indexOf(t)}))}function B(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function W(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function z(e,t,n){var r=[];return Object(i["w"])(e,E)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+E+"> property in its definition\n",type:ve.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Object(i["w"])(e,C)||r.push({message:"A MultiMode Lexer cannot be initialized without a <"+C+"> property in its definition\n",type:ve.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Object(i["w"])(e,C)&&Object(i["w"])(e,E)&&!Object(i["w"])(e.modes,e.defaultMode)&&r.push({message:"A MultiMode Lexer cannot be initialized with a "+E+": <"+e.defaultMode+">which does not exist\n",type:ve.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Object(i["w"])(e,C)&&Object(i["u"])(e.modes,(function(e,t){Object(i["u"])(e,(function(e,n){Object(i["F"])(e)&&r.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+t+"> at index: <"+n+">\n",type:ve.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),r}function G(e,t,n){var r=[],s=!1,o=Object(i["i"])(Object(i["t"])(Object(i["J"])(e.modes,(function(e){return e})))),a=Object(i["P"])(o,(function(e){return e[S]===Ee.NA})),l=Z(n);return t&&Object(i["u"])(a,(function(e){var t=J(e,l);if(!1!==t){var n=Q(e,t),o={message:n,type:t.issue,tokenType:e};r.push(o)}else Object(i["w"])(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(s=!0):v(l,e.PATTERN)&&(s=!0)})),t&&!s&&r.push({message:"Warning: No LINE_BREAKS Found.\n\tThis Lexer has been defined to track line and column information,\n\tBut none of the Token Types can be identified as matching a line terminator.\n\tSee https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n\tfor details.",type:ve.NO_LINE_BREAKS_FLAGS}),r}function K(e){var t={},n=Object(i["G"])(e);return Object(i["u"])(n,(function(n){var r=e[n];if(!Object(i["y"])(r))throw Error("non exhaustive match");t[n]=[]})),t}function X(e){var t=e.PATTERN;if(Object(i["D"])(t))return!1;if(Object(i["B"])(t))return!0;if(Object(i["w"])(t,"exec"))return!0;if(Object(i["E"])(t))return!1;throw Error("non exhaustive match")}function $(e){return!(!Object(i["E"])(e)||1!==e.length)&&e.charCodeAt(0)}var q={test:function(e){for(var t=e.length,n=this.lastIndex;n<t;n++){var r=e.charCodeAt(n);if(10===r)return this.lastIndex=n+1,!0;if(13===r)return 10===e.charCodeAt(n+1)?this.lastIndex=n+2:this.lastIndex=n+1,!0}return!1},lastIndex:0};function J(e,t){if(Object(i["w"])(e,"LINE_BREAKS"))return!1;if(Object(i["D"])(e.PATTERN)){try{v(t,e.PATTERN)}catch(n){return{issue:ve.IDENTIFY_TERMINATOR,errMsg:n.message}}return!1}if(Object(i["E"])(e.PATTERN))return!1;if(X(e))return{issue:ve.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Q(e,t){if(t.issue===ve.IDENTIFY_TERMINATOR)return"Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <"+e.name+"> Token Type\n\t Root cause: "+t.errMsg+".\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===ve.CUSTOM_LINE_BREAK)return"Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <"+e.name+"> Token Type\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}function Z(e){var t=Object(i["I"])(e,(function(e){return Object(i["E"])(e)&&e.length>0?e.charCodeAt(0):e}));return t}function ee(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var te=256;function ne(e){return e<te?e:re[e]}var re=[];function ie(){if(Object(i["A"])(re)){re=new Array(65536);for(var e=0;e<65536;e++)re[e]=e>255?255+~~(e/255):e}}function se(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function oe(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var ae=1,le={};function ue(e){var t=ce(e);he(t),me(t),de(t),Object(i["u"])(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function ce(e){var t=Object(i["g"])(e),n=e,r=!0;while(r){n=Object(i["i"])(Object(i["t"])(Object(i["I"])(n,(function(e){return e.CATEGORIES}))));var s=Object(i["l"])(n,t);t=t.concat(s),Object(i["A"])(s)?r=!1:n=s}return t}function he(e){Object(i["u"])(e,(function(e){pe(e)||(le[ae]=e,e.tokenTypeIdx=ae++),ge(e)&&!Object(i["y"])(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),ge(e)||(e.CATEGORIES=[]),ye(e)||(e.categoryMatches=[]),we(e)||(e.categoryMatchesMap={})}))}function de(e){Object(i["u"])(e,(function(e){e.categoryMatches=[],Object(i["u"])(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(le[n].tokenTypeIdx)}))}))}function me(e){Object(i["u"])(e,(function(e){fe([],e)}))}function fe(e,t){Object(i["u"])(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),Object(i["u"])(t.CATEGORIES,(function(n){var r=e.concat(t);Object(i["j"])(r,n)||fe(r,n)}))}function pe(e){return Object(i["w"])(e,"tokenTypeIdx")}function ge(e){return Object(i["w"])(e,"CATEGORIES")}function ye(e){return Object(i["w"])(e,"categoryMatches")}function we(e){return Object(i["w"])(e,"categoryMatchesMap")}function be(e){return Object(i["w"])(e,"tokenTypeIdx")}var ve,_e={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->"+e.image+"<- The Mode Stack is empty"},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return"unexpected character: ->"+e.charAt(t)+"<- at offset: "+t+", skipped "+n+" characters."}};(function(e){e[e["MISSING_PATTERN"]=0]="MISSING_PATTERN",e[e["INVALID_PATTERN"]=1]="INVALID_PATTERN",e[e["EOI_ANCHOR_FOUND"]=2]="EOI_ANCHOR_FOUND",e[e["UNSUPPORTED_FLAGS_FOUND"]=3]="UNSUPPORTED_FLAGS_FOUND",e[e["DUPLICATE_PATTERNS_FOUND"]=4]="DUPLICATE_PATTERNS_FOUND",e[e["INVALID_GROUP_TYPE_FOUND"]=5]="INVALID_GROUP_TYPE_FOUND",e[e["PUSH_MODE_DOES_NOT_EXIST"]=6]="PUSH_MODE_DOES_NOT_EXIST",e[e["MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE"]=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e["MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY"]=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e["MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST"]=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e["LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED"]=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e["SOI_ANCHOR_FOUND"]=11]="SOI_ANCHOR_FOUND",e[e["EMPTY_MATCH_PATTERN"]=12]="EMPTY_MATCH_PATTERN",e[e["NO_LINE_BREAKS_FLAGS"]=13]="NO_LINE_BREAKS_FLAGS",e[e["UNREACHABLE_PATTERN"]=14]="UNREACHABLE_PATTERN",e[e["IDENTIFY_TERMINATOR"]=15]="IDENTIFY_TERMINATOR",e[e["CUSTOM_LINE_BREAK"]=16]="CUSTOM_LINE_BREAK"})(ve||(ve={}));var Se={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:_e,traceInitPerf:!1,skipValidations:!1};Object.freeze(Se);var Ee=function(){function e(e,t){var n=this;if(void 0===t&&(t=Se),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},"boolean"===typeof t)throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");this.config=Object(i["K"])(Se,t);var r=this.config.traceInitPerf;!0===r?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"===typeof r&&(this.traceInitMaxIdent=r,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",(function(){var r,s=!0;n.TRACE_INIT("Lexer Config handling",(function(){if(n.config.lineTerminatorsPattern===Se.lineTerminatorsPattern)n.config.lineTerminatorsPattern=q;else if(n.config.lineTerminatorCharacters===Se.lineTerminatorCharacters)throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n\tFor details See: https://sap.github.io/chevrotain/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");if(t.safeMode&&t.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),Object(i["y"])(e)?(r={modes:{}},r.modes[E]=Object(i["g"])(e),r[E]=E):(s=!1,r=Object(i["h"])(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(z(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(G(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},Object(i["u"])(r.modes,(function(e,t){r.modes[t]=Object(i["P"])(e,(function(e){return Object(i["F"])(e)}))}));var o=Object(i["G"])(r.modes);if(Object(i["u"])(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var s;(n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(R(e,o))})),Object(i["A"])(n.lexerDefinitionErrors))&&(ue(e),n.TRACE_INIT("analyzeTokenTypes",(function(){s=T(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=s.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=s.charCodeToPatternIdxToConfig,n.emptyGroups=Object(i["K"])(n.emptyGroups,s.emptyGroups),n.hasCustom=s.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=s.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!Object(i["A"])(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var a=Object(i["I"])(n.lexerDefinitionErrors,(function(e){return e.message})),l=a.join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+l)}Object(i["u"])(n.lexerDefinitionWarning,(function(e){Object(i["d"])(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(M?(n.chopInput=i["a"],n.match=n.matchWithTest):(n.updateLastIndex=i["b"],n.match=n.matchWithExec),s&&(n.handleModes=i["b"]),!1===n.trackStartLines&&(n.computeNewColumn=i["a"]),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=i["b"]),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else{if(!/onlyOffset/i.test(n.config.positionTracking))throw Error('Invalid <positionTracking> config option: "'+n.config.positionTracking+'"');n.createTokenInstance=n.createOffsetOnlyToken}n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)})),n.TRACE_INIT("Failed Optimization Warnings",(function(){var e=Object(i["O"])(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!Object(i["A"])(e))throw Error("Lexer Modes: < "+e.join(", ")+' > cannot be optimized.\n\t Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.\n\t Or inspect the console log for details on how to resolve these issues.')})),n.TRACE_INIT("clearRegExpParserCache",(function(){u()})),n.TRACE_INIT("toFastProperties",(function(){Object(i["S"])(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!Object(i["A"])(this.lexerDefinitionErrors)){var n=Object(i["I"])(this.lexerDefinitionErrors,(function(e){return e.message})),r=n.join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+r)}var s=this.tokenizeInternal(e,t);return s},e.prototype.tokenizeInternal=function(e,t){var n,r,s,o,a,l,u,c,h,d,m,f,p,g,y=this,w=e,b=w.length,v=0,_=0,S=this.hasCustom?0:Math.floor(e.length/10),E=new Array(S),C=[],M=this.trackStartLines?1:void 0,T=this.trackStartLines?1:void 0,R=K(this.emptyGroups),O=this.trackStartLines,N=this.config.lineTerminatorsPattern,A=0,L=[],I=[],k=[],x=[];Object.freeze(x);var D=void 0;function H(){return L}function P(e){var t=ne(e),n=I[t];return void 0===n?x:n}var j,F=function(e){if(1===k.length&&void 0===e.tokenType.PUSH_MODE){var t=y.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);C.push({offset:e.startOffset,line:void 0!==e.startLine?e.startLine:void 0,column:void 0!==e.startColumn?e.startColumn:void 0,length:e.image.length,message:t})}else{k.pop();var n=Object(i["H"])(k);L=y.patternIdxToConfig[n],I=y.charCodeToPatternIdxToConfig[n],A=L.length;var r=y.canModeBeOptimized[n]&&!1===y.config.safeMode;D=I&&r?P:H}};function Y(e){k.push(e),I=this.charCodeToPatternIdxToConfig[e],L=this.patternIdxToConfig[e],A=L.length,A=L.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;D=I&&t?P:H}Y.call(this,t);while(v<b){a=null;var U=w.charCodeAt(v),V=D(U),B=V.length;for(n=0;n<B;n++){j=V[n];var W=j.pattern;l=null;var z=j.short;if(!1!==z?U===z&&(a=W):!0===j.isCustom?(g=W.exec(w,v,E,R),null!==g?(a=g[0],void 0!==g.payload&&(l=g.payload)):a=null):(this.updateLastIndex(W,v),a=this.match(W,e,v)),null!==a){if(o=j.longerAlt,void 0!==o){var G=L[o],X=G.pattern;u=null,!0===G.isCustom?(g=X.exec(w,v,E,R),null!==g?(s=g[0],void 0!==g.payload&&(u=g.payload)):s=null):(this.updateLastIndex(X,v),s=this.match(X,e,v)),s&&s.length>a.length&&(a=s,l=u,j=G)}break}}if(null!==a){if(c=a.length,h=j.group,void 0!==h&&(d=j.tokenTypeIdx,m=this.createTokenInstance(a,v,d,j.tokenType,M,T,c),this.handlePayload(m,l),!1===h?_=this.addToken(E,_,m):R[h].push(m)),e=this.chopInput(e,c),v+=c,T=this.computeNewColumn(T,c),!0===O&&!0===j.canLineTerminator){var $=0,q=void 0,J=void 0;N.lastIndex=0;do{q=N.test(a),!0===q&&(J=N.lastIndex-1,$++)}while(!0===q);0!==$&&(M+=$,T=c-J,this.updateTokenEndLineColumnLocation(m,h,J,$,M,T,c))}this.handleModes(j,F,Y,m)}else{var Q=v,Z=M,ee=T,te=!1;while(!te&&v<b)for(w.charCodeAt(v),e=this.chopInput(e,1),v++,r=0;r<A;r++){var re=L[r];W=re.pattern,z=re.short;if(!1!==z?w.charCodeAt(v)===z&&(te=!0):!0===re.isCustom?te=null!==W.exec(w,v,E,R):(this.updateLastIndex(W,v),te=null!==W.exec(e)),!0===te)break}f=v-Q,p=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(w,Q,f,Z,ee),C.push({offset:Q,line:Z,column:ee,length:f,message:p})}}return this.hasCustom||(E.length=_),{tokens:E,groups:R,errors:C}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var i=e.push;t(r),void 0!==i&&n.call(this,i)}else void 0!==e.push&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,i,s,o){var a,l;void 0!==t&&(a=n===o-1,l=a?-1:0,1===r&&!0===a||(e.endLine=i+l,e.endColumn=s-1-l))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,i,s){return{image:e,startOffset:t,startLine:i,startColumn:s,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,i,s,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:s,endColumn:s+o-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,t++,t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){null!==t&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){var r=e.test(t);return!0===r?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return null!==n?n[0]:n},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();function Ce(e){return Te(e)?e.LABEL:e.name}function Me(e){return e.name}function Te(e){return Object(i["E"])(e.LABEL)&&""!==e.LABEL}var Re="parent",Oe="categories",Ne="label",Ae="group",Le="push_mode",Ie="pop_mode",ke="longer_alt",xe="line_breaks",De="start_chars_hint";function He(e){return Pe(e)}function Pe(e){var t=e.pattern,n={};if(n.name=e.name,Object(i["F"])(t)||(n.PATTERN=t),Object(i["w"])(e,Re))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return Object(i["w"])(e,Oe)&&(n.CATEGORIES=e[Oe]),ue([n]),Object(i["w"])(e,Ne)&&(n.LABEL=e[Ne]),Object(i["w"])(e,Ae)&&(n.GROUP=e[Ae]),Object(i["w"])(e,Ie)&&(n.POP_MODE=e[Ie]),Object(i["w"])(e,Le)&&(n.PUSH_MODE=e[Le]),Object(i["w"])(e,ke)&&(n.LONGER_ALT=e[ke]),Object(i["w"])(e,xe)&&(n.LINE_BREAKS=e[xe]),Object(i["w"])(e,De)&&(n.START_CHARS_HINT=e[De]),n}var je=He({name:"EOF",pattern:Ee.NA});function Fe(e,t,n,r,i,s,o,a){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:s,startColumn:o,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function Ye(e,t){return se(e,t)}ue([je]);var Ue=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),Object(i["u"])(this.definition,(function(t){t.accept(e)}))},e}(),Be=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),Object.defineProperty(t.prototype,"definition",{get:function(){return void 0!==this.referencedRule?this.referencedRule.definition:[]},set:function(e){},enumerable:!0,configurable:!0}),t.prototype.accept=function(e){e.visit(this)},t}(Ve),We=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),ze=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Ge=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Ke=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Xe=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),$e=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),qe=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Je=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,Object(i["f"])(n,Object(i["N"])(t,(function(e){return void 0!==e}))),n}return Ue(t,e),t}(Ve),Qe=function(){function e(e){this.idx=1,Object(i["f"])(this,Object(i["N"])(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function Ze(e){return Object(i["I"])(e,et)}function et(e){function t(e){return Object(i["I"])(e,et)}if(e instanceof Be)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof ze)return{type:"Flat",definition:t(e.definition)};if(e instanceof Ge)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Ke)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Xe)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:et(new Qe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof qe)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:et(new Qe({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof $e)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Je)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof Qe){var n={type:"Terminal",name:e.terminalType.name,label:Ce(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=Object(i["D"])(r)?r.source:r),n}if(e instanceof We)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var tt=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),Object(i["u"])(e.definition,(function(r,s){var o=Object(i["m"])(e.definition,s+1);if(r instanceof Be)n.walkProdRef(r,o,t);else if(r instanceof Qe)n.walkTerminal(r,o,t);else if(r instanceof ze)n.walkFlat(r,o,t);else if(r instanceof Ge)n.walkOption(r,o,t);else if(r instanceof Ke)n.walkAtLeastOne(r,o,t);else if(r instanceof Xe)n.walkAtLeastOneSep(r,o,t);else if(r instanceof qe)n.walkManySep(r,o,t);else if(r instanceof $e)n.walkMany(r,o,t);else{if(!(r instanceof Je))throw Error("non exhaustive match");n.walkOr(r,o,t)}}))},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,n){var r=[new Ge({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new Ge({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=nt(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var r=this,s=t.concat(n);Object(i["u"])(e.definition,(function(e){var t=new ze({definition:[e]});r.walk(t,s)}))},e}();function nt(e,t,n){var r=[new Ge({definition:[new Qe({terminalType:e.separator})].concat(e.definition)})],i=r.concat(t,n);return i}var rt=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case Be:return this.visitNonTerminal(t);case ze:return this.visitFlat(t);case Ge:return this.visitOption(t);case Ke:return this.visitRepetitionMandatory(t);case Xe:return this.visitRepetitionMandatoryWithSeparator(t);case qe:return this.visitRepetitionWithSeparator(t);case $e:return this.visitRepetition(t);case Je:return this.visitAlternation(t);case Qe:return this.visitTerminal(t);case We:return this.visitRule(t);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitFlat=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}(),it=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function st(e){return e instanceof ze||e instanceof Ge||e instanceof $e||e instanceof Ke||e instanceof Xe||e instanceof qe||e instanceof Qe||e instanceof We}function ot(e,t){void 0===t&&(t=[]);var n=e instanceof Ge||e instanceof $e||e instanceof qe;return!!n||(e instanceof Je?Object(i["Q"])(e.definition,(function(e){return ot(e,t)})):!(e instanceof Be&&Object(i["j"])(t,e))&&(e instanceof Ve&&(e instanceof Be&&t.push(e),Object(i["o"])(e.definition,(function(e){return ot(e,t)})))))}function at(e){return e instanceof Je}function lt(e){if(e instanceof Be)return"SUBRULE";if(e instanceof Ge)return"OPTION";if(e instanceof Je)return"OR";if(e instanceof Ke)return"AT_LEAST_ONE";if(e instanceof Xe)return"AT_LEAST_ONE_SEP";if(e instanceof qe)return"MANY_SEP";if(e instanceof $e)return"MANY";if(e instanceof Qe)return"CONSUME";throw Error("non exhaustive match")}var ut=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.separator="-",t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return it(t,e),t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";Object(i["w"])(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitOption=function(e){this.dslMethods.option.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},t.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},t.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},t}(rt),ct=new ut;function ht(e){ct.reset(),e.accept(ct);var t=ct.dslMethods;return ct.reset(),t}function dt(e){if(e instanceof Be)return dt(e.referencedRule);if(e instanceof Qe)return pt(e);if(st(e))return mt(e);if(at(e))return ft(e);throw Error("non exhaustive match")}function mt(e){var t,n=[],r=e.definition,s=0,o=r.length>s,a=!0;while(o&&a)t=r[s],a=ot(t),n=n.concat(dt(t)),s+=1,o=r.length>s;return Object(i["T"])(n)}function ft(e){var t=Object(i["I"])(e.definition,(function(e){return dt(e)}));return Object(i["T"])(Object(i["t"])(t))}function pt(e){return[e.terminalType]}var gt="_~IN~_",yt=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),wt=function(e){function t(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return yt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(e,t,n){},t.prototype.walkProdRef=function(e,t,n){var r=vt(e.referencedRule,e.idx)+this.topProd.name,i=t.concat(n),s=new ze({definition:i}),o=dt(s);this.follows[r]=o},t}(tt);function bt(e){var t={};return Object(i["u"])(e,(function(e){var n=new wt(e).startWalking();Object(i["f"])(t,n)})),t}function vt(e,t){return e.name+t+gt}var _t=4,St=8,Et=8,Ct=1<<St,Mt=2<<St,Tt=3<<St,Rt=4<<St,Ot=5<<St,Nt=6<<St;function At(e,t,n){return n|t|e}var Lt=32-Et;function It(e,t,n,r){var i=r+1<<Lt;return At(e,t,n)|i}var kt=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function xt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset)}function Dt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset===!0&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Ht(e,t,n){void 0===e.children[n]?e.children[n]=[t]:e.children[n].push(t)}function Pt(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var jt=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return kt(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!Object(i["F"])(e.name)){var r=void 0;if(e instanceof Ge||e instanceof $e||e instanceof Ke||e instanceof Je)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof Xe||e instanceof qe))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var s=[r],o=At(this.ruleIdx,n,e.idx);this.result.push({def:s,key:o,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,Ge,Mt)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,$e,Tt)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,Ke,Rt)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,Xe,Nt)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,qe,Ot)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,Je,Ct);var n=e.definition.length>1;Object(i["u"])(e.definition,(function(r,s){if(!Object(i["F"])(r.name)){var o=r.definition;o=n?[new Ge({definition:r.definition})]:r.definition;var a=It(t.ruleIdx,Ct,e.idx,s);t.result.push({def:o,key:a,name:r.name,orgProd:r})}}))},t}(rt);function Ft(e,t){var n={allRuleNames:[]};return Object(i["u"])(e,(function(e){var r=t[e.name];n.allRuleNames.push(e.name);var s=new jt(r);e.accept(s),Object(i["u"])(s.result,(function(t){t.def,t.key;var r=t.name;n.allRuleNames.push(e.name+r)}))})),n}var Yt=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ut=function(e){function t(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName="",r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return Yt(t,e),t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=Object(i["g"])(this.path.ruleStack).reverse(),this.occurrenceStack=Object(i["g"])(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(t,n){void 0===n&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},t.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},t.prototype.updateExpectedNext=function(){Object(i["A"])(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(tt),Vt=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName="",r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return Yt(t,e),t.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),i=new ze({definition:r});this.possibleTokTypes=dt(i),this.found=!0}},t}(Ut),Bt=function(e){function t(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return Yt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(tt),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(Bt),zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(Bt),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(Bt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Yt(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var s=Object(i["s"])(n.concat(r));this.result.isEndOfRule=void 0===s,s instanceof Qe&&(this.result.token=s.terminalType,this.result.occurrence=s.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(Bt);function Xt(e,t,n){void 0===n&&(n=[]),n=Object(i["g"])(n);var r=[],s=0;function o(t){return t.concat(Object(i["m"])(e,s+1))}function a(e){var i=Xt(o(e),t,n);return r.concat(i)}while(n.length<t&&s<e.length){var l=e[s];if(l instanceof ze)return a(l.definition);if(l instanceof Be)return a(l.definition);if(l instanceof Ge)r=a(l.definition);else{if(l instanceof Ke){var u=l.definition.concat([new $e({definition:l.definition})]);return a(u)}if(l instanceof Xe){u=[new ze({definition:l.definition}),new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})];return a(u)}if(l instanceof qe){u=l.definition.concat([new $e({definition:[new Qe({terminalType:l.separator})].concat(l.definition)})]);r=a(u)}else if(l instanceof $e){u=l.definition.concat([new $e({definition:l.definition})]);r=a(u)}else{if(l instanceof Je)return Object(i["u"])(l.definition,(function(e){r=a(e.definition)})),r;if(!(l instanceof Qe))throw Error("non exhaustive match");n.push(l.terminalType)}}s++}return r.push({partialPath:n,suffixDef:Object(i["m"])(e,s)}),r}function $t(e,t,n,r){var s="EXIT_NONE_TERMINAL",o=[s],a="EXIT_ALTERNATIVE",l=!1,u=t.length,c=u-r-1,h=[],d=[];d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});while(!Object(i["A"])(d)){var m=d.pop();if(m!==a){var f=m.def,p=m.idx,g=m.ruleStack,y=m.occurrenceStack;if(!Object(i["A"])(f)){var w=f[0];if(w===s){var b={idx:p,def:Object(i["m"])(f),ruleStack:Object(i["n"])(g),occurrenceStack:Object(i["n"])(y)};d.push(b)}else if(w instanceof Qe)if(p<u-1){var v=p+1,_=t[v];if(n(_,w.terminalType)){b={idx:v,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(b)}}else{if(p!==u-1)throw Error("non exhaustive match");h.push({nextTokenType:w.terminalType,nextTokenOccurrence:w.idx,ruleStack:g,occurrenceStack:y}),l=!0}else if(w instanceof Be){var S=Object(i["g"])(g);S.push(w.nonTerminalName);var E=Object(i["g"])(y);E.push(w.idx);b={idx:p,def:w.definition.concat(o,Object(i["m"])(f)),ruleStack:S,occurrenceStack:E};d.push(b)}else if(w instanceof Ge){var C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);var M={idx:p,def:w.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y};d.push(M)}else if(w instanceof Ke){var T=new $e({definition:w.definition,idx:w.idx}),R=w.definition.concat([T],Object(i["m"])(f));b={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(b)}else if(w instanceof Xe){var O=new Qe({terminalType:w.separator});T=new $e({definition:[O].concat(w.definition),idx:w.idx}),R=w.definition.concat([T],Object(i["m"])(f)),b={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(b)}else if(w instanceof qe){C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);O=new Qe({terminalType:w.separator});var N=new $e({definition:[O].concat(w.definition),idx:w.idx});R=w.definition.concat([N],Object(i["m"])(f)),M={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(M)}else if(w instanceof $e){C={idx:p,def:Object(i["m"])(f),ruleStack:g,occurrenceStack:y};d.push(C),d.push(a);N=new $e({definition:w.definition,idx:w.idx}),R=w.definition.concat([N],Object(i["m"])(f)),M={idx:p,def:R,ruleStack:g,occurrenceStack:y};d.push(M)}else if(w instanceof Je)for(var A=w.definition.length-1;A>=0;A--){var L=w.definition[A],I={idx:p,def:L.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y};d.push(I),d.push(a)}else if(w instanceof ze)d.push({idx:p,def:w.definition.concat(Object(i["m"])(f)),ruleStack:g,occurrenceStack:y});else{if(!(w instanceof We))throw Error("non exhaustive match");d.push(qt(w,p,g,y))}}}else l&&Object(i["H"])(d).idx<=c&&d.pop()}return h}function qt(e,t,n,r){var s=Object(i["g"])(n);s.push(e.name);var o=Object(i["g"])(r);return o.push(1),{idx:t,def:e.definition,ruleStack:s,occurrenceStack:o}}var Jt,Qt=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Zt(e){if(e instanceof Ge)return Jt.OPTION;if(e instanceof $e)return Jt.REPETITION;if(e instanceof Ke)return Jt.REPETITION_MANDATORY;if(e instanceof Xe)return Jt.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof qe)return Jt.REPETITION_WITH_SEPARATOR;if(e instanceof Je)return Jt.ALTERNATION;throw Error("non exhaustive match")}function en(e,t,n,r,i,s){var o=hn(e,t,n),a=pn(o)?oe:se;return s(o,r,a,i)}function tn(e,t,n,r,i,s){var o=dn(e,t,i,n),a=pn(o)?oe:se;return s(o[0],a,r)}function nn(e,t,n,r){var s=e.length,o=Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=Object(i["I"])(t,(function(e){return e.GATE})),o=0;o<s;o++){var a=e[o],l=a.length,u=r[o];if(void 0===u||!1!==u.call(this))e:for(var c=0;c<l;c++){for(var h=a[c],d=h.length,m=0;m<d;m++){var f=this.LA(m+1);if(!1===n(f,h[m]))continue e}return o}}};if(o&&!r){var a=Object(i["I"])(e,(function(e){return Object(i["t"])(e)})),l=Object(i["O"])(a,(function(e,t,n){return Object(i["u"])(t,(function(t){Object(i["w"])(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),Object(i["u"])(t.categoryMatches,(function(t){Object(i["w"])(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return l[e.tokenTypeIdx]}}return function(){for(var t=0;t<s;t++){var r=e[t],i=r.length;e:for(var o=0;o<i;o++){for(var a=r[o],l=a.length,u=0;u<l;u++){var c=this.LA(u+1);if(!1===n(c,a[u]))continue e}return t}}}}function rn(e,t,n){var r=Object(i["o"])(e,(function(e){return 1===e.length})),s=e.length;if(r&&!n){var o=Object(i["t"])(e);if(1===o.length&&Object(i["A"])(o[0].categoryMatches)){var a=o[0],l=a.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}var u=Object(i["O"])(o,(function(e,t,n){return e[t.tokenTypeIdx]=!0,Object(i["u"])(t.categoryMatches,(function(t){e[t]=!0})),e}),[]);return function(){var e=this.LA(1);return!0===u[e.tokenTypeIdx]}}return function(){e:for(var n=0;n<s;n++){for(var r=e[n],i=r.length,o=0;o<i;o++){var a=this.LA(o+1);if(!1===t(a,r[o]))continue e}return!0}return!1}}(function(e){e[e["OPTION"]=0]="OPTION",e[e["REPETITION"]=1]="REPETITION",e[e["REPETITION_MANDATORY"]=2]="REPETITION_MANDATORY",e[e["REPETITION_MANDATORY_WITH_SEPARATOR"]=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e["REPETITION_WITH_SEPARATOR"]=4]="REPETITION_WITH_SEPARATOR",e[e["ALTERNATION"]=5]="ALTERNATION"})(Jt||(Jt={}));var sn=function(e){function t(t,n,r){var i=e.call(this)||this;return i.topProd=t,i.targetOccurrence=n,i.targetProdType=r,i}return Qt(t,e),t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)},t.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,Jt.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,Jt.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(tt),on=function(e){function t(t,n,r){var i=e.call(this)||this;return i.targetOccurrence=t,i.targetProdType=n,i.targetRef=r,i.result=[],i}return Qt(t,e),t.prototype.checkIsTarget=function(e,t){e.idx!==this.targetOccurrence||this.targetProdType!==t||void 0!==this.targetRef&&e!==this.targetRef||(this.result=e.definition)},t.prototype.visitOption=function(e){this.checkIsTarget(e,Jt.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,Jt.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,Jt.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,Jt.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,Jt.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,Jt.ALTERNATION)},t}(rt);function an(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function ln(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],i=[],s=0;s<t.length;s++){var o=t[s];i.push(o+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var l="_"+r.categoryMatches[a];i.push(o+l)}}t=i}return t}function un(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var i=e[r],s=0;s<t.length;s++){var o=t[s];if(!0===i[o])return!1}return!0}function cn(e,t){for(var n=Object(i["I"])(e,(function(e){return Xt([e],1)})),r=an(n.length),s=Object(i["I"])(n,(function(e){var t={};return Object(i["u"])(e,(function(e){var n=ln(e.partialPath);Object(i["u"])(n,(function(e){t[e]=!0}))})),t})),o=n,a=1;a<=t;a++){var l=o;o=an(l.length);for(var u=function(e){for(var n=l[e],u=0;u<n.length;u++){var c=n[u].partialPath,h=n[u].suffixDef,d=ln(c),m=un(s,d,e);if(m||Object(i["A"])(h)||c.length===t){var f=r[e];if(!1===mn(f,c)){f.push(c);for(var p=0;p<d.length;p++){var g=d[p];s[e][g]=!0}}}else{var y=Xt(h,a+1,c);o[e]=o[e].concat(y),Object(i["u"])(y,(function(t){var n=ln(t.partialPath);Object(i["u"])(n,(function(t){s[e][t]=!0}))}))}}},c=0;c<l.length;c++)u(c)}return r}function hn(e,t,n,r){var i=new on(e,Jt.ALTERNATION,r);return t.accept(i),cn(i.result,n)}function dn(e,t,n,r){var i=new on(e,n);t.accept(i);var s=i.result,o=new sn(t,e,n),a=o.startWalking(),l=new ze({definition:s}),u=new ze({definition:a});return cn([l,u],r)}function mn(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var i=0;i<r.length;i++){var s=t[i],o=r[i],a=s===o||void 0!==o.categoryMatchesMap[s.tokenTypeIdx];if(!1===a)continue e}return!0}}return!1}function fn(e,t){return e.length<t.length&&Object(i["o"])(e,(function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]}))}function pn(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["o"])(e,(function(e){return Object(i["A"])(e.categoryMatches)}))}))}))}var gn=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function yn(e,t,n,r,s,o){var a=i["I"](e,(function(e){return bn(e,s)})),l=i["I"](e,(function(e){return An(e,e,s)})),u=[],c=[],h=[];Object(i["o"])(l,i["A"])&&(u=Object(i["I"])(e,(function(e){return kn(e,s)})),c=Object(i["I"])(e,(function(e){return xn(e,t,r,s)})),h=Pn(e,t,s));var d=Yn(e,n,s),m=i["I"](n,(function(e){return Rn(e,s)})),f=wn(e,s),p=Un(e,s),g=Object(i["I"])(e,(function(e){return Hn(e,s)})),y=Object(i["I"])(e,(function(e){return Mn(e,s)})),w=Object(i["I"])(e,(function(t){return On(t,e,o,s)}));return i["t"](a.concat(m,f,p,h,l,u,c,d,g,y,w))}function wn(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new jt("");e.accept(r);var s=Object(i["I"])(r.result,(function(e){return e.orgProd}));n.push(Object(i["I"])(s,(function(n){return Tn(e,n,t)})))})),Object(i["t"])(n)}function bn(e,t){var n=new Sn;e.accept(n);var r=n.allProductions,s=i["v"](r,vn),o=i["N"](s,(function(e){return e.length>1})),a=i["I"](i["U"](o),(function(n){var r=i["s"](n),s=t.buildDuplicateFoundError(e,n),o=lt(r),a={message:s,type:Gr.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:o,occurrence:r.idx},l=_n(r);return l&&(a.parameter=l),a}));return a}function vn(e){return lt(e)+"_#_"+e.idx+"_#_"+_n(e)}function _n(e){return e instanceof Qe?e.terminalType.name:e instanceof Be?e.nonTerminalName:""}var Sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return gn(t,e),t.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},t.prototype.visitOption=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t.prototype.visitAlternation=function(e){this.allProductions.push(e)},t.prototype.visitTerminal=function(e){this.allProductions.push(e)},t}(rt),En=/^[a-zA-Z_]\w*$/,Cn=new RegExp(En.source.replace("^","^\\$"));function Mn(e,t){var n=[],r=e.name;return r.match(En)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:En}),type:Gr.INVALID_RULE_NAME,ruleName:r}),n}function Tn(e,t,n){var r,i=[];return t.name.match(Cn)||(r=n.buildInvalidNestedRuleNameError(e,t),i.push({message:r,type:Gr.INVALID_NESTED_RULE_NAME,ruleName:e.name})),i}function Rn(e,t){var n=[],r=e.name;return r.match(En)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:En}),type:Gr.INVALID_TOKEN_NAME}),n}function On(e,t,n,r){var s=[],o=Object(i["O"])(t,(function(t,n){return n.name===e.name?t+1:t}),0);if(o>1){var a=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});s.push({message:a,type:Gr.DUPLICATE_RULE_NAME,ruleName:e.name})}return s}function Nn(e,t,n){var r,s=[];return i["j"](t,e)||(r="Invalid rule override, rule: ->"+e+"<- cannot be overridden in the grammar: ->"+n+"<-as it is not defined in any of the super grammars ",s.push({message:r,type:Gr.INVALID_RULE_OVERRIDE,ruleName:e})),s}function An(e,t,n,r){void 0===r&&(r=[]);var s=[],o=Ln(t.definition);if(i["A"](o))return[];var a=e.name,l=i["j"](o,e);l&&s.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:Gr.LEFT_RECURSION,ruleName:a});var u=i["l"](o,r.concat([e])),c=i["I"](u,(function(t){var s=i["g"](r);return s.push(t),An(e,t,n,s)}));return s.concat(i["t"](c))}function Ln(e){var t=[];if(i["A"](e))return t;var n=i["s"](e);if(n instanceof Be)t.push(n.referencedRule);else if(n instanceof ze||n instanceof Ge||n instanceof Ke||n instanceof Xe||n instanceof qe||n instanceof $e)t=t.concat(Ln(n.definition));else if(n instanceof Je)t=i["t"](i["I"](n.definition,(function(e){return Ln(e.definition)})));else if(!(n instanceof Qe))throw Error("non exhaustive match");var r=ot(n),s=e.length>1;if(r&&s){var o=i["m"](e);return t.concat(Ln(o))}return t}var In=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return gn(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(rt);function kn(e,t){var n=new In;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){var s=i["n"](r.definition),o=i["I"](s,(function(n,s){var o=$t([n],[],null,1);return i["A"](o)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:s}),type:Gr.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:s+1}:null}));return n.concat(i["i"](o))}),[]);return s}function xn(e,t,n,r){var s=new In;e.accept(s);var o=s.alternations,a=n[e.name];a&&(o=Object(i["P"])(o,(function(e){return a[lt(e)+(0===e.idx?"":e.idx)]}))),o=Object(i["P"])(o,(function(e){return!0===e.ignoreAmbiguities}));var l=i["O"](o,(function(n,i){var s=i.idx,o=i.maxLookahead||t,a=hn(s,e,o,i),l=jn(a,i,e,r),u=Fn(a,i,e,r);return n.concat(l,u)}),[]);return l}var Dn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return gn(t,e),t.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},t.prototype.visitRepetition=function(e){this.allProductions.push(e)},t}(rt);function Hn(e,t){var n=new In;e.accept(n);var r=n.alternations,s=i["O"](r,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:Gr.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[]);return s}function Pn(e,t,n){var r=[];return Object(i["u"])(e,(function(e){var s=new Dn;e.accept(s);var o=s.allProductions;Object(i["u"])(o,(function(s){var o=Zt(s),a=s.maxLookahead||t,l=s.idx,u=dn(l,e,o,a),c=u[0];if(Object(i["A"])(Object(i["t"])(c))){var h=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});r.push({message:h,type:Gr.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}function jn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(n,r,o){return!0===t.definition[o].ignoreAmbiguities||Object(i["u"])(r,(function(r){var a=[o];Object(i["u"])(e,(function(e,n){o!==n&&mn(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&a.push(n)})),a.length>1&&!mn(s,r)&&(s.push(r),n.push({alts:a,path:r}))})),n}),[]),a=i["I"](o,(function(e){var s=Object(i["I"])(e.alts,(function(e){return e+1})),o=r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:s,prefixPath:e.path});return{message:o,type:Gr.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}));return a}function Fn(e,t,n,r){var s=[],o=Object(i["O"])(e,(function(e,t,n){var r=Object(i["I"])(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return Object(i["u"])(o,(function(e){var a=t.definition[e.idx];if(!0!==a.ignoreAmbiguities){var l=e.idx,u=e.path,c=Object(i["r"])(o,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<l&&fn(e.path,u)})),h=Object(i["I"])(c,(function(e){var i=[e.idx+1,l+1],s=0===t.idx?"":t.idx,o=r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path});return{message:o,type:Gr.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:s,alternatives:i}}));s=s.concat(h)}})),s}function Yn(e,t,n){var r=[],s=Object(i["I"])(t,(function(e){return e.name}));return Object(i["u"])(e,(function(e){var t=e.name;if(Object(i["j"])(s,t)){var o=n.buildNamespaceConflictError(e);r.push({message:o,type:Gr.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}function Un(e,t){var n=[];return Object(i["u"])(e,(function(e){var r=new jt("");e.accept(r);var s=Object(i["v"])(r.result,(function(e){return e.name})),o=Object(i["N"])(s,(function(e){return e.length>1}));Object(i["u"])(Object(i["U"])(o),(function(r){var s=Object(i["I"])(r,(function(e){return e.orgProd})),o=t.buildDuplicateNestedRuleNameError(e,s);n.push({message:o,type:Gr.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}var Vn={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual,r=(e.previous,e.ruleName,Te(t)),i=r?"--\x3e "+Ce(t)+" <--":"token of type --\x3e "+t.name+" <--",s="Expecting "+i+" but found --\x3e '"+n.image+"' <--";return s},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,r=(e.previous,e.customUserDescription),s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["O"])(t,(function(e,t){return e.concat(t)}),[]),u=Object(i["I"])(l,(function(e){return"["+Object(i["I"])(e,(function(e){return Ce(e)})).join(", ")+"]"})),c=Object(i["I"])(u,(function(e,t){return" "+(t+1)+". "+e})),h="one of these possible Token sequences:\n"+c.join("\n");return s+h+a},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,r=e.customUserDescription,s=(e.ruleName,"Expecting: "),o=Object(i["s"])(n).image,a="\nbut found: '"+o+"'";if(r)return s+r+a;var l=Object(i["I"])(t,(function(e){return"["+Object(i["I"])(e,(function(e){return Ce(e)})).join(",")+"]"})),u="expecting at least one iteration which starts with one of these possible Token sequences::\n <"+l.join(" ,")+">";return s+u+a}};Object.freeze(Vn);var Bn={buildRuleNotFoundError:function(e,t){var n="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-";return n}},Wn={buildDuplicateFoundError:function(e,t){function n(e){return e instanceof Qe?e.terminalType.name:e instanceof Be?e.nonTerminalName:""}var r=e.name,s=Object(i["s"])(t),o=s.idx,a=lt(s),l=n(s),u=o>0,c="->"+a+(u?o:"")+"<- "+(l?"with argument: ->"+l+"<-":"")+"\n appears more than once ("+t.length+" times) in the top level rule: ->"+r+"<-. \n For further details see: https://sap.github.io/chevrotain/docs/FAQ.html#NUMERICAL_SUFFIXES \n ";return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,"\n"),c},buildInvalidNestedRuleNameError:function(e,t){var n="Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+Cn.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign.";return n},buildDuplicateNestedRuleNameError:function(e,t){var n=Object(i["s"])(t).name,r="Duplicate nested rule name: ->"+n+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule.";return r},buildNamespaceConflictError:function(e){var t="Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <"+e.name+">.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.";return t},buildAlternationPrefixAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Ce(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous alternatives: <"+e.ambiguityIndices.join(" ,")+"> due to common lookahead prefix\nin <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\nSee: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.";return r},buildAlternationAmbiguityError:function(e){var t=Object(i["I"])(e.prefixPath,(function(e){return Ce(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx,r="Ambiguous Alternatives Detected: <"+e.ambiguityIndices.join(" ,")+"> in <OR"+n+"> inside <"+e.topLevelRule.name+"> Rule,\n<"+t+"> may appears as a prefix path in all these alternatives.\n";return r+="See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.",r},buildEmptyRepetitionError:function(e){var t=lt(e.repetition);0!==e.repetition.idx&&(t+=e.repetition.idx);var n="The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop.";return n},buildTokenNameError:function(e){var t=e.tokenType.name,n="Invalid Grammar Token name: ->"+t+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-";return n},buildEmptyAlternationError:function(e){var t="Ambiguous empty alternative: <"+(e.emptyChoiceIdx+1)+"> in <OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\nOnly the last alternative may be an empty alternative.";return t},buildTooManyAlternativesError:function(e){var t="An Alternation cannot have more than 256 alternatives:\n<OR"+e.alternation.idx+"> inside <"+e.topLevelRule.name+"> Rule.\n has "+(e.alternation.definition.length+1)+" alternatives.";return t},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,n=i["I"](e.leftRecursionPath,(function(e){return e.name})),r=t+" --\x3e "+n.concat([t]).join(" --\x3e "),s="Left Recursion found in grammar.\nrule: <"+t+"> can be invoked from itself (directly or indirectly)\nwithout consuming any Tokens. The grammar path that causes this is: \n "+r+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.";return s},buildInvalidRuleNameError:function(e){var t=e.topLevelRule.name,n=e.expectedPattern.toString(),r="Invalid grammar rule name: ->"+t+"<- it must match the pattern: ->"+n+"<-";return r},buildDuplicateRuleNameError:function(e){var t;t=e.topLevelRule instanceof We?e.topLevelRule.name:e.topLevelRule;var n="Duplicate definition, rule: ->"+t+"<- is already defined in the grammar: ->"+e.grammarName+"<-";return n}},zn=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();function Gn(e,t){var n=new Kn(e,t);return n.resolveRefs(),n.errors}var Kn=function(e){function t(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return zn(t,e),t.prototype.resolveRefs=function(){var e=this;Object(i["u"])(Object(i["U"])(this.nameToTopRule),(function(t){e.currTopLevel=t,t.accept(e)}))},t.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:n,type:Gr.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(rt);function Xn(e){e=Object(i["k"])(e,{errMsgProvider:Bn});var t={};return Object(i["u"])(e.rules,(function(e){t[e.name]=e})),Gn(t,e.errMsgProvider)}function $n(e){return e=Object(i["k"])(e,{errMsgProvider:Wn,ignoredIssues:{}}),yn(e.rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function qn(e){Object(i["u"])(e.rules,(function(e){var t=new ut;e.accept(t),Object(i["u"])(t.dslMethods,(function(e){Object(i["u"])(e,(function(e,t){e.idx=t+1}))}))}))}var Jn="MismatchedTokenException",Qn="NoViableAltException",Zn="EarlyExitException",er="NotAllInputParsedException",tr=[Jn,Qn,Zn,er];function nr(e){return Object(i["j"])(tr,e.name)}function rr(e,t,n){this.name=Jn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function ir(e,t,n){this.name=Qn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function sr(e,t){this.name=er,this.message=e,this.token=t,this.resyncedTokens=[]}function or(e,t,n){this.name=Zn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(tr),rr.prototype=Error.prototype,ir.prototype=Error.prototype,sr.prototype=Error.prototype,or.prototype=Error.prototype;var ar={},lr="InRuleRecoveryException";function ur(e){this.name=lr,this.message=e}ur.prototype=Error.prototype;var cr=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=Object(i["w"])(e,"recoveryEnabled")?e.recoveryEnabled:Kr.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=hr)},e.prototype.getTokenToInsert=function(e){var t=Fe(e,"",NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t},e.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},e.prototype.tryInRepetitionRecovery=function(e,t,n,r){var s=this,o=this.findReSyncTokenType(),a=this.exportLexerState(),l=[],u=!1,c=this.LA(1),h=this.LA(1),d=function(){var e=s.LA(0),t=s.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:c,previous:e,ruleName:s.getCurrRuleFullName()}),n=new rr(t,c,s.LA(0));n.resyncedTokens=Object(i["n"])(l),s.SAVE_ERROR(n)};while(!u){if(this.tokenMatcher(h,r))return void d();if(n.call(this))return d(),void e.apply(this,t);this.tokenMatcher(h,o)?u=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,l))}this.importLexerState(a)},e.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!1!==n&&(void 0!==e&&void 0!==t&&(!this.tokenMatcher(this.LA(1),e)&&(!this.isBackTracking()&&!this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))))},e.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t),r=this.getNextPossibleTokenTypes(n);return r},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t)){var n=this.getTokenToInsert(e);return n}if(this.canRecoverWithSingleTokenDeletion(e)){var r=this.SKIP_TOKEN();return this.consumeToken(),r}throw new ur("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},e.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(e))return!1;if(Object(i["A"])(t))return!1;var r=this.LA(1),s=void 0!==Object(i["q"])(t,(function(e){return n.tokenMatcher(r,e)}));return s},e.prototype.canRecoverWithSingleTokenDeletion=function(e){var t=this.tokenMatcher(this.LA(2),e);return t},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(t);return Object(i["j"])(n,e)},e.prototype.findReSyncTokenType=function(){var e=this.flattenFollowSet(),t=this.LA(1),n=2;while(1){var r=t.tokenType;if(Object(i["j"])(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return ar;var e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var e=this,t=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)||(t=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),Object(i["I"])(t,(function(r,i){return 0===i?ar:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:e.shortRuleNameToFullName(t[i-1])}}))},e.prototype.flattenFollowSet=function(){var e=this,t=Object(i["I"])(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)}));return Object(i["t"])(t)},e.prototype.getFollowSetFromFollowKey=function(e){if(e===ar)return[je];var t=e.ruleName+e.idxInCallingRule+gt+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,je)||t.push(e),t},e.prototype.reSyncTo=function(e){var t=[],n=this.LA(1);while(!1===this.tokenMatcher(n,e))n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return Object(i["n"])(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,s,o){},e.prototype.getCurrentGrammarPath=function(e,t){var n=this.getHumanReadableRuleStack(),r=Object(i["g"])(this.RULE_OCCURRENCE_STACK),s={ruleStack:n,occurrenceStack:r,lastTok:e,lastTokOccurrence:t};return s},e.prototype.getHumanReadableRuleStack=function(){var e=this;return Object(i["A"])(this.LAST_EXPLICIT_RULE_STACK)?Object(i["I"])(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):Object(i["I"])(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function hr(e,t,n,r,i,s,o){var a=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[a];if(void 0===l){var u=this.getCurrRuleFullName(),c=this.getGAstProductions()[u],h=new s(c,i);l=h.startWalking(),this.firstAfterRepMap[a]=l}var d=l.token,m=l.occurrence,f=l.isEndOfRule;1===this.RULE_STACK.length&&f&&void 0===d&&(d=je,m=1),this.shouldInRepetitionRecoveryBeTried(d,m,o)&&this.tryInRepetitionRecovery(e,t,n,d)}var dr=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=Object(i["w"])(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:Kr.dynamicTokensEnabled,this.maxLookahead=Object(i["w"])(e,"maxLookahead")?e.maxLookahead:Kr.maxLookahead,this.lookAheadFuncsCache=Object(i["z"])()?new Map:[],Object(i["z"])()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;Object(i["u"])(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var n=ht(e),r=n.alternation,s=n.repetition,o=n.option,a=n.repetitionMandatory,l=n.repetitionMandatoryWithSeparator,u=n.repetitionWithSeparator;Object(i["u"])(r,(function(n){var r=0===n.idx?"":n.idx;t.TRACE_INIT(""+lt(n)+r,(function(){var r=en(n.idx,e,n.maxLookahead||t.maxLookahead,n.hasPredicates,t.dynamicTokensEnabled,t.lookAheadBuilderForAlternatives),i=At(t.fullRuleNameToShort[e.name],Ct,n.idx);t.setLaFuncCache(i,r)}))})),Object(i["u"])(s,(function(n){t.computeLookaheadFunc(e,n.idx,Tt,Jt.REPETITION,n.maxLookahead,lt(n))})),Object(i["u"])(o,(function(n){t.computeLookaheadFunc(e,n.idx,Mt,Jt.OPTION,n.maxLookahead,lt(n))})),Object(i["u"])(a,(function(n){t.computeLookaheadFunc(e,n.idx,Rt,Jt.REPETITION_MANDATORY,n.maxLookahead,lt(n))})),Object(i["u"])(l,(function(n){t.computeLookaheadFunc(e,n.idx,Nt,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,lt(n))})),Object(i["u"])(u,(function(n){t.computeLookaheadFunc(e,n.idx,Ot,Jt.REPETITION_WITH_SEPARATOR,n.maxLookahead,lt(n))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,n,r,i,s){var o=this;this.TRACE_INIT(""+s+(0===t?"":t),(function(){var s=tn(t,e,i||o.maxLookahead,o.dynamicTokensEnabled,r,o.lookAheadBuilderForOptional),a=At(o.fullRuleNameToShort[e.name],n,t);o.setLaFuncCache(a,s)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,n){return rn(e,t,n)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,n,r){return nn(e,t,n,r)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return At(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}();function mr(e){return yr(e.constructor)}var fr,pr=/^\s*function\s*(\S*)\s*\(/,gr="name";function yr(e){var t=e.name;if(t)return t;var n=e.toString().match(pr)[1];return n}function wr(e,t){var n=Object.getOwnPropertyDescriptor(e,gr);return!(!Object(i["F"])(n)&&!n.configurable)&&(Object.defineProperty(e,gr,{enumerable:!1,configurable:!0,writable:!1,value:t}),!0)}function br(e,t){for(var n=Object(i["G"])(e),r=n.length,s=0;s<r;s++)for(var o=n[s],a=e[o],l=a.length,u=0;u<l;u++){var c=a[u];void 0===c.tokenTypeIdx&&(void 0!==c.fullName?this[c.fullName](c.children,t):this[c.name](c.children,t))}}function vr(e,t){var n=function(){};wr(n,e+"BaseSemantics");var r={visit:function(e,t){if(Object(i["y"])(e)&&(e=e[0]),!Object(i["F"])(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=Sr(this,t);if(!Object(i["A"])(e)){var n=Object(i["I"])(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+yr(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=t,n}function _r(e,t,n){var r=function(){};wr(r,e+"BaseSemanticsWithDefaults");var s=Object.create(n.prototype);return Object(i["u"])(t,(function(e){s[e]=br})),r.prototype=s,r.prototype.constructor=r,r}function Sr(e,t){var n=Er(e,t),r=Mr(e,t);return n.concat(r)}function Er(e,t){var n=Object(i["I"])(t,(function(t){if(!Object(i["B"])(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+yr(e.constructor)+" CST Visitor.",type:fr.MISSING_METHOD,methodName:t}}));return Object(i["i"])(n)}(function(e){e[e["REDUNDANT_METHOD"]=0]="REDUNDANT_METHOD",e[e["MISSING_METHOD"]=1]="MISSING_METHOD"})(fr||(fr={}));var Cr=["constructor","visit","validateVisitor"];function Mr(e,t){var n=[];for(var r in e)En.test(r)&&Object(i["B"])(e[r])&&!Object(i["j"])(Cr,r)&&!Object(i["j"])(t,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+yr(e.constructor)+" CST Visitor\nThere is no Grammar Rule corresponding to this method's name.\nFor utility methods on visitor classes use methods names that do not match /"+En.source+"/.",type:fr.REDUNDANT_METHOD,methodName:r});return n}var Tr=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=Object(i["w"])(e,"outputCst")?e.outputCst:Kr.outputCst,this.nodeLocationTracking=Object(i["w"])(e,"nodeLocationTracking")?e.nodeLocationTracking:Kr.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Dt,this.setNodeLocationFromNode=Dt,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=xt,this.setNodeLocationFromNode=xt,this.cstPostRule=i["b"],this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error('Invalid <nodeLocationTracking> config option: "'+e.nodeLocationTracking+'"');this.setNodeLocationFromToken=i["b"],this.setNodeLocationFromNode=i["b"],this.cstPostRule=i["b"],this.setInitialNodeLocation=i["b"]}else this.cstInvocationStateUpdate=i["b"],this.cstFinallyStateUpdate=i["b"],this.cstPostTerminal=i["b"],this.cstPostNonTerminal=i["b"],this.cstPostRule=i["b"],this.getLastExplicitRuleShortName=this.getLastExplicitRuleShortNameNoCst,this.getPreviousExplicitRuleShortName=this.getPreviousExplicitRuleShortNameNoCst,this.getLastExplicitRuleOccurrenceIndex=this.getLastExplicitRuleOccurrenceIndexNoCst,this.manyInternal=this.manyInternalNoCst,this.orInternal=this.orInternalNoCst,this.optionInternal=this.optionInternalNoCst,this.atLeastOneInternal=this.atLeastOneInternalNoCst,this.manySepFirstInternal=this.manySepFirstInternalNoCst,this.atLeastOneSepFirstInternal=this.atLeastOneSepFirstInternalNoCst},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstNestedInvocationStateUpdate=function(e,t){var n={name:e,fullName:this.shortRuleNameToFull[this.getLastExplicitRuleShortName()]+e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstInvocationStateUpdate=function(e,t){this.LAST_EXPLICIT_RULE_STACK.push(this.RULE_STACK.length-1);var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.LAST_EXPLICIT_RULE_STACK.pop(),this.CST_STACK.pop()},e.prototype.cstNestedFinallyStateUpdate=function(){var e=this.CST_STACK.pop();this.cstPostRule(e)},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset===!0?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var n=this.CST_STACK[this.CST_STACK.length-1];Ht(n,t,e),this.setNodeLocationFromToken(n.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];Pt(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if(Object(i["F"])(this.baseCstVisitorConstructor)){var e=vr(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(Object(i["F"])(this.baseCstVisitorWithDefaultsConstructor)){var e=_r(this.className,this.allRuleNames,this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.nestedRuleBeforeClause=function(e,t){var n;return void 0!==e.NAME?(n=e.NAME,this.nestedRuleInvocationStateUpdate(n,t),n):void 0},e.prototype.nestedAltBeforeClause=function(e,t,n,r){var i,s=this.getLastExplicitRuleShortName(),o=It(s,n,t,r);return void 0!==e.NAME?(i=e.NAME,this.nestedRuleInvocationStateUpdate(i,o),{shortName:o,nestedName:i}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var i=n[n.length-1];Pt(i,t,r),this.setNodeLocationFromNode(i.location,r.location)},e.prototype.getLastExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_STACK[e]},e.prototype.getLastExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-2];return this.RULE_STACK[e]},e.prototype.getPreviousExplicitRuleShortNameNoCst=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.LAST_EXPLICIT_RULE_STACK[this.LAST_EXPLICIT_RULE_STACK.length-1];return this.RULE_OCCURRENCE_STACK[e]},e.prototype.getLastExplicitRuleOccurrenceIndexNoCst=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e.prototype.nestedRuleInvocationStateUpdate=function(e,t){this.RULE_OCCURRENCE_STACK.push(1),this.RULE_STACK.push(t),this.cstNestedInvocationStateUpdate(e,t)},e.prototype.nestedRuleFinallyStateUpdate=function(){this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstNestedFinallyStateUpdate()},e}(),Rr=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(e){if(!0!==this.selfAnalysisDone)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=e,this.tokVectorLength=e.length},enumerable:!0,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):zr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?zr:this.tokVector[t]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}(),Or=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,t,n){if(void 0===n&&(n=Xr),Object(i["j"])(this.definedRulesNames,e)){var r=Wn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),s={message:r,type:Gr.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(s)}this.definedRulesNames.push(e);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.OVERRIDE_RULE=function(e,t,n){void 0===n&&(n=Xr);var r=[];r=r.concat(Nn(e,this.definedRulesNames,this.className)),this.definitionErrors.push.apply(this.definitionErrors,r);var i=this.defineRule(e,t,n);return this[e]=i,i},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return e.apply(this,t),!0}catch(r){if(nr(r))return!1;throw r}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return Ze(Object(i["U"])(this.gastProductionsCache))},e}(),Nr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=mr(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=oe,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Object(i["w"])(t,"serializedGrammar"))throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_6-0-0\n\tFor Further details.");if(Object(i["y"])(e)){if(Object(i["A"])(e))throw Error("A Token Vocabulary cannot be empty.\n\tNote that the first argument for the parser constructor\n\tis no longer a Token vector (since v4.0).");if("number"===typeof e[0].startOffset)throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n\tSee: https://sap.github.io/chevrotain/docs/changes/BREAKING_CHANGES.html#_4-0-0\n\tFor Further details.")}if(Object(i["y"])(e))this.tokensMap=Object(i["O"])(e,(function(e,t){return e[t.name]=t,e}),{});else if(Object(i["w"])(e,"modes")&&Object(i["o"])(Object(i["t"])(Object(i["U"])(e.modes)),be)){var n=Object(i["t"])(Object(i["U"])(e.modes)),r=Object(i["T"])(n);this.tokensMap=Object(i["O"])(r,(function(e,t){return e[t.name]=t,e}),{})}else{if(!Object(i["C"])(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=Object(i["h"])(e)}this.tokensMap["EOF"]=je;var s=Object(i["o"])(Object(i["U"])(e),(function(e){return Object(i["A"])(e.categoryMatches)}));this.tokenMatcher=s?oe:se,ue(Object(i["U"])(this.tokensMap))},e.prototype.defineRule=function(e,t,n){if(this.selfAnalysisDone)throw Error("Grammar rule <"+e+"> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var r,s=Object(i["w"])(n,"resyncEnabled")?n.resyncEnabled:Xr.resyncEnabled,o=Object(i["w"])(n,"recoveryValueFunc")?n.recoveryValueFunc:Xr.recoveryValueFunc,a=this.ruleShortNameIdx<<_t+St;function l(e){try{if(!0===this.outputCst){t.apply(this,e);var n=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(n),n}return t.apply(this,e)}catch(r){return this.invokeRuleCatch(r,s,o)}finally{this.ruleFinallyStateUpdate()}}this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a,r=function(t,n){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(a,e,t),l.call(this,n)};var u="ruleName";return r[u]=e,r["originalGrammarAction"]=t,r},e.prototype.invokeRuleCatch=function(e,t,n){var r=1===this.RULE_STACK.length,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(nr(e)){var s=e;if(i){var o=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(o)){if(s.resyncedTokens=this.reSyncTo(o),this.outputCst){var a=this.CST_STACK[this.CST_STACK.length-1];return a.recoveredNode=!0,a}return n()}if(this.outputCst){a=this.CST_STACK[this.CST_STACK.length-1];a.recoveredNode=!0,s.partialCstResult=a}throw s}if(r)return this.moveToTerminatedState(),n();throw s}throw e},e.prototype.optionInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Mt,t),r=this.nestedRuleBeforeClause(e,n);try{return this.optionInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.optionInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Mt,t);return this.optionInternalLogic(e,t,n)},e.prototype.optionInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,i=e.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=e;if(!0===o.call(this))return r.call(this)},e.prototype.atLeastOneInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Rt,e),r=this.nestedRuleBeforeClause(t,n);try{return this.atLeastOneInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Rt,e);this.atLeastOneInternalLogic(e,t,n)},e.prototype.atLeastOneInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;if(!0!==o.call(this))throw this.raiseEarlyExitException(e,Jt.REPETITION_MANDATORY,t.ERR_MSG);var l=this.doSingleRepetition(r);while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],o,Rt,e,Gt)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e),r=this.nestedRuleBeforeClause(t,n);try{this.atLeastOneSepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.atLeastOneSepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Nt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0!==o.call(this))throw this.raiseEarlyExitException(e,Jt.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,Kt],a,Nt,e,Kt)},e.prototype.manyInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Tt,e),r=this.nestedRuleBeforeClause(t,n);try{return this.manyInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manyInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Tt,e);return this.manyInternalLogic(e,t,n)},e.prototype.manyInternalLogic=function(e,t,n){var r,i,s=this,o=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,i=t.GATE,void 0!==i){var a=o;o=function(){return i.call(s)&&a.call(s)}}}else r=t;var l=!0;while(!0===o.call(this)&&!0===l)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,Tt,e,Wt,l)},e.prototype.manySepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,e),r=this.nestedRuleBeforeClause(t,n);try{this.manySepFirstInternalLogic(e,t,n)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.manySepFirstInternalNoCst=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,e);this.manySepFirstInternalLogic(e,t,n)},e.prototype.manySepFirstInternalLogic=function(e,t,n){var r=this,i=t.DEF,s=t.SEP,o=this.getLaFuncFromCache(n);if(!0===o.call(this)){i.call(this);var a=function(){return r.tokenMatcher(r.LA(1),s)};while(!0===this.tokenMatcher(this.LA(1),s))this.CONSUME(s),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,a,i,zt],a,Ot,e,zt)}},e.prototype.repetitionSepSecondInternal=function(e,t,n,r,i){while(n())this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,Nt,e,i)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();e.call(this);var n=this.getLexerPosition();return n>t},e.prototype.orInternalNoCst=function(e,t){var n=Object(i["y"])(e)?e:e.DEF,r=this.getKeyForAutomaticLookahead(Ct,t),s=this.getLaFuncFromCache(r),o=s.call(this,n);if(void 0!==o){var a=n[o];return a.ALT.call(this)}this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ct,t),r=this.nestedRuleBeforeClause(e,n);try{var s=Object(i["y"])(e)?e:e.DEF,o=this.getLaFuncFromCache(n),a=o.call(this,s);if(void 0!==a){var l=s[a],u=this.nestedAltBeforeClause(l,t,Ct,a);try{return l.ALT.call(this)}finally{void 0!==u&&this.nestedRuleFinallyClause(u.shortName,u.nestedName)}}this.raiseNoAltException(t,e.ERR_MSG)}finally{void 0!==r&&this.nestedRuleFinallyClause(n,r)}},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new sr(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=void 0!==n?n.ARGS:void 0;return r=e.call(this,t,i),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(s){this.subruleInternalError(s,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw nr(e)&&void 0!==e.partialCstResult&&(this.cstPostNonTerminal(e.partialCstResult,void 0!==t&&void 0!==t.LABEL?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(s){r=this.consumeInternalRecovery(e,t,s)}return this.cstPostTerminal(void 0!==n&&void 0!==n.LABEL?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var r,i=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new rr(r,t,i))},e.prototype.consumeInternalRecovery=function(e,t,n){if(!this.recoveryEnabled||"MismatchedTokenException"!==n.name||this.isBackTracking())throw n;var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(i){throw i.name===lr?n:i}},e.prototype.saveRecogState=function(){var e=this.errors,t=Object(i["g"])(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK,LAST_EXPLICIT_RULE_STACK:this.LAST_EXPLICIT_RULE_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return 0!==this.isBackTrackingStack.length},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),je)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}(),Ar=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=Object(i["k"])(e.errorMessageProvider,Kr.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(nr(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Object(i["g"])(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return Object(i["g"])(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,n){for(var r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=dn(e,i,t,this.maxLookahead),o=s[0],a=[],l=1;l<=this.maxLookahead;l++)a.push(this.LA(l));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:a,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new or(u,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=hn(e,r,this.maxLookahead),s=[],o=1;o<=this.maxLookahead;o++)s.push(this.LA(o));var a=this.LA(0),l=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:s,previous:a,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new ir(l,this.LA(1),a))},e}(),Lr=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var n=this.gastProductionsCache[e];if(Object(i["F"])(n))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return $t([n],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=Object(i["s"])(e.ruleStack),n=this.getGAstProductions(),r=n[t],s=new Vt(r,e).startWalking();return s},e}(),Ir={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ir);var kr=!0,xr=Math.pow(2,St)-1,Dr=He({name:"RECORDING_PHASE_TOKEN",pattern:Ee.NA});ue([Dr]);var Hr=Fe(Dr,"This IToken indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",-1,-1,-1,-1,-1,-1);Object.freeze(Hr);var Pr={name:"This CSTNode indicates the Parser is in Recording Phase\n\tSee: https://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording for details",children:{}},jr=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",(function(){for(var t=function(t){var n=t>0?t:"";e["CONSUME"+n]=function(e,n){return this.consumeInternalRecord(e,t,n)},e["SUBRULE"+n]=function(e,n){return this.subruleInternalRecord(e,t,n)},e["OPTION"+n]=function(e){return this.optionInternalRecord(e,t)},e["OR"+n]=function(e){return this.orInternalRecord(e,t)},e["MANY"+n]=function(e){this.manyInternalRecord(t,e)},e["MANY_SEP"+n]=function(e){this.manySepFirstInternalRecord(t,e)},e["AT_LEAST_ONE"+n]=function(e){this.atLeastOneInternalRecord(t,e)},e["AT_LEAST_ONE_SEP"+n]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},n=0;n<10;n++)t(n);e["consume"]=function(e,t,n){return this.consumeInternalRecord(t,e,n)},e["subrule"]=function(e,t,n){return this.subruleInternalRecord(t,e,n)},e["option"]=function(e,t){return this.optionInternalRecord(t,e)},e["or"]=function(e,t){return this.orInternalRecord(t,e)},e["many"]=function(e,t){this.manyInternalRecord(e,t)},e["atLeastOne"]=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD}))},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",(function(){for(var t=0;t<10;t++){var n=t>0?t:"";delete e["CONSUME"+n],delete e["SUBRULE"+n],delete e["OPTION"+n],delete e["OR"+n],delete e["MANY"+n],delete e["MANY_SEP"+n],delete e["AT_LEAST_ONE"+n],delete e["AT_LEAST_ONE_SEP"+n]}delete e["consume"],delete e["subrule"],delete e["option"],delete e["or"],delete e["many"],delete e["atLeastOne"],delete e.ACTION,delete e.BACKTRACK,delete e.LA}))},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return zr},e.prototype.topLevelRuleRecord=function(e,t){try{var n=new We({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(r){if(!0!==r.KNOWN_RECORDER_ERROR)try{r.message=r.message+'\n\t This error was thrown during the "grammar recording phase" For more info see:\n\thttps://sap.github.io/chevrotain/docs/guide/internals.html#grammar-recording'}catch(i){throw r}throw r}},e.prototype.optionInternalRecord=function(e,t){return Fr.call(this,Ge,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){Fr.call(this,Ke,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){Fr.call(this,Xe,t,e,kr)},e.prototype.manyInternalRecord=function(e,t){Fr.call(this,$e,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){Fr.call(this,qe,t,e,kr)},e.prototype.orInternalRecord=function(e,t){return Yr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,n){if(Vr(t),!e||!1===Object(i["w"])(e,"ruleName")){var r=new Error("<SUBRULE"+Ur(t)+"> argument is invalid expecting a Parser method reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=e["ruleName"],a=new Be({idx:t,nonTerminalName:o,referencedRule:void 0});return s.definition.push(a),this.outputCst?Pr:Ir},e.prototype.consumeInternalRecord=function(e,t,n){if(Vr(t),!pe(e)){var r=new Error("<CONSUME"+Ur(t)+"> argument is invalid expecting a TokenType reference but got: <"+JSON.stringify(e)+">\n inside top level rule: <"+this.recordingProdStack[0].name+">");throw r.KNOWN_RECORDER_ERROR=!0,r}var s=Object(i["M"])(this.recordingProdStack),o=new Qe({idx:t,terminalType:e});return s.definition.push(o),Hr},e}();function Fr(e,t,n,r){void 0===r&&(r=!1),Vr(n);var s=Object(i["M"])(this.recordingProdStack),o=Object(i["B"])(t)?t:t.DEF,a=new e({definition:[],idx:n});return Object(i["w"])(t,"NAME")&&(a.name=t.NAME),r&&(a.separator=t.SEP),Object(i["w"])(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),o.call(this),s.definition.push(a),this.recordingProdStack.pop(),Ir}function Yr(e,t){var n=this;Vr(t);var r=Object(i["M"])(this.recordingProdStack),s=!1===Object(i["y"])(e),o=!1===s?e:e.DEF,a=new Je({definition:[],idx:t,ignoreAmbiguities:s&&!0===e.IGNORE_AMBIGUITIES});Object(i["w"])(e,"NAME")&&(a.name=e.NAME),Object(i["w"])(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);var l=Object(i["Q"])(o,(function(e){return Object(i["B"])(e.GATE)}));return a.hasPredicates=l,r.definition.push(a),Object(i["u"])(o,(function(e){var t=new ze({definition:[]});a.definition.push(t),Object(i["w"])(e,"NAME")&&(t.name=e.NAME),Object(i["w"])(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Object(i["w"])(e,"GATE")&&(t.ignoreAmbiguities=!0),n.recordingProdStack.push(t),e.ALT.call(n),n.recordingProdStack.pop()})),Ir}function Ur(e){return 0===e?"":""+e}function Vr(e){if(e<0||e>xr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(xr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var Br=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(Object(i["w"])(e,"traceInitPerf")){var t=e.traceInitPerf,n="number"===typeof t;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=Kr.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,t){if(!0===this.traceInitPerf){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join("\t");this.traceInitIndent<this.traceInitMaxIdent&&console.log(n+"--\x3e <"+e+">");var r=Object(i["R"])(t),s=r.time,o=r.value,a=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(n+"<-- <"+e+"> time: "+s+"ms"),this.traceInitIndent--,o}return t()},e}(),Wr=function(){var e=function(t,n){return e=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,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),zr=Fe(je,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(zr);var Gr,Kr=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Vn,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Xr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function $r(e){return void 0===e&&(e=void 0),function(){return e}}(function(e){e[e["INVALID_RULE_NAME"]=0]="INVALID_RULE_NAME",e[e["DUPLICATE_RULE_NAME"]=1]="DUPLICATE_RULE_NAME",e[e["INVALID_RULE_OVERRIDE"]=2]="INVALID_RULE_OVERRIDE",e[e["DUPLICATE_PRODUCTIONS"]=3]="DUPLICATE_PRODUCTIONS",e[e["UNRESOLVED_SUBRULE_REF"]=4]="UNRESOLVED_SUBRULE_REF",e[e["LEFT_RECURSION"]=5]="LEFT_RECURSION",e[e["NONE_LAST_EMPTY_ALT"]=6]="NONE_LAST_EMPTY_ALT",e[e["AMBIGUOUS_ALTS"]=7]="AMBIGUOUS_ALTS",e[e["CONFLICT_TOKENS_RULES_NAMESPACE"]=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e["INVALID_TOKEN_NAME"]=9]="INVALID_TOKEN_NAME",e[e["INVALID_NESTED_RULE_NAME"]=10]="INVALID_NESTED_RULE_NAME",e[e["DUPLICATE_NESTED_NAME"]=11]="DUPLICATE_NESTED_NAME",e[e["NO_NON_EMPTY_LOOKAHEAD"]=12]="NO_NON_EMPTY_LOOKAHEAD",e[e["AMBIGUOUS_PREFIX_ALTS"]=13]="AMBIGUOUS_PREFIX_ALTS",e[e["TOO_MANY_ALTS"]=14]="TOO_MANY_ALTS"})(Gr||(Gr={}));var qr=function(){function e(e,t){void 0===t&&(t=Kr),this.ignoredIssues=Kr.ignoredIssues,this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),Object(i["w"])(t,"ignoredIssues")&&t.ignoredIssues!==Kr.ignoredIssues&&Object(i["d"])("The <ignoredIssues> IParserConfig property is soft-deprecated and will be removed in future versions.\n\tPlease use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead."),this.ignoredIssues=Object(i["w"])(t,"ignoredIssues")?t.ignoredIssues:Kr.ignoredIssues,this.skipValidations=Object(i["w"])(t,"skipValidations")?t.skipValidations:Kr.skipValidations}return e.performSelfAnalysis=function(e){e.performSelfAnalysis()},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",(function(){var n;t.selfAnalysisDone=!0;var r=t.className;t.TRACE_INIT("toFastProps",(function(){Object(i["S"])(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),Object(i["u"])(t.definedRulesNames,(function(e){var n=t[e],r=n["originalGrammarAction"],i=void 0;t.TRACE_INIT(e+" Rule",(function(){i=t.topLevelRuleRecord(e,r)})),t.gastProductionsCache[e]=i}))}finally{t.disableRecording()}}));var s=[];if(t.TRACE_INIT("Grammar Resolving",(function(){s=Xn({rules:Object(i["U"])(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,s)})),t.TRACE_INIT("Grammar Validations",(function(){if(Object(i["A"])(s)&&!1===t.skipValidations){var e=$n({rules:Object(i["U"])(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:Object(i["U"])(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:Wn,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),Object(i["A"])(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e=bt(Object(i["U"])(t.gastProductionsCache));t.resyncFollows=e})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(Object(i["U"])(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e=Ft(Object(i["U"])(t.gastProductionsCache),t.fullRuleNameToShort);t.allRuleNames=e.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!Object(i["A"])(t.definitionErrors))throw n=Object(i["I"])(t.definitionErrors,(function(e){return e.message})),new Error("Parser Definition Errors detected:\n "+n.join("\n-------------------------------\n"))}))},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();Object(i["e"])(qr,[cr,dr,Tr,Rr,Nr,Or,Ar,Lr,jr,Br]);var Jr=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!0,r=e.call(this,t,s)||this,r}return Wr(t,e),t}(qr),Qr=function(e){function t(t,n){void 0===n&&(n=Kr);var r=this,s=Object(i["h"])(n);return s.outputCst=!1,r=e.call(this,t,s)||this,r}return Wr(t,e),t}(qr);function Zr(e,t){var n=void 0===t?{}:t,i=n.resourceBase,s=void 0===i?"https://unpkg.com/chevrotain@"+r+"/diagrams/":i,o=n.css,a=void 0===o?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":o,l='\n\x3c!-- This is a generated file --\x3e\n<!DOCTYPE html>\n<meta charset="utf-8">\n<style>\n body {\n background-color: hsl(30, 20%, 95%)\n }\n</style>\n\n',u="\n<link rel='stylesheet' href='"+a+"'>\n",c="\n<script src='"+s+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+s+"src/diagrams_builder.js'><\/script>\n<script src='"+s+"src/diagrams_behavior.js'><\/script>\n<script src='"+s+"src/main.js'><\/script>\n",h='\n<div id="diagrams" align="center"></div> \n',d="\n<script>\n window.serializedGrammar = "+JSON.stringify(e,null," ")+";\n<\/script>\n",m='\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n';return l+u+c+h+d+m}var ei="\n";function ti(e){return"\n(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(['chevrotain'], factory);\n } else if (typeof module === 'object' && module.exports) {\n // Node. Does not work with strict CommonJS, but\n // only CommonJS-like environments that support module.exports,\n // like Node.\n module.exports = factory(require('chevrotain'));\n } else {\n // Browser globals (root is window)\n root.returnExports = factory(root.b);\n }\n}(typeof self !== 'undefined' ? self : this, function (chevrotain) {\n\n"+ri(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}function ni(e){return" \n"+ri(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}function ri(e){var t="\nfunction "+e.name+"(tokenVocabulary, config) {\n // invoke super constructor\n // No support for embedded actions currently, so we can 'hardcode'\n // The use of CstParser.\n chevrotain.CstParser.call(this, tokenVocabulary, config)\n\n const $ = this\n\n "+ii(e.rules)+"\n\n // very important to call this after all the rules have been defined.\n // otherwise the parser may not work correctly as it will lack information\n // derived during the self analysis phase.\n this.performSelfAnalysis(this)\n}\n\n// inheritance as implemented in javascript in the previous decade... :(\n"+e.name+".prototype = Object.create(chevrotain.CstParser.prototype)\n"+e.name+".prototype.constructor = "+e.name+" \n ";return t}function ii(e){var t=Object(i["I"])(e,(function(e){return si(e,1)}));return t.join("\n")}function si(e,t){var n=fi(t,'$.RULE("'+e.name+'", function() {')+ei;return n+=mi(e.definition,t+1),n+=fi(t+1,"})")+ei,n}function oi(e,t){var n=e.terminalType.name;return fi(t,"$.CONSUME"+e.idx+"(this.tokensMap."+n+")"+ei)}function ai(e,t){return fi(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+ei)}function li(e,t){var n=fi(t,"$.OR"+e.idx+"([")+ei,r=Object(i["I"])(e.definition,(function(e){return ui(e,t+1)}));return n+=r.join(","+ei),n+=ei+fi(t,"])"+ei),n}function ui(e,t){var n=fi(t,"{")+ei;return e.name&&(n+=fi(t+1,'NAME: "'+e.name+'",')+ei),n+=fi(t+1,"ALT: function() {")+ei,n+=mi(e.definition,t+1),n+=fi(t+1,"}")+ei,n+=fi(t,"}"),n}function ci(e,t){if(e instanceof Be)return ai(e,t);if(e instanceof Ge)return hi("OPTION",e,t);if(e instanceof Ke)return hi("AT_LEAST_ONE",e,t);if(e instanceof Xe)return hi("AT_LEAST_ONE_SEP",e,t);if(e instanceof qe)return hi("MANY_SEP",e,t);if(e instanceof $e)return hi("MANY",e,t);if(e instanceof Je)return li(e,t);if(e instanceof Qe)return oi(e,t);if(e instanceof ze)return mi(e.definition,t);throw Error("non exhaustive match")}function hi(e,t,n){var r=fi(n,"$."+(e+t.idx)+"(");return t.name||t.separator?(r+="{"+ei,t.name&&(r+=fi(n+1,'NAME: "'+t.name+'"')+","+ei),t.separator&&(r+=fi(n+1,"SEP: this.tokensMap."+t.separator.name)+","+ei),r+="DEF: "+di(t.definition,n+2)+ei,r+=fi(n,"}")+ei):r+=di(t.definition,n+1),r+=fi(n,")")+ei,r}function di(e,t){var n="function() {"+ei;return n+=mi(e,t),n+=fi(t,"}")+ei,n}function mi(e,t){var n="";return Object(i["u"])(e,(function(e){n+=ci(e,t+1)})),n}function fi(e,t){var n=Array(4*e+1).join(" ");return n+t}function pi(e){var t=ni({name:e.name,rules:e.rules}),r=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return r(e.tokenVocabulary,t,n("fa83"))}}function gi(e){return ti({name:e.name,rules:e.rules})}function yi(){console.warn("The clearCache function was 'soft' removed from the Chevrotain API.\n\t It performs no action other than printing this message.\n\t Please avoid using it as it will be completely removed in the future")}},facd:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),n="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,s=e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"één minuut",mm:"%d minuten",h:"één uur",hh:"%d uur",d:"één dag",dd:"%d dagen",w:"één week",ww:"%d weken",M:"één maand",MM:"%d maanden",y:"één jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}});return s}))},fb46:function(e,t,n){"use strict";var r=n("0227"),i=n("fd18"),s=n("bef1"),o=n("4aa5"),a=n("088f"),l=i([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=s.f(a(e)),n=o.f;return n?l(t,n(e)):t}},fc2d:function(e,t,n){"use strict";var r=n("bf78"),i=Object;e.exports=function(e){return i(r(e))}},fd18:function(e,t,n){"use strict";var r=n("48ab"),i=Function.prototype,s=i.call,o=r&&i.bind.bind(s,s);e.exports=r?o:function(e){return function(){return s.apply(e,arguments)}}},fd7e:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("x-pseudo",{months:"J~áñúá~rý_F~ébrú~árý_~Márc~h_Áp~ríl_~Máý_~Júñé~_Júl~ý_Áú~gúst~_Sép~témb~ér_Ó~ctób~ér_Ñ~óvém~bér_~Décé~mbér".split("_"),monthsShort:"J~áñ_~Féb_~Már_~Ápr_~Máý_~Júñ_~Júl_~Áúg_~Sép_~Óct_~Ñóv_~Déc".split("_"),monthsParseExact:!0,weekdays:"S~úñdá~ý_Mó~ñdáý~_Túé~sdáý~_Wéd~ñésd~áý_T~húrs~dáý_~Fríd~áý_S~átúr~dáý".split("_"),weekdaysShort:"S~úñ_~Móñ_~Túé_~Wéd_~Thú_~Frí_~Sát".split("_"),weekdaysMin:"S~ú_Mó~_Tú_~Wé_T~h_Fr~_Sá".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd, D MMMM YYYY HH:mm"},calendar:{sameDay:"[T~ódá~ý át] LT",nextDay:"[T~ómó~rró~w át] LT",nextWeek:"dddd [át] LT",lastDay:"[Ý~ést~érdá~ý át] LT",lastWeek:"[L~ást] dddd [át] LT",sameElse:"L"},relativeTime:{future:"í~ñ %s",past:"%s á~gó",s:"á ~féw ~sécó~ñds",ss:"%d s~écóñ~ds",m:"á ~míñ~úté",mm:"%d m~íñú~tés",h:"á~ñ hó~úr",hh:"%d h~óúrs",d:"á ~dáý",dd:"%d d~áýs",M:"á ~móñ~th",MM:"%d m~óñt~hs",y:"á ~ýéár",yy:"%d ý~éárs"},dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,n=1===~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th";return e+n},week:{dow:1,doy:4}});return t}))},fdba:function(e,t,n){"use strict";var r=n("d128"),i=n("2b75"),s=n("a60d"),o=n("088f"),a=n("9394"),l=n("c041");t.f=r&&!i?Object.defineProperties:function(e,t){o(e);var n,r=a(t),i=l(t),u=i.length,c=0;while(u>c)s.f(e,n=i[c++],r[n]);return e}},ff56:function(e,t,n){"use strict";var r=n("624b"),i=n("87ed");e.exports=r(i.proto,"size","get")||function(e){return e.size}},ffec:function(e,t,n){"use strict";n.r(t),n.d(t,"isNumeric",(function(){return r})),n.d(t,"isNumericLike",(function(){return i})),n.d(t,"rangeEach",(function(){return s})),n.d(t,"rangeEachReverse",(function(){return o})),n.d(t,"valueAccordingPercent",(function(){return a})),n.d(t,"clamp",(function(){return l}));n("38b3"),n("f448"),n("66e1"),n("2582"),n("f86b"),n("1587"),n("c5d7");function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=typeof e;if("number"===n)return!isNaN(e)&&isFinite(e);if("string"===n){if(0===e.length)return!1;if(1===e.length)return/\d/.test(e);const n=Array.from(new Set([".",...t])).map(e=>"\\"+e).join("|");return new RegExp(`^[+-]?(((${n})?\\d+((${n})\\d+)?(e[+-]?\\d+)?)|(0x[a-f\\d]+))$`,"i").test(e.trim())}return"object"===n&&(!!e&&"number"===typeof e.valueOf()&&!(e instanceof Date))}function i(e){return r(e,[","])}function s(e,t,n){let r=-1;"function"===typeof t?(n=t,t=e):r=e-1;while(++r<=t)if(!1===n(r))break}function o(e,t,n){let r=e+1;"function"===typeof t&&(n=t,t=0);while(--r>=t)if(!1===n(r))break}function a(e,t){return t=parseInt(t.toString().replace("%",""),10),t=isNaN(t)?0:t,parseInt(e*t/100,10)}function l(e,t,n){return Math.min(e,t)===e?t:Math.max(e,n)===e?n:e}},ffff:function(e,t,n){(function(e,t){t(n("c1df"))})(0,(function(e){"use strict";
- //! moment.js locale configuration
- var t=e.defineLocale("se",{months:"ođđajagemánnu_guovvamánnu_njukčamánnu_cuoŋománnu_miessemánnu_geassemánnu_suoidnemánnu_borgemánnu_čakčamánnu_golggotmánnu_skábmamánnu_juovlamánnu".split("_"),monthsShort:"ođđj_guov_njuk_cuo_mies_geas_suoi_borg_čakč_golg_skáb_juov".split("_"),weekdays:"sotnabeaivi_vuossárga_maŋŋebárga_gaskavahkku_duorastat_bearjadat_lávvardat".split("_"),weekdaysShort:"sotn_vuos_maŋ_gask_duor_bear_láv".split("_"),weekdaysMin:"s_v_m_g_d_b_L".split("_"),longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD.MM.YYYY",LL:"MMMM D. [b.] YYYY",LLL:"MMMM D. [b.] YYYY [ti.] HH:mm",LLLL:"dddd, MMMM D. [b.] YYYY [ti.] HH:mm"},calendar:{sameDay:"[otne ti] LT",nextDay:"[ihttin ti] LT",nextWeek:"dddd [ti] LT",lastDay:"[ikte ti] LT",lastWeek:"[ovddit] dddd [ti] LT",sameElse:"L"},relativeTime:{future:"%s geažes",past:"maŋit %s",s:"moadde sekunddat",ss:"%d sekunddat",m:"okta minuhta",mm:"%d minuhtat",h:"okta diimmu",hh:"%d diimmut",d:"okta beaivi",dd:"%d beaivvit",M:"okta mánnu",MM:"%d mánut",y:"okta jahki",yy:"%d jagit"},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}});return t}))}}]);
|