44.bundle.js 2.0 MB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. /*! For license information please see 44.bundle.js.LICENSE.txt */
  2. (self.webpackChunkfront=self.webpackChunkfront||[]).push([[44],{23:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},119:function(e,t,n){!function(e){"use strict";var t={1:"۱",2:"۲",3:"۳",4:"۴",5:"۵",6:"۶",7:"۷",8:"۸",9:"۹",0:"۰"},n={"۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","۰":"0"};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}})}(n(95093))},244:(e,t,n)=>{"use strict";function r(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}n.d(t,{A:()=>r})},411:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var r=n(96540);n(74848);const o=r.createContext(),i=()=>r.useContext(o)??!1},655:(e,t,n)=>{"use strict";var r=n(36955),o=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},836:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,Q:()=>i});var r=n(96540),o=n(54405);function i(e){if("object"!=typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)}function s(e){if(r.isValidElement(e)||(0,o.Hy)(e)||!i(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=s(e[n])})),t}function a(e,t,n={clone:!0}){const l=n.clone?{...e}:e;return i(e)&&i(t)&&Object.keys(t).forEach((u=>{r.isValidElement(t[u])||(0,o.Hy)(t[u])?l[u]=t[u]:i(t[u])&&Object.prototype.hasOwnProperty.call(e,u)&&i(e[u])?l[u]=a(e[u],t[u],n):n.clone?l[u]=i(t[u])?s(t[u]):t[u]:l[u]=t[u]})),l}},1152:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(97164).A},1221:function(e,t,n){!function(e){"use strict";var t=["جنوري","فيبروري","مارچ","اپريل","مئي","جون","جولاءِ","آگسٽ","سيپٽمبر","آڪٽوبر","نومبر","ڊسمبر"],n=["آچر","سومر","اڱارو","اربع","خميس","جمع","ڇنڇر"];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}})}(n(95093))},1321:(e,t,n)=>{"use strict";function r(e=[]){return([,t])=>t&&function(e,t=[]){if(!function(e){return"string"==typeof e.main}(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||"string"!=typeof e[n])return!1;return!0}(t,e)}n.d(t,{A:()=>r})},1625:(e,t,n)=>{"use strict";var r=n(79504);e.exports=r({}.isPrototypeOf)},1632:function(e,t,n){!function(e){"use strict";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 年"}})}(n(95093))},1713:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(96540).createContext(void 0)},1767:e=>{"use strict";e.exports=function(e){return{iterator:e,next:e.next,done:!1}}},1908:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i});var r=n(61626);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t,n="Mui"){const i=o[t];return i?`${n}-${i}`:`${r.A.generate(e)}-${t}`}},2360:(e,t,n)=>{"use strict";var r,o=n(28551),i=n(96801),s=n(88727),a=n(30421),l=n(20397),u=n(4055),h=n(66119),c="prototype",d="script",m=h("IE_PROTO"),p=function(){},f=function(e){return"<"+d+">"+e+"</"+d+">"},g=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},y=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;y="undefined"!=typeof document?document.domain&&r?g(r):(t=u("iframe"),n="java"+d+":",t.style.display="none",l.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):g(r);for(var o=s.length;o--;)delete y[c][s[o]];return y()};a[m]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p[c]=o(e),n=new p,p[c]=null,n[m]=e):n=y(),void 0===t?n:i.f(n,t)}},2478:(e,t,n)=>{"use strict";var r=n(79504),o=n(48981),i=Math.floor,s=r("".charAt),a=r("".replace),l=r("".slice),u=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,n,r,c,d){var m=n+e.length,p=r.length,f=h;return void 0!==c&&(c=o(c),f=u),a(d,f,(function(o,a){var u;switch(s(a,0)){case"$":return"$";case"&":return e;case"`":return l(t,0,n);case"'":return l(t,m);case"<":u=c[l(a,1,-1)];break;default:var h=+a;if(0===h)return o;if(h>p){var d=i(h/10);return 0===d?o:d<=p?void 0===r[d-1]?s(a,1):r[d-1]+s(a,1):o}u=r[h-1]}return void 0===u?"":u}))}},3035:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][2]?o[n][2]:o[n][1]:r?o[n][0]:o[n][1]}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}})}(n(95093))},3072:(e,t)=>{"use strict";var n="function"==typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,h=n?Symbol.for("react.async_mode"):60111,c=n?Symbol.for("react.concurrent_mode"):60111,d=n?Symbol.for("react.forward_ref"):60112,m=n?Symbol.for("react.suspense"):60113,p=n?Symbol.for("react.suspense_list"):60120,f=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,y=n?Symbol.for("react.block"):60121,w=n?Symbol.for("react.fundamental"):60117,v=n?Symbol.for("react.responder"):60118,_=n?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case h:case c:case i:case a:case s:case m:return e;default:switch(e=e&&e.$$typeof){case u:case d:case g:case f:case l:return e;default:return t}}case o:return t}}}function S(e){return b(e)===c}t.AsyncMode=h,t.ConcurrentMode=c,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=d,t.Fragment=i,t.Lazy=g,t.Memo=f,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=m,t.isAsyncMode=function(e){return S(e)||b(e)===h},t.isConcurrentMode=S,t.isContextConsumer=function(e){return b(e)===u},t.isContextProvider=function(e){return b(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return b(e)===d},t.isFragment=function(e){return b(e)===i},t.isLazy=function(e){return b(e)===g},t.isMemo=function(e){return b(e)===f},t.isPortal=function(e){return b(e)===o},t.isProfiler=function(e){return b(e)===a},t.isStrictMode=function(e){return b(e)===s},t.isSuspense=function(e){return b(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===c||e===a||e===s||e===m||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===f||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===w||e.$$typeof===v||e.$$typeof===_||e.$$typeof===y)},t.typeOf=b},3322:function(e,t,n){!function(e){"use strict";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,o){var i,s=t.words[r];return 1===r.length?"y"===r&&n?"једна година":o||n?s[0]:s[1]:(i=t.correctGrammaticalCase(e,s),"yy"===r&&n&&"годину"===i?e+" година":e+" "+i)}};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(){return["[прошле] [недеље] [у] LT","[прошлог] [понедељка] [у] LT","[прошлог] [уторка] [у] LT","[прошле] [среде] [у] LT","[прошлог] [четвртка] [у] LT","[прошлог] [петка] [у] LT","[прошле] [суботе] [у] LT"][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}})}(n(95093))},3508:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},3576:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);const o="undefined"!=typeof window?r.useLayoutEffect:r.useEffect},3709:(e,t,n)=>{"use strict";function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return e.get(s(e,t))}function i(e,t,n){return e.set(s(e,t),n),n}function s(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")}n.d(t,{A:()=>u}),n(16280);var a=new WeakMap;class l{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];var o,s,l;r(this,"row",null),r(this,"col",null),l=!1,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(o=this,s=a),s.set(o,l),i(a,this,n),void 0!==e&&void 0!==t&&(this.row=e,this.col=t)}isValid(e){const{countRows:t,countCols:n,countRowHeaders:r,countColHeaders:o}={countRows:0,countCols:0,countRowHeaders:0,countColHeaders:0,...e};return!(!Number.isInteger(this.row)||!Number.isInteger(this.col)||this.row<-o||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 o(a,this)}isSouthEastOf(e){return this.row>=e.row&&(o(a,this)?this.col<=e.col:this.col>=e.col)}isNorthWestOf(e){return this.row<=e.row&&(o(a,this)?this.col>=e.col:this.col<=e.col)}isSouthWestOf(e){return this.row>=e.row&&(o(a,this)?this.col>=e.col:this.col<=e.col)}isNorthEastOf(e){return this.row<=e.row&&(o(a,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.row)&&(this.row=e.row),Number.isInteger(null==e?void 0:e.col)&&(this.col=e.col),e instanceof l&&i(a,this,e.isRtl()),this}clone(){return new l(this.row,this.col,o(a,this))}toObject(){return{row:this.row,col:this.col}}}const u=l},3949:(e,t,n)=>{"use strict";n(7588)},4055:(e,t,n)=>{"use strict";var r=n(44576),o=n(20034),i=r.document,s=o(i)&&o(i.createElement);e.exports=function(e){return s?i.createElement(e):{}}},4076:(e,t,n)=>{"use strict";function r(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach((e=>n.searchParams.append("args[]",e))),`Minified MUI error #${e}; visit ${n} for the full message.`}n.d(t,{A:()=>r})},4146:(e,t,n)=>{"use strict";var r=n(73404),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var u=Object.defineProperty,h=Object.getOwnPropertyNames,c=Object.getOwnPropertySymbols,d=Object.getOwnPropertyDescriptor,m=Object.getPrototypeOf,p=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(p){var o=m(n);o&&o!==p&&e(t,o,r)}var s=h(n);c&&(s=s.concat(c(n)));for(var a=l(t),f=l(n),g=0;g<s.length;++g){var y=s[g];if(!(i[y]||r&&r[y]||f&&f[y]||a&&a[y])){var w=d(n,y);try{u(t,y,w)}catch(e){}}}}return t}},4417:e=>{"use strict";e.exports=function(e,t){return t||(t={}),e?(e=String(e.__esModule?e.default:e),/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]|(%20)/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e):e}},4495:(e,t,n)=>{"use strict";var r=n(39519),o=n(79039),i=n(44576).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},4894:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(28040).A)()},4977:(e,t,n)=>{"use strict";n.d(t,{Dp:()=>d,Dg:()=>m}),n(96540);var r=n(57514),o=n(17437),i=n(74848);function s(e){const{styles:t,defaultTheme:n={}}=e,r="function"==typeof t?e=>{return t(null==(r=e)||0===Object.keys(r).length?n:e);var r}:t;return(0,i.jsx)(o.mL,{styles:r})}var a=n(14921);const l=function({styles:e,themeId:t,defaultTheme:n={}}){const r=(0,a.A)(n),o="function"==typeof e?e(t&&r[t]||r):e;return(0,i.jsx)(s,{styles:o})};var u=n(4894),h=n(31355);const c=function(e){return(0,i.jsx)(l,{...e,defaultTheme:u.A,themeId:h.A})};function d(e){return function(t){return(0,i.jsx)(c,{styles:"function"==typeof e?n=>e({theme:n,...t}):e})}}function m(){return r.A}},5784:function(e,t,n){!function(e){"use strict";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 o(e,t,n,o){var i=e+" ";switch(n){case"s":return t||o?"pár sekúnd":"pár sekundami";case"ss":return t||o?i+(r(e)?"sekundy":"sekúnd"):i+"sekundami";case"m":return t?"minúta":o?"minútu":"minútou";case"mm":return t||o?i+(r(e)?"minúty":"minút"):i+"minútami";case"h":return t?"hodina":o?"hodinu":"hodinou";case"hh":return t||o?i+(r(e)?"hodiny":"hodín"):i+"hodinami";case"d":return t||o?"deň":"dňom";case"dd":return t||o?i+(r(e)?"dni":"dní"):i+"dňami";case"M":return t||o?"mesiac":"mesiacom";case"MM":return t||o?i+(r(e)?"mesiace":"mesiacov"):i+"mesiacmi";case"y":return t||o?"rok":"rokom";case"yy":return t||o?i+(r(e)?"roky":"rokov"):i+"rokmi"}}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:case 4:case 5:return"[minulý] dddd [o] LT";case 3:return"[minulú stredu o] LT";case 6:return"[minulú sobotu o] LT"}},sameElse:"L"},relativeTime:{future:"za %s",past:"pred %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}})}(n(95093))},6181:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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 n=t.toLowerCase();return n.includes("w")||n.includes("m")?e+".":e+function(e){var t=(e=""+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ê"}(e)},week:{dow:1,doy:4}})}(n(95093))},6469:(e,t,n)=>{"use strict";var r=n(78227),o=n(2360),i=n(24913).f,s=r("unscopables"),a=Array.prototype;void 0===a[s]&&i(a,s,{configurable:!0,value:o(null)}),e.exports=function(e){a[s][e]=!0}},6833:(e,t,n)=>{"use strict";n.d(t,{sd:()=>y,f4:()=>g,Mt:()=>w,F3:()=>v}),n(16280);var r=n(24360),o=(n(98992),n(81454),n(71409)),i=n(83986);const s="asc",a=new Map([[s,[-1,1]],["desc",[1,-1]]]),l=e=>`The priority '${e}' is already declared in a map.`,u=e=>`The priority '${e}' is not a number.`;var h=n(85428);n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698);const c=e=>`'${e}' value is already declared in a unique set.`,d=e=>`There is already registered "${e}" plugin.`,m=function(){let{errorPriorityExists:e,errorPriorityNaN:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=new Map;return e=(0,i.Tn)(e)?e:l,t=(0,i.Tn)(t)?t:u,{addItem:function(r,i){if(!(0,o.kf)(r))throw new Error(t(r));if(n.has(r))throw new Error(e(r));n.set(r,i)},getItems:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:s;const[t,r]=a.get(e)||a.get(s);return[...n].sort(((e,n)=>e[0]<n[0]?t:r)).map((e=>e[1]))}}}({errorPriorityExists:e=>`There is already registered plugin on priority "${e}".`,errorPriorityNaN:e=>`The priority "${e}" is not a number.`}),p=function(){let{errorItemExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Set;return e=(0,i.Tn)(e)?e:c,{addItem:function(n){if(t.has(n))throw new Error(e(n));t.add(n)},clear:function(){t.clear()},getItems:function(){return[...t]}}}({errorItemExists:d}),f=(0,h.u)({errorIdExists:d});function g(){return[...m.getItems(),...p.getItems()]}function y(e){const t=(0,r.Ob)(e);return f.getItem(t)}function w(e){return!!y(e)}function v(e,t,n){[e,t,n]=function(e,t,n){return"function"==typeof e&&(e=(t=e).PLUGIN_KEY,n=t.PLUGIN_PRIORITY),[e,t,n]}(e,t,n),void 0===y(e)&&function(e,t,n){const o=(0,r.Ob)(e);if(f.hasItem(o))throw new Error(d(o));void 0===n?p.addItem(o):m.addItem(n,o),f.addItem(o,t)}(e,t,n)}},6947:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};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}})}(n(95093))},6980:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},7040:(e,t,n)=>{"use strict";var r=n(4495);e.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},7196:(e,t,n)=>{"use strict";n.d(t,{EU:()=>u,NI:()=>l,iZ:()=>c,kW:()=>d,vf:()=>h,zu:()=>i});var r=n(836),o=n(63132);const i={xs:0,sm:600,md:900,lg:1200,xl:1536},s={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${i[e]}px)`},a={containerQueries:e=>({up:t=>{let n="number"==typeof t?t:i[t]||t;return"number"==typeof n&&(n=`${n}px`),e?`@container ${e} (min-width:${n})`:`@container (min-width:${n})`}})};function l(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||s;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"==typeof t){const e=r.breakpoints||s;return Object.keys(t).reduce(((s,l)=>{if((0,o.ob)(e.keys,l)){const e=(0,o.CT)(r.containerQueries?r:a,l);e&&(s[e]=n(t[l],l))}else if(Object.keys(e.values||i).includes(l))s[e.up(l)]=n(t[l],l);else{const e=l;s[e]=t[e]}return s}),{})}return n(t)}function u(e={}){const t=e.keys?.reduce(((t,n)=>(t[e.up(n)]={},t)),{});return t||{}}function h(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e,...t){const n=u(e),o=[n,...t].reduce(((e,t)=>(0,r.A)(e,t)),{});return h(Object.keys(n),o)}function d({values:e,breakpoints:t,base:n}){const r=n||function(e,t){if("object"!=typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r<e.length&&(n[t]=!0)})):r.forEach((t=>{null!=e[t]&&(n[t]=!0)})),n}(e,t),o=Object.keys(r);if(0===o.length)return e;let i;return o.reduce(((t,n,r)=>(Array.isArray(e)?(t[n]=null!=e[r]?e[r]:e[i],i=r):"object"==typeof e?(t[n]=null!=e[n]?e[n]:e[i],i=n):t[n]=e,t)),{})}},7306:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},7388:(e,t,n)=>{"use strict";n.d(t,{A:()=>be});var r=n(96540),o=n(34164),i=n(836),s=n(21362),a=n(17726),l=n(4076),u=n(91092),h=n(33983),c=n(39407),d=n(411),m=n(53948),p=n(71026),f=n(10104),g=n(26739),y=n(20439),w=n(65418),v=n(41538),_=n(38572),b=n(41558),S=n(49565),C=n(96148),E=n(1908);function M(e){return(0,E.Ay)("MuiPopover",e)}(0,C.A)("MuiPopover",["root","paper"]);var T=n(85078),R=n(98663),A=n(74848);function N(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function L(e,t){let n=0;return"number"==typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function x(e){return[e.horizontal,e.vertical].map((e=>"number"==typeof e?`${e}px`:e)).join(" ")}function O(e){return"function"==typeof e?e():e}const I=(0,g.Ay)(b.A,{name:"MuiPopover",slot:"Root"})({}),k=(0,g.Ay)(S.A,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),D=r.forwardRef((function(e,t){const n=(0,y.b)({props:e,name:"MuiPopover"}),{action:i,anchorEl:a,anchorOrigin:l={vertical:"top",horizontal:"left"},anchorPosition:u,anchorReference:c="anchorEl",children:d,className:m,container:p,elevation:g=8,marginThreshold:b=16,open:S,PaperProps:C={},slots:E={},slotProps:D={},transformOrigin:P={vertical:"top",horizontal:"left"},TransitionComponent:H,transitionDuration:F="auto",TransitionProps:Y={},disableScrollLock:V=!1,...U}=n,B=r.useRef(),W={...n,anchorOrigin:l,anchorReference:c,elevation:g,marginThreshold:b,transformOrigin:P,TransitionComponent:H,transitionDuration:F,TransitionProps:Y},j=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"]},M,t)})(W),z=r.useCallback((()=>{if("anchorPosition"===c)return u;const e=O(a),t=(e&&1===e.nodeType?e:(0,h.A)(B.current).body).getBoundingClientRect();return{top:t.top+N(t,l.vertical),left:t.left+L(t,l.horizontal)}}),[a,l.horizontal,l.vertical,u,c]),G=r.useCallback((e=>({vertical:N(e,P.vertical),horizontal:L(e,P.horizontal)})),[P.horizontal,P.vertical]),$=r.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=G(t);if("none"===c)return{top:null,left:null,transformOrigin:x(n)};const r=z();let o=r.top-n.vertical,i=r.left-n.horizontal;const s=o+t.height,l=i+t.width,u=(0,v.A)(O(a)),h=u.innerHeight-b,d=u.innerWidth-b;if(null!==b&&o<b){const e=o-b;o-=e,n.vertical+=e}else if(null!==b&&s>h){const e=s-h;o-=e,n.vertical+=e}if(null!==b&&i<b){const e=i-b;i-=e,n.horizontal+=e}else if(l>d){const e=l-d;i-=e,n.horizontal+=e}return{top:`${Math.round(o)}px`,left:`${Math.round(i)}px`,transformOrigin:x(n)}}),[a,c,z,G,b]),[K,X]=r.useState(S),q=r.useCallback((()=>{const e=B.current;if(!e)return;const t=$(e);null!==t.top&&e.style.setProperty("top",t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,X(!0)}),[$]);r.useEffect((()=>(V&&window.addEventListener("scroll",q),()=>window.removeEventListener("scroll",q))),[a,V,q]),r.useEffect((()=>{S&&q()})),r.useImperativeHandle(i,(()=>S?{updatePosition:()=>{q()}}:null),[S,q]),r.useEffect((()=>{if(!S)return;const e=(0,w.A)((()=>{q()})),t=(0,v.A)(O(a));return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[a,S,q]);let Q=F;const J={slots:{transition:H,...E},slotProps:{transition:Y,paper:C,...D}},[Z,ee]=(0,T.A)("transition",{elementType:_.A,externalForwardedProps:J,ownerState:W,getSlotProps:e=>({...e,onEntering:(t,n)=>{e.onEntering?.(t,n),q()},onExited:t=>{e.onExited?.(t),X(!1)}}),additionalProps:{appear:!0,in:S}});"auto"!==F||Z.muiSupportAuto||(Q=void 0);const te=p||(a?(0,h.A)(O(a)).body:void 0),[ne,{slots:re,slotProps:oe,...ie}]=(0,T.A)("root",{ref:t,elementType:I,externalForwardedProps:{...J,...U},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:E.backdrop},slotProps:{backdrop:(0,R.A)("function"==typeof D.backdrop?D.backdrop(W):D.backdrop,{invisible:!0})},container:te,open:S},ownerState:W,className:(0,o.A)(j.root,m)}),[se,ae]=(0,T.A)("paper",{ref:B,className:j.paper,elementType:k,externalForwardedProps:J,shouldForwardComponentProp:!0,additionalProps:{elevation:g,style:K?void 0:{opacity:0}},ownerState:W});return(0,A.jsx)(ne,{...ie,...!(0,f.A)(ne)&&{slots:re,slotProps:oe,disableScrollLock:V},children:(0,A.jsx)(Z,{...ee,timeout:Q,children:(0,A.jsx)(se,{...ae,children:d})})})}));var P=n(98855);function H(e){return(0,E.Ay)("MuiMenu",e)}(0,C.A)("MuiMenu",["root","paper","list"]);const F={vertical:"top",horizontal:"right"},Y={vertical:"top",horizontal:"left"},V=(0,g.Ay)(D,{shouldForwardProp:e=>(0,P.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root"})({}),U=(0,g.Ay)(k,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),B=(0,g.Ay)(p.A,{name:"MuiMenu",slot:"List"})({outline:0}),W=r.forwardRef((function(e,t){const n=(0,y.b)({props:e,name:"MuiMenu"}),{autoFocus:i=!0,children:a,className:l,disableAutoFocusItem:u=!1,MenuListProps:h={},onClose:c,open:p,PaperProps:f={},PopoverClasses:g,transitionDuration:w="auto",TransitionProps:{onEntering:v,..._}={},variant:b="selectedMenu",slots:S={},slotProps:C={},...E}=n,M=(0,d.I)(),R={...n,autoFocus:i,disableAutoFocusItem:u,MenuListProps:h,onEntering:v,PaperProps:f,transitionDuration:w,TransitionProps:_,variant:b},N=(e=>{const{classes:t}=e;return(0,s.A)({root:["root"],paper:["paper"],list:["list"]},H,t)})(R),L=i&&!u&&p,x=r.useRef(null);let O=-1;r.Children.map(a,((e,t)=>{r.isValidElement(e)&&(e.props.disabled||("selectedMenu"===b&&e.props.selected||-1===O)&&(O=t))}));const I={slots:S,slotProps:{list:h,transition:_,paper:f,...C}},k=(0,m.A)({elementType:S.root,externalSlotProps:C.root,ownerState:R,className:[N.root,l]}),[D,P]=(0,T.A)("paper",{className:N.paper,elementType:U,externalForwardedProps:I,shouldForwardComponentProp:!0,ownerState:R}),[W,j]=(0,T.A)("list",{className:(0,o.A)(N.list,h.className),elementType:B,shouldForwardComponentProp:!0,externalForwardedProps:I,getSlotProps:e=>({...e,onKeyDown:t=>{(e=>{"Tab"===e.key&&(e.preventDefault(),c&&c(e,"tabKeyDown"))})(t),e.onKeyDown?.(t)}}),ownerState:R}),z="function"==typeof I.slotProps.transition?I.slotProps.transition(R):I.slotProps.transition;return(0,A.jsx)(V,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:M?"right":"left"},transformOrigin:M?F:Y,slots:{root:S.root,paper:D,backdrop:S.backdrop,...S.transition&&{transition:S.transition}},slotProps:{root:k,paper:P,backdrop:"function"==typeof C.backdrop?C.backdrop(R):C.backdrop,transition:{...z,onEntering:(...e)=>{((e,t)=>{x.current&&x.current.adjustStyleForScrollbar(e,{direction:M?"rtl":"ltr"}),v&&v(e,t)})(...e),z?.onEntering?.(...e)}}},open:p,ref:t,transitionDuration:w,ownerState:R,...E,classes:g,children:(0,A.jsx)(W,{actions:x,autoFocus:i&&(-1===O||u),autoFocusItem:L,variant:b,...j,children:a})})}));function j(e){return(0,E.Ay)("MuiNativeSelect",e)}const z=(0,C.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),G=(0,g.Ay)("select")((({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${z.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:e})=>"filled"!==e.variant&&"outlined"!==e.variant,style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]}))),$=(0,g.Ay)(G,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:P.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${z.multiple}`]:t.multiple}]}})({}),K=(0,g.Ay)("svg")((({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${z.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:e})=>e.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]}))),X=(0,g.Ay)(K,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,c.A)(n.variant)}`],n.open&&t.iconOpen]}})({}),q=r.forwardRef((function(e,t){const{className:n,disabled:i,error:a,IconComponent:l,inputRef:u,variant:h="standard",...d}=e,m={...e,disabled:i,variant:h,error:a},p=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,c.A)(n)}`,i&&"iconOpen",r&&"disabled"]};return(0,s.A)(l,j,t)})(m);return(0,A.jsxs)(r.Fragment,{children:[(0,A.jsx)($,{ownerState:m,className:(0,o.A)(p.select,n),disabled:i,ref:u||t,...d}),e.multiple?null:(0,A.jsx)(X,{as:l,ownerState:m,className:p.icon})]})}));var Q=n(99692),J=n(23),Z=n(30301),ee=n(1152);function te(e){return(0,E.Ay)("MuiSelect",e)}const ne=(0,C.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var re;const oe=(0,g.Ay)(G,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${ne.select}`]:t.select},{[`&.${ne.select}`]:t[n.variant]},{[`&.${ne.error}`]:t.error},{[`&.${ne.multiple}`]:t.multiple}]}})({[`&.${ne.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),ie=(0,g.Ay)(K,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${(0,c.A)(n.variant)}`],n.open&&t.iconOpen]}})({}),se=(0,g.Ay)("input",{shouldForwardProp:e=>(0,J.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function ae(e,t){return"object"==typeof t&&null!==t?e===t:String(e)===String(t)}function le(e){return null==e||"string"==typeof e&&!e.trim()}const ue=r.forwardRef((function(e,t){const{"aria-describedby":n,"aria-label":i,autoFocus:a,autoWidth:d,children:m,className:p,defaultOpen:f,defaultValue:g,disabled:y,displayEmpty:w,error:v=!1,IconComponent:_,inputRef:b,labelId:S,MenuProps:C={},multiple:E,name:M,onBlur:T,onChange:R,onClose:N,onFocus:L,onOpen:x,open:O,readOnly:I,renderValue:k,required:D,SelectDisplayProps:P={},tabIndex:H,type:F,value:Y,variant:V="standard",...U}=e,[B,j]=(0,ee.A)({controlled:Y,default:g,name:"Select"}),[z,G]=(0,ee.A)({controlled:O,default:f,name:"Select"}),$=r.useRef(null),K=r.useRef(null),[X,q]=r.useState(null),{current:J}=r.useRef(null!=O),[ne,ue]=r.useState(),he=(0,Z.A)(t,b),ce=r.useCallback((e=>{K.current=e,e&&q(e)}),[]),de=X?.parentNode;r.useImperativeHandle(he,(()=>({focus:()=>{K.current.focus()},node:$.current,value:B})),[B]),r.useEffect((()=>{f&&z&&X&&!J&&(ue(d?null:de.clientWidth),K.current.focus())}),[X,d]),r.useEffect((()=>{a&&K.current.focus()}),[a]),r.useEffect((()=>{if(!S)return;const e=(0,h.A)(K.current).getElementById(S);if(e){const t=()=>{getSelection().isCollapsed&&K.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[S]);const me=(e,t)=>{e?x&&x(t):N&&N(t),J||(ue(d?null:de.clientWidth),G(e))},pe=r.Children.toArray(m),fe=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(E){n=Array.isArray(B)?B.slice():[];const t=B.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),B!==n&&(j(n),R)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:M}}),R(o,e)}E||me(!1,t)}},ge=null!==X&&z;let ye,we;delete U["aria-invalid"];const ve=[];let _e=!1,be=!1;((0,Q.lq)({value:B})||w)&&(k?ye=k(B):_e=!0);const Se=pe.map((e=>{if(!r.isValidElement(e))return null;let t;if(E){if(!Array.isArray(B))throw new Error((0,l.A)(2));t=B.some((t=>ae(t,e.props.value))),t&&_e&&ve.push(e.props.children)}else t=ae(B,e.props.value),t&&_e&&(we=e.props.children);return t&&(be=!0),r.cloneElement(e,{"aria-selected":t?"true":"false",onClick:fe(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));_e&&(ye=E?0===ve.length?null:ve.reduce(((e,t,n)=>(e.push(t),n<ve.length-1&&e.push(", "),e)),[]):we);let Ce,Ee=ne;!d&&J&&X&&(Ee=de.clientWidth),Ce=void 0!==H?H:y?null:0;const Me=P.id||(M?`mui-component-select-${M}`:void 0),Te={...e,variant:V,value:B,open:ge,error:v},Re=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:a}=e,l={select:["select",n,r&&"disabled",o&&"multiple",a&&"error"],icon:["icon",`icon${(0,c.A)(n)}`,i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,s.A)(l,te,t)})(Te),Ae={...C.PaperProps,...C.slotProps?.paper},Ne=(0,u.A)();return(0,A.jsxs)(r.Fragment,{children:[(0,A.jsx)(oe,{as:"div",ref:ce,tabIndex:Ce,role:"combobox","aria-controls":ge?Ne:void 0,"aria-disabled":y?"true":void 0,"aria-expanded":ge?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[S,Me].filter(Boolean).join(" ")||void 0,"aria-describedby":n,"aria-required":D?"true":void 0,"aria-invalid":v?"true":void 0,onKeyDown:e=>{I||[" ","ArrowUp","ArrowDown","Enter"].includes(e.key)&&(e.preventDefault(),me(!0,e))},onMouseDown:y||I?null:e=>{0===e.button&&(e.preventDefault(),K.current.focus(),me(!0,e))},onBlur:e=>{!ge&&T&&(Object.defineProperty(e,"target",{writable:!0,value:{value:B,name:M}}),T(e))},onFocus:L,...P,ownerState:Te,className:(0,o.A)(P.className,Re.select,p),id:Me,children:le(ye)?re||(re=(0,A.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):ye}),(0,A.jsx)(se,{"aria-invalid":v,value:Array.isArray(B)?B.join(","):B,name:M,ref:$,"aria-hidden":!0,onChange:e=>{const t=pe.find((t=>t.props.value===e.target.value));void 0!==t&&(j(t.props.value),R&&R(e,t))},tabIndex:-1,disabled:y,className:Re.nativeInput,autoFocus:a,required:D,...U,ownerState:Te}),(0,A.jsx)(ie,{as:_,className:Re.icon,ownerState:Te}),(0,A.jsx)(W,{id:`menu-${M||""}`,anchorEl:de,open:ge,onClose:e=>{me(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...C,slotProps:{...C.slotProps,list:{"aria-labelledby":S,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:Ne,...C.MenuListProps},paper:{...Ae,style:{minWidth:Ee,...null!=Ae?Ae.style:null}}},children:Se})]})}));var he=n(93583),ce=n(76761),de=n(41811),me=n(78164),pe=n(63984),fe=n(47195);const ge={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>(0,P.A)(e)&&"variant"!==e},ye=(0,g.Ay)(me.A,ge)(""),we=(0,g.Ay)(fe.A,ge)(""),ve=(0,g.Ay)(pe.A,ge)(""),_e=r.forwardRef((function(e,t){const n=(0,y.b)({name:"MuiSelect",props:e}),{autoWidth:l=!1,children:u,classes:h={},className:c,defaultOpen:d=!1,displayEmpty:m=!1,IconComponent:p=de.A,id:f,input:g,inputProps:w,label:v,labelId:_,MenuProps:b,multiple:S=!1,native:C=!1,onClose:E,onOpen:M,open:T,renderValue:R,SelectDisplayProps:N,variant:L="outlined",...x}=n,O=C?q:ue,I=(0,ce.A)(),k=(0,he.A)({props:n,muiFormControl:I,states:["variant","error"]}),D=k.variant||L,P={...n,variant:D,classes:h},H=(e=>{const{classes:t}=e,n=(0,s.A)({root:["root"]},te,t);return{...t,...n}})(P),{root:F,...Y}=H,V=g||{standard:(0,A.jsx)(ye,{ownerState:P}),outlined:(0,A.jsx)(we,{label:v,ownerState:P}),filled:(0,A.jsx)(ve,{ownerState:P})}[D],U=(0,Z.A)(t,(0,a.A)(V));return(0,A.jsx)(r.Fragment,{children:r.cloneElement(V,{inputComponent:O,inputProps:{children:u,error:k.error,IconComponent:p,variant:D,type:void 0,multiple:S,...C?{id:f}:{autoWidth:l,defaultOpen:d,displayEmpty:m,labelId:_,MenuProps:b,onClose:E,onOpen:M,open:T,renderValue:R,SelectDisplayProps:{id:f,...N}},...w,classes:w?(0,i.A)(Y,w.classes):Y,...g?g.props.inputProps:{}},...(S&&C||m)&&"outlined"===D?{notched:!0}:{},ref:U,className:(0,o.A)(V.props.className,c,H.root),...!g&&{variant:D},...x})})}));_e.muiName="Select";const be=_e},7588:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(72652),s=n(79306),a=n(28551),l=n(1767),u=n(9539),h=n(84549)("forEach",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:h},{forEach:function(e){a(this);try{s(e)}catch(e){u(this,"throw",e)}if(h)return o(h,this,e);var t=l(this),n=0;i(t,(function(t){e(t,n++)}),{IS_RECORD:!0})}})},8235:function(e,t,n){!function(e){"use strict";var t={1:"१",2:"२",3:"३",4:"४",5:"५",6:"६",7:"७",8:"८",9:"९",0:"०"},n={"१":"1","२":"2","३":"3","४":"4","५":"5","६":"6","७":"7","८":"8","९":"9","०":"0"};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}})}(n(95093))},8861:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r=n(96540),o=n(34164),i=n(21362),s=n(17437),a=n(26739),l=n(39241),u=n(20439),h=n(39407),c=n(1321),d=n(96148),m=n(1908);function p(e){return(0,m.Ay)("MuiCircularProgress",e)}(0,d.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"]);var f=n(74848);const g=s.i7`
  3. 0% {
  4. transform: rotate(0deg);
  5. }
  6. 100% {
  7. transform: rotate(360deg);
  8. }
  9. `,y=s.i7`
  10. 0% {
  11. stroke-dasharray: 1px, 200px;
  12. stroke-dashoffset: 0;
  13. }
  14. 50% {
  15. stroke-dasharray: 100px, 200px;
  16. stroke-dashoffset: -15px;
  17. }
  18. 100% {
  19. stroke-dasharray: 1px, 200px;
  20. stroke-dashoffset: -126px;
  21. }
  22. `,w="string"!=typeof g?s.AH`
  23. animation: ${g} 1.4s linear infinite;
  24. `:null,v="string"!=typeof y?s.AH`
  25. animation: ${y} 1.4s ease-in-out infinite;
  26. `:null,_=(0,a.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${(0,h.A)(n.color)}`]]}})((0,l.A)((({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:w||{animation:`${g} 1.4s linear infinite`}},...Object.entries(e.palette).filter((0,c.A)()).map((([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})))]})))),b=(0,a.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg"})({display:"block"}),S=(0,a.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${(0,h.A)(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})((0,l.A)((({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink,style:v||{animation:`${y} 1.4s ease-in-out infinite`}}]})))),C=r.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiCircularProgress"}),{className:r,color:s="primary",disableShrink:a=!1,size:l=40,style:c,thickness:d=3.6,value:m=0,variant:g="indeterminate",...y}=n,w={...n,color:s,disableShrink:a,size:l,thickness:d,value:m,variant:g},v=(e=>{const{classes:t,variant:n,color:r,disableShrink:o}=e,s={root:["root",n,`color${(0,h.A)(r)}`],svg:["svg"],circle:["circle",`circle${(0,h.A)(n)}`,o&&"circleDisableShrink"]};return(0,i.A)(s,p,t)})(w),C={},E={},M={};if("determinate"===g){const e=2*Math.PI*((44-d)/2);C.strokeDasharray=e.toFixed(3),M["aria-valuenow"]=Math.round(m),C.strokeDashoffset=`${((100-m)/100*e).toFixed(3)}px`,E.transform="rotate(-90deg)"}return(0,f.jsx)(_,{className:(0,o.A)(v.root,r),style:{width:l,height:l,...E,...c},ownerState:w,ref:t,role:"progressbar",...M,...y,children:(0,f.jsx)(b,{className:v.svg,ownerState:w,viewBox:"22 22 44 44",children:(0,f.jsx)(S,{className:v.circle,style:C,ownerState:w,cx:44,cy:44,r:(44-d)/2,fill:"none",strokeWidth:d})})})}))},8872:(e,t,n)=>{"use strict";n(18237)},9033:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:6}})}(n(95093))},9417:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,{A:()=>r})},9539:(e,t,n)=>{"use strict";var r=n(69565),o=n(28551),i=n(55966);e.exports=function(e,t,n){var s,a;o(e);try{if(!(s=i(e,"return"))){if("throw"===t)throw n;return n}s=r(s,e)}catch(e){a=!0,s=e}if("throw"===t)throw n;if(a)throw s;return o(s),n}},9792:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(96540),o=n(34164),i=n(21362),s=n(39407),a=n(26739),l=n(39241),u=n(20439),h=n(96148),c=n(1908);function d(e){return(0,c.Ay)("MuiSvgIcon",e)}(0,h.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var m=n(74848);const p=(0,a.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t[`color${(0,s.A)(n.color)}`],t[`fontSize${(0,s.A)(n.fontSize)}`]]}})((0,l.A)((({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:"currentColor"}},{props:{fontSize:"inherit"},style:{fontSize:"inherit"}},{props:{fontSize:"small"},style:{fontSize:e.typography?.pxToRem?.(20)||"1.25rem"}},{props:{fontSize:"medium"},style:{fontSize:e.typography?.pxToRem?.(24)||"1.5rem"}},{props:{fontSize:"large"},style:{fontSize:e.typography?.pxToRem?.(35)||"2.1875rem"}},...Object.entries((e.vars??e).palette).filter((([,e])=>e&&e.main)).map((([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}}))),{props:{color:"action"},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:"disabled"},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:"inherit"},style:{color:void 0}}]})))),f=r.forwardRef((function(e,t){const n=(0,u.b)({props:e,name:"MuiSvgIcon"}),{children:a,className:l,color:h="inherit",component:c="svg",fontSize:f="medium",htmlColor:g,inheritViewBox:y=!1,titleAccess:w,viewBox:v="0 0 24 24",..._}=n,b=r.isValidElement(a)&&"svg"===a.type,S={...n,color:h,component:c,fontSize:f,instanceFontSize:e.fontSize,inheritViewBox:y,viewBox:v,hasSvgAsChild:b},C={};y||(C.viewBox=v);const E=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&`color${(0,s.A)(t)}`,`fontSize${(0,s.A)(n)}`]};return(0,i.A)(o,d,r)})(S);return(0,m.jsxs)(p,{as:c,className:(0,o.A)(E.root,l),focusable:"false",color:g,"aria-hidden":!w||void 0,role:w?"img":void 0,ref:t,...C,..._,...b&&a.props,ownerState:S,children:[b?a.props.children:a,w?(0,m.jsx)("title",{children:w}):null]})}));f.muiName="SvgIcon";const g=f;function y(e,t){function n(t,n){return(0,m.jsx)(g,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=g.muiName,r.memo(r.forwardRef(n))}},10104:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"string"==typeof e}},10350:(e,t,n)=>{"use strict";var r=n(43724),o=n(39297),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=o(i,"name"),l=a&&"something"===function(){}.name,u=a&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:a,PROPER:l,CONFIGURABLE:u}},10540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},10644:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},10757:(e,t,n)=>{"use strict";var r=n(97751),o=n(94901),i=n(1625),s=n(7040),a=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return o(t)&&i(t.prototype,a(e))}},11025:function(e,t,n){!function(e){"use strict";var t={1:"௧",2:"௨",3:"௩",4:"௪",5:"௫",6:"௬",7:"௭",8:"௮",9:"௯",0:"௦"},n={"௧":"1","௨":"2","௩":"3","௪":"4","௫":"5","௬":"6","௭":"7","௮":"8","௯":"9","௦":"0"};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}})}(n(95093))},11056:(e,t,n)=>{"use strict";var r=n(24913).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}})}},11080:(e,t,n)=>{"use strict";n.d(t,{L3:()=>d,M8:()=>m,VA:()=>p,aZ:()=>l}),n(16280);var r=n(63487),o=n(34647);const i=new WeakMap,{register:s,getItem:a,hasItem:l,getNames:u,getValues:h}=(0,o.A)("editors");function c(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.R.getSingleton().add("afterDestroy",(function(){t[this.guid]=null}))}function d(e,t){let n;if("function"==typeof e)i.get(e)||p(null,e),n=i.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 p(e,t){e&&"string"!=typeof e&&(e=(t=e).EDITOR_TYPE);const n=new c(t);"string"==typeof e&&s(e,n),i.set(t,n)}},11108:(e,t,n)=>{"use strict";function r(e,t){"function"==typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},11470:function(e,t,n){!function(e){"use strict";function t(e,t,n){return e+" "+function(e,t){return 2===t?function(e){var t={m:"v",b:"v",d:"z"};return void 0===t[e.charAt(0)]?e:t[e.charAt(0)]+e.substring(1)}(e):e}({mm:"munutenn",MM:"miz",dd:"devezh"}[n],e)}function n(e){return e>9?n(e%10):e}var r=[/^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],o=/^(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,i=[/^Su/i,/^Lu/i,/^Me([^r]|$)/i,/^Mer/i,/^Ya/i,/^Gw/i,/^Sa/i];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:i,fullWeekdaysParse:[/^sul/i,/^lun/i,/^meurzh/i,/^merc[ʼ\']her/i,/^yaou/i,/^gwener/i,/^sadorn/i],shortWeekdaysParse:[/^Sul/i,/^Lun/i,/^Meu/i,/^Mer/i,/^Yao/i,/^Gwe/i,/^Sad/i],minWeekdaysParse:i,monthsRegex:o,monthsShortRegex:o,monthsStrictRegex:/^(genver|c[ʼ\']hwevrer|meurzh|ebrel|mae|mezheven|gouere|eost|gwengolo|here|du|kerzu)/i,monthsShortStrictRegex:/^(gen|c[ʼ\']hwe|meu|ebr|mae|eve|gou|eos|gwe|her|du|ker)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,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:function(e){switch(n(e)){case 1:case 3:case 4:case 5:case 9:return e+" bloaz";default:return e+" vloaz"}}},dayOfMonthOrdinalParse:/\d{1,2}(añ|vet)/,ordinal:function(e){return e+(1===e?"añ":"vet")},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."}})}(n(95093))},11713:function(e,t,n){!function(e){"use strict";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?'אחה"צ':"אחרי הצהריים":"בערב"}})}(n(95093))},11885:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},12211:(e,t,n)=>{"use strict";var r=n(79039);e.exports=!r((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},13317:(e,t,n)=>{"use strict";n.d(t,{v:()=>o,z:()=>i}),n(98992),n(54520);var r=n(77325);function o(e,t){return(0,r.YD)(e,(e=>e-t.filter((t=>t<e)).length))}function i(e,t){const n=t[0],o=t.length;return(0,r.YD)(e,(e=>e>=n?e+o:e))}},13431:(e,t,n)=>{"use strict";n.d(t,{A:()=>a,q:()=>s});const r=/^(\r\n|\n\r|\r|\n)/,o=/^[^\t\r\n]+/,i=/^\t/;function s(e){const t=[[""]];if(0===e.length)return t;let n,s=0,a=0;for(;e.length>0&&n!==e.length;)if(n=e.length,e.match(i))e=e.replace(i,""),s+=1,t[a][s]="";else if(e.match(r))e=e.replace(r,""),s=0,a+=1,t[a]=[""];else{let n="";if(e.startsWith('"')){let t=0,r=!0;for(;r;){const o=e.slice(0,1);'"'===o&&(t+=1),n+=o,(0===(e=e.slice(1)).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(o);n=t?t[0]:"",e=e.slice(n.length)}t[a][s]=n}return t}function a(e){let t,n,r,o,i,s="";for(t=0,n=e.length;t<n;t+=1){for(o=e[t].length,r=0;r<o;r+=1)r>0&&(s+="\t"),i=e[t][r],"string"==typeof i?i.indexOf("\n")>-1?s+=`"${i.replace(/"/g,'""')}"`:s+=i:s+=null==i?"":i;t!==n-1&&(s+="\n")}return s}},13579:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(72652),s=n(79306),a=n(28551),l=n(1767),u=n(9539),h=n(84549)("some",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:h},{some:function(e){a(this);try{s(e)}catch(e){u(this,"throw",e)}if(h)return o(h,this,e);var t=l(this),n=0;return i(t,(function(t,r){if(e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},13609:(e,t,n)=>{"use strict";var r=n(46518),o=n(48981),i=n(26198),s=n(34527),a=n(84606),l=n(96837);r({target:"Array",proto:!0,arity:1,forced:1!==[].unshift(0)||!function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(e){return e instanceof TypeError}}()},{unshift:function(e){var t=o(this),n=i(t),r=arguments.length;if(r){l(n+r);for(var u=n;u--;){var h=u+r;u in t?t[h]=t[u]:a(t,h)}for(var c=0;c<r;c++)t[c]=arguments[c]}return s(t,n+r)}})},13925:(e,t,n)=>{"use strict";var r=n(20034);e.exports=function(e){return r(e)||null===e}},13968:(e,t,n)=>{"use strict";function r(e){return window.requestAnimationFrame(e)}function o(e){window.cancelAnimationFrame(e)}function i(){return"ontouchstart"in window}function s(){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.d(t,{II:()=>l,Nt:()=>s,uU:()=>o,xi:()=>r,yd:()=>i})},14292:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);function o(e,t){return r.isValidElement(e)&&-1!==t.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)}},14601:(e,t,n)=>{"use strict";var r=n(97751),o=n(39297),i=n(66699),s=n(1625),a=n(52967),l=n(77740),u=n(11056),h=n(23167),c=n(32603),d=n(77584),m=n(80747),p=n(43724),f=n(96395);e.exports=function(e,t,n,g){var y="stackTraceLimit",w=g?2:1,v=e.split("."),_=v[v.length-1],b=r.apply(null,v);if(b){var S=b.prototype;if(!f&&o(S,"cause")&&delete S.cause,!n)return b;var C=r("Error"),E=t((function(e,t){var n=c(g?t:e,void 0),r=g?new b(e):new b;return void 0!==n&&i(r,"message",n),m(r,E,r.stack,2),this&&s(S,this)&&h(r,this,E),arguments.length>w&&d(r,arguments[w]),r}));if(E.prototype=S,"Error"!==_?a?a(E,C):l(E,C,{name:!0}):p&&y in b&&(u(E,b,y),u(E,b,"prepareStackTrace")),l(E,b),!f)try{S.name!==_&&i(S,"name",_),S.constructor=E}catch(e){}return E}}},14921:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(65387),o=n(96540),i=n(24684);const s=(0,r.A)(),a=function(e=s){return function(e=null){const t=o.useContext(i.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}(e)}},15024:(e,t,n)=>{"use strict";var r=n(46518),o=n(83650),i=n(39835);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("symmetricDifference")||!i("symmetricDifference")},{symmetricDifference:o})},15867:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},15870:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540);const o={};function i(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}},16193:(e,t,n)=>{"use strict";var r=n(79504),o=Error,i=r("".replace),s=String(new o("zxcasd").stack),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);e.exports=function(e,t){if(l&&"string"==typeof e&&!o.prepareStackTrace)for(;t--;)e=i(e,a,"");return e}},16280:(e,t,n)=>{"use strict";var r=n(46518),o=n(44576),i=n(18745),s=n(14601),a="WebAssembly",l=o[a],u=7!==new Error("e",{cause:7}).cause,h=function(e,t){var n={};n[e]=s(e,t,u),r({global:!0,constructor:!0,arity:1,forced:u},n)},c=function(e,t){if(l&&l[e]){var n={};n[e]=s(a+"."+e,t,u),r({target:a,stat:!0,constructor:!0,arity:1,forced:u},n)}};h("Error",(function(e){return function(t){return i(e,this,arguments)}})),h("EvalError",(function(e){return function(t){return i(e,this,arguments)}})),h("RangeError",(function(e){return function(t){return i(e,this,arguments)}})),h("ReferenceError",(function(e){return function(t){return i(e,this,arguments)}})),h("SyntaxError",(function(e){return function(t){return i(e,this,arguments)}})),h("TypeError",(function(e){return function(t){return i(e,this,arguments)}})),h("URIError",(function(e){return function(t){return i(e,this,arguments)}})),c("CompileError",(function(e){return function(t){return i(e,this,arguments)}})),c("LinkError",(function(e){return function(t){return i(e,this,arguments)}})),c("RuntimeError",(function(e){return function(t){return i(e,this,arguments)}}))},16618:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвилина":"хвилину":"h"===n?t?"година":"годину":e+" "+(r=+e,o={ss:t?"секунда_секунди_секунд":"секунду_секунди_секунд",mm:t?"хвилина_хвилини_хвилин":"хвилину_хвилини_хвилин",hh:t?"година_години_годин":"годину_години_годин",dd:"день_дні_днів",MM:"місяць_місяці_місяців",yy:"рік_роки_років"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2]);var r,o}function n(e){return function(){return e+"о"+(11===this.hours()?"б":"")+"] LT"}}e.defineLocale("uk",{months:{format:"січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня".split("_"),standalone:"січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень".split("_")},monthsShort:"січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд".split("_"),weekdays:function(e,t){var n={nominative:"неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота".split("_"),accusative:"неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу".split("_"),genitive:"неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи".split("_")};return!0===e?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?n[/(\[[ВвУу]\]) ?dddd/.test(t)?"accusative":/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?"genitive":"nominative"][e.day()]:n.nominative},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:n("[Сьогодні "),nextDay:n("[Завтра "),lastDay:n("[Вчора "),nextWeek:n("[У] dddd ["),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return n("[Минулої] dddd [").call(this);case 1:case 2:case 4:return n("[Минулого] dddd [").call(this)}},sameElse:"L"},relativeTime:{future:"за %s",past:"%s тому",s:"декілька секунд",ss:t,m:t,mm:t,h:"годину",hh:t,d:"день",dd:t,M:"місяць",MM:t,y:"рік",yy:t},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}})}(n(95093))},16823:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},17160:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},17241:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(96540).createContext(null)},17357:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};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}})}(n(95093))},17437:(e,t,n)=>{"use strict";n.d(t,{AH:()=>d,i7:()=>m,mL:()=>c});var r,o,i=n(24684),s=n(96540),a=n(30041),l=n(71287),u=n(43174),h=(n(55655),n(4146),function(e,t){var n=arguments;if(null==t||!i.h.call(t,"css"))return s.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=i.E,o[1]=(0,i.c)(e,t);for(var a=2;a<r;a++)o[a]=n[a];return s.createElement.apply(null,o)});r=h||(h={}),o||(o=r.JSX||(r.JSX={}));var c=(0,i.w)((function(e,t){var n=e.styles,r=(0,u.J)([n],void 0,s.useContext(i.T)),o=s.useRef();return(0,l.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),i=!1,s=document.querySelector('style[data-emotion="'+e+" "+r.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==s&&(i=!0,s.setAttribute("data-emotion",e),n.hydrate([s])),o.current=[n,i],function(){n.flush()}}),[t]),(0,l.i)((function(){var e=o.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==r.next&&(0,a.sk)(t,r.next,!0),n.tags.length){var i=n.tags[n.tags.length-1].nextElementSibling;n.before=i,n.flush()}t.insert("",r,n,!1)}}),[t,r.name]),null}));function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,u.J)(t)}function m(){var e=d.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}},17538:function(e,t,n){!function(e){"use strict";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?"පෙ.ව.":"පෙර වරු"}})}(n(95093))},17642:(e,t,n)=>{"use strict";var r=n(46518),o=n(83440),i=n(79039);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("difference",(function(e){return 0===e.size}))||i((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}))},{difference:o})},17726:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);function o(e){return parseInt(r.version,10)>=19?e?.props?.ref||null:e?.ref||null}},17730:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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"})}(n(95093))},18014:(e,t,n)=>{"use strict";var r=n(91291),o=Math.min;e.exports=function(e){var t=r(e);return t>0?o(t,9007199254740991):0}},18107:(e,t,n)=>{"use strict";var r=n(46518),o=n(48981),i=n(26198),s=n(91291),a=n(6469);r({target:"Array",proto:!0},{at:function(e){var t=o(this),n=i(t),r=s(e),a=r>=0?r:n+r;return a<0||a>=n?void 0:t[a]}}),a("at")},18111:(e,t,n)=>{"use strict";var r=n(46518),o=n(44576),i=n(90679),s=n(28551),a=n(94901),l=n(42787),u=n(62106),h=n(97040),c=n(79039),d=n(39297),m=n(78227),p=n(57657).IteratorPrototype,f=n(43724),g=n(96395),y="constructor",w="Iterator",v=m("toStringTag"),_=TypeError,b=o[w],S=g||!a(b)||b.prototype!==p||!c((function(){b({})})),C=function(){if(i(this,p),l(this)===p)throw new _("Abstract class Iterator not directly constructable")},E=function(e,t){f?u(p,e,{configurable:!0,get:function(){return t},set:function(t){if(s(this),this===p)throw new _("You can't redefine this property");d(this,e)?this[e]=t:h(this,e,t)}}):p[e]=t};d(p,v)||E(v,w),!S&&d(p,y)&&p[y]!==Object||E(y,C),C.prototype=p,r({global:!0,constructor:!0,forced:S},{Iterator:C})},18139:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(49649);function o(e){const{variants:t,...n}=e,o={variants:t,style:(0,r.tT)(n),isProcessed:!0};return o.style===n||t&&t.forEach((e=>{"function"!=typeof e.style&&(e.style=(0,r.tT)(e.style))})),o}},18237:(e,t,n)=>{"use strict";var r=n(46518),o=n(72652),i=n(79306),s=n(28551),a=n(1767),l=n(9539),u=n(84549),h=n(18745),c=n(79039),d=TypeError,m=c((function(){[].keys().reduce((function(){}),void 0)})),p=!m&&u("reduce",d);r({target:"Iterator",proto:!0,real:!0,forced:m||p},{reduce:function(e){s(this);try{i(e)}catch(e){l(this,"throw",e)}var t=arguments.length<2,n=t?void 0:arguments[1];if(p)return h(p,this,t?[e]:[e,n]);var r=a(this),u=0;if(o(r,(function(r){t?(t=!1,n=r):n=e(n,r,u),u++}),{IS_RECORD:!0}),t)throw new d("Reduce of empty iterator with no initial value");return n}})},18745:(e,t,n)=>{"use strict";var r=n(40616),o=Function.prototype,i=o.apply,s=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},19462:(e,t,n)=>{"use strict";var r=n(69565),o=n(2360),i=n(66699),s=n(56279),a=n(78227),l=n(91181),u=n(55966),h=n(57657).IteratorPrototype,c=n(62529),d=n(9539),m=n(91385),p=a("toStringTag"),f="IteratorHelper",g="WrapForValidIterator",y="normal",w="throw",v=l.set,_=function(e){var t=l.getterFor(e?g:f);return s(o(h),{next:function(){var n=t(this);if(e)return n.nextHandler();if(n.done)return c(void 0,!0);try{var r=n.nextHandler();return n.returnHandlerResult?r:c(r,n.done)}catch(e){throw n.done=!0,e}},return:function(){var n=t(this),o=n.iterator;if(n.done=!0,e){var i=u(o,"return");return i?r(i,o):c(void 0,!0)}if(n.inner)try{d(n.inner.iterator,y)}catch(e){return d(o,w,e)}if(n.openIters)try{m(n.openIters,y)}catch(e){return d(o,w,e)}return o&&d(o,y),c(void 0,!0)}})},b=_(!0),S=_(!1);i(S,p,"Iterator Helper"),e.exports=function(e,t,n){var r=function(r,o){o?(o.iterator=r.iterator,o.next=r.next):o=r,o.type=t?g:f,o.returnHandlerResult=!!n,o.nextHandler=e,o.counter=0,o.done=!1,v(this,o)};return r.prototype=t?b:S,r}},19617:(e,t,n)=>{"use strict";var r=n(25397),o=n(35610),i=n(26198),s=function(e){return function(t,n,s){var a=r(t),l=i(a);if(0===l)return!e&&-1;var u,h=o(s,l);if(e&&n!=n){for(;l>h;)if((u=a[h++])!=u)return!0}else for(;l>h;h++)if((e||h in a)&&a[h]===n)return e||h||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},19750:(e,t,n)=>{"use strict";function r(e,t){const n={...t};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){const i=o;if("components"===i||"slots"===i)n[i]={...e[i],...n[i]};else if("componentsProps"===i||"slotProps"===i){const o=e[i],s=t[i];if(s)if(o){n[i]={...s};for(const e in o)if(Object.prototype.hasOwnProperty.call(o,e)){const t=e;n[i][t]=r(o[t],s[t])}}else n[i]=s;else n[i]=o||{}}else void 0===n[i]&&(n[i]=e[i])}return n}n.d(t,{A:()=>r})},20034:(e,t,n)=>{"use strict";var r=n(94901);e.exports=function(e){return"object"==typeof e?null!==e:r(e)}},20091:(e,t,n)=>{"use strict";n.d(t,{$w:()=>ee,Bq:()=>v,C0:()=>oe,D1:()=>K,DK:()=>Y,De:()=>_,E3:()=>Z,Gq:()=>F,I6:()=>te,Ie:()=>S,JC:()=>B,K7:()=>I,LL:()=>j,Ly:()=>a,Mv:()=>E,ON:()=>q,Oe:()=>h,PA:()=>i,Pe:()=>d,Sx:()=>R,Vp:()=>L,XJ:()=>$,Xu:()=>W,Xy:()=>J,ZK:()=>Q,aM:()=>ne,aO:()=>c,c6:()=>M,cY:()=>A,cr:()=>u,eU:()=>V,fX:()=>P,gd:()=>H,gj:()=>re,h$:()=>D,hY:()=>x,iQ:()=>y,kp:()=>l,nB:()=>g,p6:()=>k,sb:()=>ie,v1:()=>N,vZ:()=>z,v_:()=>O,vg:()=>b,vy:()=>w,xM:()=>U,yn:()=>m,yq:()=>s,zN:()=>T,zO:()=>X}),n(16280),n(44114),n(98992),n(54520),n(3949);var r=n(24360),o=n(66422);function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=-1,r=null,o=e;for(;null!==o;){if(n===t){r=o;break}o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o=o.host:(n+=1,o=o.parentNode)}return r}function s(e,t){const n=e.closest(".handsontable");return!!n&&(n.parentNode===t||n===t)}function a(e){return function(e){return Object.getPrototypeOf(e.parent)&&e.frameElement}(e)&&e.parent}function l(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:o}=Node;let i=e;for(;null!=i&&i!==n;){const{nodeType:e,nodeName:n}=i;if(e===r&&(t.includes(n)||t.includes(i)))return i;const{host:s}=i;i=s&&e===o?s:i.parentNode}return null}function u(e,t,n){const r=[];let o=e;for(;o&&(o=l(o,t,n),o&&(!n||n.contains(o)));)r.push(o),o=o.host&&o.nodeType===Node.DOCUMENT_FRAGMENT_NODE?o.host:o.parentNode;const i=r.length;return i?r[i-1]:null}function h(e,t){const n={element:void 0,classNames:[]};let r=e;for(;null!==r&&r!==e.ownerDocument.documentElement&&!n.element;){if("string"==typeof t&&r.classList.contains(t))n.element=r,n.classNames.push(t);else if(t instanceof RegExp){const e=Array.from(r.classList).filter((e=>t.test(e)));e.length&&(n.element=r,n.classNames.push(...e))}r=r.parentElement}return n}function c(e,t){let n=e.parentNode,r=[];for("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);null!==n;){if(r.indexOf(n)>-1)return!0;n=n.parentNode}return!1}function d(e){let t=0,n=e;if(n.previousSibling)for(;n=n.previousSibling;)t+=1;return t}function m(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 f(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 g(e,t){return void 0!==e.classList&&"string"==typeof t&&""!==t&&e.classList.contains(t)}function y(e,t){"string"==typeof t&&(t=t.split(" ")),(t=p(t)).length>0&&e.classList.add(...t)}function w(e,t){"string"==typeof t?t=t.split(" "):t instanceof RegExp&&(t=[t]);let{regexFree:n,regexes:r}=f(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}=f(t,!0);n.forEach((t=>{""!==t&&e.removeAttribute(t)})),r.forEach((t=>{e.getAttributeNames().forEach((n=>{t.test(n)&&e.removeAttribute(n)}))}))}function b(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--)b(t[e])}}function S(e){let t;for(;t=e.lastChild;)e.removeChild(t)}const C=/(<(.*)>|&(.*);)/;function E(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];C.test(t)?e.innerHTML=n?(0,r.aj)(t):t:M(e,t)}function M(e,t){const n=e.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=t:(S(e),e.appendChild(e.ownerDocument.createTextNode(t)))}function T(e){const t=e.ownerDocument.documentElement,n=e.ownerDocument.defaultView;let r=e;for(;r!==t;){if(null===r)return!1;if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){if(r.host){if(r.host.impl)return T(r.host.impl);if(r.host)return T(r.host);throw new Error("Lost in Web Components world")}return!1}if("none"===n.getComputedStyle(r).display)return!1;r=r.parentNode}return!0}function R(e){const t=e.ownerDocument.defaultView;let n=e;for(;n.parentNode;){if("0px"===n.style.height||"0"===n.style.height)return"hidden"===t.getComputedStyle(n).overflow;n=n.parentNode}return!1}function A(e){const t=e.ownerDocument,n=t.defaultView,r=t.documentElement;let o,i,s,a=e;for(o=a.offsetLeft,i=a.offsetTop,s=a;(a=a.offsetParent)&&a!==t.body&&"offsetLeft"in a;)o+=a.offsetLeft,i+=a.offsetTop,s=a;return s&&"fixed"===s.style.position&&(o+=n.pageXOffset||r.scrollLeft,i+=n.pageYOffset||r.scrollTop),{left:o,top:i}}function N(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollY}function L(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:window).scrollX}function x(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?N(t):e.scrollTop}function O(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;return e===t?L(t):e.scrollLeft}function I(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 o=e.parentNode;for(;o&&o.style&&t.body!==o;){let{overflow:e,overflowX:t,overflowY:i}=o.style;if([e,t,i].includes("scroll"))return o;if(({overflow:e,overflowX:t,overflowY:i}=n.getComputedStyle(o)),r.includes(e)||r.includes(t)||r.includes(i))return o;if(o.clientHeight<=o.scrollHeight+1&&(r.includes(i)||r.includes(e)))return o;if(o.clientWidth<=o.scrollWidth+1&&(r.includes(t)||r.includes(e)))return o;o=o.parentNode}return n}function k(e){return e.scrollHeight-e.clientHeight}function D(e){return e.scrollWidth-e.clientWidth}function P(e){const t=e.ownerDocument,n=t.defaultView;let r=e.parentNode;for(;r&&r.style&&t.body!==r;){if("visible"!==r.style.overflow&&""!==r.style.overflow)return r;const e=n.getComputedStyle(r),t=["scroll","hidden","auto"],o=e.getPropertyValue("overflow"),i=e.getPropertyValue("overflow-y"),s=e.getPropertyValue("overflow-x");if(t.includes(o)||t.includes(i)||t.includes(s))return r;r=r.parentNode}return n}function H(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 o=n.getComputedStyle(e);return""!==o[t]&&void 0!==o[t]?o[t]:void 0}function F(e){return e.offsetWidth}function Y(e){return e.offsetHeight}function V(e){return e.clientHeight||e.innerHeight}function U(e){return e.clientWidth||e.innerWidth}function B(e){return e.selectionStart?e.selectionStart:0}function W(e){return e.selectionEnd?e.selectionEnd:0}function j(){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 z(e,t,n){if(void 0===n&&(n=t),e.setSelectionRange){e.focus();try{e.setSelectionRange(t,n)}catch(r){const o=e.parentNode,i=o.style.display;o.style.display="block",e.setSelectionRange(t,n),o.style.display=i}}}let G;function $(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return void 0===G&&(G=function(){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 o=t.offsetWidth;return r===o&&(o=n.clientWidth),(e.body||e.documentElement).removeChild(n),r-o}(e)),G}function K(e){return e instanceof Window?e.document.body.scrollHeight>e.innerHeight:e.offsetWidth!==e.clientWidth}function X(e){return e instanceof Window?e.document.body.scrollWidth>e.innerWidth:e.offsetHeight!==e.clientHeight}function q(e,t,n){e.style.transform=`translate3d(${t},${n},0)`}function Q(e){e.style.transform&&""!==e.style.transform&&(e.style.transform="")}function J(e){return e&&(["INPUT","SELECT","TEXTAREA"].indexOf(e.nodeName)>-1||"true"===e.contentEditable)}function Z(e){return J(e)&&!1===e.hasAttribute("data-hot-input")}function ee(e){return!e.parentNode}function te(e,t){new IntersectionObserver(((n,r)=>{n.forEach((n=>{n.isIntersecting&&null!==e.offsetParent&&(t(),r.unobserve(e))}))}),{root:e.ownerDocument.body}).observe(e)}function ne(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,i=r.createRange(),s=r.defaultView.getSelection();v(e,"contenteditable",!0),n&&v(e,...(0,o.MG)()),t&&y(e,"invisibleSelection"),i.selectNodeContents(e),s.removeAllRanges(),s.addRange(i)}function re(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&&w(e,"invisibleSelection"),e.removeAttribute("contenteditable")}function oe(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];ne(e,n),t(),re(e,n)}function ie(e){var t;const n=null==e||null===(t=e.ownerDocument)||void 0===t?void 0:t.defaultView.Element;return!!(n&&null!==n&&e instanceof n)}},20116:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(72652),s=n(79306),a=n(28551),l=n(1767),u=n(9539),h=n(84549)("find",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:h},{find:function(e){a(this);try{s(e)}catch(e){u(this,"throw",e)}if(h)return o(h,this,e);var t=l(this),n=0;return i(t,(function(t,r){if(e(t,n++))return r(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}})},20397:(e,t,n)=>{"use strict";var r=n(97751);e.exports=r("document","documentElement")},20439:(e,t,n)=>{"use strict";n.d(t,{b:()=>s});var r=n(96540),o=n(19750);n(74848);const i=r.createContext(void 0);function s(e){return function({props:e,name:t}){return function(e){const{theme:t,name:n,props:r}=e;if(!t||!t.components||!t.components[n])return r;const i=t.components[n];return i.defaultProps?(0,o.A)(i.defaultProps,r):i.styleOverrides||i.variants?r:(0,o.A)(i,r)}({props:e,name:t,theme:{components:r.useContext(i)}})}(e)}},20838:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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}})}(n(95093))},21135:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},21234:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,p0:()=>o});const r={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},o={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function i(e){return`${Math.round(e)}ms`}function s(e){if(!e)return 0;const t=e/36;return Math.min(Math.round(10*(4+15*t**.25+t/5)),3e3)}function a(e){const t={...r,...e.easing},n={...o,...e.duration};return{getAutoHeightDuration:s,create:(e=["all"],r={})=>{const{duration:o=n.standard,easing:s=t.easeInOut,delay:a=0,...l}=r;return(Array.isArray(e)?e:[e]).map((e=>`${e} ${"string"==typeof o?o:i(o)} ${s} ${"string"==typeof a?a:i(a)}`)).join(",")},...e,easing:t,duration:n}}},21362:(e,t,n)=>{"use strict";function r(e,t,n=void 0){const r={};for(const o in e){const i=e[o];let s="",a=!0;for(let e=0;e<i.length;e+=1){const r=i[e];r&&(s+=(!0===a?"":" ")+t(r),a=!1,n&&n[r]&&(s+=" "+n[r]))}r[o]=s}return r}n.d(t,{A:()=>r})},21827:function(e,t,n){!function(e){"use strict";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(){return 0===this.day()?"[la scorsa] dddd [alle] LT":"[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}})}(n(95093))},22195:(e,t,n)=>{"use strict";var r=n(79504),o=r({}.toString),i=r("".slice);e.exports=function(e){return i(o(e),8,-1)}},22257:(e,t,n)=>{"use strict";n.d(t,{KN:()=>s,oh:()=>l,ub:()=>a}),n(44114),n(79978),n(98992),n(54520),n(81454),n(8872);var r=n(65615);const o={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">"},i=new RegExp(Object.keys(o).map((e=>`(${e})`)).join("|"),"gi");function s(e){const t=e.hasColHeaders(),n=e.hasRowHeaders(),o=[t?-1:0,n?-1:0,e.countRows()-1,e.countCols()-1],i=e.getData(...o),s=i.length,a=s>0?i[0].length:0,l=["<table>","</table>"],u=t?["<thead>","</thead>"]:[],h=["<tbody>","</tbody>"],c=n?1:0,d=t?1:0;for(let o=0;o<s;o+=1){const s=t&&0===o,l=[];for(let t=0;t<a;t+=1){const a=!s&&n&&0===t;let u="";if(s)u=`<th>${e.getColHeader(t-c)}</th>`;else if(a)u=`<th>${e.getRowHeader(o-d)}</th>`;else{const n=i[o][t],{hidden:s,rowspan:a,colspan:l}=e.getCellMeta(o-d,t-c);if(!s){const e=[];if(a&&e.push(`rowspan="${a}"`),l&&e.push(`colspan="${l}"`),(0,r.Im)(n))u=`<td ${e.join(" ")}></td>`;else{const t=n.toString().replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20/gi,"&nbsp;").replace(/\t/gi,"&#9;");u=`<td ${e.join(" ")}>${t}</td>`}}}l.push(u)}const m=["<tr>",...l,"</tr>"].join("");s?u.splice(1,0,m):h.splice(-1,0,m)}return l.splice(1,0,u.join(""),h.join("")),l.join("")}function a(e){const t=e.length,n=["<table>"];for(let o=0;o<t;o+=1){const i=e[o],s=i.length,a=[];0===o&&n.push("<tbody>");for(let e=0;e<s;e+=1){const t=i[e],n=(0,r.Im)(t)?"":t.toString().replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/(<br(\s*|\/)>(\r\n|\n)?|\r\n|\n)/g,"<br>\r\n").replace(/\x20{2,}/gi,(e=>`<span style="mso-spacerun: yes">${"&nbsp;".repeat(e.length-1)} </span>`)).replace(/\t/gi,"&#9;");a.push(`<td>${n}</td>`)}n.push("<tr>",...a,"</tr>"),o+1===t&&n.push("</tbody>")}return n.push("</table>"),n.join("")}function l(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;const n={},r=t.createDocumentFragment(),s=t.createElement("div");r.appendChild(s);let a=e;if("string"==typeof a){const e=a.replace(/<td\b[^>]*?>([\s\S]*?)<\/\s*td>/g,(e=>{const t=e.match(/<td\b[^>]*?>/g)[0];return`${t}${e.substring(t.length,e.lastIndexOf("<")).trim().replaceAll(/\n\s+/g," ").replaceAll(/<p.*?>/g,"\n").replace("\n","").replaceAll(/<\/(.*)>\s+$/gm,"</$1>").replace(/(<(?!br)([^>]+)>)/gi,"").replaceAll(/^&nbsp;$/gm,"")}</td>`}));s.insertAdjacentHTML("afterbegin",`${e}`),a=s.querySelector("table")}if(!a||!function(e){return"TABLE"===(e&&e.nodeName||"")}(a))return;const l=s.querySelector('meta[name$="enerator"]'),u=null!==a.querySelector("tbody th"),h=a.querySelector("tr"),c=h?Array.from(h.cells).reduce(((e,t)=>e+t.colSpan),0)-(u?1:0):0,d=a.tFoot&&Array.from(a.tFoot.rows)||[],m=[];let p=!1,f=0,g=0;if(a.tHead){const e=Array.from(a.tHead.rows).filter((e=>{const t=null!==e.querySelector("td");return t&&m.push(e),!t}));f=e.length,p=f>0,f>1?n.nestedHeaders=Array.from(e).reduce(((e,t)=>{const n=Array.from(t.cells).reduce(((e,t,n)=>{if(u&&0===n)return e;const{colSpan:r,innerHTML:o}=t,i=r>1?{label:o,colspan:r}:o;return e.push(i),e}),[]);return e.push(n),e}),[]):p&&(n.colHeaders=Array.from(e[0].children).reduce(((e,t,n)=>(u&&0===n||e.push(t.innerHTML),e)),[]))}m.length&&(n.fixedRowsTop=m.length),d.length&&(n.fixedRowsBottom=d.length);const y=[...m,...Array.from(a.tBodies).reduce(((e,t)=>(e.push(...Array.from(t.rows)),e)),[]),...d];g=y.length;const w=new Array(g);for(let e=0;e<g;e++)w[e]=new Array(c);const v=[],_=[];for(let e=0;e<g;e++){const t=y[e],n=Array.from(t.cells),r=n.length;for(let t=0;t<r;t++){const r=n[t],{nodeName:s,innerHTML:a,rowSpan:u,colSpan:h}=r,c=w[e].findIndex((e=>void 0===e));if("TD"===s){if(u>1||h>1){for(let t=e;t<e+u;t++)if(t<g)for(let e=c;e<c+h;e++)w[t][e]=null;const t=r.getAttribute("style");t&&t.includes("mso-ignore:colspan")||v.push({col:c,row:e,rowspan:u,colspan:h})}let t="";t=l&&/excel/gi.test(l.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"),w[e][c]=t.replace(i,(e=>o[e]))}else _.push(a)}}return v.length&&(n.mergeCells=v),_.length&&(n.rowHeaders=_),w.length&&(n.data=w),n}},22274:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},22489:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(79306),s=n(28551),a=n(1767),l=n(19462),u=n(96319),h=n(96395),c=n(9539),d=n(30684),m=n(84549),p=!h&&!d("filter",(function(){})),f=!h&&!p&&m("filter",TypeError),g=h||p||f,y=l((function(){for(var e,t,n=this.iterator,r=this.predicate,i=this.next;;){if(e=s(o(i,n)),this.done=!!e.done)return;if(t=e.value,u(n,r,[t,this.counter++],!0))return t}}));r({target:"Iterator",proto:!0,real:!0,forced:g},{filter:function(e){s(this);try{i(e)}catch(e){c(this,"throw",e)}return f?o(f,this,e):new y(a(this),{predicate:e})}})},22812:e=>{"use strict";var t=TypeError;e.exports=function(e,n){if(e<n)throw new t("Not enough arguments");return e}},22969:(e,t,n)=>{"use strict";var r=n(85072),o=n.n(r),i=n(97825),s=n.n(i),a=n(77659),l=n.n(a),u=n(55056),h=n.n(u),c=n(10540),d=n.n(c),m=n(41113),p=n.n(m),f=n(47400),g={};g.styleTagTransform=p(),g.setAttributes=h(),g.insert=l().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=d(),o()(f.A,g),f.A&&f.A.locals&&f.A.locals},23167:(e,t,n)=>{"use strict";var r=n(94901),o=n(20034),i=n(52967);e.exports=function(e,t,n){var s,a;return i&&r(s=t.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&i(e,a),e}},23215:(e,t,n)=>{"use strict";n(81148)},23827:function(e,t,n){!function(e){"use strict";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年"}})}(n(95093))},24337:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,q:()=>r});const r=e=>e.scrollTop;function o(e,t){const{timeout:n,easing:r,style:o={}}=e;return{duration:o.transitionDuration??("number"==typeof n?n:n[t.mode]||0),easing:o.transitionTimingFunction??("object"==typeof r?r[t.mode]:r),delay:o.transitionDelay}}},24360:(e,t,n)=>{"use strict";n.d(t,{Pi:()=>ie,DU:()=>oe,aj:()=>le,Kq:()=>ae,V2:()=>se,Ob:()=>re}),n(44114);const{entries:r,setPrototypeOf:o,isFrozen:i,getPrototypeOf:s,getOwnPropertyDescriptor:a}=Object;let{freeze:l,seal:u,create:h}=Object,{apply:c,construct:d}="undefined"!=typeof Reflect&&Reflect;l||(l=function(e){return e}),u||(u=function(e){return e}),c||(c=function(e,t,n){return e.apply(t,n)}),d||(d=function(e,t){return new e(...t)});const m=A(Array.prototype.forEach),p=A(Array.prototype.lastIndexOf),f=A(Array.prototype.pop),g=A(Array.prototype.push),y=A(Array.prototype.splice),w=A(String.prototype.toLowerCase),v=A(String.prototype.toString),_=A(String.prototype.match),b=A(String.prototype.replace),S=A(String.prototype.indexOf),C=A(String.prototype.trim),E=A(Object.prototype.hasOwnProperty),M=A(RegExp.prototype.test),T=(R=TypeError,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return d(R,t)});var R;function A(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return c(e,t,r)}}function N(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w;o&&o(e,null);let r=t.length;for(;r--;){let o=t[r];if("string"==typeof o){const e=n(o);e!==o&&(i(t)||(t[r]=e),o=e)}e[o]=!0}return e}function L(e){for(let t=0;t<e.length;t++)E(e,t)||(e[t]=null);return e}function x(e){const t=h(null);for(const[n,o]of r(e))E(e,n)&&(Array.isArray(o)?t[n]=L(o):o&&"object"==typeof o&&o.constructor===Object?t[n]=x(o):t[n]=o);return t}function O(e,t){for(;null!==e;){const n=a(e,t);if(n){if(n.get)return A(n.get);if("function"==typeof n.value)return A(n.value)}e=s(e)}return function(){return null}}const I=l(["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"]),k=l(["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"]),D=l(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),P=l(["animate","color-profile","cursor","discard","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"]),H=l(["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","mprescripts"]),F=l(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Y=l(["#text"]),V=l(["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","popover","popovertarget","popovertargetaction","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","wrap","xmlns","slot"]),U=l(["accent-height","accumulate","additive","alignment-baseline","amplitude","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","exponent","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","intercept","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","slope","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","tablevalues","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"]),B=l(["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"]),W=l(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),j=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),z=u(/<%[\w\W]*|[\w\W]*%>/gm),G=u(/\$\{[\w\W]*/gm),$=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),K=u(/^aria-[\-\w]+$/),X=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),q=u(/^(?:\w+script|data):/i),Q=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),J=u(/^html$/i),Z=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var ee=Object.freeze({__proto__:null,ARIA_ATTR:K,ATTR_WHITESPACE:Q,CUSTOM_ELEMENT:Z,DATA_ATTR:$,DOCTYPE_NAME:J,ERB_EXPR:z,IS_ALLOWED_URI:X,IS_SCRIPT_OR_DATA:q,MUSTACHE_EXPR:j,TMPLIT_EXPR:G});const te=function(){return"undefined"==typeof window?null:window};var ne=function e(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:te();const n=t=>e(t);if(n.version="3.2.6",n.removed=[],!t||!t.document||9!==t.document.nodeType||!t.Element)return n.isSupported=!1,n;let{document:o}=t;const i=o,s=i.currentScript,{DocumentFragment:a,HTMLTemplateElement:u,Node:c,Element:d,NodeFilter:R,NamedNodeMap:A=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:L,DOMParser:j,trustedTypes:z}=t,G=d.prototype,$=O(G,"cloneNode"),K=O(G,"remove"),q=O(G,"nextSibling"),Q=O(G,"childNodes"),Z=O(G,"parentNode");if("function"==typeof u){const e=o.createElement("template");e.content&&e.content.ownerDocument&&(o=e.content.ownerDocument)}let ne,re="";const{implementation:oe,createNodeIterator:ie,createDocumentFragment:se,getElementsByTagName:ae}=o,{importNode:le}=i;let ue={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};n.isSupported="function"==typeof r&&"function"==typeof Z&&oe&&void 0!==oe.createHTMLDocument;const{MUSTACHE_EXPR:he,ERB_EXPR:ce,TMPLIT_EXPR:de,DATA_ATTR:me,ARIA_ATTR:pe,IS_SCRIPT_OR_DATA:fe,ATTR_WHITESPACE:ge,CUSTOM_ELEMENT:ye}=ee;let{IS_ALLOWED_URI:we}=ee,ve=null;const _e=N({},[...I,...k,...D,...H,...Y]);let be=null;const Se=N({},[...V,...U,...B,...W]);let Ce=Object.seal(h(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}})),Ee=null,Me=null,Te=!0,Re=!0,Ae=!1,Ne=!0,Le=!1,xe=!0,Oe=!1,Ie=!1,ke=!1,De=!1,Pe=!1,He=!1,Fe=!0,Ye=!1,Ve=!0,Ue=!1,Be={},We=null;const je=N({},["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"]);let ze=null;const Ge=N({},["audio","video","img","source","image","track"]);let $e=null;const Ke=N({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Xe="http://www.w3.org/1998/Math/MathML",qe="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Je=Qe,Ze=!1,et=null;const tt=N({},[Xe,qe,Qe],v);let nt=N({},["mi","mo","mn","ms","mtext"]),rt=N({},["annotation-xml"]);const ot=N({},["title","style","font","a","script"]);let it=null;const st=["application/xhtml+xml","text/html"];let at=null,lt=null;const ut=o.createElement("form"),ht=function(e){return e instanceof RegExp||e instanceof Function},ct=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!lt||lt!==e){if(e&&"object"==typeof e||(e={}),e=x(e),it=-1===st.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,at="application/xhtml+xml"===it?v:w,ve=E(e,"ALLOWED_TAGS")?N({},e.ALLOWED_TAGS,at):_e,be=E(e,"ALLOWED_ATTR")?N({},e.ALLOWED_ATTR,at):Se,et=E(e,"ALLOWED_NAMESPACES")?N({},e.ALLOWED_NAMESPACES,v):tt,$e=E(e,"ADD_URI_SAFE_ATTR")?N(x(Ke),e.ADD_URI_SAFE_ATTR,at):Ke,ze=E(e,"ADD_DATA_URI_TAGS")?N(x(Ge),e.ADD_DATA_URI_TAGS,at):Ge,We=E(e,"FORBID_CONTENTS")?N({},e.FORBID_CONTENTS,at):je,Ee=E(e,"FORBID_TAGS")?N({},e.FORBID_TAGS,at):x({}),Me=E(e,"FORBID_ATTR")?N({},e.FORBID_ATTR,at):x({}),Be=!!E(e,"USE_PROFILES")&&e.USE_PROFILES,Te=!1!==e.ALLOW_ARIA_ATTR,Re=!1!==e.ALLOW_DATA_ATTR,Ae=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ne=!1!==e.ALLOW_SELF_CLOSE_IN_ATTR,Le=e.SAFE_FOR_TEMPLATES||!1,xe=!1!==e.SAFE_FOR_XML,Oe=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,Pe=e.RETURN_DOM_FRAGMENT||!1,He=e.RETURN_TRUSTED_TYPE||!1,ke=e.FORCE_BODY||!1,Fe=!1!==e.SANITIZE_DOM,Ye=e.SANITIZE_NAMED_PROPS||!1,Ve=!1!==e.KEEP_CONTENT,Ue=e.IN_PLACE||!1,we=e.ALLOWED_URI_REGEXP||X,Je=e.NAMESPACE||Qe,nt=e.MATHML_TEXT_INTEGRATION_POINTS||nt,rt=e.HTML_INTEGRATION_POINTS||rt,Ce=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(Ce.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&ht(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(Ce.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(Ce.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Le&&(Re=!1),Pe&&(De=!0),Be&&(ve=N({},Y),be=[],!0===Be.html&&(N(ve,I),N(be,V)),!0===Be.svg&&(N(ve,k),N(be,U),N(be,W)),!0===Be.svgFilters&&(N(ve,D),N(be,U),N(be,W)),!0===Be.mathMl&&(N(ve,H),N(be,B),N(be,W))),e.ADD_TAGS&&(ve===_e&&(ve=x(ve)),N(ve,e.ADD_TAGS,at)),e.ADD_ATTR&&(be===Se&&(be=x(be)),N(be,e.ADD_ATTR,at)),e.ADD_URI_SAFE_ATTR&&N($e,e.ADD_URI_SAFE_ATTR,at),e.FORBID_CONTENTS&&(We===je&&(We=x(We)),N(We,e.FORBID_CONTENTS,at)),Ve&&(ve["#text"]=!0),Oe&&N(ve,["html","head","body"]),ve.table&&(N(ve,["tbody"]),delete Ee.tbody),e.TRUSTED_TYPES_POLICY){if("function"!=typeof e.TRUSTED_TYPES_POLICY.createHTML)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof e.TRUSTED_TYPES_POLICY.createScriptURL)throw T('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');ne=e.TRUSTED_TYPES_POLICY,re=ne.createHTML("")}else void 0===ne&&(ne=function(e,t){if("object"!=typeof e||"function"!=typeof e.createPolicy)return null;let n=null;const r="data-tt-policy-suffix";t&&t.hasAttribute(r)&&(n=t.getAttribute(r));const o="dompurify"+(n?"#"+n:"");try{return e.createPolicy(o,{createHTML:e=>e,createScriptURL:e=>e})}catch(e){return console.warn("TrustedTypes policy "+o+" could not be created."),null}}(z,s)),null!==ne&&"string"==typeof re&&(re=ne.createHTML(""));l&&l(e),lt=e}},dt=N({},[...k,...D,...P]),mt=N({},[...H,...F]),pt=function(e){g(n.removed,{element:e});try{Z(e).removeChild(e)}catch(t){K(e)}},ft=function(e,t){try{g(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){g(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e)if(De||Pe)try{pt(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},gt=function(e){let t=null,n=null;if(ke)e="<remove></remove>"+e;else{const t=_(e,/^[\r\n\t ]+/);n=t&&t[0]}"application/xhtml+xml"===it&&Je===Qe&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");const r=ne?ne.createHTML(e):e;if(Je===Qe)try{t=(new j).parseFromString(r,it)}catch(e){}if(!t||!t.documentElement){t=oe.createDocument(Je,"template",null);try{t.documentElement.innerHTML=Ze?re:r}catch(e){}}const i=t.body||t.documentElement;return e&&n&&i.insertBefore(o.createTextNode(n),i.childNodes[0]||null),Je===Qe?ae.call(t,Oe?"html":"body")[0]:Oe?t.documentElement:i},yt=function(e){return ie.call(e.ownerDocument||e,e,R.SHOW_ELEMENT|R.SHOW_COMMENT|R.SHOW_TEXT|R.SHOW_PROCESSING_INSTRUCTION|R.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof L&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof A)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},vt=function(e){return"function"==typeof c&&e instanceof c};function _t(e,t,r){m(e,(e=>{e.call(n,t,r,lt)}))}const bt=function(e){let t=null;if(_t(ue.beforeSanitizeElements,e,null),wt(e))return pt(e),!0;const r=at(e.nodeName);if(_t(ue.uponSanitizeElement,e,{tagName:r,allowedTags:ve}),xe&&e.hasChildNodes()&&!vt(e.firstElementChild)&&M(/<[/\w!]/g,e.innerHTML)&&M(/<[/\w!]/g,e.textContent))return pt(e),!0;if(7===e.nodeType)return pt(e),!0;if(xe&&8===e.nodeType&&M(/<[/\w]/g,e.data))return pt(e),!0;if(!ve[r]||Ee[r]){if(!Ee[r]&&Ct(r)){if(Ce.tagNameCheck instanceof RegExp&&M(Ce.tagNameCheck,r))return!1;if(Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(r))return!1}if(Ve&&!We[r]){const t=Z(e)||e.parentNode,n=Q(e)||e.childNodes;if(n&&t)for(let r=n.length-1;r>=0;--r){const o=$(n[r],!0);o.__removalCount=(e.__removalCount||0)+1,t.insertBefore(o,q(e))}}return pt(e),!0}return e instanceof d&&!function(e){let t=Z(e);t&&t.tagName||(t={namespaceURI:Je,tagName:"template"});const n=w(e.tagName),r=w(t.tagName);return!!et[e.namespaceURI]&&(e.namespaceURI===qe?t.namespaceURI===Qe?"svg"===n:t.namespaceURI===Xe?"svg"===n&&("annotation-xml"===r||nt[r]):Boolean(dt[n]):e.namespaceURI===Xe?t.namespaceURI===Qe?"math"===n:t.namespaceURI===qe?"math"===n&&rt[r]:Boolean(mt[n]):e.namespaceURI===Qe?!(t.namespaceURI===qe&&!rt[r])&&!(t.namespaceURI===Xe&&!nt[r])&&!mt[n]&&(ot[n]||!dt[n]):!("application/xhtml+xml"!==it||!et[e.namespaceURI]))}(e)?(pt(e),!0):"noscript"!==r&&"noembed"!==r&&"noframes"!==r||!M(/<\/no(script|embed|frames)/i,e.innerHTML)?(Le&&3===e.nodeType&&(t=e.textContent,m([he,ce,de],(e=>{t=b(t,e," ")})),e.textContent!==t&&(g(n.removed,{element:e.cloneNode()}),e.textContent=t)),_t(ue.afterSanitizeElements,e,null),!1):(pt(e),!0)},St=function(e,t,n){if(Fe&&("id"===t||"name"===t)&&(n in o||n in ut))return!1;if(Re&&!Me[t]&&M(me,t));else if(Te&&M(pe,t));else if(!be[t]||Me[t]){if(!(Ct(e)&&(Ce.tagNameCheck instanceof RegExp&&M(Ce.tagNameCheck,e)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(e))&&(Ce.attributeNameCheck instanceof RegExp&&M(Ce.attributeNameCheck,t)||Ce.attributeNameCheck instanceof Function&&Ce.attributeNameCheck(t))||"is"===t&&Ce.allowCustomizedBuiltInElements&&(Ce.tagNameCheck instanceof RegExp&&M(Ce.tagNameCheck,n)||Ce.tagNameCheck instanceof Function&&Ce.tagNameCheck(n))))return!1}else if($e[t]);else if(M(we,b(n,ge,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==S(n,"data:")||!ze[e])if(Ae&&!M(fe,b(n,ge,"")));else if(n)return!1;return!0},Ct=function(e){return"annotation-xml"!==e&&_(e,ye)},Et=function(e){_t(ue.beforeSanitizeAttributes,e,null);const{attributes:t}=e;if(!t||wt(e))return;const r={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:be,forceKeepAttr:void 0};let o=t.length;for(;o--;){const i=t[o],{name:s,namespaceURI:a,value:l}=i,u=at(s),h=l;let c="value"===s?h:C(h);if(r.attrName=u,r.attrValue=c,r.keepAttr=!0,r.forceKeepAttr=void 0,_t(ue.uponSanitizeAttribute,e,r),c=r.attrValue,!Ye||"id"!==u&&"name"!==u||(ft(s,e),c="user-content-"+c),xe&&M(/((--!?|])>)|<\/(style|title)/i,c)){ft(s,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){ft(s,e);continue}if(!Ne&&M(/\/>/i,c)){ft(s,e);continue}Le&&m([he,ce,de],(e=>{c=b(c,e," ")}));const d=at(e.nodeName);if(St(d,u,c)){if(ne&&"object"==typeof z&&"function"==typeof z.getAttributeType)if(a);else switch(z.getAttributeType(d,u)){case"TrustedHTML":c=ne.createHTML(c);break;case"TrustedScriptURL":c=ne.createScriptURL(c)}if(c!==h)try{a?e.setAttributeNS(a,s,c):e.setAttribute(s,c),wt(e)?pt(e):f(n.removed)}catch(t){ft(s,e)}}else ft(s,e)}_t(ue.afterSanitizeAttributes,e,null)},Mt=function e(t){let n=null;const r=yt(t);for(_t(ue.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)_t(ue.uponSanitizeShadowNode,n,null),bt(n),Et(n),n.content instanceof a&&e(n.content);_t(ue.afterSanitizeShadowDOM,t,null)};return n.sanitize=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=null,o=null,s=null,l=null;if(Ze=!e,Ze&&(e="\x3c!--\x3e"),"string"!=typeof e&&!vt(e)){if("function"!=typeof e.toString)throw T("toString is not a function");if("string"!=typeof(e=e.toString()))throw T("dirty is not a string, aborting")}if(!n.isSupported)return e;if(Ie||ct(t),n.removed=[],"string"==typeof e&&(Ue=!1),Ue){if(e.nodeName){const t=at(e.nodeName);if(!ve[t]||Ee[t])throw T("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof c)r=gt("\x3c!----\x3e"),o=r.ownerDocument.importNode(e,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?r=o:r.appendChild(o);else{if(!De&&!Le&&!Oe&&-1===e.indexOf("<"))return ne&&He?ne.createHTML(e):e;if(r=gt(e),!r)return De?null:He?re:""}r&&ke&&pt(r.firstChild);const u=yt(Ue?e:r);for(;s=u.nextNode();)bt(s),Et(s),s.content instanceof a&&Mt(s.content);if(Ue)return e;if(De){if(Pe)for(l=se.call(r.ownerDocument);r.firstChild;)l.appendChild(r.firstChild);else l=r;return(be.shadowroot||be.shadowrootmode)&&(l=le.call(i,l,!0)),l}let h=Oe?r.outerHTML:r.innerHTML;return Oe&&ve["!doctype"]&&r.ownerDocument&&r.ownerDocument.doctype&&r.ownerDocument.doctype.name&&M(J,r.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+r.ownerDocument.doctype.name+">\n"+h),Le&&m([he,ce,de],(e=>{h=b(h,e," ")})),ne&&He?ne.createHTML(h):h},n.setConfig=function(){ct(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),Ie=!0},n.clearConfig=function(){lt=null,Ie=!1},n.isValidAttribute=function(e,t,n){lt||ct({});const r=at(e),o=at(t);return St(r,o,n)},n.addHook=function(e,t){"function"==typeof t&&g(ue[e],t)},n.removeHook=function(e,t){if(void 0!==t){const n=p(ue[e],t);return-1===n?void 0:y(ue[e],n,1)[0]}return f(ue[e])},n.removeHooks=function(e){ue[e]=[]},n.removeAllHooks=function(){ue={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},n}();function re(e){return e[0].toUpperCase()+e.substr(1)}function oe(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return e()+e()+e()+e()}function ie(e){return/^([0-9][0-9]?%$)|(^100%$)/.test(e)}function se(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 ae(e){return le(`${e}`,{ALLOWED_TAGS:[]})}function le(e,t){return ne.sanitize(e,t)}},24457:function(e,t,n){!function(e){"use strict";function t(e,t,n){var r=" ";return(e%100>=20||e>=100&&e%100==0)&&(r=" de "),e+r+{ss:"secunde",mm:"minute",hh:"ore",dd:"zile",ww:"săptămâni",MM:"luni",yy:"ani"}[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}})}(n(95093))},24496:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},24659:(e,t,n)=>{"use strict";var r=n(79039),o=n(6980);e.exports=!r((function(){var e=new Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",o(1,7)),7!==e.stack)}))},24684:(e,t,n)=>{"use strict";n.d(t,{E:()=>f,T:()=>h,c:()=>m,h:()=>c,w:()=>u});var r=n(96540),o=n(55655),i=n(30041),s=n(43174),a=n(71287),l=r.createContext("undefined"!=typeof HTMLElement?(0,o.A)({key:"css"}):null),u=(l.Provider,function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(l);return e(t,o,n)}))}),h=r.createContext({}),c={}.hasOwnProperty,d="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",m=function(e,t){var n={};for(var r in t)c.call(t,r)&&(n[r]=t[r]);return n[d]=e,n},p=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,i.SF)(t,n,r),(0,a.s)((function(){return(0,i.sk)(t,n,r)})),null},f=u((function(e,t,n){var o=e.css;"string"==typeof o&&void 0!==t.registered[o]&&(o=t.registered[o]);var a=e[d],l=[o],u="";"string"==typeof e.className?u=(0,i.Rk)(t.registered,l,e.className):null!=e.className&&(u=e.className+" ");var m=(0,s.J)(l,void 0,r.useContext(h));u+=t.key+"-"+m.name;var f={};for(var g in e)c.call(e,g)&&"css"!==g&&g!==d&&(f[g]=e[g]);return f.className=u,n&&(f.ref=n),r.createElement(r.Fragment,null,r.createElement(p,{cache:t,serialized:m,isStringTag:"string"==typeof a}),r.createElement(a,f))}))},24890:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,v:()=>i});var r=n(96148),o=n(1908);function i(e){return(0,o.Ay)("MuiOutlinedInput",e)}const s={...n(26410).A,...(0,r.A)("MuiOutlinedInput",["root","notchedOutline","input"])}},24902:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);function o(...e){const t=r.useRef(void 0),n=r.useCallback((t=>{const n=e.map((e=>{if(null==e)return null;if("function"==typeof e){const n=e,r=n(t);return"function"==typeof r?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}));return()=>{n.forEach((e=>e?.()))}}),e);return r.useMemo((()=>e.every((e=>null==e))?null:e=>{t.current&&(t.current(),t.current=void 0),null!=e&&(t.current=n(e))}),e)}},24913:(e,t,n)=>{"use strict";var r=n(43724),o=n(35917),i=n(48686),s=n(28551),a=n(56969),l=TypeError,u=Object.defineProperty,h=Object.getOwnPropertyDescriptor,c="enumerable",d="configurable",m="writable";t.f=r?i?function(e,t,n){if(s(e),t=a(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&m in n&&!n[m]){var r=h(e,t);r&&r[m]&&(e[t]=n.value,n={configurable:d in n?n[d]:r[d],enumerable:c in n?n[c]:r[c],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=a(t),s(n),o)try{return u(e,t,n)}catch(e){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},25155:(e,t,n)=>{"use strict";n.d(t,{CA:()=>o,Ml:()=>a,d:()=>i,kH:()=>l,nO:()=>s,zg:()=>u});var r=n(20091);function o(e){e.isImmediatePropagationEnabled=!1,e.cancelBubble=!0}function i(e){return!1===e.isImmediatePropagationEnabled}function s(e){return 2===e.button}function a(e){return 0===e.button}function l(e){return e instanceof TouchEvent}function u(e,t){const n={x:e.offsetX,y:e.offsetY};let o=e.target;if(!(0,r.sb)(t)||o!==t&&o.contains(t))return n;for(;o!==t;)n.x+=o.offsetLeft,n.y+=o.offsetTop,o=o.offsetParent;return n}},25170:(e,t,n)=>{"use strict";var r=n(46706),o=n(94402);e.exports=r(o.proto,"size","get")||function(e){return e.size}},25177:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},25397:(e,t,n)=>{"use strict";var r=n(47055),o=n(67750);e.exports=function(e){return r(o(e))}},25745:(e,t,n)=>{"use strict";var r=n(77629);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},26111:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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}})}(n(95093))},26198:(e,t,n)=>{"use strict";var r=n(18014);e.exports=function(e){return r(e.length)}},26269:e=>{"use strict";e.exports={}},26308:function(e,t,n){!function(e){"use strict";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");case"m":return t?"jedna minuta":"jedne minute";case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return t?"jedan sat":"jednog sata";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}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}})}(n(95093))},26410:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,g:()=>i});var r=n(96148),o=n(1908);function i(e){return(0,o.Ay)("MuiInputBase",e)}const s=(0,r.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"])},26435:function(e,t,n){!function(e){"use strict";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")}}})}(n(95093))},26739:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(63248),o=n(4894),i=n(31355),s=n(98855);const a=(0,r.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:s.A})},27088:function(e,t,n){!function(e){"use strict";var t={0:"-ші",1:"-ші",2:"-ші",3:"-ші",4:"-ші",5:"-ші",6:"-шы",7:"-ші",8:"-ші",9:"-шы",10:"-шы",20:"-шы",30:"-шы",40:"-шы",50:"-ші",60:"-шы",70:"-ші",80:"-ші",90:"-шы",100:"-ші"};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){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(95093))},27476:(e,t,n)=>{"use strict";var r=n(22195),o=n(79504);e.exports=function(e){if("Function"===r(e))return o(e)}},28040:(e,t,n)=>{"use strict";n.d(t,{A:()=>J});var r=n(4076),o=n(836),i=n(82777);const s={black:"#000",white:"#fff"},a={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},l={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},u={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},h={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},c={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},d={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},m={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"};function p(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:s.white,default:s.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const f=p();function g(){return{text:{primary:s.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:s.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const y=g();function w(e,t,n,r){const o=r.light||r,s=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,i.a)(e.main,o):"dark"===t&&(e.dark=(0,i.e$)(e.main,s)))}function v(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:v=.2,..._}=e,b=e.primary||function(e="light"){return"dark"===e?{main:c[200],light:c[50],dark:c[400]}:{main:c[700],light:c[400],dark:c[800]}}(t),S=e.secondary||function(e="light"){return"dark"===e?{main:l[200],light:l[50],dark:l[400]}:{main:l[500],light:l[300],dark:l[700]}}(t),C=e.error||function(e="light"){return"dark"===e?{main:u[500],light:u[300],dark:u[700]}:{main:u[700],light:u[400],dark:u[800]}}(t),E=e.info||function(e="light"){return"dark"===e?{main:d[400],light:d[300],dark:d[700]}:{main:d[700],light:d[500],dark:d[900]}}(t),M=e.success||function(e="light"){return"dark"===e?{main:m[400],light:m[300],dark:m[700]}:{main:m[800],light:m[500],dark:m[900]}}(t),T=e.warning||function(e="light"){return"dark"===e?{main:h[400],light:h[300],dark:h[700]}:{main:"#ed6c02",light:h[500],dark:h[900]}}(t);function R(e){return(0,i.eM)(e,y.text.primary)>=n?y.text.primary:f.text.primary}const A=({color:e,name:t,mainShade:n=500,lightShade:o=300,darkShade:i=700})=>{if(!(e={...e}).main&&e[n]&&(e.main=e[n]),!e.hasOwnProperty("main"))throw new Error((0,r.A)(11,t?` (${t})`:"",n));if("string"!=typeof e.main)throw new Error((0,r.A)(12,t?` (${t})`:"",JSON.stringify(e.main)));return w(e,"light",o,v),w(e,"dark",i,v),e.contrastText||(e.contrastText=R(e.main)),e};let N;return"light"===t?N=p():"dark"===t&&(N=g()),(0,o.A)({common:{...s},mode:t,primary:A({color:b,name:"primary"}),secondary:A({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:A({color:C,name:"error"}),warning:A({color:T,name:"warning"}),info:A({color:E,name:"info"}),success:A({color:M,name:"success"}),grey:a,contrastThreshold:n,getContrastText:R,augmentColor:A,tonalOffset:v,...N},_)}function _(e=""){function t(...n){if(!n.length)return"";const r=n[0];return"string"!=typeof r||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${t(...n.slice(1))})`}return(n,...r)=>`var(--${e?`${e}-`:""}${n}${t(...r)})`}var b=n(33372),S=n(93781);function C(e){const t={};return Object.entries(e).forEach((e=>{const[n,r]=e;"object"==typeof r&&(t[n]=`${r.fontStyle?`${r.fontStyle} `:""}${r.fontVariant?`${r.fontVariant} `:""}${r.fontWeight?`${r.fontWeight} `:""}${r.fontStretch?`${r.fontStretch} `:""}${r.fontSize||""}${r.lineHeight?`/${r.lineHeight} `:""}${r.fontFamily||""}`)})),t}const E=(e,t,n,r=[])=>{let o=e;t.forEach(((e,i)=>{i===t.length-1?Array.isArray(o)?o[Number(e)]=n:o&&"object"==typeof o&&(o[e]=n):o&&"object"==typeof o&&(o[e]||(o[e]=r.includes(e)?[]:{}),o=o[e])}))};function M(e,t){const{prefix:n,shouldSkipGeneratingVar:r}=t||{},o={},i={},s={};var a,l;return a=(e,t,a)=>{if(!("string"!=typeof t&&"number"!=typeof t||r&&r(e,t))){const r=`--${n?`${n}-`:""}${e.join("-")}`,l=((e,t)=>"number"==typeof t?["lineHeight","fontWeight","opacity","zIndex"].some((t=>e.includes(t)))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t)(e,t);Object.assign(o,{[r]:l}),E(i,e,`var(${r})`,a),E(s,e,`var(${r}, ${l})`,a)}},l=e=>"vars"===e[0],function e(t,n=[],r=[]){Object.entries(t).forEach((([t,o])=>{(!l||l&&!l([...n,t]))&&null!=o&&("object"==typeof o&&Object.keys(o).length>0?e(o,[...n,t],Array.isArray(o)?[...r,t]:r):a([...n,t],o,r))}))}(e),{css:o,vars:i,varsWithDefaults:s}}const T=function(e,t={}){const{getSelector:n=y,disableCssColorScheme:r,colorSchemeSelector:i}=t,{colorSchemes:s={},components:a,defaultColorScheme:l="light",...u}=e,{vars:h,css:c,varsWithDefaults:d}=M(u,t);let m=d;const p={},{[l]:f,...g}=s;if(Object.entries(g||{}).forEach((([e,n])=>{const{vars:r,css:i,varsWithDefaults:s}=M(n,t);m=(0,o.A)(m,s),p[e]={css:i,vars:r}})),f){const{css:e,vars:n,varsWithDefaults:r}=M(f,t);m=(0,o.A)(m,r),p[l]={css:e,vars:n}}function y(t,n){let r=i;if("class"===i&&(r=".%s"),"data"===i&&(r="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(r=`[${i}="%s"]`),t){if("media"===r){if(e.defaultColorScheme===t)return":root";const r=s[t]?.palette?.mode||t;return{[`@media (prefers-color-scheme: ${r})`]:{":root":n}}}if(r)return e.defaultColorScheme===t?`:root, ${r.replace("%s",String(t))}`:r.replace("%s",String(t))}return":root"}return{vars:m,generateThemeVars:()=>{let e={...h};return Object.entries(p).forEach((([,{vars:t}])=>{e=(0,o.A)(e,t)})),e},generateStyleSheets:()=>{const t=[],o=e.defaultColorScheme||"light";function i(e,n){Object.keys(n).length&&t.push("string"==typeof e?{[e]:{...n}}:e)}i(n(void 0,{...c}),c);const{[o]:a,...l}=p;if(a){const{css:e}=a,t=s[o]?.palette?.mode,l=!r&&t?{colorScheme:t,...e}:{...e};i(n(o,{...l}),l)}return Object.entries(l).forEach((([e,{css:t}])=>{const o=s[e]?.palette?.mode,a=!r&&o?{colorScheme:o,...t}:{...t};i(n(e,{...a}),a)})),t}}};var R=n(98762),A=n(95548),N=n(65387);const L={textTransform:"uppercase"},x='"Roboto", "Helvetica", "Arial", sans-serif';function O(e,t){const{fontFamily:n=x,fontSize:r=14,fontWeightLight:i=300,fontWeightRegular:s=400,fontWeightMedium:a=500,fontWeightBold:l=700,htmlFontSize:u=16,allVariants:h,pxToRem:c,...d}="function"==typeof t?t(e):t,m=r/14,p=c||(e=>e/u*m+"rem"),f=(e,t,r,o,i)=>{return{fontFamily:n,fontWeight:e,fontSize:p(t),lineHeight:r,...n===x?{letterSpacing:(s=o/t,Math.round(1e5*s)/1e5+"em")}:{},...i,...h};var s},g={h1:f(i,96,1.167,-1.5),h2:f(i,60,1.2,-.5),h3:f(s,48,1.167,0),h4:f(s,34,1.235,.25),h5:f(s,24,1.334,0),h6:f(a,20,1.6,.15),subtitle1:f(s,16,1.75,.15),subtitle2:f(a,14,1.57,.1),body1:f(s,16,1.5,.15),body2:f(s,14,1.43,.15),button:f(a,14,1.75,.4,L),caption:f(s,12,1.66,.4),overline:f(s,12,2.66,1,L),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,o.A)({htmlFontSize:u,pxToRem:p,fontFamily:n,fontSize:r,fontWeightLight:i,fontWeightRegular:s,fontWeightMedium:a,fontWeightBold:l,...g},d,{clone:!1})}function I(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const k=["none",I(0,2,1,-1,0,1,1,0,0,1,3,0),I(0,3,1,-2,0,2,2,0,0,1,5,0),I(0,3,3,-2,0,3,4,0,0,1,8,0),I(0,2,4,-1,0,4,5,0,0,1,10,0),I(0,3,5,-1,0,5,8,0,0,1,14,0),I(0,3,5,-1,0,6,10,0,0,1,18,0),I(0,4,5,-2,0,7,10,1,0,2,16,1),I(0,5,5,-3,0,8,10,1,0,3,14,2),I(0,5,6,-3,0,9,12,1,0,3,16,2),I(0,6,6,-3,0,10,14,1,0,4,18,3),I(0,6,7,-4,0,11,15,1,0,4,20,3),I(0,7,8,-4,0,12,17,2,0,5,22,4),I(0,7,8,-4,0,13,19,2,0,5,24,4),I(0,7,9,-4,0,14,21,2,0,5,26,4),I(0,8,9,-5,0,15,22,2,0,6,28,5),I(0,8,10,-5,0,16,24,2,0,6,30,5),I(0,8,11,-5,0,17,26,2,0,6,32,5),I(0,9,11,-5,0,18,28,2,0,7,34,6),I(0,9,12,-6,0,19,29,2,0,7,36,6),I(0,10,13,-6,0,20,31,3,0,8,38,7),I(0,10,13,-6,0,21,33,3,0,8,40,7),I(0,10,14,-6,0,22,35,3,0,8,42,7),I(0,11,14,-7,0,23,36,3,0,9,44,8),I(0,11,15,-7,0,24,38,3,0,9,46,8)];var D=n(21234);const P={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function H(e={}){const t={...e};return function e(t){const n=Object.entries(t);for(let i=0;i<n.length;i++){const[s,a]=n[i];r=a,!(0,o.Q)(r)&&void 0!==r&&"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&!Array.isArray(r)||s.startsWith("unstable_")?delete t[s]:(0,o.Q)(a)&&(t[s]={...a},e(t[s]))}var r}(t),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(t,null,2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`}const F=function(e={},...t){const{breakpoints:n,mixins:i={},spacing:s,palette:a={},transitions:l={},typography:u={},shape:h,...c}=e;if(e.vars&&void 0===e.generateThemeVars)throw new Error((0,r.A)(20));const d=v(a),m=(0,N.A)(e);let p=(0,o.A)(m,{mixins:(f=m.breakpoints,g=i,{toolbar:{minHeight:56,[f.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[f.up("sm")]:{minHeight:64}},...g}),palette:d,shadows:k.slice(),typography:O(d,u),transitions:(0,D.Ay)(l),zIndex:{...P}});var f,g;return p=(0,o.A)(p,c),p=t.reduce(((e,t)=>(0,o.A)(e,t)),p),p.unstable_sxConfig={...R.A,...c?.unstable_sxConfig},p.unstable_sx=function(e){return(0,A.A)({sx:e,theme:this})},p.toRuntimeSource=H,p};var Y=n(34578);const V=[...Array(25)].map(((e,t)=>{if(0===t)return"none";const n=(0,Y.A)(t);return`linear-gradient(rgba(255 255 255 / ${n}), rgba(255 255 255 / ${n}))`}));function U(e){return{inputPlaceholder:"dark"===e?.5:.42,inputUnderline:"dark"===e?.7:.42,switchTrackDisabled:"dark"===e?.2:.12,switchTrack:"dark"===e?.3:.38}}function B(e){return"dark"===e?V:[]}function W(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||"palette"===e[0]&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const j=e=>(t,n)=>{const r=e.rootSelector||":root",o=e.colorSchemeSelector;let i=o;if("class"===o&&(i=".%s"),"data"===o&&(i="[data-%s]"),o?.startsWith("data-")&&!o.includes("%s")&&(i=`[${o}="%s"]`),e.defaultColorScheme===t){if("dark"===t){const o={};return(s=e.cssVarPrefix,[...[...Array(25)].map(((e,t)=>`--${s?`${s}-`:""}overlays-${t}`)),`--${s?`${s}-`:""}palette-AppBar-darkBg`,`--${s?`${s}-`:""}palette-AppBar-darkColor`]).forEach((e=>{o[e]=n[e],delete n[e]})),"media"===i?{[r]:n,"@media (prefers-color-scheme: dark)":{[r]:o}}:i?{[i.replace("%s",t)]:o,[`${r}, ${i.replace("%s",t)}`]:n}:{[r]:{...n,...o}}}if(i&&"media"!==i)return`${r}, ${i.replace("%s",String(t))}`}else if(t){if("media"===i)return{[`@media (prefers-color-scheme: ${String(t)})`]:{[r]:n}};if(i)return i.replace("%s",String(t))}var s;return r};function z(e,t,n){!e[t]&&n&&(e[t]=n)}function G(e){return"string"==typeof e&&e.startsWith("hsl")?(0,i.YL)(e):e}function $(e,t){`${t}Channel`in e||(e[`${t}Channel`]=(0,i.Me)(G(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().\nTo suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}const K=e=>{try{return e()}catch(e){}},X=(e="mui")=>_(e);function q(e,t,n,r){if(!t)return;t=!0===t?{}:t;const o="dark"===r?"dark":"light";if(!n)return void(e[r]=function(e){const{palette:t={mode:"light"},opacity:n,overlays:r,...o}=e,i=v(t);return{palette:i,opacity:{...U(i.mode),...n},overlays:r||B(i.mode),...o}}({...t,palette:{mode:o,...t?.palette}}));const{palette:i,...s}=F({...n,palette:{mode:o,...t?.palette}});return e[r]={...t,palette:i,opacity:{...U(o),...t?.opacity},overlays:t?.overlays||B(o)},s}function Q(e,t,n){e.colorSchemes&&n&&(e.colorSchemes[t]={...!0!==n&&n,palette:v({...!0===n?{}:n.palette,mode:t})})}function J(e={},...t){const{palette:n,cssVariables:s=!1,colorSchemes:a=(n?void 0:{light:!0}),defaultColorScheme:l=n?.mode,...u}=e,h=l||"light",c=a?.[h],d={...a,...n?{[h]:{..."boolean"!=typeof c&&c,palette:n}}:void 0};if(!1===s){if(!("colorSchemes"in e))return F(e,...t);let r=n;"palette"in e||d[h]&&(!0!==d[h]?r=d[h].palette:"dark"===h&&(r={mode:"dark"}));const o=F({...e,palette:r},...t);return o.defaultColorScheme=h,o.colorSchemes=d,"light"===o.palette.mode&&(o.colorSchemes.light={...!0!==d.light&&d.light,palette:o.palette},Q(o,"dark",d.dark)),"dark"===o.palette.mode&&(o.colorSchemes.dark={...!0!==d.dark&&d.dark,palette:o.palette},Q(o,"light",d.light)),o}return n||"light"in d||"light"!==h||(d.light=!0),function(e={},...t){const{colorSchemes:n={light:!0},defaultColorScheme:s,disableCssColorScheme:a=!1,cssVarPrefix:l="mui",shouldSkipGeneratingVar:u=W,colorSchemeSelector:h=(n.light&&n.dark?"media":void 0),rootSelector:c=":root",...d}=e,m=Object.keys(n)[0],p=s||(n.light&&"light"!==m?"light":m),f=X(l),{[p]:g,light:y,dark:w,...v}=n,_={...v};let E=g;if(("dark"===p&&!("dark"in n)||"light"===p&&!("light"in n))&&(E=!0),!E)throw new Error((0,r.A)(21,p));const M=q(_,E,d,p);y&&!_.light&&q(_,y,void 0,"light"),w&&!_.dark&&q(_,w,void 0,"dark");let N={defaultColorScheme:p,...M,cssVarPrefix:l,colorSchemeSelector:h,rootSelector:c,getCssVar:f,colorSchemes:_,font:{...C(M.typography),...M.font},spacing:(L=d.spacing,"number"==typeof L?`${L}px`:"string"==typeof L||"function"==typeof L||Array.isArray(L)?L:"8px")};var L;Object.keys(N.colorSchemes).forEach((e=>{const t=N.colorSchemes[e].palette,n=e=>{const n=e.split("-"),r=n[1],o=n[2];return f(e,t[r][o])};var r;if("light"===t.mode&&(z(t.common,"background","#fff"),z(t.common,"onBackground","#000")),"dark"===t.mode&&(z(t.common,"background","#000"),z(t.common,"onBackground","#fff")),r=t,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"].forEach((e=>{r[e]||(r[e]={})})),"light"===t.mode){z(t.Alert,"errorColor",(0,i.Nd)(t.error.light,.6)),z(t.Alert,"infoColor",(0,i.Nd)(t.info.light,.6)),z(t.Alert,"successColor",(0,i.Nd)(t.success.light,.6)),z(t.Alert,"warningColor",(0,i.Nd)(t.warning.light,.6)),z(t.Alert,"errorFilledBg",n("palette-error-main")),z(t.Alert,"infoFilledBg",n("palette-info-main")),z(t.Alert,"successFilledBg",n("palette-success-main")),z(t.Alert,"warningFilledBg",n("palette-warning-main")),z(t.Alert,"errorFilledColor",K((()=>t.getContrastText(t.error.main)))),z(t.Alert,"infoFilledColor",K((()=>t.getContrastText(t.info.main)))),z(t.Alert,"successFilledColor",K((()=>t.getContrastText(t.success.main)))),z(t.Alert,"warningFilledColor",K((()=>t.getContrastText(t.warning.main)))),z(t.Alert,"errorStandardBg",(0,i.j4)(t.error.light,.9)),z(t.Alert,"infoStandardBg",(0,i.j4)(t.info.light,.9)),z(t.Alert,"successStandardBg",(0,i.j4)(t.success.light,.9)),z(t.Alert,"warningStandardBg",(0,i.j4)(t.warning.light,.9)),z(t.Alert,"errorIconColor",n("palette-error-main")),z(t.Alert,"infoIconColor",n("palette-info-main")),z(t.Alert,"successIconColor",n("palette-success-main")),z(t.Alert,"warningIconColor",n("palette-warning-main")),z(t.AppBar,"defaultBg",n("palette-grey-100")),z(t.Avatar,"defaultBg",n("palette-grey-400")),z(t.Button,"inheritContainedBg",n("palette-grey-300")),z(t.Button,"inheritContainedHoverBg",n("palette-grey-A100")),z(t.Chip,"defaultBorder",n("palette-grey-400")),z(t.Chip,"defaultAvatarColor",n("palette-grey-700")),z(t.Chip,"defaultIconColor",n("palette-grey-700")),z(t.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),z(t.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),z(t.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),z(t.LinearProgress,"primaryBg",(0,i.j4)(t.primary.main,.62)),z(t.LinearProgress,"secondaryBg",(0,i.j4)(t.secondary.main,.62)),z(t.LinearProgress,"errorBg",(0,i.j4)(t.error.main,.62)),z(t.LinearProgress,"infoBg",(0,i.j4)(t.info.main,.62)),z(t.LinearProgress,"successBg",(0,i.j4)(t.success.main,.62)),z(t.LinearProgress,"warningBg",(0,i.j4)(t.warning.main,.62)),z(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.11)`),z(t.Slider,"primaryTrack",(0,i.j4)(t.primary.main,.62)),z(t.Slider,"secondaryTrack",(0,i.j4)(t.secondary.main,.62)),z(t.Slider,"errorTrack",(0,i.j4)(t.error.main,.62)),z(t.Slider,"infoTrack",(0,i.j4)(t.info.main,.62)),z(t.Slider,"successTrack",(0,i.j4)(t.success.main,.62)),z(t.Slider,"warningTrack",(0,i.j4)(t.warning.main,.62));const e=(0,i.Y9)(t.background.default,.8);z(t.SnackbarContent,"bg",e),z(t.SnackbarContent,"color",K((()=>t.getContrastText(e)))),z(t.SpeedDialAction,"fabHoverBg",(0,i.Y9)(t.background.paper,.15)),z(t.StepConnector,"border",n("palette-grey-400")),z(t.StepContent,"border",n("palette-grey-400")),z(t.Switch,"defaultColor",n("palette-common-white")),z(t.Switch,"defaultDisabledColor",n("palette-grey-100")),z(t.Switch,"primaryDisabledColor",(0,i.j4)(t.primary.main,.62)),z(t.Switch,"secondaryDisabledColor",(0,i.j4)(t.secondary.main,.62)),z(t.Switch,"errorDisabledColor",(0,i.j4)(t.error.main,.62)),z(t.Switch,"infoDisabledColor",(0,i.j4)(t.info.main,.62)),z(t.Switch,"successDisabledColor",(0,i.j4)(t.success.main,.62)),z(t.Switch,"warningDisabledColor",(0,i.j4)(t.warning.main,.62)),z(t.TableCell,"border",(0,i.j4)((0,i.Cg)(t.divider,1),.88)),z(t.Tooltip,"bg",(0,i.Cg)(t.grey[700],.92))}if("dark"===t.mode){z(t.Alert,"errorColor",(0,i.j4)(t.error.light,.6)),z(t.Alert,"infoColor",(0,i.j4)(t.info.light,.6)),z(t.Alert,"successColor",(0,i.j4)(t.success.light,.6)),z(t.Alert,"warningColor",(0,i.j4)(t.warning.light,.6)),z(t.Alert,"errorFilledBg",n("palette-error-dark")),z(t.Alert,"infoFilledBg",n("palette-info-dark")),z(t.Alert,"successFilledBg",n("palette-success-dark")),z(t.Alert,"warningFilledBg",n("palette-warning-dark")),z(t.Alert,"errorFilledColor",K((()=>t.getContrastText(t.error.dark)))),z(t.Alert,"infoFilledColor",K((()=>t.getContrastText(t.info.dark)))),z(t.Alert,"successFilledColor",K((()=>t.getContrastText(t.success.dark)))),z(t.Alert,"warningFilledColor",K((()=>t.getContrastText(t.warning.dark)))),z(t.Alert,"errorStandardBg",(0,i.Nd)(t.error.light,.9)),z(t.Alert,"infoStandardBg",(0,i.Nd)(t.info.light,.9)),z(t.Alert,"successStandardBg",(0,i.Nd)(t.success.light,.9)),z(t.Alert,"warningStandardBg",(0,i.Nd)(t.warning.light,.9)),z(t.Alert,"errorIconColor",n("palette-error-main")),z(t.Alert,"infoIconColor",n("palette-info-main")),z(t.Alert,"successIconColor",n("palette-success-main")),z(t.Alert,"warningIconColor",n("palette-warning-main")),z(t.AppBar,"defaultBg",n("palette-grey-900")),z(t.AppBar,"darkBg",n("palette-background-paper")),z(t.AppBar,"darkColor",n("palette-text-primary")),z(t.Avatar,"defaultBg",n("palette-grey-600")),z(t.Button,"inheritContainedBg",n("palette-grey-800")),z(t.Button,"inheritContainedHoverBg",n("palette-grey-700")),z(t.Chip,"defaultBorder",n("palette-grey-700")),z(t.Chip,"defaultAvatarColor",n("palette-grey-300")),z(t.Chip,"defaultIconColor",n("palette-grey-300")),z(t.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),z(t.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),z(t.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),z(t.LinearProgress,"primaryBg",(0,i.Nd)(t.primary.main,.5)),z(t.LinearProgress,"secondaryBg",(0,i.Nd)(t.secondary.main,.5)),z(t.LinearProgress,"errorBg",(0,i.Nd)(t.error.main,.5)),z(t.LinearProgress,"infoBg",(0,i.Nd)(t.info.main,.5)),z(t.LinearProgress,"successBg",(0,i.Nd)(t.success.main,.5)),z(t.LinearProgress,"warningBg",(0,i.Nd)(t.warning.main,.5)),z(t.Skeleton,"bg",`rgba(${n("palette-text-primaryChannel")} / 0.13)`),z(t.Slider,"primaryTrack",(0,i.Nd)(t.primary.main,.5)),z(t.Slider,"secondaryTrack",(0,i.Nd)(t.secondary.main,.5)),z(t.Slider,"errorTrack",(0,i.Nd)(t.error.main,.5)),z(t.Slider,"infoTrack",(0,i.Nd)(t.info.main,.5)),z(t.Slider,"successTrack",(0,i.Nd)(t.success.main,.5)),z(t.Slider,"warningTrack",(0,i.Nd)(t.warning.main,.5));const e=(0,i.Y9)(t.background.default,.98);z(t.SnackbarContent,"bg",e),z(t.SnackbarContent,"color",K((()=>t.getContrastText(e)))),z(t.SpeedDialAction,"fabHoverBg",(0,i.Y9)(t.background.paper,.15)),z(t.StepConnector,"border",n("palette-grey-600")),z(t.StepContent,"border",n("palette-grey-600")),z(t.Switch,"defaultColor",n("palette-grey-300")),z(t.Switch,"defaultDisabledColor",n("palette-grey-600")),z(t.Switch,"primaryDisabledColor",(0,i.Nd)(t.primary.main,.55)),z(t.Switch,"secondaryDisabledColor",(0,i.Nd)(t.secondary.main,.55)),z(t.Switch,"errorDisabledColor",(0,i.Nd)(t.error.main,.55)),z(t.Switch,"infoDisabledColor",(0,i.Nd)(t.info.main,.55)),z(t.Switch,"successDisabledColor",(0,i.Nd)(t.success.main,.55)),z(t.Switch,"warningDisabledColor",(0,i.Nd)(t.warning.main,.55)),z(t.TableCell,"border",(0,i.Nd)((0,i.Cg)(t.divider,1),.68)),z(t.Tooltip,"bg",(0,i.Cg)(t.grey[700],.92))}$(t.background,"default"),$(t.background,"paper"),$(t.common,"background"),$(t.common,"onBackground"),$(t,"divider"),Object.keys(t).forEach((e=>{const n=t[e];"tonalOffset"!==e&&n&&"object"==typeof n&&(n.main&&z(t[e],"mainChannel",(0,i.Me)(G(n.main))),n.light&&z(t[e],"lightChannel",(0,i.Me)(G(n.light))),n.dark&&z(t[e],"darkChannel",(0,i.Me)(G(n.dark))),n.contrastText&&z(t[e],"contrastTextChannel",(0,i.Me)(G(n.contrastText))),"text"===e&&($(t[e],"primary"),$(t[e],"secondary")),"action"===e&&(n.active&&$(t[e],"active"),n.selected&&$(t[e],"selected")))}))})),N=t.reduce(((e,t)=>(0,o.A)(e,t)),N);const x={prefix:l,disableCssColorScheme:a,shouldSkipGeneratingVar:u,getSelector:j(N)},{vars:O,generateThemeVars:I,generateStyleSheets:k}=T(N,x);return N.vars=O,Object.entries(N.colorSchemes[N.defaultColorScheme]).forEach((([e,t])=>{N[e]=t})),N.generateThemeVars=I,N.generateStyleSheets=k,N.generateSpacing=function(){return(0,b.A)(d.spacing,(0,S.LX)(this))},N.getColorSchemeSelector=function(e){return function(t){return"media"===e?`@media (prefers-color-scheme: ${t})`:e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${t}"] &`:"class"===e?`.${t} &`:"data"===e?`[data-${t}] &`:`${e.replace("%s",t)} &`:"&"}}(h),N.spacing=N.generateSpacing(),N.shouldSkipGeneratingVar=u,N.unstable_sxConfig={...R.A,...d?.unstable_sxConfig},N.unstable_sx=function(e){return(0,A.A)({sx:e,theme:this})},N.toRuntimeSource=H,N}({...u,colorSchemes:d,defaultColorScheme:h,..."boolean"!=typeof s&&s},...t)}},28061:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(16280),n(44114);var r=n(25155);let o=0;const i=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;var t,n,r;t=this,r=void 0,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="context"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.context=e||this,this.context.eventListeners||(this.context.eventListeners=[])}addEventListener(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];function s(e){n.call(this,function(e){const t=e.stopImmediatePropagation;return e.stopImmediatePropagation=function(){t.apply(this),(0,r.CA)(this)},e}(e))}return this.context.eventListeners.push({element:e,event:t,callback:n,callbackProxy:s,options:i,eventManager:this}),e.addEventListener(t,s,i),o+=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;for(;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),o-=1}}clearEvents(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.context)return;let t=this.context.eventListeners.length;for(;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),o-=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 o={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 i;n.createEvent?(i=n.createEvent("MouseEvents"),i.initMouseEvent(t,o.bubbles,o.cancelable,o.view,o.detail,o.screenX,o.screenY,o.clientX,o.clientY,o.ctrlKey,o.altKey,o.shiftKey,o.metaKey,o.button,o.relatedTarget||n.body.parentNode)):i=n.createEventObject(),e.dispatchEvent?e.dispatchEvent(i):e.fireEvent(`on${t}`,i)}}},28298:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(95093))},28527:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402).has,i=n(25170),s=n(83789),a=n(40507),l=n(9539);e.exports=function(e){var t=r(this),n=s(e);if(i(t)<n.size)return!1;var u=n.getIterator();return!1!==a(u,(function(e){if(!o(t,e))return l(u,"normal",!1)}))}},28551:(e,t,n)=>{"use strict";var r=n(20034),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not an object")}},28861:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},28959:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"хвіліна":"хвіліну":"h"===n?t?"гадзіна":"гадзіну":e+" "+(r=+e,o={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"хвіліна_хвіліны_хвілін":"хвіліну_хвіліны_хвілін",hh:t?"гадзіна_гадзіны_гадзін":"гадзіну_гадзіны_гадзін",dd:"дзень_дні_дзён",MM:"месяц_месяцы_месяцаў",yy:"год_гады_гадоў"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2]);var r,o}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:t,mm:t,h:t,hh:t,d:"дзень",dd:t,M:"месяц",MM:t,y:"год",yy:t},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}})}(n(95093))},29231:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},29309:(e,t,n)=>{"use strict";var r=n(46518),o=n(44576),i=n(59225).set,s=n(79472),a=o.setImmediate?s(i,!1):i;r({global:!0,bind:!0,enumerable:!0,forced:o.setImmediate!==a},{setImmediate:a})},29849:function(e,t,n){!function(e){"use strict";var t={1:"੧",2:"੨",3:"੩",4:"੪",5:"੫",6:"੬",7:"੭",8:"੮",9:"੯",0:"੦"},n={"੧":"1","੨":"2","੩":"3","੪":"4","੫":"5","੬":"6","੭":"7","੮":"8","੯":"9","੦":"0"};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}})}(n(95093))},30016:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(96540),o=n(34164),i=n(21362),s=n(26739),a=n(20439),l=n(85078),u=n(99798),h=n(96148),c=n(1908);function d(e){return(0,c.Ay)("MuiBackdrop",e)}(0,h.A)("MuiBackdrop",["root","invisible"]);var m=n(74848);const p=(0,s.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),f=r.forwardRef((function(e,t){const n=(0,a.b)({props:e,name:"MuiBackdrop"}),{children:r,className:s,component:h="div",invisible:c=!1,open:f,components:g={},componentsProps:y={},slotProps:w={},slots:v={},TransitionComponent:_,transitionDuration:b,...S}=n,C={...n,component:h,invisible:c},E=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,i.A)(r,d,t)})(C),M={slots:{transition:_,root:g.Root,...v},slotProps:{...y,...w}},[T,R]=(0,l.A)("root",{elementType:p,externalForwardedProps:M,className:(0,o.A)(E.root,s),ownerState:C}),[A,N]=(0,l.A)("transition",{elementType:u.A,externalForwardedProps:M,ownerState:C});return(0,m.jsx)(A,{in:f,timeout:b,...S,...N,children:(0,m.jsx)(T,{"aria-hidden":!0,...R,classes:E,ref:t,children:r})})}))},30041:(e,t,n)=>{"use strict";function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")})),r}n.d(t,{Rk:()=>r,SF:()=>o,sk:()=>i});var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},30237:(e,t,n)=>{"use strict";n(6469)("flatMap")},30301:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(24902).A},30306:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},30421:e=>{"use strict";e.exports={}},30531:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(79306),s=n(28551),a=n(1767),l=n(48646),u=n(19462),h=n(9539),c=n(96395),d=n(30684),m=n(84549),p=!c&&!d("flatMap",(function(){})),f=!c&&!p&&m("flatMap",TypeError),g=c||p||f,y=u((function(){for(var e,t,n=this.iterator,r=this.mapper;;){if(t=this.inner)try{if(!(e=s(o(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){h(n,"throw",e)}if(e=s(o(this.next,n)),this.done=!!e.done)return;try{this.inner=l(r(e.value,this.counter++),!1)}catch(e){h(n,"throw",e)}}}));r({target:"Iterator",proto:!0,real:!0,forced:g},{flatMap:function(e){s(this);try{i(e)}catch(e){h(this,"throw",e)}return f?o(f,this,e):new y(a(this),{mapper:e,inner:null})}})},30670:(e,t,n)=>{"use strict";n(30531)},30684:e=>{"use strict";e.exports=function(e,t){var n="function"==typeof Iterator&&Iterator.prototype[e];if(n)try{n.call({next:null},t).next()}catch(e){return!0}}},31052:function(e,t,n){!function(e){"use strict";var t="pagh_wa’_cha’_wej_loS_vagh_jav_Soch_chorgh_Hut".split("_");function n(e,n,r,o){var i=function(e){var n=Math.floor(e%1e3/100),r=Math.floor(e%100/10),o=e%10,i="";return n>0&&(i+=t[n]+"vatlh"),r>0&&(i+=(""!==i?" ":"")+t[r]+"maH"),o>0&&(i+=(""!==i?" ":"")+t[o]),""===i?"pagh":i}(e);switch(r){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"}}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:function(e){var t=e;return-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"},past:function(e){var t=e;return-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"},s:"puS lup",ss:n,m:"wa’ tup",mm:n,h:"wa’ rep",hh:n,d:"wa’ jaj",dd:n,M:"wa’ jar",MM:n,y:"wa’ DIS",yy:n},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},31355:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="$$material"},31524:(e,t,n)=>{"use strict";n.d(t,{sH:()=>K});var r=n(96540),o=n(40961),i=n(84389),s=n(54950),a=n(11080),l=null;function u(){var e;"undefined"!=typeof console&&(e=console).warn.apply(e,arguments)}function h(e){return c(e,"hot-renderer")?(u("Providing a component-based renderer using `hot-renderer`-annotated component is no longer supported. Pass your component using `renderer` prop of the `HotTable` or `HotColumn` component instead."),!0):!!c(e,"hot-editor")&&(u("Providing a component-based editor using `hot-editor`-annotated component is no longer supported. Pass your component using `editor` prop of the `HotTable` or `HotColumn` component instead."),!0)}function c(e,t){return r.Children.toArray(e).some((function(e){return void 0!==e.props[t]}))}function d(e,t){if(!e||!t||"boolean"==typeof t)return null;var n=r.createElement(t,null),i=m({},!1);return i.className="".concat("hot-wrapper-editor-container"," ").concat(i.className),o.createPortal(r.createElement("div",Object.assign({},i),n),e.body)}function m(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{id:e.id||(t?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(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 y(e,t,n){return t&&g(e.prototype,t),n&&g(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function v(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(v=function(){return!!e})()}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function b(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function S(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.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)?p(e,t):void 0}}var C=function(){return y((function e(){f(this,e)}),null,[{key:"getSettings",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.prevProps,r=void 0===n?{}:n,o=t.isInit,i=void 0!==o&&o,s=t.initOnlySettingKeys,a=void 0===s?[]:s,l=function(t){return!(i||!a.includes(t))&&r[t]===e[t]},u={};for(var h in e)"children"!==h&&!l(h)&&e.hasOwnProperty(h)&&(u[h]=e[h]);return u}}])}(),E=(0,r.createContext)(void 0),M=function(e){var t=e.children,n=(0,r.useRef)([]),i=(0,r.useCallback)((function(e,t){n.current[t]=e}),[]),s=(0,r.useRef)(new Map),a=(0,r.useRef)(new Map),u=(0,r.useCallback)((function(){return a.current.clear()}),[]),h=(0,r.useRef)(new Map),c=(0,r.useCallback)((function(){return h.current.clear()}),[]),d=(0,r.useRef)(new Map),m=(0,r.useCallback)((function(e){return function(t,n,i,s,u,c,m){var p="".concat(i,"-").concat(s),f=t.guid,g="".concat(f,"-").concat(p),y="".concat(p,"-").concat(f);if(a.current.has(p)&&(n.innerHTML=a.current.get(p).innerHTML),n&&!n.getAttribute("ghost-table")){for(var w=h.current.get(y),v=d.current.get(g);n.firstChild;)n.removeChild(n.firstChild);if(w&&v)n.appendChild(v);else{var _=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;t||(t=document),l||(l=t.createDocumentFragment());var i=null!=r?r:t.createElement("DIV");return l.appendChild(i),{portal:o.createPortal(e,i,n),portalContainer:i}}(r.createElement(e,{instance:t,TD:n,row:i,col:s,prop:u,value:c,cellProperties:m}),n.ownerDocument,y,v),b=_.portal,S=_.portalContainer;d.current.set(g,S),n.appendChild(S),h.current.set(y,b)}}return a.current.set("".concat(i,"-").concat(s),n),n}}),[]),f=(0,r.useRef)((function(){})),g=(0,r.useCallback)((function(e){f.current=e}),[]),y=(0,r.useCallback)((function(){var e;f.current(function(e){if(Array.isArray(e))return p(e)}(e=h.current.values())||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||S(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}),[]),w=(0,r.useMemo)((function(){return{componentRendererColumns:s.current,columnsSettings:n.current,emitColumnSettings:i,getRendererWrapper:m,clearPortalCache:c,clearRenderedCellCache:u,setRenderersPortalManagerRef:g,pushCellPortalsIntoPortalManager:y}}),[i,m,u,g,y]);return r.createElement(E.Provider,{value:w},t)};function T(){return(0,r.useContext)(E)}var R=(0,r.createContext)(void 0),A=function(e){var t=e.columnIndex,n=e.getOwnerDocument,o=e.children,i=(0,r.useMemo)((function(){return{columnIndex:t,getOwnerDocument:n}}),[t,n]);return r.createElement(R.Provider,{value:i},o)},N=["close","focus","open"],L=["getValue","setValue"],x={open:"onOpen",close:"onClose",prepare:"onPrepare",focus:"onFocus"};function O(e,t){return function(n){function r(n){var o,s,a,l;return f(this,r),s=this,l=[n],a=w(a=r),o=function(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 function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(s,v()?Reflect.construct(a,l||[],w(s).constructor):a.apply(s,l)),t.current=o,Object.getOwnPropertyNames(i.Ay.editors.BaseEditor.prototype).forEach((function(t){if("constructor"!==t&&!L.includes(t)){var n=i.Ay.editors.BaseEditor.prototype[t];r.prototype[t]=function(){for(var r,o,i,s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return N.includes(t)||(o=n.call.apply(n,[this].concat(a))),x[t]&&null!==(r=e.current)&&void 0!==r&&r[x[t]]&&(o=(i=e.current[x[t]]).call.apply(i,[this].concat(a))),o}.bind(o)}})),o}return function(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&&_(e,t)}(r,n),y(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(e){this.value=e}},{key:"open",value:function(){}},{key:"close",value:function(){}}])}(i.Ay.editors.BaseEditor)}var I=(0,r.createContext)(void 0),k=function(e){var t=e.hooksRef,n=e.hotCustomEditorInstanceRef,o=e.children;return r.createElement(I.Provider,{value:{hooksRef:t,hotCustomEditorInstanceRef:n}},o)},D=function(e){return e.type===H},P=["_columnIndex","_getOwnerDocument","children"],H=function(e){var t=T(),n=t.componentRendererColumns,o=t.emitColumnSettings,i=t.getRendererWrapper,s=(0,r.useContext)(R),a=s.columnIndex,l=s.getOwnerDocument,c=(0,r.useRef)(null),m=(0,r.useRef)(null);(0,r.useEffect)((function(){var t,s=function(){var t=C.getSettings(Object.keys(e).filter((function(e){return!P.includes(e)})).reduce((function(t,n){return t[n]=e[n],t}),{}));return e.renderer?(t.renderer=i(e.renderer),n.set(a,!0)):e.hotRenderer&&(t.renderer=e.hotRenderer),e.editor?t.editor=O(c,m):e.hotEditor&&(t.editor=e.hotEditor),t}();o(s,a),h(e.children)||(t=e.children,r.Children.toArray(t).length&&u("Unexpected children nodes found in HotColumn component. HotColumn components do not support any children."))}));var p=d(l(),e.editor);return r.createElement(k,{hooksRef:c,hotCustomEditorInstanceRef:m},p)},F=(0,r.forwardRef)((function(e,t){var n,o,i=(n=(0,r.useState)([]),o=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,s,a=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw o}}return a}}(n,o)||S(n,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),s=i[0],a=i[1];return(0,r.useImperativeHandle)(t,(function(){return a})),r.createElement(r.Fragment,null,s)}));function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var V,U,B,W,j={exports:{}};j.exports=function(){if(W)return B;W=1;var e=U?V:(U=1,V="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");function t(){}function n(){}return n.resetWarningCache=t,B=function(){function r(t,n,r,o,i,s){if(s!==e){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function o(){return r}r.isRequired=r;var i={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:o,element:r,elementType:r,instanceOf:o,node:r,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:n,resetWarningCache:t};return i.PropTypes=i,i}}()();var z=Y(j.exports),G=(0,r.forwardRef)((function(e,t){var n,o,l=(0,r.useRef)(null),c=(0,r.useRef)(null),p=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useRef)(),y=T(),w=(0,r.useCallback)((function(){return l.current&&l.current.isDestroyed?(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null):l.current}),[l]),v=(0,r.useCallback)((function(){return!l.current||l.current.isDestroyed}),[l]),_=(0,r.useCallback)((function(){y.clearRenderedCellCache(),y.componentRendererColumns.clear()}),[y]),b=(0,r.useCallback)((function(){return"undefined"!=typeof window?c.current?c.current.ownerDocument:document:null}),[c]),S=function(){var t,n=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=v()?[]:(null===(t=w())||void 0===t||null===(t=t.getSettings())||void 0===t?void 0:t._initOnlySettings)||[],i=C.getSettings(e,{prevProps:r,isInit:n,initOnlySettingKeys:o});return i.columns=y.columnsSettings.length?y.columnsSettings:i.columns,e.renderer?(i.renderer=y.getRendererWrapper(e.renderer),y.componentRendererColumns.set("global",!0)):i.renderer=e.hotRenderer||(0,s.gB)("text"),e.editor?i.editor=O(p,f):i.editor=e.hotEditor||(0,a.M8)("text"),i},E=function(e){var t,n;e&&(null!==(t=e.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=e.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&y.componentRendererColumns.size>0&&u("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")};(0,r.useEffect)((function(){var t,n,o=S(!0);return g.current=e,l.current=new i.Ay.Core(c.current,o),l.current.addHook("beforeViewRender",(function(){y.clearPortalCache(),y.clearRenderedCellCache()})),l.current.addHook("afterViewRender",(function(){y.pushCellPortalsIntoPortalManager()})),l.current.init(),E(l.current),h(e.children)||(t=e.children,n=H,r.Children.toArray(t).some((function(e){return e.type!==n}))&&u("Unexpected children nodes found in HotTable component. Only HotColumn components are allowed.")),function(){var e;_(),null===(e=w())||void 0===e||e.destroy()}}),[]),n=function(){_();var t=w(),n=S(!1,g.current);g.current=e,null==t||t.updateSettings(n,!1),E(t),h(e.children)},o=r.useRef(!1),(0,r.useEffect)((function(){if(o.current)return n();o.current=!0}),undefined),(0,r.useImperativeHandle)(t,(function(){return{get hotElementRef(){return c.current},get hotInstance(){return w()}}}));var M=r.Children.toArray(e.children).filter(D).map((function(e,t){return r.createElement(A,{columnIndex:t,getOwnerDocument:b,key:t},e)})),R=m(e),N=d(b(),e.editor);return r.createElement(r.Fragment,null,r.createElement("div",Object.assign({ref:c},R),M),r.createElement(F,{ref:y.setRenderersPortalManagerRef}),r.createElement(k,{hooksRef:p,hotCustomEditorInstanceRef:f},N))}));G.propTypes={style:z.object,id:z.string,className:z.string};var $=["children"],K=(0,r.forwardRef)((function(e,t){var n,o=e.children,i=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,$),s=null!==(n=i.id)&&void 0!==n?n:(0,r.useId)();return r.createElement(M,null,r.createElement(G,Object.assign({id:s},i,{ref:t}),o))}));K.version="15.3.0"},31541:function(e,t,n){!function(e){"use strict";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 年"}})}(n(95093))},31545:function(e,t,n){!function(e){"use strict";var t={1:"༡",2:"༢",3:"༣",4:"༤",5:"༥",6:"༦",7:"༧",8:"༨",9:"༩",0:"༠"},n={"༡":"1","༢":"2","༣":"3","༤":"4","༥":"5","༦":"6","༧":"7","༨":"8","༩":"9","༠":"0"};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}})}(n(95093))},31601:e=>{"use strict";e.exports=function(e){return e[1]}},31698:(e,t,n)=>{"use strict";var r=n(46518),o=n(44204),i=n(39835);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("union")||!i("union")},{union:o})},31803:(e,t,n)=>{"use strict";n.d(t,{z:()=>l}),n(16280),n(98992),n(81454);var r=n(41895),o=n(77792),i=n(48046),s=n(13317),a=n(83986);class l extends r.n{constructor(){var e,t,n;super(...arguments),e=this,n=[],(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="orderOfIndexes"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}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=(0,i.H)(this.orderOfIndexes,[e]),(0,a.Tn)(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=(0,o.N)(this.indexedValues,e,t,this.initValueOrFn),this.orderOfIndexes=(0,s.z)(this.orderOfIndexes,t),super.insert(e,t)}remove(e){this.indexedValues=(0,o.H)(this.indexedValues,e),this.orderOfIndexes=(0,i.H)(this.orderOfIndexes,e),this.orderOfIndexes=(0,s.v)(this.orderOfIndexes,e),super.remove(e)}getEntries(){return this.orderOfIndexes.map((e=>[e,this.getValueAtIndex(e)]))}}},32124:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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){return"D"===t?e+"वेर":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?"सांजे":"राती"}})}(n(95093))},32350:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,E:()=>i});var r=n(15870),o=n(53172);class i{static create(){return new i}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function s(){const e=(0,r.A)(i.create).current;return(0,o.A)(e.disposeEffect),e}},32475:(e,t,n)=>{"use strict";var r=n(46518),o=n(28527);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isSupersetOf",(function(e){return!e}))},{isSupersetOf:o})},32564:(e,t,n)=>{"use strict";n.d(t,{b7:()=>c,_T:()=>h}),n(16280);var r=n(65615),o=n(32919),i=(n(44114),n(77325));const s={_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){(0,i.z0)(this._hooksStorage[e]||[],(t=>{this.hot.removeHook(e,t)}))},clearHooks(){(0,o.v4)(this._hooksStorage,((e,t)=>this.removeHooksByKey(t))),this._hooksStorage={}}};(0,o.LH)(s,"MIXIN_NAME","hooksRefRegisterer",{writable:!1,enumerable:!1});const a=s;var l=n(20091);function u(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const h=Object.freeze({VIRGIN:"STATE_VIRGIN",EDITING:"STATE_EDITING",WAITING:"STATE_WAITING",FINISHED:"STATE_FINISHED"});class c{static get EDITOR_TYPE(){return"base"}constructor(e){u(this,"hot",void 0),u(this,"state",h.VIRGIN),u(this,"_opened",!1),u(this,"_fullEditMode",!1),u(this,"_closeCallback",null),u(this,"TD",null),u(this,"row",null),u(this,"col",null),u(this,"prop",null),u(this,"originalValue",null),u(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,o,i){this.TD=r,this.row=e,this.col=t,this.prop=n,this.originalValue=o,this.cellProperties=i,this.state=this.isOpened()?this.state:h.VIRGIN}extend(){return class extends this.constructor{}}saveValue(e,t){let n,r,o,i;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),o=Math.max(e[0],e[2]),i=Math.max(e[1],e[3])}else[n,r,o,i]=[this.row,this.col,null,null];const s=this.hot.runHooks("modifyGetCellCoords",n,r,!1,"meta");Array.isArray(s)&&([n,r]=s),this.hot.populateFromArray(n,r,e,o,i,"edit")}beginEditing(e,t){if(this.state!==h.VIRGIN)return;const n=this.hot,o=n.rowIndexMapper.getRenderableFromVisualIndex(this.row),i=n.columnIndexMapper.getRenderableFromVisualIndex(this.col),s=()=>{if(this.state=h.EDITING,this.isInFullEditMode()){const t="string"==typeof e?e:(0,r.As)(this.originalValue);this.setValue(t)}this.open(t),this._opened=!0,this.focus(),n.view.render(),n.runHooks("afterBeginEditing",this.row,this.col)};this.hot.addHookOnce("afterScroll",s),n.view.scrollViewport(n._createCellCoords(o,i))||(this.hot.removeHook("afterScroll",s),s())}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!==h.VIRGIN){if(this.state===h.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=h.WAITING,this.saveValue(r,t),this.hot.getCellValidator(this.cellProperties)?this.hot.addHookOnce("postAfterValidate",(e=>{this.state=h.FINISHED,this.discardEditor(e)})):(this.state=h.FINISHED,this.discardEditor(!0))}}else this.hot._registerTimeout((()=>{this._fireCallbacks(!0)}))}cancelChanges(){this.state=h.FINISHED,this.discardEditor()}discardEditor(e){this.state===h.FINISHED&&(!1===e&&!0!==this.cellProperties.allowInvalid?(this.hot.selectCell(this.row,this.col),this.focus(),this.state=h.EDITING,this._fireCallbacks(!1)):(this.close(),this._opened=!1,this._fullEditMode=!1,this.state=h.VIRGIN,this._fireCallbacks(!0),this.hot.getShortcutManager().setActiveContextName("grid")))}enableFullEditMode(){this._fullEditMode=!0}isInFullEditMode(){return this._fullEditMode}isOpened(){return this._opened}isWaiting(){return this.state===h.WAITING}getEditedCellRect(){var e;const t=this.getEditedCell();if(!t)return;const{wtOverlays:n,wtViewport:r}=this.hot.view._wt,o=this.hot.rootWindow,i=(0,l.cY)(t),s=(0,l.Gq)(t),a=(0,l.cY)(this.hot.rootElement),u=(0,l.Gq)(this.hot.rootElement),h=n.topOverlay.holder,c=n.inlineStartOverlay.holder,d=h!==o?h.scrollTop:0,m=c!==o?c.scrollLeft:0,p=o.innerWidth-a.left-u,{wtTable:f}=null!==(e=n.getParentOverlay(t))&&void 0!==e?e:this.hot.view._wt,g=f.name,y=["master","inline_start"].includes(g)?d:0,w=["master","top","bottom"].includes(g)?m:0,v=i.top===a.top?0:1;let _=i.top-a.top-v-y,b=0;b=this.hot.isRtl()?o.innerWidth-i.left-s-p-1+w:i.left-a.left-1-w,["top","top_inline_start_corner"].includes(g)&&(_+=n.topOverlay.getOverlayOffset()),["inline_start","top_inline_start_corner"].includes(g)&&(b+=Math.abs(n.inlineStartOverlay.getOverlayOffset()));const S=this.hot.hasColHeaders(),C=this.hot.rowIndexMapper.getRenderableFromVisualIndex(this.row),E=this.hot.columnIndexMapper.getRenderableFromVisualIndex(this.col),M=this.hot.rowIndexMapper.getRenderableIndexesLength()-this.hot.view._wt.getSetting("fixedRowsBottom");(S&&C<=0||C===M)&&(_+=1),E<=0&&(b+=1);const T=r.rowsRenderCalculator.startPosition,R=r.columnsRenderCalculator.startPosition,A=Math.abs(n.inlineStartOverlay.getScrollPosition()),N=n.topOverlay.getScrollPosition(),L=(0,l.XJ)(this.hot.rootDocument);let x=t.offsetTop;if(["inline_start","master"].includes(g)&&(x+=T-N),["bottom","bottom_inline_start_corner"].includes(g)){const{wtViewport:e,wtTable:t}=n.bottomOverlay.clone;x+=e.getWorkspaceHeight()-t.getHeight()-L}let O=t.offsetLeft;this.hot.isRtl()?(O=O>=0?f.getWidth()-t.offsetLeft:Math.abs(O),O+=R-A-s):["top","master","bottom"].includes(g)&&(O+=R-A);const I=o.getComputedStyle(this.TD),k=this.hot.isRtl()?"borderRightWidth":"borderLeftWidth",D=parseInt(I[k],10)>0?0:1,P=parseInt(I.borderTopWidth,10)>0?0:1,H=(0,l.Gq)(t)+D,F=(0,l.DK)(t)+P,Y=(0,l.D1)(h)?L:0,V=(0,l.zO)(c)?L:0,U=this.hot.view.maximumVisibleElementWidth(O)-Y+D;return{top:_,start:b,height:F,maxHeight:Math.max(this.hot.view.maximumVisibleElementHeight(x)-V+P,this.hot.view.getDefaultRowHeight()),width:H,maxWidth:U}}getEditedCellsLayerClass(){switch(this.checkEditorSection()){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}}(0,o.co)(c,a)},32603:(e,t,n)=>{"use strict";var r=n(655);e.exports=function(e,t){return void 0===e?arguments.length<2?"":t:r(e)}},32919:(e,t,n)=>{"use strict";n.d(t,{$3:()=>y,Go:()=>l,Gv:()=>d,IL:()=>i,LH:()=>m,Nl:()=>o,UU:()=>f,X$:()=>s,co:()=>h,mQ:()=>v,nA:()=>w,o8:()=>u,oq:()=>g,v4:()=>p,wU:()=>c,zw:()=>a}),n(16280),n(44114),n(33110),n(98992),n(3949);var r=n(77325);function o(e){let t;return Array.isArray(e)?t=e.length?new Array(e.length).fill(null):[]:(t={},p(e,((e,n)=>{"__children"!==n&&(e&&"object"==typeof e&&!Array.isArray(e)?t[n]=o(e):Array.isArray(e)?e.length&&"object"==typeof e[0]&&!Array.isArray(e[0])?t[n]=[o(e[0])]:t[n]=[]:t[n]=null)}))),t}function i(e,t){return t.prototype.constructor=t,e.prototype=new t,e.prototype.constructor=e,e}function s(e,t,n){const r=Array.isArray(n);return p(t,((t,o)=>{(!1===r||n.includes(o))&&(e[o]=t)})),e}function a(e,t){p(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 p(e,((e,n)=>{t[n]=e})),t}function h(e){e.MIXINS||(e.MIXINS=[]);for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.z0)(n,(t=>{e.MIXINS.push(t.MIXIN_NAME),p(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}`;return function(){return void 0===this[n]&&(this[n]=(e=>{let t=e;return(Array.isArray(t)||d(t))&&(t=l(t)),t})(t)),this[n]}},o=function(e){const t=`_${e}`;return function(e){this[t]=e}};Object.defineProperty(e.prototype,n,{get:r(n,t),set:o(n),configurable:!0})}}))})),e}function c(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 p(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 f(e,t){const n=t.split(".");let r=e;return p(n,(e=>{if(r=r[e],void 0===r)return r=void 0,!1})),r}function g(e,t,n){if("string"!=typeof t)return;const r=t.split(".");let o=e;r.forEach(((e,t)=>{"__proto__"!==e&&"constructor"!==e&&"prototype"!==e&&(t!==r.length-1?(v(o,e)||(o[e]={}),o=o[e]):o[e]=n)}))}function y(e){if(!d(e))return 0;const t=function(e){let n=0;return d(e)?p(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 v(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},32934:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},33044:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t,n){return"function"==typeof e?e(t,n):e}},33110:(e,t,n)=>{"use strict";var r=n(46518),o=n(97751),i=n(18745),s=n(69565),a=n(79504),l=n(79039),u=n(94901),h=n(10757),c=n(67680),d=n(66933),m=n(4495),p=String,f=o("JSON","stringify"),g=a(/./.exec),y=a("".charAt),w=a("".charCodeAt),v=a("".replace),_=a(1.1.toString),b=/[\uD800-\uDFFF]/g,S=/^[\uD800-\uDBFF]$/,C=/^[\uDC00-\uDFFF]$/,E=!m||l((function(){var e=o("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),M=l((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),T=function(e,t){var n=c(arguments),r=d(t);if(u(r)||void 0!==e&&!h(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,p(e),t)),!h(t))return t},i(f,null,n)},R=function(e,t,n){var r=y(n,t-1),o=y(n,t+1);return g(S,e)&&!g(C,o)||g(C,e)&&!g(S,r)?"\\u"+_(w(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:E||M},{stringify:function(e,t,n){var r=c(arguments),o=i(E?T:f,null,r);return M&&"string"==typeof o?v(o,b,R):o}})},33372:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(93781);function o(e=8,t=(0,r.LX)({spacing:e})){if(e.mui)return e;const n=(...e)=>(0===e.length?[1]:e).map((e=>{const n=t(e);return"number"==typeof n?`${n}px`:n})).join(" ");return n.mui=!0,n}},33392:(e,t,n)=>{"use strict";var r=n(79504),o=0,i=Math.random(),s=r(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++o+i,36)}},33428:(e,t,n)=>{"use strict";n.d(t,{sH:()=>re});var r=n(96540),o=n(40961),i=n(84389);function s(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 a(e){return a="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},a(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(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)}}function h(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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}}),t&&p(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}function p(e,t){return p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},p(e,t)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e){var t=function(){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}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(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 f(e)}(this,n)}}var y=null,w="global",v="hot-wrapper-editor-container";function _(e,t){var n=r.Children.toArray(e),o=r.Children.count(e),i=null;return 0!==o&&(i=1===o&&n[0].props[t]?n[0]:n.find((function(e){return void 0!==e.props[t]}))),i||null}function b(e){return e?e.type.WrappedComponent?e.type.WrappedComponent:e.type:null}function S(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).querySelectorAll('[class^="'.concat(v,'"]')).forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}function C(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;if(null!==t){var n=e.createElement("DIV"),r=M(t.props,!1),i=r.id,s=r.className,a=r.style;return i&&(n.id=i),n.className=[v,s].join(" "),a&&Object.assign(n.style,a),e.body.appendChild(n),o.createPortal(t,n)}}function E(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:w,o=_(e,"hot-editor"),i=b(o);return o?r.cloneElement(o,{emitEditorInstance:function(e,n){t.get(i)||t.set(i,new Map),t.get(i).set(null!=n?n:w,e)},editorColumnScope:n,isEditor:!0}):null}function M(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return{id:e.id||(t?"hot-"+Math.random().toString(36).substring(5):void 0),className:e.className||"",style:e.style||{}}}function T(e){var t=r.version.split(".").map((function(e){return parseInt(e)}));t[0]>=16&&t[1]>=3&&(e.UNSAFE_componentWillUpdate=e.componentWillUpdate,e.componentWillUpdate=void 0,e.UNSAFE_componentWillMount=e.componentWillMount,e.componentWillMount=void 0)}var R=function(){function e(){l(this,e)}return h(e,null,[{key:"getSettings",value:function(e){var t={};if(e.settings){var n=e.settings;for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}for(var o in e)"settings"!==o&&"children"!==o&&e.hasOwnProperty(o)&&(t[o]=e[o]);return t}}]),e}(),A=function(e){d(n,e);var t=g(n);function n(e,r){var o;return l(this,n),(o=t.call(this,e,r)).localEditorPortal=null,T(f(o)),o}return h(n,[{key:"getLocalEditorPortal",value:function(){return this.localEditorPortal}},{key:"setLocalEditorPortal",value:function(e){this.localEditorPortal=e}},{key:"getSettingsProps",value:function(){var e=this;return this.internalProps=["__componentRendererColumns","_emitColumnSettings","_columnIndex","_getChildElementByType","_getRendererWrapper","_getEditorClass","_getEditorCache","_getOwnerDocument","hot-renderer","hot-editor","children"],Object.keys(this.props).filter((function(t){return!e.internalProps.includes(t)})).reduce((function(t,n){return t[n]=e.props[n],t}),{})}},{key:"hasProp",value:function(e){return!!this.props[e]}},{key:"getLocalEditorElement",value:function(){return E(this.props.children,this.props._getEditorCache(),this.props._columnIndex)}},{key:"createColumnSettings",value:function(){var e=this.props._getChildElementByType(this.props.children,"hot-renderer"),t=this.getLocalEditorElement();this.columnSettings=R.getSettings(this.getSettingsProps()),null!==e?(this.columnSettings.renderer=this.props._getRendererWrapper(e),this.props._componentRendererColumns.set(this.props._columnIndex,!0)):this.hasProp("renderer")?this.columnSettings.renderer=this.props.renderer:this.columnSettings.renderer=void 0,null!==t?this.columnSettings.editor=this.props._getEditorClass(t,this.props._columnIndex):this.hasProp("editor")?this.columnSettings.editor=this.props.editor:this.columnSettings.editor=void 0}},{key:"createLocalEditorPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,t=this.props._getEditorCache(),n=E(e,t,this.props._columnIndex);n&&this.setLocalEditorPortal(C(this.props._getOwnerDocument(),n,t))}},{key:"emitColumnSettings",value:function(){this.props._emitColumnSettings(this.columnSettings,this.props._columnIndex)}},{key:"componentWillMount",value:function(){this.createLocalEditorPortal()}},{key:"componentDidMount",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"componentWillUpdate",value:function(e,t,n){this.createLocalEditorPortal(e.children)}},{key:"componentDidUpdate",value:function(){this.createColumnSettings(),this.emitColumnSettings()}},{key:"render",value:function(){return r.createElement(r.Fragment,null,this.getLocalEditorPortal())}}]),n}(r.Component),N=function(e){d(n,e);var t=g(n);function n(e){var r;return l(this,n),(r=t.call(this,e)).state={portals:[]},r}return h(n,[{key:"render",value:function(){return r.createElement(r.Fragment,null,this.state.portals)}}]),n}(r.Component);function L(e,t){return e(t={exports:{}},t.exports),t.exports}var x="function"==typeof Symbol&&Symbol.for,O=x?Symbol.for("react.element"):60103,I=x?Symbol.for("react.portal"):60106,k=x?Symbol.for("react.fragment"):60107,D=x?Symbol.for("react.strict_mode"):60108,P=x?Symbol.for("react.profiler"):60114,H=x?Symbol.for("react.provider"):60109,F=x?Symbol.for("react.context"):60110,Y=x?Symbol.for("react.async_mode"):60111,V=x?Symbol.for("react.concurrent_mode"):60111,U=x?Symbol.for("react.forward_ref"):60112,B=x?Symbol.for("react.suspense"):60113,W=x?Symbol.for("react.suspense_list"):60120,j=x?Symbol.for("react.memo"):60115,z=x?Symbol.for("react.lazy"):60116,G=x?Symbol.for("react.block"):60121,$=x?Symbol.for("react.fundamental"):60117,K=x?Symbol.for("react.responder"):60118,X=x?Symbol.for("react.scope"):60119;function q(e){if("object"===a(e)&&null!==e){var t=e.$$typeof;switch(t){case O:switch(e=e.type){case Y:case V:case k:case P:case D:case B:return e;default:switch(e=e&&e.$$typeof){case F:case U:case z:case j:case H:return e;default:return t}}case I:return t}}}function Q(e){return q(e)===V}var J={AsyncMode:Y,ConcurrentMode:V,ContextConsumer:F,ContextProvider:H,Element:O,ForwardRef:U,Fragment:k,Lazy:z,Memo:j,Portal:I,Profiler:P,StrictMode:D,Suspense:B,isAsyncMode:function(e){return Q(e)||q(e)===Y},isConcurrentMode:Q,isContextConsumer:function(e){return q(e)===F},isContextProvider:function(e){return q(e)===H},isElement:function(e){return"object"===a(e)&&null!==e&&e.$$typeof===O},isForwardRef:function(e){return q(e)===U},isFragment:function(e){return q(e)===k},isLazy:function(e){return q(e)===z},isMemo:function(e){return q(e)===j},isPortal:function(e){return q(e)===I},isProfiler:function(e){return q(e)===P},isStrictMode:function(e){return q(e)===D},isSuspense:function(e){return q(e)===B},isValidElementType:function(e){return"string"==typeof e||"function"==typeof e||e===k||e===V||e===P||e===D||e===B||e===W||"object"===a(e)&&null!==e&&(e.$$typeof===z||e.$$typeof===j||e.$$typeof===H||e.$$typeof===F||e.$$typeof===U||e.$$typeof===$||e.$$typeof===K||e.$$typeof===X||e.$$typeof===G)},typeOf:q},Z=L((function(e,t){}));Z.AsyncMode,Z.ConcurrentMode,Z.ContextConsumer,Z.ContextProvider,Z.Element,Z.ForwardRef,Z.Fragment,Z.Lazy,Z.Memo,Z.Portal,Z.Profiler,Z.StrictMode,Z.Suspense,Z.isAsyncMode,Z.isConcurrentMode,Z.isContextConsumer,Z.isContextProvider,Z.isElement,Z.isForwardRef,Z.isFragment,Z.isLazy,Z.isMemo,Z.isPortal,Z.isProfiler,Z.isStrictMode,Z.isSuspense,Z.isValidElementType,Z.typeOf,L((function(e){e.exports=J}));Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map((function(e){return t[e]}));if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach((function(e){o[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}})()&&Object.assign;function ee(){}function te(){}Function.call.bind(Object.prototype.hasOwnProperty),te.resetWarningCache=ee;var ne=L((function(e){e.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:te,resetWarningCache:ee};return n.PropTypes=n,n}()})),re=function(e){d(n,e);var t=g(n);function n(e,r){var o;return l(this,n),(o=t.call(this,e,r)).id=null,o.__hotInstance=null,o.hotElementRef=null,o.columnSettings=[],o.portalManager=null,o.portalCacheArray=[],o.globalEditorPortal=null,o.renderedCellCache=new Map,o.editorCache=new Map,o.componentRendererColumns=new Map,T(f(o)),o}return h(n,[{key:"hotInstance",get:function(){return!this.__hotInstance||this.__hotInstance&&!this.__hotInstance.isDestroyed?this.__hotInstance:(console.warn("The Handsontable instance bound to this component was destroyed and cannot be used properly."),null)},set:function(e){this.__hotInstance=e}},{key:"getRenderedCellCache",value:function(){return this.renderedCellCache}},{key:"getEditorCache",value:function(){return this.editorCache}},{key:"getGlobalEditorPortal",value:function(){return this.globalEditorPortal}},{key:"setGlobalEditorPortal",value:function(e){this.globalEditorPortal=e}},{key:"clearCache",value:function(){var e=this.getRenderedCellCache();this.setGlobalEditorPortal(null),S(this.getOwnerDocument()),this.getEditorCache().clear(),e.clear(),this.componentRendererColumns.clear()}},{key:"getOwnerDocument",value:function(){return this.hotElementRef?this.hotElementRef.ownerDocument:document}},{key:"setHotElementRef",value:function(e){this.hotElementRef=e}},{key:"getRendererWrapper",value:function(e){var t=this;return function(n,i,a,l,u,h,d){var m=t.getRenderedCellCache();if(m.has("".concat(a,"-").concat(l))&&(i.innerHTML=m.get("".concat(a,"-").concat(l)).innerHTML),i&&!i.getAttribute("ghost-table")){for(var p=function(e,t,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document;i||(i=document),y||(y=i.createDocumentFragment());var a=i.createElement("DIV");y.appendChild(a);var l=r.cloneElement(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({key:"".concat(t.row,"-").concat(t.col)},t));return{portal:o.createPortal(l,a,"".concat(t.row,"-").concat(t.col,"-").concat(Math.random())),portalContainer:a}}(e,{TD:i,row:a,col:l,prop:u,value:h,cellProperties:d,isRenderer:!0},(function(){}),i.ownerDocument),f=p.portal,g=p.portalContainer;i.firstChild;)i.removeChild(i.firstChild);i.appendChild(g),t.portalCacheArray.push(f)}return m.set("".concat(a,"-").concat(l),i),i}}},{key:"getEditorClass",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:w,r=b(e),o=null===(t=this.getEditorCache().get(r))||void 0===t?void 0:t.get(n);return this.makeEditorClass(o)}},{key:"makeEditorClass",value:function(e){var t=function(t){d(r,t);var n=g(r);function r(t){var o;return l(this,r),o=n.call(this,t),e.hotCustomEditorInstance=f(o),o.editorComponent=e,o}return h(r,[{key:"focus",value:function(){}},{key:"getValue",value:function(){}},{key:"setValue",value:function(){}},{key:"open",value:function(){}},{key:"close",value:function(){}}]),r}(i.Ay.editors.BaseEditor);return Object.getOwnPropertyNames(i.Ay.editors.BaseEditor.prototype).forEach((function(n){"constructor"!==n&&(t.prototype[n]=function(){for(var t,r=arguments.length,o=new Array(r),i=0;i<r;i++)o[i]=arguments[i];return(t=e[n]).call.apply(t,[e].concat(o))})})),t}},{key:"getGlobalRendererElement",value:function(){return _(this.props.children,"hot-renderer")}},{key:"getGlobalEditorElement",value:function(){return E(arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,this.getEditorCache())}},{key:"createGlobalEditorPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props.children,t=this.getGlobalEditorElement(e);t&&this.setGlobalEditorPortal(C(this.getOwnerDocument(),t,this.getEditorCache()))}},{key:"createNewGlobalSettings",value:function(){var e=R.getSettings(this.props),t=this.getGlobalRendererElement(),n=this.getGlobalEditorElement();return e.columns=this.columnSettings.length?this.columnSettings:e.columns,e.editor=n?this.getEditorClass(n,w):this.props.editor||(this.props.settings?this.props.settings.editor:void 0),t?(e.renderer=this.getRendererWrapper(t),this.componentRendererColumns.set("global",!0)):e.renderer=this.props.renderer||(this.props.settings?this.props.settings.renderer:void 0),e}},{key:"displayAutoSizeWarning",value:function(e){var t,n;this.hotInstance&&(null!==(t=this.hotInstance.getPlugin("autoRowSize"))&&void 0!==t&&t.enabled||null!==(n=this.hotInstance.getPlugin("autoColumnSize"))&&void 0!==n&&n.enabled)&&this.componentRendererColumns.size>0&&function(){var e;"undefined"!=typeof console&&(e=console).warn.apply(e,arguments)}("Your `HotTable` configuration includes `autoRowSize`/`autoColumnSize` options, which are not compatible with the component-based renderers`. Disable `autoRowSize` and `autoColumnSize` to prevent row and column misalignment.")}},{key:"setHotColumnSettings",value:function(e,t){this.columnSettings[t]=e}},{key:"handsontableBeforeViewRender",value:function(){this.getRenderedCellCache().clear()}},{key:"handsontableAfterViewRender",value:function(){var e=this;this.portalManager.setState((function(){return Object.assign({},{portals:e.portalCacheArray})}),(function(){e.portalCacheArray.length=0}))}},{key:"updateHot",value:function(e){this.hotInstance&&this.hotInstance.updateSettings(e,!1)}},{key:"setPortalManagerRef",value:function(e){this.portalManager=e}},{key:"componentWillMount",value:function(){this.clearCache(),this.createGlobalEditorPortal()}},{key:"componentDidMount",value:function(){var e=this,t=this.createNewGlobalSettings();this.hotInstance=new i.Ay.Core(this.hotElementRef,t),this.hotInstance.addHook("beforeViewRender",(function(t){e.handsontableBeforeViewRender()})),this.hotInstance.addHook("afterViewRender",(function(){e.handsontableAfterViewRender()})),this.hotInstance.init(),this.displayAutoSizeWarning(t)}},{key:"componentWillUpdate",value:function(e,t,n){this.clearCache(),S(this.getOwnerDocument()),this.createGlobalEditorPortal(e.children)}},{key:"componentDidUpdate",value:function(){var e=this.createNewGlobalSettings();this.updateHot(e),this.displayAutoSizeWarning(e)}},{key:"componentWillUnmount",value:function(){this.hotInstance&&this.hotInstance.destroy(),S(this.getOwnerDocument())}},{key:"render",value:function(){var e=this,t=M(this.props),n=t.id,o=t.className,i=t.style,s=r.Children.toArray(this.props.children),a=(s=s.filter((function(e){return function(e){return e.type===A}(e)}))).map((function(t,n){return r.cloneElement(t,{_componentRendererColumns:e.componentRendererColumns,_emitColumnSettings:e.setHotColumnSettings.bind(e),_columnIndex:n,_getChildElementByType:_.bind(e),_getRendererWrapper:e.getRendererWrapper.bind(e),_getEditorClass:e.getEditorClass.bind(e),_getOwnerDocument:e.getOwnerDocument.bind(e),_getEditorCache:e.getEditorCache.bind(e),children:t.props.children})}));return a.push(this.getGlobalEditorPortal()),r.createElement(r.Fragment,null,r.createElement("div",{ref:this.setHotElementRef.bind(this),id:n,className:o,style:i},a),r.createElement(N,{ref:this.setPortalManagerRef.bind(this)}))}}],[{key:"version",get:function(){return"11.0.0"}}]),n}(r.Component);re.propTypes={style:ne.object,id:ne.string,className:ne.string},r.Component},33478:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},33706:(e,t,n)=>{"use strict";var r=n(79504),o=n(94901),i=n(77629),s=r(Function.toString);o(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},33717:(e,t)=>{"use strict";t.f=Object.getOwnPropertySymbols},33853:(e,t,n)=>{"use strict";var r=n(46518),o=n(64449);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isDisjointFrom",(function(e){return!e}))},{isDisjointFrom:o})},33983:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(10644).A},34164:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r(e[t]))&&(o&&(o+=" "),o+=n)}else for(n in e)e[n]&&(o&&(o+=" "),o+=n);return o}n.d(t,{A:()=>o});const o=function(){for(var e,t,n=0,o="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r(e))&&(o&&(o+=" "),o+=t);return o}},34376:(e,t,n)=>{"use strict";var r=n(22195);e.exports=Array.isArray||function(e){return"Array"===r(e)}},34477:(e,t,n)=>{"use strict";n.d(t,{A:()=>g});var r=n(96540),o=n(34164),i=n(49649),s=n(95548),a=n(57514),l=n(14921),u=n(74848),h=n(61626),c=n(28040),d=n(31355);const m=(0,n(96148).A)("MuiBox",["root"]),p=(0,c.A)(),f=function(e={}){const{themeId:t,defaultTheme:n,defaultClassName:h="MuiBox-root",generateClassName:c}=e,d=(0,i.Ay)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(s.A);return r.forwardRef((function(e,r){const i=(0,l.A)(n),{className:s,component:m="div",...p}=(0,a.A)(e);return(0,u.jsx)(d,{as:m,ref:r,className:(0,o.A)(s,c?c(h):h),theme:t&&i[t]||i,...p})}))}({themeId:d.A,defaultTheme:p,defaultClassName:m.root,generateClassName:h.A.generate}),g=f},34527:(e,t,n)=>{"use strict";var r=n(43724),o=n(34376),i=TypeError,s=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(o(e)&&!s(e,"length").writable)throw new i("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t}},34578:(e,t,n)=>{"use strict";function r(e){let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,Math.round(10*t)/1e3}n.d(t,{A:()=>r})},34647:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=new Map;function o(){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);return{register:function(e,n){t.set(e,n)},getItem:function(e){return t.get(e)},hasItem:function(e){return t.has(e)},getNames:function(){return[...t.keys()]},getValues:function(){return[...t.values()]}}}},34675:(e,t,n)=>{"use strict";n.d(t,{Y:()=>i});var r=n(95239),o=n(92182);const i={CELL_TYPE:"text",editor:r.t,renderer:o.F}},35031:(e,t,n)=>{"use strict";var r=n(97751),o=n(79504),i=n(38480),s=n(33717),a=n(28551),l=o([].concat);e.exports=r("Reflect","ownKeys")||function(e){var t=i.f(a(e)),n=s.f;return n?l(t,n(e)):t}},35370:(e,t,n)=>{"use strict";var r=n(26198);e.exports=function(e,t,n){for(var o=0,i=arguments.length>2?n:r(t),s=new e(i);i>o;)s[o]=t[o++];return s}},35610:(e,t,n)=>{"use strict";var r=n(91291),o=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?o(n+t,0):i(n,t)}},35917:(e,t,n)=>{"use strict";var r=n(43724),o=n(79039),i=n(4055);e.exports=!r&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},36289:(e,t,n)=>{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},36840:(e,t,n)=>{"use strict";var r=n(94901),o=n(24913),i=n(50283),s=n(39433);e.exports=function(e,t,n,a){a||(a={});var l=a.enumerable,u=void 0!==a.name?a.name:t;if(r(n)&&i(n,u,a),a.global)l?e[t]=n:s(t,n);else{try{a.unsafe?e[t]&&(l=!0):delete e[t]}catch(e){}l?e[t]=n:o.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},36955:(e,t,n)=>{"use strict";var r=n(92140),o=n(94901),i=n(22195),s=n(78227)("toStringTag"),a=Object,l="Arguments"===i(function(){return arguments}());e.exports=r?i:function(e){var t,n,r;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=a(e),s))?n:l?i(t):"Object"===(r=i(t))&&o(t.callee)?"Arguments":r}},37071:function(e,t,n){!function(e){"use strict";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("_");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}})}(n(95093))},37073:(e,t,n)=>{"use strict";n.d(t,{iz:()=>lt});var r,o,i={};n.r(i),n.d(i,{AbsPlugin:()=>$i,AddressPlugin:()=>zi,ArrayPlugin:()=>Gi,BitShiftPlugin:()=>Ki,BitwiseLogicOperationsPlugin:()=>Ji,BooleanPlugin:()=>Zi,CharPlugin:()=>es,CodePlugin:()=>ts,ComplexPlugin:()=>Tl,ConditionalAggregationPlugin:()=>aa,CountBlankPlugin:()=>ns,CountUniquePlugin:()=>rs,DateTimePlugin:()=>os,DegreesPlugin:()=>us,DeltaPlugin:()=>hs,ExpPlugin:()=>cs,FinancialPlugin:()=>ds,FormulaTextPlugin:()=>ws,HyperlinkPlugin:()=>vs,InformationPlugin:()=>_s,IsEvenPlugin:()=>bs,IsOddPlugin:()=>Ss,LogarithmPlugin:()=>Cs,LookupPlugin:()=>da,MathConstantsPlugin:()=>Ms,MathPlugin:()=>Cl,MatrixPlugin:()=>As,MedianPlugin:()=>Ns,ModuloPlugin:()=>Ls,NumericAggregationPlugin:()=>Is,PowerPlugin:()=>Ps,RadiansPlugin:()=>Hs,RadixConversionPlugin:()=>Ys,RandomPlugin:()=>Gs,RomanPlugin:()=>ma,RoundingPlugin:()=>Xs,SimpleArithmerticPlugin:()=>ga,SqrtPlugin:()=>qs,StatisticalAggregationPlugin:()=>Fl,StatisticalPlugin:()=>Sl,SumprodPlugin:()=>la,TextPlugin:()=>ua,TrigonometryPlugin:()=>ha}),function(e){e.RELATIVE="RELATIVE",e.ABSOLUTE="ABSOLUTE"}(r||(r={}));class s{constructor(e,t,n){this.type=e,this.col=t,this.sheet=n}static absolute(e,t){return new s(r.ABSOLUTE,e,t)}static relative(e,t){return new s(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 s(this.type,this.col+t,r)}shiftedByColumns(e){return new s(this.type,this.col+e,this.sheet)}toSimpleColumnAddress(e){const t=In(this,e);let n=this.col;return this.isColumnRelative()&&(n=e.col+this.col),Tn(t,n)}shiftRelativeDimensions(e,t){const n=this.isColumnRelative()?this.col+e:this.col;return new s(this.type,n,this.sheet)}shiftAbsoluteDimensions(e,t){const n=this.isColumnAbsolute()?this.col+e:this.col;return new s(this.type,n,this.sheet)}withSheet(e){return new s(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(Rn(t))return;const n=I(t.col);return`${this.type===r.ABSOLUTE?"$":""}${n}`}exceedsSheetSizeLimits(e){return this.col>=e}}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=In(this,e);let n=this.row;return this.isRowRelative()&&(n=e.row+this.row),En(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(!Mn(t))return`${this.type===r.ABSOLUTE?"$":""}${t.row+1}`}exceedsSheetSizeLimits(e){return this.row>=e}}!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"}(o||(o={}));class l{constructor(e,t,n,r){this.col=e,this.row=t,this.type=n,this.sheet=r}static fromColAndRow(e,t,n){return(e.isColumnAbsolute()&&t.isRowAbsolute()?l.absolute.bind(this):e.isColumnAbsolute()?l.absoluteCol.bind(this):t.isRowAbsolute()?l.absoluteRow.bind(this):l.relative.bind(this))(e.col,t.row,n)}static relative(e,t,n){return new l(e,t,o.CELL_REFERENCE_RELATIVE,n)}static absolute(e,t,n){return new l(e,t,o.CELL_REFERENCE_ABSOLUTE,n)}static absoluteCol(e,t,n){return new l(e,t,o.CELL_REFERENCE_ABSOLUTE_COL,n)}static absoluteRow(e,t,n){return new l(e,t,o.CELL_REFERENCE_ABSOLUTE_ROW,n)}toSimpleCellAddress(e){const t=In(this,e);return this.type===o.CELL_REFERENCE_ABSOLUTE?An(t,this.col,this.row):this.type===o.CELL_REFERENCE_ABSOLUTE_ROW?An(t,e.col+this.col,this.row):this.type===o.CELL_REFERENCE_ABSOLUTE_COL?An(t,this.col,e.row+this.row):An(t,e.col+this.col,e.row+this.row)}toColumnAddress(){const e=this.isColumnRelative()?r.RELATIVE:r.ABSOLUTE;return new s(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=In(this,e);let n=this.col;return this.isColumnRelative()&&(n+=e.col),Tn(t,n)}toSimpleRowAddress(e){const t=In(this,e);let n=this.row;return this.isRowRelative()&&(n+=e.row),En(t,n)}isRowAbsolute(){return this.type===o.CELL_REFERENCE_ABSOLUTE||this.type===o.CELL_REFERENCE_ABSOLUTE_ROW}isColumnAbsolute(){return this.type===o.CELL_REFERENCE_ABSOLUTE||this.type===o.CELL_REFERENCE_ABSOLUTE_COL}isColumnRelative(){return this.type===o.CELL_REFERENCE_RELATIVE||this.type===o.CELL_REFERENCE_ABSOLUTE_ROW}isRowRelative(){return this.type===o.CELL_REFERENCE_RELATIVE||this.type===o.CELL_REFERENCE_ABSOLUTE_COL}isAbsolute(){return this.type===o.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 Nn(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 o.CELL_REFERENCE_RELATIVE:return`${t}#${this.row}R${this.col}`;case o.CELL_REFERENCE_ABSOLUTE:return`${t}#${this.row}A${this.col}`;case o.CELL_REFERENCE_ABSOLUTE_COL:return`${t}#${this.row}AC${this.col}`;case o.CELL_REFERENCE_ABSOLUTE_ROW:return`${t}#${this.row}AR${this.col}`}}unparse(e){const t=this.toSimpleCellAddress(e);if(Nn(t))return;const n=I(t.col),r=this.type===o.CELL_REFERENCE_ABSOLUTE||this.type===o.CELL_REFERENCE_ABSOLUTE_ROW?"$":"";return`${this.type===o.CELL_REFERENCE_ABSOLUTE||this.type===o.CELL_REFERENCE_ABSOLUTE_COL?"$":""}${n}${r}${t.row+1}`}exceedsSheetSizeLimits(e,t){return this.row>=t||this.col>=e}}const u=":",h="$",c="A-Za-zÀ-ʯ",d=`${c}0-9_.`,m=`[${c}0-9_]+`,p=`(${m}|'(((?!').|'')*)')!`,f=`(${p})?\\${h}?[A-Za-z]+\\${h}?[0-9]+`,g=`(${p})?\\${h}?[A-Za-z]+`,y=`(${p})?\\${h}?[0-9]+`,w="[rR][0-9]*[cC][0-9]*",v=`(${f})[^${d}]`,_=`[${c}_][${d}]*`,b=["0","1","2","3","4","5","6","7","8","9"],S=[...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))),C=new RegExp(`^(${p})?(\\${h}?)([A-Za-z]+)(\\${h}?)([0-9]+)$`),E=new RegExp(`^(${p})?(\\${h}?)([A-Za-z]+)$`),M=new RegExp(`^(${p})?(\\${h}?)([0-9]+)$`),T=new RegExp(`^${m}$`),R=(e,t,n)=>{const r=C.exec(t),o=O(r[6]);let i=D(r,e);if(void 0===i)return;null===i&&(i=void 0);const s=Number(r[8])-1;return r[5]===h&&r[7]===h?l.absolute(o,s,i):r[5]===h?l.absoluteCol(o,s-n.row,i):r[7]===h?l.absoluteRow(o-n.col,s,i):l.relative(o-n.col,s-n.row,i)},A=(e,t,n)=>{const r=E.exec(t);let o=D(r,e);if(void 0===o)return;null===o&&(o=void 0);const i=O(r[6]);return r[5]===h?s.absolute(i,o):s.relative(i-n.col,o)},N=(e,t,n)=>{const r=M.exec(t);let o=D(r,e);if(void 0===o)return;null===o&&(o=void 0);const i=Number(r[6])-1;return r[5]===h?a.absolute(i,o):a.relative(i-n.row,o)},L=(e,t,n)=>{const r=C.exec(t);if(!r)return;const o=O(r[6]);let i=D(r,e);if(void 0===i)return;null===i&&(i=n);const s=Number(r[8])-1;return An(i,o,s)},x=(e,t,n)=>{const r=I(t.col),o=k(t.sheet,e);if(void 0!==o)return n!==t.sheet?`${o}!${r}${t.row+1}`:`${r}${t.row+1}`};function O(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 I(e){let t="";for(;e>=0;)t=String.fromCharCode(e%26+97)+t,e=Math.floor(e/26)-1;return t.toUpperCase()}function k(e,t){let n=t(e);if(void 0!==n)return T.test(n)?n:(n=n.replace(/'/g,"''"),`'${n}'`)}function D(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 P=n(42620);const H=(e,t)=>({type:e,message:t});var F,Y,V;!function(e){e.LexingError="LexingError",e.ParserError="ParsingError",e.StaticOffsetError="StaticOffsetError",e.StaticOffsetOutOfRangeError="StaticOffsetOutOfRangeError",e.RangeOffsetNotAllowed="RangeOffsetNotAllowed",e.InvalidRangeSize="InvalidRangeSize"}(F||(F={})),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"}(Y||(Y={})),function(e){e[e.RELATIVE=0]="RELATIVE",e[e.START_ABSOLUTE=1]="START_ABSOLUTE",e[e.BOTH_ABSOLUTE=2]="BOTH_ABSOLUTE"}(V||(V={}));const U=(e,t)=>({type:Y.CELL_REFERENCE,reference:e,leadingWhitespace:null==t?void 0:t.image}),B=(e,t,n,r)=>($(e,t,n),{type:Y.CELL_RANGE,start:e,end:t,sheetReferenceType:n,leadingWhitespace:r}),W=(e,t,n)=>({type:Y.ARRAY,args:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==n?void 0:n.image}),j=(e,t)=>({type:Y.ERROR,error:e,leadingWhitespace:null==t?void 0:t.image}),z=(e,t,n)=>({type:Y.ERROR_WITH_RAW_INPUT,error:t,rawInput:e,leadingWhitespace:null==n?void 0:n.image}),G=()=>({type:Y.ERROR,error:Cn.parsingError()});function $(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!==V.RELATIVE||void 0!==e.sheet&&n===V.RELATIVE)throw new Error("Sheet address inconsistent with sheet reference type")}function K(e,t){return(null!=t?t:"")+e}const X={[Y.PLUS_OP]:"+",[Y.MINUS_OP]:"-",[Y.TIMES_OP]:"*",[Y.DIV_OP]:"/",[Y.CONCATENATE_OP]:"&",[Y.POWER_OP]:"^",[Y.EQUALS_OP]:"=",[Y.NOT_EQUAL_OP]:"<>",[Y.GREATER_THAN_OP]:">",[Y.GREATER_THAN_OR_EQUAL_OP]:">=",[Y.LESS_THAN_OP]:"<",[Y.LESS_THAN_OR_EQUAL_OP]:"<="};class q{constructor(e){this.functionRegistry=e,this.cache=new Map}set(e,t){const n=((e,t,n,r)=>({ast:e,relativeDependencies:t,hasVolatileFunction:n,hasStructuralChangeFunction:r}))(t,Pe(t,this.functionRegistry),Q(t,this.functionRegistry.isFunctionVolatile),Q(t,this.functionRegistry.isFunctionDependentOnSheetStructureChange));return this.cache.set(e,n),n}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 Q=(e,t)=>{switch(e.type){case Y.EMPTY:case Y.NUMBER:case Y.STRING:case Y.ERROR:case Y.ERROR_WITH_RAW_INPUT:case Y.CELL_REFERENCE:case Y.CELL_RANGE:case Y.COLUMN_RANGE:case Y.ROW_RANGE:case Y.NAMED_EXPRESSION:return!1;case Y.PERCENT_OP:case Y.PLUS_UNARY_OP:case Y.MINUS_UNARY_OP:return Q(e.value,t);case Y.CONCATENATE_OP:case Y.EQUALS_OP:case Y.NOT_EQUAL_OP:case Y.LESS_THAN_OP:case Y.GREATER_THAN_OP:case Y.LESS_THAN_OR_EQUAL_OP:case Y.GREATER_THAN_OR_EQUAL_OP:case Y.MINUS_OP:case Y.PLUS_OP:case Y.TIMES_OP:case Y.DIV_OP:case Y.POWER_OP:return Q(e.left,t)||Q(e.right,t);case Y.PARENTHESIS:return Q(e.expression,t);case Y.FUNCTION_CALL:return!!t(e.procedureName)||e.args.some((e=>Q(e,t)));case Y.ARRAY:return e.args.some((e=>e.some((e=>Q(e,t)))))}};class J{}J.DistinctSigns="Distinct signs.",J.WrongArgNumber="Wrong number of arguments.",J.EmptyArg="Empty function argument.",J.EmptyArray="Empty array not allowed.",J.ArrayDimensions="Array dimensions are not compatible.",J.NoSpaceForArrayResult="No space for array result.",J.ValueSmall="Value too small.",J.ValueLarge="Value too large.",J.BadCriterion="Incorrect criterion.",J.RangeManySheets="Range spans more than one sheet.",J.CellRangeExpected="Cell range expected.",J.WrongDimension="Wrong range dimension.",J.ScalarExpected="Cell range not allowed.",J.NumberCoercion="Value cannot be coerced to number.",J.NumberExpected="Number argument expected.",J.IntegerExpected="Value needs to be an integer.",J.BadMode="Mode not recognized.",J.DateBounds="Date outside of bounds.",J.OutOfSheet="Resulting reference is out of the sheet.",J.WrongType="Wrong type of argument.",J.NaN="NaN or infinite value encountered.",J.EqualLength="Ranges need to be of equal length.",J.Negative="Value cannot be negative.",J.NotBinary="String does not represent a binary number.",J.NotOctal="String does not represent an octal number.",J.NotHex="String does not represent a hexadecimal number.",J.EndStartPeriod="End period needs to be at least start period.",J.CellRefExpected="Cell reference expected.",J.EmptyRange="Empty range not allowed.",J.BadRef="Address is not correct.",J.NumberRange="Number-only range expected.",J.ValueNotFound="Value not found.",J.ValueBaseLarge="Value in base too large.",J.ValueBaseSmall="Value in base too small.",J.ValueBaseLong="Value in base too long.",J.NegativeLength="Length cannot be negative.",J.PatternNotFound="Pattern not found.",J.OneValue="Needs at least one value.",J.TwoValues="Range needs to contain at least two elements.",J.ThreeValues="Range needs to contain at least three elements.",J.IndexBounds="Index out of bounds.",J.IndexLarge="Index too large.",J.Formula="Expected formula.",J.NegativeCount="Count cannot be negative.",J.ParseError="Parsing error.",J.SheetRef="Sheet does not exist.",J.PeriodLong="Period number cannot exceed life length.",J.InvalidDate="Invalid date.",J.BitshiftLong="Result of bitshift is too long.",J.EmptyString="Empty-string argument not allowed.",J.LengthBounds="Length out of bounds.",J.NegativeTime="Time cannot be negative.",J.NoDefault="No default option.",J.NoConditionMet="None of the conditions were met.",J.Selector="Selector cannot exceed the number of arguments.",J.StartEndDate="Start date needs to be earlier than end date.",J.IncorrectDateTime="String does not represent correct DateTime.",J.CharacterCodeBounds="Character code out of bounds.",J.NonZero="Argument cannot be 0.",J.LessThanOne="Argument cannot be less than 1.",J.WeekendString="Incorrect weekend bitmask string.",J.InvalidRoman="Invalid roman numeral.",J.WrongOrder="Wrong order of values.",J.ComplexNumberExpected="Complex number expected.",J.ShouldBeIorJ="Should be 'i' or 'j'.",J.SizeMismatch="Array dimensions mismatched.",J.FunctionName=e=>`Function name ${e} not recognized.`,J.NamedExpressionName=e=>`Named expression ${e} not recognized.`,J.LicenseKey=e=>`License key is ${e}.`;const Z=(0,P.createToken)({name:"AdditionOp",pattern:P.Lexer.NA}),ee=(0,P.createToken)({name:"PlusOp",pattern:/\+/,categories:Z}),te=(0,P.createToken)({name:"MinusOp",pattern:/-/,categories:Z}),ne=(0,P.createToken)({name:"MultiplicationOp",pattern:P.Lexer.NA}),re=(0,P.createToken)({name:"TimesOp",pattern:/\*/,categories:ne}),oe=(0,P.createToken)({name:"DivOp",pattern:/\//,categories:ne}),ie=(0,P.createToken)({name:"PowerOp",pattern:/\^/}),se=(0,P.createToken)({name:"PercentOp",pattern:/%/}),ae=(0,P.createToken)({name:"BooleanOp",pattern:P.Lexer.NA}),le=(0,P.createToken)({name:"EqualsOp",pattern:/=/,categories:ae}),ue=(0,P.createToken)({name:"NotEqualOp",pattern:/<>/,categories:ae}),he=(0,P.createToken)({name:"GreaterThanOp",pattern:/>/,categories:ae}),ce=(0,P.createToken)({name:"LessThanOp",pattern:/</,categories:ae}),de=(0,P.createToken)({name:"GreaterThanOrEqualOp",pattern:/>=/,categories:ae}),me=(0,P.createToken)({name:"LessThanOrEqualOp",pattern:/<=/,categories:ae}),pe=(0,P.createToken)({name:"ConcatenateOp",pattern:/&/}),fe=(0,P.createToken)({name:"LParen",pattern:/\(/}),ge=(0,P.createToken)({name:"RParen",pattern:/\)/}),ye=(0,P.createToken)({name:"ArrayLParen",pattern:/{/}),we=(0,P.createToken)({name:"ArrayRParen",pattern:/}/}),ve=(0,P.createToken)({name:"StringLiteral",pattern:/"([^"\\]*(\\.[^"\\]*)*)"/}),_e=(0,P.createToken)({name:"ErrorLiteral",pattern:/#[A-Za-z0-9\/]+[?!]?/}),be=(0,P.createToken)({name:"RangeSeparator",pattern:new RegExp(u)}),Se=(0,P.createToken)({name:"ColumnRange",pattern:new RegExp(`${g}${u}${g}`)}),Ce=(0,P.createToken)({name:"RowRange",pattern:new RegExp(`${y}${u}${y}`)}),Ee=(0,P.createToken)({name:"ProcedureName",pattern:new RegExp(`([${c}][${d}]*)\\(`)}),Me=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...S,...b,h,"'","_"],this.cellReferenceRegexp=new RegExp(v,"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)}},Te=(0,P.createToken)({name:"CellReference",pattern:Me.match.bind(Me),start_chars_hint:Me.POSSIBLE_START_CHARACTERS,line_breaks:!1}),Re=new class{constructor(){this.POSSIBLE_START_CHARACTERS=[...S,"_"],this.namedExpressionRegexp=new RegExp(_,"y"),this.r1c1CellRefRegexp=new RegExp(`^${w}$`)}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}},Ae=(0,P.createToken)({name:"NamedExpression",pattern:Re.match.bind(Re),start_chars_hint:Re.POSSIBLE_START_CHARACTERS,line_breaks:!1}),Ne=e=>{const t=e.translationPackage.getFunctionTranslation("OFFSET"),n=e.errorMapping,r=e.translationPackage.buildFunctionMapping(),o=new RegExp("standard"===e.ignoreWhiteSpace?"[ \\t\\n\\r]+":"\\s+"),i=(0,P.createToken)({name:"WhiteSpace",pattern:o}),s=(0,P.createToken)({name:"ArrayRowSep",pattern:e.arrayRowSeparator}),a=(0,P.createToken)({name:"ArrayColSep",pattern:e.arrayColumnSeparator}),l=(0,P.createToken)({name:"NumberLiteral",pattern:new RegExp(`(([${e.decimalSeparator}]\\d+)|(\\d+([${e.decimalSeparator}]\\d*)?))(e[+-]?\\d+)?`)}),u=(0,P.createToken)({name:"OffsetProcedureName",pattern:new RegExp(t,"i")});let h,c;return e.functionArgSeparator===e.arrayColumnSeparator?(h=a,c=[]):e.functionArgSeparator===e.arrayRowSeparator?(h=s,c=[]):(h=(0,P.createToken)({name:"ArgSeparator",pattern:e.functionArgSeparator}),c=[h]),{ArgSeparator:h,NumberLiteral:l,OffsetProcedureName:u,ArrayRowSeparator:s,ArrayColSeparator:a,WhiteSpace:i,allTokens:[i,ee,te,re,oe,ie,le,ue,se,de,me,he,ce,fe,ge,ye,we,u,Ee,be,...c,Se,Ce,l,ve,_e,pe,ae,Z,ne,Te,Ae,s,a],errorMapping:n,functionMapping:r,decimalSeparator:e.decimalSeparator,maxColumns:e.maxColumns,maxRows:e.maxRows}};class Le extends P.EmbeddedActionsParser{constructor(e,t){super(e.allTokens,{outputCst:!1,maxLookahead:7}),this.booleanExpressionOrEmpty=this.RULE("booleanExpressionOrEmpty",(()=>this.OR([{ALT:()=>this.SUBRULE(this.booleanExpression)},{ALT:(0,P.EMPTY_ALT)({type:Y.EMPTY,leadingWhitespace:void 0})}]))),this.procedureExpression=this.RULE("procedureExpression",(()=>{var e;const t=this.CONSUME(Ee),n=t.image.toUpperCase().slice(0,-1),r=null!==(e=this.lexerConfig.functionMapping[n])&&void 0!==e?e:n,o=[];let i=this.SUBRULE(this.booleanExpressionOrEmpty);this.MANY((()=>{var e;const t=this.CONSUME(this.lexerConfig.ArgSeparator);i.type===Y.EMPTY&&(i.leadingWhitespace=null===(e=t.leadingWhitespace)||void 0===e?void 0:e.image),o.push(i),i=this.SUBRULE2(this.booleanExpressionOrEmpty)})),o.push(i),1===o.length&&o[0].type===Y.EMPTY&&(o.length=0);const s=this.CONSUME(ge);return((e,t,n,r)=>({type:Y.FUNCTION_CALL,procedureName:e,args:t,leadingWhitespace:null==n?void 0:n.image,internalWhitespace:null==r?void 0:r.image,hyperlink:void 0}))(r,o,t.leadingWhitespace,s.leadingWhitespace)})),this.namedExpressionExpression=this.RULE("namedExpressionExpression",(()=>{const e=this.CONSUME(Ae);return t=e.image,n=e.leadingWhitespace,{type:Y.NAMED_EXPRESSION,expressionName:t,leadingWhitespace:null==n?void 0:n.image};var t,n})),this.offsetProcedureExpression=this.RULE("offsetProcedureExpression",(()=>{const e=[];return this.CONSUME(this.lexerConfig.OffsetProcedureName),this.CONSUME(fe),this.MANY_SEP({SEP:this.lexerConfig.ArgSeparator,DEF:()=>{e.push(this.SUBRULE(this.booleanExpression))}}),this.CONSUME(ge),this.handleOffsetHeuristic(e)})),this.columnRangeExpression=this.RULE("columnRangeExpression",(()=>{const e=this.CONSUME(Se),[t,n]=e.image.split(":"),r=this.ACTION((()=>A(this.sheetMapping,t,this.formulaAddress))),o=this.ACTION((()=>A(this.sheetMapping,n,this.formulaAddress)));if(void 0===r||void 0===o)return j(new Cn(sn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns)||o.exceedsSheetSizeLimits(this.lexerConfig.maxColumns))return z(e.image,new Cn(sn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==o.sheet)return this.parsingError(F.ParserError,"Malformed range expression");const{firstEnd:i,secondEnd:s,sheetRefType:a}=Le.fixSheetIdsForRangeEnds(r,o);return l=i,u=s,h=a,c=e.leadingWhitespace,$(l,u,h),{type:Y.COLUMN_RANGE,start:l,end:u,sheetReferenceType:h,leadingWhitespace:null==c?void 0:c.image};var l,u,h,c})),this.rowRangeExpression=this.RULE("rowRangeExpression",(()=>{const e=this.CONSUME(Ce),[t,n]=e.image.split(":"),r=this.ACTION((()=>N(this.sheetMapping,t,this.formulaAddress))),o=this.ACTION((()=>N(this.sheetMapping,n,this.formulaAddress)));if(void 0===r||void 0===o)return j(new Cn(sn.REF));if(r.exceedsSheetSizeLimits(this.lexerConfig.maxRows)||o.exceedsSheetSizeLimits(this.lexerConfig.maxRows))return z(e.image,new Cn(sn.NAME),e.leadingWhitespace);if(void 0===r.sheet&&void 0!==o.sheet)return this.parsingError(F.ParserError,"Malformed range expression");const{firstEnd:i,secondEnd:s,sheetRefType:a}=Le.fixSheetIdsForRangeEnds(r,o);return l=i,u=s,h=a,c=e.leadingWhitespace,$(l,u,h),{type:Y.ROW_RANGE,start:l,end:u,sheetReferenceType:h,leadingWhitespace:null==c?void 0:c.image};var l,u,h,c})),this.cellReference=this.RULE("cellReference",(()=>{const e=this.CONSUME(Te),t=this.ACTION((()=>R(this.sheetMapping,e.image,this.formulaAddress)));return void 0===t?z(e.image,new Cn(sn.REF),e.leadingWhitespace):t.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?z(e.image,new Cn(sn.NAME),e.leadingWhitespace):U(t,e.leadingWhitespace)})),this.endRangeReference=this.RULE("endRangeReference",(e=>{var t;const n=this.CONSUME(Te),r=this.ACTION((()=>R(this.sheetMapping,e.image,this.formulaAddress))),o=this.ACTION((()=>R(this.sheetMapping,n.image,this.formulaAddress)));return void 0===r||void 0===o?this.ACTION((()=>z(`${e.image}:${n.image}`,new Cn(sn.REF),e.leadingWhitespace))):r.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)||o.exceedsSheetSizeLimits(this.lexerConfig.maxColumns,this.lexerConfig.maxRows)?this.ACTION((()=>z(`${e.image}:${n.image}`,new Cn(sn.NAME),e.leadingWhitespace))):this.buildCellRange(r,o,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((()=>R(this.sheetMapping,e.image,this.formulaAddress)));return void 0===r?j(new Cn(sn.REF)):n.type===Y.CELL_REFERENCE?this.buildCellRange(r,n.reference,null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image):this.parsingError(F.RangeOffsetNotAllowed,"Range offset not allowed here")}}]))),this.cellRangeExpression=this.RULE("cellRangeExpression",(()=>{const e=this.CONSUME(Te);return this.CONSUME2(be),this.SUBRULE(this.endOfRangeExpression,{ARGS:[e]})})),this.endRangeWithOffsetStartReference=this.RULE("endRangeWithOffsetStartReference",(e=>{const t=this.CONSUME(Te),n=this.ACTION((()=>R(this.sheetMapping,t.image,this.formulaAddress)));return void 0===n?this.ACTION((()=>j(new Cn(sn.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===Y.CELL_REFERENCE?this.buildCellRange(e.reference,t.reference,e.leadingWhitespace):this.parsingError(F.RangeOffsetNotAllowed,"Range offset not allowed here")}}]))),this.offsetExpression=this.RULE("offsetExpression",(()=>{const e=this.SUBRULE(this.offsetProcedureExpression);let t;return this.OPTION((()=>{this.CONSUME(be),t=e.type===Y.CELL_RANGE?this.parsingError(F.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))}}])})),W(e)})),this.parenthesisExpression=this.RULE("parenthesisExpression",(()=>{const e=this.CONSUME(fe),t=this.SUBRULE(this.booleanExpression),n=this.CONSUME(ge);return((e,t,n)=>({type:Y.PARENTHESIS,expression:e,leadingWhitespace:null==t?void 0:t.image,internalWhitespace:null==n?void 0:n.image}))(t,e.leadingWhitespace,n.leadingWhitespace)})),this.arrayExpression=this.RULE("arrayExpression",(()=>this.OR([{ALT:()=>{const e=this.CONSUME(ye),t=this.SUBRULE(this.insideArrayExpression),n=this.CONSUME(we);return W(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 t=this.numericStringToNumber(e.image),n=e.leadingWhitespace,{type:Y.NUMBER,value:t,leadingWhitespace:null==n?void 0:n.image};var t,n}},{ALT:()=>(e=>{var t;return{type:Y.STRING,value:e.image.slice(1,-1),leadingWhitespace:null===(t=e.leadingWhitespace)||void 0===t?void 0:t.image}})(this.CONSUME(ve))},{ALT:()=>{const e=this.CONSUME(_e),t=e.image.toUpperCase(),n=this.lexerConfig.errorMapping[t];return n?j(new Cn(n),e.leadingWhitespace):this.parsingError(F.ParserError,"Unknown error literal")}}])})),this.rightUnaryOpAtomicExpression=this.RULE("rightUnaryOpAtomicExpression",(()=>{const e=this.SUBRULE(this.positiveAtomicExpression),t=this.OPTION((()=>this.CONSUME(se)));return t?(n=e,r=t.leadingWhitespace,{type:Y.PERCENT_OP,value:n,leadingWhitespace:null==r?void 0:r.image}):e;var n,r})),this.atomicExpression=this.RULE("atomicExpression",(()=>this.OR([{ALT:()=>{const e=this.CONSUME(Z),t=this.SUBRULE(this.atomicExpression);return(0,P.tokenMatcher)(e,ee)?((e,t)=>({type:Y.PLUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}))(t,e.leadingWhitespace):(0,P.tokenMatcher)(e,te)?((e,t)=>({type:Y.MINUS_UNARY_OP,value:e,leadingWhitespace:null==t?void 0:t.image}))(t,e.leadingWhitespace):(this.customParsingError=H(F.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(ie),n=this.SUBRULE2(this.atomicExpression);var r,o,i;(0,P.tokenMatcher)(t,ie)?(r=e,o=n,i=t.leadingWhitespace,e={type:Y.POWER_OP,left:r,right:o,leadingWhitespace:null==i?void 0:i.image}):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(ne),n=this.SUBRULE2(this.powerExpression);var r,o,i;(0,P.tokenMatcher)(t,re)?(r=e,o=n,i=t.leadingWhitespace,e={type:Y.TIMES_OP,left:r,right:o,leadingWhitespace:null==i?void 0:i.image}):(0,P.tokenMatcher)(t,oe)?e=((e,t,n)=>({type:Y.DIV_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(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(Z),n=this.SUBRULE2(this.multiplicationExpression);var r,o,i;(0,P.tokenMatcher)(t,ee)?(r=e,o=n,i=t.leadingWhitespace,e={type:Y.PLUS_OP,left:r,right:o,leadingWhitespace:null==i?void 0:i.image}):(0,P.tokenMatcher)(t,te)?e=((e,t,n)=>({type:Y.MINUS_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(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(pe),n=this.SUBRULE2(this.additionExpression);var r,o,i;r=e,o=n,i=t.leadingWhitespace,e={type:Y.CONCATENATE_OP,left:r,right:o,leadingWhitespace:null==i?void 0:i.image}})),e})),this.booleanExpression=this.RULE("booleanExpression",(()=>{let e=this.SUBRULE(this.concatenateExpression);return this.MANY((()=>{const t=this.CONSUME(ae),n=this.SUBRULE2(this.concatenateExpression);var r,o,i;(0,P.tokenMatcher)(t,le)?(r=e,o=n,i=t.leadingWhitespace,e={type:Y.EQUALS_OP,left:r,right:o,leadingWhitespace:null==i?void 0:i.image}):(0,P.tokenMatcher)(t,ue)?e=((e,t,n)=>({type:Y.NOT_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(e,n,t.leadingWhitespace):(0,P.tokenMatcher)(t,he)?e=((e,t,n)=>({type:Y.GREATER_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(e,n,t.leadingWhitespace):(0,P.tokenMatcher)(t,ce)?e=((e,t,n)=>({type:Y.LESS_THAN_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(e,n,t.leadingWhitespace):(0,P.tokenMatcher)(t,de)?e=((e,t,n)=>({type:Y.GREATER_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(e,n,t.leadingWhitespace):(0,P.tokenMatcher)(t,me)?e=((e,t,n)=>({type:Y.LESS_THAN_OR_EQUAL_OP,left:e,right:t,leadingWhitespace:null==n?void 0:n.image}))(e,n,t.leadingWhitespace):this.ACTION((()=>{throw Error("Operator not supported")}))})),e})),this.formula=this.RULE("formula",(()=>(this.CONSUME(le),this.SUBRULE(this.booleanExpression)))),this.lexerConfig=e,this.sheetMapping=t,this.formulaAddress=An(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:F.ParserError,message:e.message})))),r.length>0&&(n=G()),{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(F.ParserError,"Malformed range expression");const{firstEnd:r,secondEnd:o,sheetRefType:i}=Le.fixSheetIdsForRangeEnds(e,t);return B(r,o,i,n)}static fixSheetIdsForRangeEnds(e,t){const n=Le.rangeSheetReferenceType(e.sheet,t.sheet);return{firstEnd:e,secondEnd:void 0!==e.sheet&&void 0===t.sheet?t.withSheet(e.sheet):t,sheetRefType:n}}handleOffsetHeuristic(e){const t=e[0];if(t.type!==Y.CELL_REFERENCE)return this.parsingError(F.StaticOffsetError,"First argument to OFFSET is not a reference");const n=e[1];let r;if(n.type===Y.NUMBER&&Number.isInteger(n.value))r=n.value;else if(n.type===Y.PLUS_UNARY_OP&&n.value.type===Y.NUMBER&&Number.isInteger(n.value.value))r=n.value.value;else{if(n.type!==Y.MINUS_UNARY_OP||n.value.type!==Y.NUMBER||!Number.isInteger(n.value.value))return this.parsingError(F.StaticOffsetError,"Second argument to OFFSET is not a static number");r=-n.value.value}const i=e[2];let s;if(i.type===Y.NUMBER&&Number.isInteger(i.value))s=i.value;else if(i.type===Y.PLUS_UNARY_OP&&i.value.type===Y.NUMBER&&Number.isInteger(i.value.value))s=i.value.value;else{if(i.type!==Y.MINUS_UNARY_OP||i.value.type!==Y.NUMBER||!Number.isInteger(i.value.value))return this.parsingError(F.StaticOffsetError,"Third argument to OFFSET is not a static number");s=-i.value.value}const a=e[3];let u;if(void 0===a)u=1;else{if(a.type!==Y.NUMBER)return this.parsingError(F.StaticOffsetError,"Fourth argument to OFFSET is not a static number");if(u=a.value,u<1)return this.parsingError(F.StaticOffsetError,"Fourth argument to OFFSET is too small number");if(!Number.isInteger(u))return this.parsingError(F.StaticOffsetError,"Fourth argument to OFFSET is not integer")}const h=e[4];let c;if(void 0===h)c=1;else{if(h.type!==Y.NUMBER)return this.parsingError(F.StaticOffsetError,"Fifth argument to OFFSET is not a static number");if(c=h.value,c<1)return this.parsingError(F.StaticOffsetError,"Fifth argument to OFFSET is too small number");if(!Number.isInteger(c))return this.parsingError(F.StaticOffsetError,"Fifth argument to OFFSET is not integer")}const d=new l(t.reference.col+s,t.reference.row+r,t.reference.type);let m=d.col,p=d.row;if(t.reference.type!==o.CELL_REFERENCE_RELATIVE&&t.reference.type!==o.CELL_REFERENCE_ABSOLUTE_COL||(p+=this.formulaAddress.row),t.reference.type!==o.CELL_REFERENCE_RELATIVE&&t.reference.type!==o.CELL_REFERENCE_ABSOLUTE_ROW||(m+=this.formulaAddress.col),m<0||p<0)return j(new Cn(sn.REF,J.OutOfSheet));if(1===c&&1===u)return U(d);{const e=new l(d.col+c-1,d.row+u-1,d.type);return B(d,e,V.RELATIVE)}}parsingError(e,t){return this.customParsingError=H(e,t),G()}static rangeSheetReferenceType(e,t){return void 0===e?V.RELATIVE:void 0===t?V.START_ABSOLUTE:V.BOTH_ABSOLUTE}}class xe{constructor(e){this.lexerConfig=e,this.lexer=new P.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 xe.filterTokensByNeighbors(e,((e,t,n)=>((0,P.tokenMatcher)(e,Te)||(0,P.tokenMatcher)(e,be))&&(0,P.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&((0,P.tokenMatcher)(n,Te)||(0,P.tokenMatcher)(n,be))))}skipWhitespacesBeforeArgSeparators(e){return xe.filterTokensByNeighbors(e,((e,t,n)=>!(0,P.tokenMatcher)(e,this.lexerConfig.ArgSeparator)&&(0,P.tokenMatcher)(t,this.lexerConfig.WhiteSpace)&&(0,P.tokenMatcher)(n,this.lexerConfig.ArgSeparator)))}static filterTokensByNeighbors(e,t){if(e.length<3)return e;let n=0;const r=[e[n++]];for(;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&&(0,P.tokenMatcher)(e[e.length-1],this.lexerConfig.WhiteSpace)&&e.pop(),e}}class Oe{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 Y.EMPTY:return K("",e.leadingWhitespace);case Y.NUMBER:return K(Ie(e.value,this.config.decimalSeparator),e.leadingWhitespace);case Y.STRING:return K('"'+e.value+'"',e.leadingWhitespace);case Y.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)+"("+n+K(")",e.internalWhitespace);return K(r,e.leadingWhitespace)}case Y.NAMED_EXPRESSION:return K((null===(n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.sheet))||void 0===n?void 0:n.displayName)||e.expressionName,e.leadingWhitespace);case Y.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(sn.REF),K(n,e.leadingWhitespace)}case Y.COLUMN_RANGE:case Y.ROW_RANGE:case Y.CELL_RANGE:return K(this.formatRange(e,t),e.leadingWhitespace);case Y.PLUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return K("+",e.leadingWhitespace)+n}case Y.MINUS_UNARY_OP:{const n=this.unparseAst(e.value,t);return K("-",e.leadingWhitespace)+n}case Y.PERCENT_OP:return this.unparseAst(e.value,t)+K("%",e.leadingWhitespace);case Y.ERROR:return K(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:sn.ERROR),e.leadingWhitespace);case Y.ERROR_WITH_RAW_INPUT:return K(e.rawInput,e.leadingWhitespace);case Y.PARENTHESIS:{const n="("+this.unparseAst(e.expression,t)+K(")",e.internalWhitespace);return K(n,e.leadingWhitespace)}case Y.ARRAY:{const n="{"+e.args.map((e=>e.map((e=>this.unparseAst(e,t))).join(this.config.arrayColumnSeparator))).join(this.config.arrayRowSeparator)+K("}",e.internalWhitespace);return K(n,e.leadingWhitespace)}default:{const n=this.unparseAst(e.left,t),r=this.unparseAst(e.right,t);return n+K(X[e.type],e.leadingWhitespace)+r}}}unparseSheetName(e){const t=k(e,this.sheetMappingFn);if(void 0===t)throw new lt(e);return t}formatRange(e,t){let n="",r="";void 0!==e.start.sheet&&e.sheetReferenceType!==V.RELATIVE&&(n=this.unparseSheetName(e.start.sheet)+"!"),void 0!==e.end.sheet&&e.sheetReferenceType===V.BOTH_ABSOLUTE&&(r=this.unparseSheetName(e.end.sheet)+"!");const o=e.start.unparse(t),i=e.end.unparse(t);return void 0===o||void 0===i?this.config.translationPackage.getErrorTranslation(sn.REF):`${n}${o}:${r}${i}`}}function Ie(e,t){return e.toString().replace(".",t)}class ke{constructor(e,t,n){this.config=e,this.functionRegistry=t,this.sheetMapping=n,this.statsCacheUsed=0,this.lexerConfig=Ne(e),this.lexer=new xe(this.lexerConfig),this.formulaParser=new Le(this.lexerConfig,this.sheetMapping),this.cache=new q(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:F.LexingError,message:e.message})));return{ast:G(),errors:e,hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]}}const r=this.computeHashFromTokens(n.tokens,t);let o=this.cache.get(r);if(void 0!==o)++this.statsCacheUsed;else{const e=this.bindWhitespacesToTokens(n.tokens),i=this.formulaParser.parseFromTokens(e,t);if(i.errors.length>0)return Object.assign(Object.assign({},i),{hasVolatileFunction:!1,hasStructuralChangeFunction:!1,dependencies:[]});o=this.cache.set(r,i.ast)}const{ast:i,hasVolatileFunction:s,hasStructuralChangeFunction:a}=o,l=this.convertReversedRangesToRegularRanges(i);return{ast:l,errors:[],hasVolatileFunction:s,hasStructuralChangeFunction:a,dependencies:Pe(l,this.functionRegistry)}}convertReversedRangesToRegularRanges(e){switch(e.type){case Y.EMPTY:case Y.NUMBER:case Y.STRING:case Y.ERROR:case Y.ERROR_WITH_RAW_INPUT:case Y.CELL_REFERENCE:case Y.NAMED_EXPRESSION:return e;case Y.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 Y.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 Y.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 Y.PERCENT_OP:case Y.PLUS_UNARY_OP:case Y.MINUS_UNARY_OP:{const t=this.convertReversedRangesToRegularRanges(e.value);return Object.assign(Object.assign({},e),{value:t})}case Y.CONCATENATE_OP:case Y.EQUALS_OP:case Y.NOT_EQUAL_OP:case Y.LESS_THAN_OP:case Y.GREATER_THAN_OP:case Y.LESS_THAN_OR_EQUAL_OP:case Y.GREATER_THAN_OR_EQUAL_OP:case Y.MINUS_OP:case Y.PLUS_OP:case Y.TIMES_OP:case Y.DIV_OP:case Y.POWER_OP:{const t=this.convertReversedRangesToRegularRanges(e.left),n=this.convertReversedRangesToRegularRanges(e.right);return Object.assign(Object.assign({},e),{left:t,right:n})}case Y.PARENTHESIS:{const t=this.convertReversedRangesToRegularRanges(e.expression);return Object.assign(Object.assign({},e),{expression:t})}case Y.FUNCTION_CALL:{const t=e.args.map((e=>this.convertReversedRangesToRegularRanges(e)));return Object.assign(Object.assign({},e),{args:t})}case Y.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,o]=n.map((e=>e.toColumnAddress())).sort(s.compareByAbsoluteAddress(this.formulaAddress)),[i,u]=n.map((e=>e.toRowAddress())).sort(a.compareByAbsoluteAddress(this.formulaAddress)),[h,c]=n.map((e=>e.sheet)).sort(ke.compareSheetIds.bind(this));return{start:l.fromColAndRow(r,i,h),end:l.fromColAndRow(o,u,c)}}orderColumnRangeEnds(e,t){const n=[e,t],[r,o]=n.sort(s.compareByAbsoluteAddress(this.formulaAddress)),[i,a]=n.map((e=>e.sheet)).sort(ke.compareSheetIds.bind(this));return{start:new s(r.type,r.col,i),end:new s(o.type,o.col,a)}}orderRowRangeEnds(e,t){const n=[e,t],[r,o]=n.sort(a.compareByAbsoluteAddress(this.formulaAddress)),[i,s]=n.map((e=>e.sheet)).sort(ke.compareSheetIds.bind(this));return{start:new a(r.type,r.row,i),end:new a(o.type,o.row,s)}}static compareSheetIds(e,t){return(e=null!=e?e:1/0)-(null!=t?t:1/0)}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:o}=t;return{ast:e,errors:[],hasVolatileFunction:n,hasStructuralChangeFunction:r,dependencies:o}}}computeHashFromTokens(e,t){var n;let r="",o=0;for(;o<e.length;){const i=e[o];if((0,P.tokenMatcher)(i,Te)){const e=R(this.sheetMapping,i.image,t);r=void 0===e?r.concat(i.image):r.concat(e.hash(!0))}else if((0,P.tokenMatcher)(i,Ee)){const e=i.image.toUpperCase().slice(0,-1),t=null!==(n=this.lexerConfig.functionMapping[e])&&void 0!==n?n:e;r=r.concat(t,"(")}else if((0,P.tokenMatcher)(i,Se)){const[e,n]=i.image.split(":"),o=A(this.sheetMapping,e,t),s=A(this.sheetMapping,n,t);r=void 0===o||void 0===s?r.concat("!REF"):r.concat(o.hash(!0),":",s.hash(!0))}else if((0,P.tokenMatcher)(i,Ce)){const[e,n]=i.image.split(":"),o=N(this.sheetMapping,e,t),s=N(this.sheetMapping,n,t);r=void 0===o||void 0===s?r.concat("!REF"):r.concat(o.hash(!0),":",s.hash(!0))}else r=r.concat(i.image);o++}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 Y.EMPTY:return e.leadingWhitespace||"";case Y.NUMBER:return K(Ie(e.value,this.config.decimalSeparator),e.leadingWhitespace);case Y.STRING:return K('"'+e.value+'"',e.leadingWhitespace);case Y.NAMED_EXPRESSION:return K(e.expressionName,e.leadingWhitespace);case Y.FUNCTION_CALL:{const t=e.args.map((e=>this.computeHashOfAstNode(e))).join(this.config.functionArgSeparator),n=e.procedureName+"("+t+K(")",e.internalWhitespace);return K(n,e.leadingWhitespace)}case Y.CELL_REFERENCE:return K(e.reference.hash(!0),e.leadingWhitespace);case Y.COLUMN_RANGE:case Y.ROW_RANGE:case Y.CELL_RANGE:return K(e.start.hash(e.sheetReferenceType!==V.RELATIVE)+":"+e.end.hash(e.sheetReferenceType===V.BOTH_ABSOLUTE),e.leadingWhitespace);case Y.MINUS_UNARY_OP:return K("-"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case Y.PLUS_UNARY_OP:return K("+"+this.computeHashOfAstNode(e.value),e.leadingWhitespace);case Y.PERCENT_OP:return this.computeHashOfAstNode(e.value)+K("%",e.leadingWhitespace);case Y.ERROR:return K(this.config.translationPackage.getErrorTranslation(e.error?e.error.type:sn.ERROR),e.leadingWhitespace);case Y.ERROR_WITH_RAW_INPUT:return K(e.rawInput,e.leadingWhitespace);case Y.ARRAY:return K("{"+e.args.map((e=>e.map((e=>this.computeHashOfAstNode(e))).join(","))).join(";")+K("}",e.internalWhitespace),e.leadingWhitespace);case Y.PARENTHESIS:{const t="("+this.computeHashOfAstNode(e.expression)+K(")",e.internalWhitespace);return K(t,e.leadingWhitespace)}default:return this.computeHashOfAstNode(e.left)+K(X[e.type],e.leadingWhitespace)+this.computeHashOfAstNode(e.right)}}bindWhitespacesToTokens(e){const t=[],n=e[0];(0,P.tokenMatcher)(n,this.lexerConfig.WhiteSpace)||t.push(n);for(let n=1;n<e.length;++n){const r=e[n];if((0,P.tokenMatcher)(r,this.lexerConfig.WhiteSpace))continue;const o=e[n-1];(0,P.tokenMatcher)(o,this.lexerConfig.WhiteSpace)&&(r.leadingWhitespace=o),t.push(r)}return t}tokenizeFormula(e){return this.lexer.tokenizeFormula(e)}}const De=(e,t,n,r)=>{switch(e.type){case Y.EMPTY:case Y.NUMBER:case Y.STRING:case Y.ERROR:return;case Y.NAMED_EXPRESSION:return void(r&&n.push(new Ue(e.expressionName)));case Y.CELL_REFERENCE:return void(r&&n.push(new He(e.reference)));case Y.CELL_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new Fe(e.start,e.end)));case Y.COLUMN_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new Ye(e.start,e.end)));case Y.ROW_RANGE:return void(r&&e.start.sheet===e.end.sheet&&n.push(new Ve(e.start,e.end)));case Y.PERCENT_OP:case Y.PLUS_UNARY_OP:case Y.MINUS_UNARY_OP:return void De(e.value,t,n,!0);case Y.CONCATENATE_OP:case Y.EQUALS_OP:case Y.NOT_EQUAL_OP:case Y.LESS_THAN_OP:case Y.GREATER_THAN_OP:case Y.LESS_THAN_OR_EQUAL_OP:case Y.GREATER_THAN_OR_EQUAL_OP:case Y.MINUS_OP:case Y.PLUS_OP:case Y.TIMES_OP:case Y.DIV_OP:case Y.POWER_OP:return De(e.left,t,n,!0),void De(e.right,t,n,!0);case Y.PARENTHESIS:return void De(e.expression,t,n,r);case Y.FUNCTION_CALL:{const r=!t.doesFunctionNeedArgumentToBeComputed(e.procedureName);return void e.args.forEach((e=>De(e,t,n,r)))}}},Pe=(e,t)=>{const n=new Array;return De(e,t,n,!0),n};class He{constructor(e){this.dependency=e}absolutize(e){return this.dependency.toSimpleCellAddress(e)}}class Fe{constructor(e,t){this.start=e,this.end=t}absolutize(e){return new Hn(this.start.toSimpleCellAddress(e),this.end.toSimpleCellAddress(e))}}class Ye{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleColumnAddress(e),n=this.end.toSimpleColumnAddress(e);return new Fn(t.sheet,t.col,n.col)}}class Ve{constructor(e,t){this.start=e,this.end=t}absolutize(e){const t=this.start.toSimpleRowAddress(e),n=this.end.toSimpleRowAddress(e);return new Yn(t.sheet,t.row,n.row)}}class Ue{constructor(e){this.name=e}absolutize(e){return this}}const Be=(e,t)=>e.map((e=>e.absolutize(t))),We=Symbol("Empty value");function je(e){return e instanceof ze?e.val:e}class ze{constructor(e,t){this.val=e,this.format=t}fromNumber(e){return new this.constructor(e)}}function Ge(e,t){if("number"==typeof e)return t;{const n=e.fromNumber(t);return n.format=e.format,n}}class $e extends ze{getDetailedType(){return Ze.NUMBER_DATE}}class Ke extends ze{getDetailedType(){return Ze.NUMBER_CURRENCY}}class Xe extends ze{getDetailedType(){return Ze.NUMBER_TIME}}class qe extends ze{getDetailedType(){return Ze.NUMBER_DATETIME}}class Qe extends ze{getDetailedType(){return Ze.NUMBER_PERCENT}}function Je(e){return"number"==typeof e||e instanceof ze}var Ze,et;function tt(e){return e instanceof ze?{type:e.getDetailedType(),format:e.format}:{type:Ze.NUMBER_RAW}}!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"}(Ze||(Ze={}));class nt{constructor(e,t,n,r){this._data=e,this.range=t,this.dependencyGraph=n,this._hasOnlyNumbers=r,this.size=void 0===e?new ur(t.effectiveWidth(n),t.effectiveHeight(n)):new ur(e[0].length,e.length)}get data(){return this.ensureThatComputed(),this._data}static fromRange(e,t,n){return new nt(e,t,n,!0)}static onlyNumbers(e){return new nt(e,void 0,void 0,!0)}static onlyValues(e){return new nt(e,void 0,void 0,void 0)}static onlyRange(e,t){return new nt(void 0,e,t,void 0)}static fromScalar(e){return new nt([[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 An(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],An(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 nt?(this._hasOnlyNumbers=!1,new Cn(sn.VALUE,J.ScalarExpected)):(Je(t)||(this._hasOnlyNumbers=!1),t)})))}}class rt{constructor(){this.changes=new Map}static empty(){return new rt}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 nt)for(const t of n.effectiveAddressesFromData(e))this.changes.delete(xn(t));this.changes.set(xn(e),t)}addInterpreterValue(e,t,n){this.add(t,{address:t,value:e,oldValue:n})}}class ot{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 ot(e,t,t+n-1)}static fromRowStartAndEnd(e,t,n){return new ot(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 ot(this.sheet,t,n)}firstRow(){return new ot(this.sheet,this.rowStart,this.rowStart)}}class it{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 it(e,t,t+n-1)}static fromColumnStartAndEnd(e,t,n){return new it(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 it(this.sheet,t,n)}firstColumn(){return new it(this.sheet,this.columnStart,this.columnStart)}}!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"}(et||(et={}));class st{constructor(){this.stats=new Map([[et.CRITERION_FUNCTION_FULL_CACHE_USED,0],[et.CRITERION_FUNCTION_PARTIAL_CACHE_USED,0]]),this.startTimes=new Map}incrementCriterionFunctionFullCacheUsed(){var e;const t=(null!==(e=this.stats.get(et.CRITERION_FUNCTION_FULL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(et.CRITERION_FUNCTION_FULL_CACHE_USED,t)}incrementCriterionFunctionPartialCacheUsed(){var e;const t=(null!==(e=this.stats.get(et.CRITERION_FUNCTION_PARTIAL_CACHE_USED))&&void 0!==e?e:0)+1;this.stats.set(et.CRITERION_FUNCTION_PARTIAL_CACHE_USED,t)}reset(){this.stats.clear(),this.startTimes.clear(),this.stats.set(et.CRITERION_FUNCTION_FULL_CACHE_USED,0),this.stats.set(et.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 o=null!==(t=this.stats.get(e))&&void 0!==t?t:0;o+=n-r,this.stats.set(e,o),this.startTimes.delete(e)}}measure(e,t){this.start(e);const n=t();return this.end(e),n}snapshot(){return new Map(this.stats)}}class at extends st{incrementCriterionFunctionFullCacheUsed(){}incrementCriterionFunctionPartialCacheUsed(){}start(e){}end(e){}}class lt extends Error{constructor(e){super(`There's no sheet with id = ${e}`)}}class ut extends Error{constructor(e){super(`There's no sheet with name '${e}'`)}}class ht extends Error{constructor(e){super(`Sheet with name ${e} already exists`)}}class ct extends Error{constructor(){super("Sheet size limit exceeded")}}class dt extends Error{constructor(){super("This is not a formula")}}class mt extends Error{constructor(e){super(`Address (row = ${e.row}, col = ${e.col}) is invalid`)}}class pt extends Error{constructor(e){super(`Invalid arguments, expected ${e}`)}}class ft extends Error{constructor(e,t){super(`Sheets ${e} and ${t} are not equal.`)}}class gt extends Error{constructor(e){super(`Name of Named Expression '${e}' is already present`)}}class yt extends Error{constructor(e){super(`Name of Named Expression '${e}' is invalid`)}}class wt extends Error{constructor(e){super(`Named Expression '${e}' does not exist`)}}class vt extends Error{constructor(){super("There is no operation to undo")}}class _t extends Error{constructor(){super("There is no operation to redo")}}class bt extends Error{constructor(){super("There is nothing to paste")}}function St(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 Ct extends Error{constructor(e){super(`Unable to parse value: ${JSON.stringify(e,St,4)}`)}}class Et extends Error{constructor(e,t){super(`Expected value of type: ${e} for config parameter: ${t}`)}}class Mt extends Error{constructor(e){super(`Config parameter ${e} cannot be empty.`)}}class Tt extends Error{constructor(e,t){super(`Config parameter ${e} should be at least ${t}`)}}class Rt extends Error{constructor(e,t){super(`Config parameter ${e} should be at most ${t}`)}}class At extends Error{constructor(e,t){super(`Expected one of ${e} for config parameter: ${t}`)}}class Nt extends Error{constructor(){super("Computations are suspended")}}class Lt extends Error{constructor(e){super(`Translation for ${e} is missing in the translation package you're using.`)}}class xt extends Error{constructor(e){super(`Cannot register translation for function with id: ${e}`)}}class Ot extends Error{constructor(){super("Language not registered.")}}class It extends Error{constructor(){super("Language already registered.")}}class kt extends Error{static functionNotDeclaredInPlugin(e,t){return new kt(`Function with id ${e} not declared in plugin ${t}`)}static functionMethodNotFound(e,t){return new kt(`Function method ${e} not found in plugin ${t}`)}}class Dt extends Error{static cannotRegisterFunctionWithId(e){return new Dt(`Cannot register function with id ${e}`)}static cannotUnregisterFunctionWithId(e){return new Dt(`Cannot unregister function with id ${e}`)}static cannotUnregisterProtectedPlugin(){return new Dt("Cannot unregister protected plugin")}}class Pt extends Error{constructor(){super("Cannot perform this operation, source location has an array inside.")}}class Ht extends Error{constructor(){super("Cannot perform this operation, target location has an array inside.")}}class Ft extends Error{constructor(){super("Relative addresses not allowed in named expressions.")}}class Yt extends Error{constructor(e,t){super(`Alias id ${e} in plugin ${t} already defined as a function or alias.`)}}class Vt{constructor(e){this.policy=e,this.mapping=new Map}getCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new lt(e.sheet);return t.getCell(e)}fetchCell(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new lt(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 lt(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:o}=t,i=this.policy.call(o);this.addSheet(e,new i(r,n))}getCellValue(e){const t=this.getCell(e);return void 0===t?We:t instanceof Gt?t.getArrayCellValue(e):t.getCellValue()}getRawValue(e){const t=this.getCell(e);return t instanceof fn?t.getValues().rawValue:t instanceof Gt?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 lt(e);return t.getHeight()}getWidth(e){const t=this.mapping.get(e);if(!t)throw new lt(e);return t.getWidth()}addRows(e,t,n){const r=this.mapping.get(e);if(void 0===r)throw new lt(e);r.addRows(t,n)}removeRows(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new lt(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 lt(e);r.addColumns(t,n)}removeColumns(e){const t=this.mapping.get(e.sheet);if(void 0===t)throw new lt(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 lt(e);yield*t.getEntries(e)}}class Ut{constructor(){this.arrayMapping=new Map}getArray(e){const t=this.getArrayByCorner(e.start);if(null==t?void 0:t.getRange().sameAs(e))return t}getArrayByCorner(e){return this.arrayMapping.get(xn(e))}setArray(e,t){this.arrayMapping.set(xn(e.start),t)}removeArray(e){"string"==typeof e?this.arrayMapping.delete(e):this.arrayMapping.delete(xn(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 o=r.getRange();return t<=o.start.row?[o.shifted(0,n),r]:void 0}))}moveArrayVerticesAfterColumnByColumns(e,t,n){this.updateArrayVerticesInSheet(e,((e,r)=>{const o=r.getRange();return t<=o.start.col?[o.shifted(n,0),r]:void 0}))}updateArrayVerticesInSheet(e,t){const n=Array();for(const[r,o]of this.arrayMapping.entries()){if(o.sheet!==e)continue;const i=t(r,o);void 0!==i&&(this.removeArray(r),n.push(i))}n.forEach((([e,t])=>{this.setArray(e,t)}))}}class Bt{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 Wt{constructor(e){if(this.size=new ur(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 Wt(e instanceof nt?e.data:[[e]])}simpleRangeValue(){return nt.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(We));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 t of this.array)t.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(We));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 jt{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}}class zt{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 $t(e,t,r):new Gt(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 Gt extends zt{constructor(e,t,n,r=0){super(e,t,r),n.isRef?this.array=new jt(new Cn(sn.REF,J.NoSpaceForArrayResult),ur.error()):this.array=new Bt(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 Cn)return this.setErrorValue(e),e;const t=Wt.fromInterpreterValue(e);return t.resize(this.array.size),this.array=t,e}getCellValue(){if(this.array instanceof Bt)throw Error("Array not computed yet.");return this.array.simpleRangeValue()}valueOrUndef(){if(!(this.array instanceof Bt))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(e){return new Cn(sn.REF)}}getArrayCellRawValue(e){const t=this.getArrayCellValue(e);return t instanceof Cn||t===We?void 0:je(t)}setArrayCellValue(e,t){const n=e.col-this.cellAddress.col,r=e.row-this.cellAddress.row;this.array instanceof Wt&&this.array.set(n,r,t)}setNoSpace(){return this.array=new jt(new Cn(sn.SPILL,J.NoSpaceForArrayResult),ur.error()),this.getCellValue()}getRange(){return Hn.spanFrom(this.cellAddress,this.width,this.height)}getRangeOrUndef(){return Hn.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 Bt)}columnsFromArray(){return it.fromNumberOfColumns(this.cellAddress.sheet,this.cellAddress.col,this.width)}rowsFromArray(){return ot.fromNumberOfRows(this.cellAddress.sheet,this.cellAddress.row,this.height)}ensureRecentData(e){}isLeftCorner(e){return kn(this.cellAddress,e)}setErrorValue(e){this.array=new jt(e,this.array.size)}}class $t extends zt{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}}class Kt{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}}const Xt=(e,t,n,r,o)=>{if(t instanceof Kt){const e=t.range.intersectionWith(n);return void 0!==e?Array.from(e.addresses(o)):[]}let i,s;return t instanceof zt?(i=t.getFormula(r),s=t.getAddress(r),Pe(i,e).filter((e=>e instanceof He)).map((e=>e.dependency.toSimpleCellAddress(s))).filter((e=>n.addressInRange(e)))):[]};var qt;!function(e){e[e.ON_STACK=0]="ON_STACK",e[e.PROCESSED=1]="PROCESSED",e[e.POPPED=2]="POPPED"}(qt||(qt={}));class Qt{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]=qt.ON_STACK;const t=[e],n=[];for(;t.length>0;){const e=t[t.length-1];switch(this.nodeStatus[e]){case qt.ON_STACK:this.handleOnStack(e,n,t);break;case qt.PROCESSED:this.handleProcessed(e,n,t);break;case qt.POPPED:t.pop()}}}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]=qt.ON_STACK)})),this.nodeStatus[e]=qt.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]=qt.POPPED}postprocess(e,t,n){const r=[];e.forEach((e=>{r[e]=!0}));const o=[],i=[];return this.order.reverse(),this.order.forEach((e=>{const s=this.getAdjacentNodeIds(e);this.sccNonSingletons[e]||s.includes(e)?(i.push(this.nodesSparseArray[e]),t(this.nodesSparseArray[e]),s.forEach((e=>r[e]=!0))):(o.push(this.nodesSparseArray[e]),r[e]&&n(this.nodesSparseArray[e])&&s.forEach((e=>r[e]=!0)))})),{sorted:o,cycled:i}}}class Jt{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}}class Zt{constructor(e){this.dependencyQuery=e,this.nodesSparseArray=[],this.edgesSparseArray=[],this.nodesIds=new Map,this.dirtyAndVolatileNodeIds=new Jt({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 o=this.edgesSparseArray[n].indexOf(r);if(-1===o)throw new Error("Edge does not exist");delete this.edgesSparseArray[n][o]}removeEdgeIfExists(e,t){const n=this.getNodeId(e),r=this.getNodeId(t);if(void 0===n)return;if(void 0===r)return;const o=this.edgesSparseArray[n].indexOf(r);-1!==o&&delete this.edgesSparseArray[n][o]}topSortWithScc(){return this.getTopSortedWithSccSubgraphFrom(this.getNodes(),(()=>!0),(()=>{}))}getTopSortedWithSccSubgraphFrom(e,t,n){const r=new Qt(this.nodesSparseArray,this.edgesSparseArray),o=e.map((e=>this.getNodeId(e))).filter((e=>void 0!==e));return r.getTopSortedWithSccSubgraphFrom(o,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}`)}}class en{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=tn(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=tn(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=tn(e,t);return null==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(),o=Array(),i=e.sheet;for(const[s,a]of this.entriesFromSheet(e.sheet)){const l=a.range;e.start<=t(a.range.end)&&(l.removeSpan(e),l.shouldBeRemoved()?(this.removeByKey(i,s),n.push(a)):r.push([s,a]),o.push(a))}const s=[];r.sort(((e,n)=>nn(e[1],n[1],t)));for(const[e,t]of r){const n=tn((a=t.range).start,a.end);if(n===e)continue;const r=this.getByKey(i,n);this.removeByKey(i,e),void 0!==r&&t!=r?s.push([r,t]):this.setRange(t)}var a;return{verticesToRemove:n,verticesToMerge:s,verticesWithChangedSize:o}}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,((o,i)=>e.containsRange(i.range)?(i.range.shiftByColumns(t),i.range.shiftByRows(n),i.range.moveToSheet(r),{changedSize:!1,vertex:i}):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=An(e.end.sheet,e.end.col,e.end.row-1),n=this.getRange(e.start,t);if(void 0!==n)return{smallerRangeVertex:n,restRange:Hn.fromSimpleCellAddresses(An(e.start.sheet,e.start.col,e.end.row),e.end)}}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,o]of this.entriesFromSheet(e)){const i=t(r,o);void 0!==i&&(this.removeByKey(e,r),n.push(i))}return n.forEach((e=>{this.setRange(e.vertex)})),{verticesWithChangedSize:n.filter((e=>e.changedSize)).map((e=>e.vertex))}}}function tn(e,t){return`${e.col},${e.row},${t.col},${t.row}`}const nn=(e,t,n)=>{const r=n(e.range.start),o=n(e.range.start);return r===o?n(e.range.end)-n(t.range.end):r-o};class rn{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 Lt(`functions.${e}`);return t}getMaybeFunctionTranslation(e){return this.functions[e]}getErrorTranslation(e){if(e===sn.LIC)return`#${sn.LIC}!`;const t=this.errors[e];if(void 0===t)throw new Lt(`errors.${e}`);return t}getUITranslation(e){const t=this.ui[e];if(void 0===t)throw new Lt(`ui.${e}`);return t}checkUI(){for(const e of Object.values(on))if(!(e in this.ui))throw new Lt(`ui.${e}`)}checkErrors(){for(const e of Object.values(sn))if(!(e in this.errors)&&e!==sn.LIC)throw new Lt(`errors.${e}`)}checkFunctionTranslations(e){const t=new Set(Object.getOwnPropertyNames(e));for(const e of Object.getOwnPropertyNames(this._protectedTranslations))if(t.has(e))throw new xt(e)}}var on,sn,an,ln,un;function hn(e){return e.toLowerCase()}!function(e){e.NEW_SHEET_PREFIX="NEW_SHEET_PREFIX"}(on||(on={}));class cn{constructor(e,t){this.id=e,this.displayName=t}get canonicalName(){return hn(this.displayName)}}class dn{constructor(e){this.languages=e,this.mappingFromCanonicalName=new Map,this.mappingFromId=new Map,this.lastSheetId=-1,this.fetch=e=>{const t=this.mappingFromCanonicalName.get(hn(e));if(void 0===t)throw new ut(e);return t.id},this.get=e=>{var t;return null===(t=this.mappingFromCanonicalName.get(hn(e)))||void 0===t?void 0:t.id},this.fetchDisplayName=e=>this.fetchSheetById(e).displayName,this.sheetNamePrefix=e.getUITranslation(on.NEW_SHEET_PREFIX)}addSheet(e=`${this.sheetNamePrefix}${this.lastSheetId+2}`){const t=hn(e);if(this.mappingFromCanonicalName.has(t))throw new ht(e);this.lastSheetId++;const n=new cn(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(hn(e))}renameSheet(e,t){const n=this.fetchSheetById(e),r=n.displayName;if(r===t)return;const o=this.mappingFromCanonicalName.get(hn(t));if(void 0!==o&&o.id!==n.id)throw new ht(t);const i=n.canonicalName;return this.mappingFromCanonicalName.delete(i),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 lt(e);return t}}class mn{constructor(e,t,n,r,o,i,s,a){this.addressMapping=e,this.rangeMapping=t,this.sheetMapping=n,this.arrayMapping=r,this.stats=o,this.lazilyTransformingAstService=i,this.functionRegistry=s,this.namedExpressions=a,this.changes=rt.empty(),this.dependencyQueryAddresses=e=>{if(e instanceof Kt)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 Ue?this.namedExpressions.namedExpressionOrPlaceholder(t.name,e.sheet).address:On(t)?t:Pn(t.start,t.end)))}return[]}},this.dependencyQueryVertices=e=>{if(e instanceof Kt)return this.rangeDependencyQuery(e);{const t=this.formulaDependencyQuery(e);if(void 0!==t){const[e,n]=t;return n.map((t=>{if(t instanceof Hn)return[t.start,this.rangeMapping.fetchRange(t.start,t.end)];if(t instanceof Ue){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 o;void 0!==n&&this.graph.adjacentNodes(n).has(e)?(o=r,t.push([new Hn(n.start,n.end),n])):o=e.range;for(const e of o.addresses(this)){const n=this.addressMapping.getCell(e);void 0!==n&&t.push([e,n])}return t},this.formulaDependencyQuery=e=>{let t,n;if(!(e instanceof zt))return;n=e.getAddress(this.lazilyTransformingAstService),t=e.getFormula(this.lazilyTransformingAstService);const r=Pe(t,this.functionRegistry);return[n,Be(r,n)]},this.graph=new Zt(this.dependencyQueryVertices)}static buildEmpty(e,t,n,r,o){return new mn(new Vt(t.chooseAddressMappingPolicy),new en,new dn(t.translationPackage),new Ut,o,e,n,r)}setFormulaToCell(e,t,n,r,o,i){const s=zt.fromAst(t,e,r,this.lazilyTransformingAstService.version());return this.exchangeOrAddFormulaVertex(s),this.processCellDependencies(n,s),this.graph.markNodeAsDirty(s),o&&this.markAsVolatile(s),i&&this.markAsDependentOnStructureChange(s),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 Gt&&this.arrayMapping.removeArray(n.getRange()),n instanceof fn)n.getValues().rawValue!==t.rawValue&&(n.setValues(t),this.graph.markNodeAsDirty(n));else{const r=new fn(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 rt.empty();if(this.graph.adjacentNodes(t).size>0){const n=new pn;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 Hn){const t=e;let r=this.getRange(t.start,t.end);void 0===r&&(r=new Kt(t),this.rangeMapping.setRange(r)),this.graph.addNodeAndReturnId(r);const o=this.graph.getNodeId(r);t.isFinite()||this.graph.markNodeAsInfiniteRange(o);const{smallerRangeVertex:i,restRange:s}=this.rangeMapping.findSmallerRange(t);if(void 0!==i){if(this.graph.addEdge(i,o),r.bruteForce){r.bruteForce=!1;for(const e of t.addresses(this))this.graph.removeEdge(this.fetchCell(e),o)}}else r.bruteForce=!0;const a=this.arrayMapping.getArray(s);if(void 0!==a)this.graph.addEdge(a,o);else for(const e of s.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:t,o)}this.graph.addEdge(o,n),t.isFinite()&&this.correctInfiniteRangesDependenciesByRangeVertex(r)}else if(e instanceof Ue){const r=t.getAddress(this.lazilyTransformingAstService).sheet,{vertex:o,id:i}=this.fetchNamedExpressionVertex(e.name,r);this.graph.addEdge(null!=i?i:o,n)}else{const{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=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 pn,r=this.graph.addNodeAndReturnId(n);return this.addressMapping.setCell(e,n),{vertex:n,id:r}}removeRows(e){this.stats.measure(et.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 Gt){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}})),this.stats.measure(et.ADJUSTING_ADDRESS_MAPPING,(()=>{this.addressMapping.removeRows(e)}));const t=this.stats.measure(et.ADJUSTING_RANGES,(()=>{const t=this.truncateRanges(e,(e=>e.row));return this.getArrayVerticesRelatedToRanges(t)}));return this.stats.measure(et.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(et.ADJUSTING_RANGES,(()=>{const t=this.rangeMapping.removeRangesInSheet(e);for(const e of t)this.removeVertex(e);this.stats.measure(et.ADJUSTING_ADDRESS_MAPPING,(()=>{this.addressMapping.removeSheet(e)}))}))}clearSheet(e){const t=new Set;for(const[n,r]of this.addressMapping.sheetEntries(e))r instanceof Gt?t.add(r):this.setCellEmpty(n);for(const e of t.values())this.setArrayEmpty(e);this.addStructuralNodesToChangeSet()}removeColumns(e){this.stats.measure(et.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 Gt){if(!n.isLeftCorner(t))continue;this.shrinkArrayToCorner(n),this.arrayMapping.removeArray(n.getRange())}this.removeVertex(n)}})),this.stats.measure(et.ADJUSTING_ADDRESS_MAPPING,(()=>{this.addressMapping.removeColumns(e)}));const t=this.stats.measure(et.ADJUSTING_RANGES,(()=>{const t=this.truncateRanges(e,(e=>e.col));return this.getArrayVerticesRelatedToRanges(t)}));return this.stats.measure(et.ADJUSTING_ARRAY_MAPPING,(()=>this.fixArraysAfterRemovingColumns(e.sheet,e.columnStart,e.numberOfColumns))),this.addStructuralNodesToChangeSet(),{affectedArrays:t,contentChanges:this.getAndClearContentChanges()}}addRows(e){this.stats.measure(et.ADJUSTING_ADDRESS_MAPPING,(()=>{this.addressMapping.addRows(e.sheet,e.rowStart,e.numberOfRows)}));const t=this.stats.measure(et.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(et.ADJUSTING_ARRAY_MAPPING,(()=>{this.fixArraysAfterAddingRow(e.sheet,e.rowStart,e.numberOfRows)}));for(const t of this.addressMapping.verticesFromRowsSpan(e))this.graph.markNodeAsDirty(t);return this.addStructuralNodesToChangeSet(),{affectedArrays:t}}addColumns(e){this.stats.measure(et.ADJUSTING_ADDRESS_MAPPING,(()=>{this.addressMapping.addColumns(e.sheet,e.columnStart,e.numberOfColumns)}));const t=this.stats.measure(et.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(et.ADJUSTING_ARRAY_MAPPING,(()=>this.fixArraysAfterAddingColumn(e.sheet,e.columnStart,e.numberOfColumns)));for(const t of this.addressMapping.verticesFromColumnsSpan(e))this.graph.markNodeAsDirty(t);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 pn)&&t!==e)return!1}return!0}moveCells(e,t,n,r){for(const o of e.addressesWithDirection(t,n,this)){const i=An(r,o.col+t,o.row+n);let s=this.addressMapping.getCell(o);const a=this.addressMapping.getCell(i);if(this.addressMapping.removeCell(o),void 0!==s){let t;this.graph.markNodeAsDirty(s),this.addressMapping.setCell(i,s);for(const n of this.graph.adjacentNodes(s))n instanceof Kt&&!e.containsRange(n.range)&&(t=null!=t?t:this.fetchCellOrCreateEmpty(o).vertex,this.graph.addEdge(t,n),this.graph.removeEdge(s,n));t&&(this.graph.markNodeAsDirty(t),this.addressMapping.setCell(o,t))}if(void 0!==a){void 0===s&&this.addressMapping.removeCell(i);for(const e of this.graph.adjacentNodes(a))s=null!=s?s:this.fetchCellOrCreateEmpty(i).vertex,this.graph.addEdge(s,e),this.graph.markNodeAsDirty(s);this.removeVertex(a)}}for(const t of this.rangeMapping.rangeVerticesContainedInRange(e))for(const n of this.graph.adjacentNodes(t))if(n instanceof Kt&&!e.containsRange(n.range)){this.graph.removeEdge(t,n);for(const e of t.range.addresses(this)){const{vertex:t,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:t,n),this.addressMapping.setCell(e,t),this.graph.markNodeAsDirty(t)}}this.rangeMapping.moveRangesInsideSourceRange(e,t,n,r)}setArrayEmpty(e){const t=Hn.spanFrom(e.getAddress(this.lazilyTransformingAstService),e.width,e.height),n=this.graph.adjacentNodes(e);for(const e of t.addresses(this))this.addressMapping.removeCell(e);for(const t of n.values()){const n=Xt(this.functionRegistry,t,e.getRange(),this.lazilyTransformingAstService,this);for(const e of n){const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=r?r:n,t)}n.length>0&&this.graph.markNodeAsDirty(t)}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 Gt&&(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 nt?new Cn(sn.VALUE,J.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 $t&&e.ensureRecentData(this.lazilyTransformingAstService)}*rawValuesFromRange(e){for(const t of e.addresses(this)){const e=this.getScalarValue(t);e!==We&&(yield[je(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 zt?this.formulaDirectDependenciesToArray(t,e):this.rangeDirectDependenciesToArray(t,e);let r=!1;for(const[o,i]of n)e.isLeftCorner(o)&&(r=!0),this.graph.addEdge(i,t),this.graph.markNodeAsDirty(i);r||this.graph.removeEdge(e,t)}this.graph.markNodeAsDirty(e)}isArrayInternalCell(e){const t=this.getCell(e);return t instanceof Gt&&!t.isLeftCorner(e)}getAndClearContentChanges(){const e=this.changes;return this.changes=rt.empty(),e}getAdjacentNodesAddresses(e){const t=this.graph.adjacentNodes(e),n=[];return t.forEach((e=>{const t=e;t instanceof Kt?n.push(Pn(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),o=null!=r?r:this.graph.getNodeId(n);t.forEach((({id:e})=>{this.graph.addEdge(o,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 Gt&&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?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 Cn(sn.REF),n,t):(this.addressMapping.removeCell(n),this.changes.addChange(We,n,t)):this.changes.addChange(We,n,t)}}*formulaDirectDependenciesToArray(e,t){var n;const[,r]=null!==(n=this.formulaDependencyQuery(e))&&void 0!==n?n:[];if(void 0!==r)for(const e of r)if(!(e instanceof Ue||e instanceof Hn)&&t.getRange().addressInRange(e)){const t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}*rangeDirectDependenciesToArray(e,t){const{restRange:n}=this.rangeMapping.findSmallerRange(e.range);for(const e of n.addresses(this))if(t.getRange().addressInRange(e)){const t=this.fetchCellOrCreateEmpty(e).vertex;yield[e,t]}}*adjacentArrayVertices(e){const t=this.graph.adjacentNodes(e);for(const e of t)(e instanceof zt||e instanceof Kt)&&(yield e)}addStructuralNodesToChangeSet(){this.graph.markChangingWithStructureNodesAsDirty()}fixRangesWhenAddingRows(e,t,n){const r=Array.from(this.rangeMapping.rangesInSheet(e));for(const e of r)if(e.range.includesRow(t+n))if(e.bruteForce){const r=e.range.rangeWithSameWidth(t,n);for(const t of r.addresses(this)){const{vertex:n,id:r}=this.fetchCellOrCreateEmpty(t);this.graph.addEdge(null!=r?r:n,e)}}else{let t=e,n=this.rangeMapping.findSmallerRange(t.range);if(void 0!==n.smallerRangeVertex)continue;for(;void 0===n.smallerRangeVertex;){const e=new Kt(Hn.spanFrom(t.range.start,t.range.width(),t.range.height()-1));this.rangeMapping.setRange(e),this.graph.addNodeAndReturnId(e);const r=new Hn(An(t.range.start.sheet,t.range.start.col,t.range.end.row),t.range.end);this.addAllFromRange(r,t),this.graph.addEdge(e,t),t=e,n=this.rangeMapping.findSmallerRange(t.range)}this.graph.addEdge(n.smallerRangeVertex,t),this.addAllFromRange(n.restRange,t),this.graph.removeEdge(n.smallerRangeVertex,e)}}addAllFromRange(e,t){for(const n of e.addresses(this)){const{vertex:e,id:r}=this.fetchCellOrCreateEmpty(n);this.graph.addEdge(null!=r?r:e,t)}}fixRangesWhenAddingColumns(e,t,n){for(const r of this.rangeMapping.rangesInSheet(e))if(r.range.includesColumn(t+n)){let o;o=r.bruteForce?r.range.rangeWithSameHeight(t,n):Hn.spanFrom(An(e,t,r.range.end.row),n,1);for(const e of o.addresses(this)){const{vertex:t,id:n}=this.fetchCellOrCreateEmpty(e);this.graph.addEdge(null!=n?n:t,r)}}}exchangeOrAddFormulaVertex(e){const t=e.getAddress(this.lazilyTransformingAstService),n=Hn.spanFrom(t,e.width,e.height),r=this.shrinkPossibleArrayAndGetCell(t);if(e instanceof Gt&&this.setArray(n,e),this.exchangeOrAddGraphNode(r,e),this.addressMapping.setCell(t,e),e instanceof Gt){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 t of n.addresses(this))this.addressMapping.setCell(t,e)}setAddressMappingForArrayVertex(e,t){if(this.addressMapping.setCell(t,e),!(e instanceof Gt))return;const n=Hn.spanFromOrUndef(t,e.width,e.height);if(void 0!==n&&(this.setArray(n,e),this.isThereSpaceForArray(e)))for(const t of n.addresses(this))this.addressMapping.setCell(t,e)}truncateRanges(e,t){const{verticesToRemove:n,verticesToMerge:r,verticesWithChangedSize:o}=this.rangeMapping.truncateRanges(e,t);for(const[e,t]of r)this.mergeRangeVertices(e,t);for(const e of n)this.removeVertexAndCleanupDependencies(e);return o}fixArraysAfterAddingRow(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInRows(ot.fromRowStartAndEnd(e,t-1,t-1))){const o=r.getRange();for(let i=o.start.col;i<=o.end.col;++i)for(let s=t;s<=o.end.row;++s){const t=An(e,i,s),o=An(e,i,s+n),a=r.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(We,o,a)}}}fixArraysAfterRemovingRows(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterRowByRows(e,t,-n),!(t<=0))for(const[,n]of this.arrayMapping.arraysInRows(ot.fromRowStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(n))for(const e of n.getRange().addresses(this))this.addressMapping.setCell(e,n);else this.setNoSpaceIfArray(n)}fixArraysAfterAddingColumn(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,n),!(t<=0))for(const[,r]of this.arrayMapping.arraysInCols(it.fromColumnStartAndEnd(e,t-1,t-1))){const o=r.getRange();for(let i=o.start.row;i<=o.end.row;++i)for(let s=t;s<=o.end.col;++s){const t=An(e,s,i),o=An(e,s+n,i),a=r.getArrayCellValue(t);this.addressMapping.moveCell(o,t),this.changes.addChange(We,o,a)}}}fixArraysAfterRemovingColumns(e,t,n){if(this.arrayMapping.moveArrayVerticesAfterColumnByColumns(e,t,-n),!(t<=0))for(const[,n]of this.arrayMapping.arraysInCols(it.fromColumnStartAndEnd(e,t-1,t-1)))if(this.isThereSpaceForArray(n))for(const e of n.getRange().addresses(this))this.addressMapping.setCell(e,n);else this.setNoSpaceIfArray(n)}shrinkPossibleArrayAndGetCell(e){const t=this.getCell(e);return t instanceof Gt?(this.setNoSpaceIfArray(t),this.getCell(e)):t}setNoSpaceIfArray(e){e instanceof Gt&&(this.shrinkArrayToCorner(e),e.setNoSpace())}removeVertex(e){this.removeVertexAndCleanupDependencies(e),e instanceof Kt&&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));for(;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 Kt||r instanceof pn)&&this.graph.removeNode(r).forEach((e=>t.add(e))),r instanceof Kt?this.rangeMapping.removeRange(r):r instanceof pn&&this.addressMapping.removeCell(n))}}}class pn{constructor(){}getCellValue(){return We}}class fn{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}}class gn{constructor(e,t){this.errors=e,this.rawInput=t}getCellValue(){const e=this.errors.map((e=>e.message)).find((e=>e));return Cn.parsingError(e)}getFormula(){return this.rawInput}}class yn{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(((o,i)=>{i>=e&&(r.set(i+t,o),n.delete(i))})),r.forEach(((e,t)=>{n.set(t,e)}))})),this.height+=t}addColumns(e,t){const n=new Map;this.mapping.forEach(((r,o)=>{o>=e&&(n.set(o+t,r),this.mapping.delete(o))})),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,o)=>{o>=e.rowStart&&(t.delete(o),o>e.rowEnd&&n.set(o-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,o]of n)yield[An(e,t,r),o]}*verticesFromColumn(e){const t=this.mapping.get(e);if(void 0!==t)for(const[e,n]of t)yield n}*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 o=n.get(r);void 0!==o&&(yield[An(e.sheet,t,r),o])}}*entriesFromColumnsSpan(e){for(const t of e.columns()){const n=this.mapping.get(t);if(void 0!==n)for(const[r,o]of n.entries())yield[An(e.sheet,t,r),o]}}*vertices(){for(const[e,t]of this.mapping)for(const[e,n]of t)void 0!==n&&(yield n)}}class wn{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),this.mapping[e.row]||(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 e=0;e<t;e++)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 t=0;t<this.height;t++)void 0!==this.mapping[t]&&this.mapping[t].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[An(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[An(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[An(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]}}!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"}(sn||(sn={})),function(e){e.FORMULA="FORMULA",e.VALUE="VALUE",e.ARRAY="ARRAY",e.EMPTY="EMPTY",e.ARRAYFORMULA="ARRAYFORMULA"}(an||(an={})),function(e){e.EMPTY="EMPTY",e.NUMBER="NUMBER",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.ERROR="ERROR"}(ln||(ln={})),function(e){e.NUMBER="NUMBER"}(un||(un={}));const vn=Object.assign(Object.assign({},ln),un),_n=Object.assign(Object.assign({},ln),Ze),bn=e=>{switch(e){case vn.EMPTY:return 0;case vn.NUMBER:return 1;case vn.STRING:return 2;case vn.BOOLEAN:return 3;case vn.ERROR:return 4}throw new Error("Cell value not computed")},Sn=e=>{if(e===We)return vn.EMPTY;if(e instanceof Cn||e instanceof nt)return vn.ERROR;if("string"==typeof e)return vn.STRING;if(Je(e))return vn.NUMBER;if("boolean"==typeof e)return vn.BOOLEAN;throw new Error("Cell value not computed")};class Cn{constructor(e,t,n){this.type=e,this.message=t,this.root=n}static parsingError(e){return new Cn(sn.ERROR,`${J.ParseError}${e?" "+e:""}`)}attachRootVertex(e){return void 0===this.root?new Cn(this.type,this.message,e):this}}const En=(e,t)=>({sheet:e,row:t}),Mn=e=>e.row<0,Tn=(e,t)=>({sheet:e,col:t}),Rn=e=>e.col<0,An=(e,t,n)=>({sheet:e,col:t,row:n}),Nn=e=>e.col<0||e.row<0,Ln=(e,t,n,r)=>An(t,e.col+n,e.row+r),xn=e=>`${e.sheet},${e.row},${e.col}`;function On(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 In=(e,t)=>{var n;return null!==(n=e.sheet)&&void 0!==n?n:t.sheet},kn=(e,t)=>e.sheet===t.sheet&&e.col===t.col&&e.row===t.row;function Dn(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"start"in e&&On(e.start)&&"end"in e&&On(e.end)}const Pn=(e,t)=>({start:e,end:t});class Hn{constructor(e,t){if(e.sheet!==t.sheet)throw new ft(e.sheet,t.sheet);this.start=An(e.sheet,e.col,e.row),this.end=An(t.sheet,t.col,t.row)}get sheet(){return this.start.sheet}static fromSimpleCellAddresses(e,t){if(e.sheet!==t.sheet)throw new ft(e.sheet,t.sheet);const n=t.col-e.col,r=t.row-e.row;return Number.isFinite(r)&&Number.isFinite(n)?new Hn(e,t):Number.isFinite(r)?new Yn(e.sheet,e.row,t.row):new Fn(e.sheet,e.col,t.col)}static fromAst(e,t){return e.type===Y.CELL_RANGE?Hn.fromCellRange(e,t):e.type===Y.COLUMN_RANGE?Fn.fromColumnRange(e,t):Yn.fromRowRangeAst(e,t)}static fromAstOrUndef(e,t){try{return Hn.fromAst(e,t)}catch(e){return}}static fromCellRange(e,t){return new Hn(e.start.toSimpleCellAddress(t),e.end.toSimpleCellAddress(t))}static spanFrom(e,t,n){const r=Hn.spanFromOrUndef(e,t,n);if(void 0===r)throw new Error("AbsoluteCellRange: Wrong range size");return r}static spanFromOrUndef(e,t,n){if(!Number.isFinite(t)&&Number.isFinite(n)){if(0!==e.col)return;return new Yn(e.sheet,e.row,e.row+n-1)}if(!Number.isFinite(n)&&Number.isFinite(t)){if(0!==e.row)return;return new Fn(e.sheet,e.col,e.col+t-1)}if(Number.isFinite(n)&&Number.isFinite(t))return new Hn(e,An(e.sheet,e.col+t-1,e.row+n-1))}static fromCoordinates(e,t,n,r,o){return new Hn(An(e,t,n),An(e,r,o))}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),o=Math.min(this.end.col,e.end.col);return t>n||r>o?void 0:new Hn(An(this.sheet,r,t),An(this.sheet,o,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 Hn.spanFrom(An(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 ot?this.removeRows(e.start,e.end):this.removeColumns(e.start,e.end)}shouldBeRemoved(){return this.width()<=0||this.height()<=0}rangeWithSameWidth(e,t){return Hn.spanFrom(An(this.sheet,this.start.col,e),this.width(),t)}rangeWithSameHeight(e,t){return Hn.spanFrom(An(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=An(this.sheet,this.start.col+n,this.start.row+t);e[t].push(r)}}return e}withStart(e){return new Hn(e,this.end)}sameDimensionsAs(e){return this.width()===e.width()&&this.height()===e.height()}sameAs(e){return kn(this.start,e.start)&&kn(this.end,e.end)}addressesArrayMap(e,t){const n=[];let r=this.start.row;for(;r<=this.effectiveEndRow(e);){let o=this.start.col;const i=[];for(;o<=this.effectiveEndColumn(e);)i.push(t(An(this.start.sheet,o,r))),o++;n.push(i),r++}return n}addresses(e){const t=[];let n=this.start.row;const r=this.effectiveEndRow(e),o=this.effectiveEndColumn(e);for(;n<=r;){let e=this.start.col;for(;e<=o;)t.push(An(this.start.sheet,e,n)),e++;n++}return t}*addressesWithDirection(e,t,n){if(e>0)if(t>0){let e=this.effectiveEndRow(n);for(;e>=this.start.row;){let t=this.effectiveEndColumn(n);for(;t>=this.start.col;)yield An(this.start.sheet,t,e),t-=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(n);){let t=this.effectiveEndColumn(n);for(;t>=this.start.col;)yield An(this.start.sheet,t,e),t-=1;e+=1}}else if(t>0){let e=this.effectiveEndRow(n);for(;e>=this.start.row;){let t=this.start.col;for(;t<=this.effectiveEndColumn(n);)yield An(this.start.sheet,t,e),t+=1;e-=1}}else{let e=this.start.row;for(;e<=this.effectiveEndRow(n);){let t=this.start.col;for(;t<=this.effectiveEndColumn(n);)yield An(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 An(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 Fn extends Hn{constructor(e,t,n){super(An(e,t,0),An(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 ft(n.sheet,r.sheet);return new Fn(n.sheet,n.col,r.col)}shouldBeRemoved(){return this.width()<=0}shiftByRows(e){}expandByRows(e){}shifted(e,t){return new Fn(this.sheet,this.start.col+e,this.end.col+e)}rangeWithSameHeight(e,t){return new Fn(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 Yn extends Hn{constructor(e,t,n){super(An(e,0,t),An(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 ft(n.sheet,r.sheet);return new Yn(n.sheet,n.row,r.row)}shouldBeRemoved(){return this.height()<=0}shiftByColumns(e){}expandByColumns(e){}shifted(e,t){return new Yn(this.sheet,this.start.row+t,this.end.row+t)}rangeWithSameWidth(e,t){return new Yn(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){}}class Vn{constructor(e,t,n){this.formulaAddress=e,this.arraysFlag=t,this.formulaVertex=n}}const Un=/^\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij]))\s*(([+-])\s*([+-]?)\s*(([\d\.,]+(e[+-]?\d+)?)\s*([ij]?)|([ij])))?$/;class Bn{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(je(e),je(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=nr(e,t);return this.ExtendedNumberFactory(this.addWithEpsilonRaw(je(e),je(t)),n)},this.unaryMinus=e=>Ge(e,-je(e)),this.unaryPlus=e=>e,this.unaryPercent=e=>new Qe(je(e)/100),this.concat=(e,t)=>e.concat(t),this.nonstrictadd=(e,t)=>e instanceof Cn?e:t instanceof Cn?t:"number"==typeof e?"number"==typeof t?this.addWithEpsilonRaw(e,t):e:"number"==typeof t?t:0,this.subtract=(e,t)=>{const n=nr(e,t),r=je(e);let o=r-je(t);return Math.abs(o)<this.actualEps*Math.abs(r)&&(o=0),this.ExtendedNumberFactory(o,n)},this.divide=(e,t)=>{const n=je(e),r=je(t);if(0===r)return new Cn(sn.DIV_BY_ZERO);{const o=rr(e,t);return this.ExtendedNumberFactory(n/r,o)}},this.multiply=(e,t)=>{const n=rr(e,t);return this.ExtendedNumberFactory(je(e)*je(t),n)},this.manyToExactComplex=e=>{const t=[];for(const n of e){if(n instanceof Cn)return n;if(Je(n)||"string"==typeof n){const e=this.coerceScalarToComplex(n);e instanceof Cn||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 Cn)return n;Je(n)&&t.push(je(n))}return t},this.manyToOnlyNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof Cn)return n;if(Je(n))t.push(je(n));else if(n!==We)return new Cn(sn.VALUE,J.NumberExpected)}return t},this.manyToCoercedNumbersDropNulls=e=>{const t=[];for(const n of e){if(n instanceof Cn)return n;if(n===We)continue;const e=this.coerceScalarToNumberOrError(n);Je(e)&&t.push(je(e))}return t},this.collator=function(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})}(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).exec(t);return null!==(n=null==r?void 0:r.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(Zn(n)||this.config.useRegularExpressions&&tr(n))return!0}return!1}floatCmp(e,t){const n=je(e),r=je(t),o=1+this.actualEps;return r>=0&&n*o>=r&&n<=r*o||r<=0&&n*o<=r&&n>=r*o?0:n>r?1:-1}coerceScalarToNumberOrError(e){var t;return e instanceof Cn?e:null!==(t=this.coerceToMaybeNumber(e))&&void 0!==t?t:new Cn(sn.VALUE,J.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===We)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 Je(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 Qe(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 Ke(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 n of e)if(n instanceof nt)t.push(n);else if(n!==We){const e=this.coerceScalarToComplex(n);if(e instanceof Cn)return e;t.push(e)}const n=[];for(const e of t)if(e instanceof nt){const t=this.manyToExactComplex(e.valuesFromTopLeftCorner());if(t instanceof Cn)return t;n.push(...t)}else n.push(e);return n}coerceScalarToComplex(e){return e instanceof Cn?e:e===We?[0,0]:Je(e)?[je(e),0]:"string"==typeof e?this.coerceStringToComplex(e):new Cn(sn.NUM,J.ComplexNumberExpected)}ExtendedNumberFactory(e,t){const{type:n,format:r}=t;switch(n){case Ze.NUMBER_RAW:return e;case Ze.NUMBER_CURRENCY:return new Ke(e,null!=r?r:this.config.currencySymbol[0]);case Ze.NUMBER_DATE:return new $e(e,r);case Ze.NUMBER_DATETIME:return new qe(e,r);case Ze.NUMBER_TIME:return new Xe(e,r);case Ze.NUMBER_PERCENT:return new Qe(e,r)}}buildRegex(e,t=!0){let n;e=this.normalizeString(e);let r=this.config.useWildcards,o=this.config.useRegularExpressions;if(o)try{RegExp(e)}catch(e){o=!1,r=!1}return n=o?function(e,t){let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r);Zn(o)||tr(o)?n+=o:n+=t?o:o.toLowerCase()}return n}(e,this.config.caseSensitive):r?function(e,t){let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r);if("~"===o){if(r==e.length-1){n+="~";continue}const t=e.charAt(r+1);Zn(t)||tr(t)?(n+="\\"+t,r++):(n+=t,r++)}else Zn(o)?n+="."+o:tr(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}(e,this.config.caseSensitive):function(e,t){let n="";for(let r=0;r<e.length;r++){const o=e.charAt(r);Zn(o)||tr(o)?n+="\\"+o:n+=t?o:o.toLowerCase()}return n}(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=sr(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(Je(n)&&Je(r))return this.floatCmp(n,r)}return e===We?e=Gn(t):t===We&&(t=Gn(e)),"string"==typeof e&&"string"==typeof t?this.stringCmp(e,t):"boolean"==typeof e&&"boolean"==typeof t?qn(zn(e),zn(t)):Je(e)&&Je(t)?this.floatCmp(e,t):e===We&&t===We?0:qn(bn(Sn(e)),bn(Sn(t)))}stringCmp(e,t){return this.collator.compare(e,t)}manyToNumbers(e,t){const n=[];for(const t of e)if(t instanceof nt)n.push(t);else{const e=je(this.coerceScalarToNumberOrError(t));if(e instanceof Cn)return e;n.push(e)}const r=[];for(const e of n)if(e instanceof nt){const n=t(e.valuesFromTopLeftCorner());if(n instanceof Cn)return n;r.push(...n)}else r.push(e);return r}coerceStringToComplex(e){const t=Un.exec(e);if(null===t)return new Cn(sn.NUM,J.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 Cn||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 Cn?r:""!==t[5]||""===t[13]?new Cn(sn.NUM,J.ComplexNumberExpected):"+"===t[8]?[n[0]+r[0],n[1]+r[1]]:[n[0]-r[0],n[1]-r[1]])}parseComplexToken(e,t){const n=je(this.coerceNonDateScalarToMaybeNumber(e));return void 0===n?new Cn(sn.NUM,J.ComplexNumberExpected):""===t?[n,0]:[0,n]}}function Wn([e,t],n){if(!isFinite(e)||!isFinite(t))return new Cn(sn.NUM,J.NaN);if(n=null!=n?n:"i",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 jn(e){return e instanceof nt?e:nt.fromScalar(e)}function zn(e){return Number(e)}function Gn(e){return"string"==typeof e?"":Je(e)?0:"boolean"!=typeof e&&We}function $n(e){if(e instanceof Cn||"boolean"==typeof e)return e;if(e===We)return!1;if(Je(e))return 0!==je(e);{const t=e.toUpperCase();return"TRUE"===t||"FALSE"!==t&&""!==t&&void 0}}function Kn(e){return e instanceof Cn||"string"==typeof e?e:e===We?"":Je(e)?je(e).toString():e?"TRUE":"FALSE"}function Xn(e){return e===We?0:e}function qn(e,t){const n=je(e),r=je(t);return n>r?1:n<r?-1:0}function Qn(e){return isNaN(e)||e===1/0||e===-1/0}function Jn(e){return 0===e?0:e}function Zn(e){return["*","?"].includes(e)}const er=["{","}","[","]","(",")","<",">","=",".","+","-",",","\\","$","^","!"];function tr(e){return er.includes(e)}function nr(e,t){const{type:n,format:r}=tt(e),{type:o,format:i}=tt(t);if(n===Ze.NUMBER_RAW)return{type:o,format:i};if(o===Ze.NUMBER_RAW)return{type:n,format:r};if(!(n!==Ze.NUMBER_DATETIME&&n!==Ze.NUMBER_DATE||o!==Ze.NUMBER_DATETIME&&o!==Ze.NUMBER_DATE))return{type:Ze.NUMBER_RAW};if(n===Ze.NUMBER_TIME){if(o===Ze.NUMBER_DATE)return{type:Ze.NUMBER_DATETIME,format:`${i} ${r}`};if(o===Ze.NUMBER_DATETIME)return{type:Ze.NUMBER_DATETIME,format:i}}if(o===Ze.NUMBER_TIME){if(n===Ze.NUMBER_DATE)return{type:Ze.NUMBER_DATETIME,format:`${r} ${i}`};if(n===Ze.NUMBER_DATETIME)return{type:Ze.NUMBER_DATETIME,format:r}}return{type:n,format:r}}function rr(e,t){let{type:n,format:r}=tt(e),{type:o,format:i}=tt(t);return n===Ze.NUMBER_PERCENT&&(n=Ze.NUMBER_RAW,r=void 0),o===Ze.NUMBER_PERCENT&&(o=Ze.NUMBER_RAW,i=void 0),n===Ze.NUMBER_RAW?{type:o,format:i}:o===Ze.NUMBER_RAW?{type:n,format:r}:{type:Ze.NUMBER_RAW}}function or(e){return sr(e.toLowerCase(),"nfd").replace(/[\u0300-\u036f]/g,"")}function ir(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 sr(e,t){return e.normalize(t.toUpperCase())}var ar;!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"}(ar||(ar={}));class lr{constructor(e){this.coerceScalarToNumberOrError=e=>this.arithmeticHelper.coerceScalarToNumberOrError(e),this.runFunction=(e,t,n,r)=>{const o=this.evaluateArguments(e,t,n),i=o.map((([e,t])=>e)),s=o.map((([e,t])=>t)),a=this.buildMetadataForEachArgumentValue(i.length,n),l=t.arraysFlag&&!n.vectorizationForbidden;if(!this.isNumberOfArgumentValuesValid(a,i.length))return new Cn(sn.NA,J.WrongArgNumber);const[u,h]=l?this.calculateSizeOfVectorizedResultArray(i,a):[1,1];if(1===u&&1===h){const e=this.vectorizeAndBroadcastArgumentsIfNecessary(l,i,a,0,0);return this.calculateSingleCellOfResultArray(t,e,a,s,r,n.returnNumberType)}const c=[...Array(u).keys()].map((e=>[...Array(h).keys()].map((o=>{const u=this.vectorizeAndBroadcastArgumentsIfNecessary(l,i,a,e,o),h=this.calculateSingleCellOfResultArray(t,u,a,s,r,n.returnNumberType);if(h instanceof nt)throw new Error("Function returning array cannot be vectorized.");return h}))));return nt.onlyValues(c)},this.runFunctionWithReferenceArgument=(e,t,n,r,o,i=()=>new Cn(sn.NA,J.CellRefExpected))=>{if(0===e.length)return this.returnNumberWrapper(r(),n.returnNumberType);if(e.length>1)return new Cn(sn.NA,J.WrongArgNumber);let s,a=e[0];for(;a.type===Y.PARENTHESIS;)a=a.expression;if(a.type===Y.CELL_REFERENCE)s=a.reference.toSimpleCellAddress(t.formulaAddress);else if(a.type===Y.CELL_RANGE||a.type===Y.COLUMN_RANGE||a.type===Y.ROW_RANGE)try{s=Hn.fromAst(a,t.formulaAddress).start}catch(e){return new Cn(sn.REF,J.CellRefExpected)}return void 0!==s?this.returnNumberWrapper(o(s),n.returnNumberType):this.runFunction(e,t,n,i)},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 nt)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 nt)switch(t.argumentType){case ar.RANGE:case ar.ANY:r=e;break;default:{const t=ir(e,n);if(void 0===t)return;e=t}}if(!(e instanceof nt))switch(t.argumentType){case ar.INTEGER:case ar.NUMBER:const n=this.coerceScalarToNumberOrError(e);if(!Je(n)){r=n;break}const o=je(n);if(void 0!==t.maxValue&&o>t.maxValue)return new Cn(sn.NUM,J.ValueLarge);if(void 0!==t.minValue&&o<t.minValue)return new Cn(sn.NUM,J.ValueSmall);if(void 0!==t.lessThan&&o>=t.lessThan)return new Cn(sn.NUM,J.ValueLarge);if(void 0!==t.greaterThan&&o<=t.greaterThan)return new Cn(sn.NUM,J.ValueSmall);if(t.argumentType===ar.INTEGER&&!Number.isInteger(o))return new Cn(sn.NUM,J.IntegerExpected);r=n;break;case ar.STRING:r=Kn(e);break;case ar.BOOLEAN:r=$n(e);break;case ar.SCALAR:case ar.NOERROR:case ar.ANY:r=e;break;case ar.RANGE:if(e instanceof Cn)return e;r=jn(e);break;case ar.COMPLEX:return this.arithmeticHelper.coerceScalarToComplex(je(e))}return t.passSubtype||void 0===r?r:je(r)}calculateSingleCellOfResultArray(e,t,n,r,o,i){const s=this.coerceArgumentsToRequiredTypes(e,t,n,r);if(s instanceof Cn)return s;const a=o(...s);return this.returnNumberWrapper(a,i)}coerceArgumentsToRequiredTypes(e,t,n,r){const o=[];for(let i=0;i<n.length;i++){const s=n[i],a=void 0!==t[i]?t[i]:null==s?void 0:s.defaultValue;if(void 0===a){o.push(void 0);continue}const l=this.coerceToType(a,s,e);if(void 0===l&&!r[i])return new Cn(sn.VALUE,J.WrongType);if(l instanceof Cn&&s.argumentType!==ar.SCALAR)return l;o.push(l)}return o}vectorizeAndBroadcastArgumentsIfNecessary(e,t,n,r,o){return t.map(((t,i)=>e&&this.isRangePassedAsAScalarArgument(t,n[i])?this.vectorizeAndBroadcastRangeArgument(t,r,o):t))}vectorizeAndBroadcastRangeArgument(e,t,n){var r;const o=1===e.height()?0:t,i=1===e.width()?0:n;return null===(r=e.data[o])||void 0===r?void 0:r[i]}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]:[];if(void 0!==t.repeatLastArgs&&Number.isInteger(t.repeatLastArgs)&&t.repeatLastArgs>0)for(;e>n.length;)n.push(...n.slice(n.length-t.repeatLastArgs));return n}isNumberOfArgumentValuesValid(e,t){return!(t>e.length)&&(!(t<e.length)||e.slice(t).every((e=>(null==e?void 0:e.optionalArg)||void 0!==(null==e?void 0:e.defaultValue))))}calculateSizeOfVectorizedResultArray(e,t){const n=e.filter(((e,n)=>this.isRangePassedAsAScalarArgument(e,t[n])));return[Math.max(1,...n.map((e=>e.height()))),Math.max(1,...n.map((e=>e.width())))]}isRangePassedAsAScalarArgument(e,t){return null!=e&&null!=t&&e instanceof nt&&![ar.RANGE,ar.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&&Je(e)?this.arithmeticHelper.ExtendedNumberFactory(je(e),{type:t,format:n}):e}}class ur{constructor(e,t,n=!1){this.width=e,this.height=t,this.isRef=n}static error(){return new ur(1,1,!0)}static scalar(){return new ur(1,1,!1)}isScalar(){return 1===this.width&&1===this.height||this.isRef}}class hr{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 Y.FUNCTION_CALL:return this.checkArraySizeForFunction(e,t);case Y.COLUMN_RANGE:case Y.ROW_RANGE:case Y.CELL_RANGE:{const n=Hn.fromAstOrUndef(e,t.formulaAddress);return void 0===n?ur.error():new ur(n.width(),n.height(),!0)}case Y.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 o=n.reduce(((e,t)=>e+t),0),i=Math.min(...r);return new ur(i,o)}case Y.STRING:case Y.NUMBER:return ur.scalar();case Y.CELL_REFERENCE:return new ur(1,1,!0);case Y.DIV_OP:case Y.CONCATENATE_OP:case Y.EQUALS_OP:case Y.GREATER_THAN_OP:case Y.GREATER_THAN_OR_EQUAL_OP:case Y.LESS_THAN_OP:case Y.LESS_THAN_OR_EQUAL_OP:case Y.MINUS_OP:case Y.NOT_EQUAL_OP:case Y.PLUS_OP:case Y.POWER_OP:case Y.TIMES_OP:{const n=this.checkArraySizeForAst(e.left,t),i=this.checkArraySizeForAst(e.right,t);return!t.arraysFlag&&(n.height>1||n.width>1||i.height>1||i.width>1)?ur.error():(r=n,o=i,new ur(Math.max(r.width,o.width),Math.max(r.height,o.height)))}case Y.MINUS_UNARY_OP:case Y.PLUS_UNARY_OP:case Y.PERCENT_OP:{const r=this.checkArraySizeForAst(e.value,t);return!t.arraysFlag&&(r.height>1||r.width>1)?ur.error():new ur((n=r).width,n.height)}case Y.PARENTHESIS:return this.checkArraySizeForAst(e.expression,t);case Y.EMPTY:default:return ur.error()}var n,r,o}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 ur(1,1);const o=e.args.map((e=>{var n;return this.checkArraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(n=null==r?void 0:r.arrayFunction)&&void 0!==n&&n))})),i=[...r.parameters];if(void 0!==r.repeatLastArgs&&i.length<o.length&&(o.length-i.length)%r.repeatLastArgs!==0)return ur.error();for(;i.length<o.length;){if(void 0===r.repeatLastArgs)return ur.error();i.push(...i.slice(i.length-r.repeatLastArgs))}let s=1,a=1;for(let e=0;e<o.length;e++)i[e].argumentType!==ar.RANGE&&i[e].argumentType!==ar.ANY&&(a=Math.max(a,o[e].height),s=Math.max(s,o[e].width));return new ur(s,a)}}class cr{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}}function dr(e,t,n){if(void 0===e)return Ui.defaultConfig[n];if("string"==typeof t){if(typeof e===t)return e;throw new Et(t,n)}if(t.includes(e))return e;throw new At(t.map((e=>`'${e}'`)).join(" "),n)}function mr(e,t,n){if(e<n)throw new Tt(t,n)}function pr(e,t,n,r){if(t(e))return e;if(void 0===e)return Ui.defaultConfig[r];throw new Et(n,r)}function fr(...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 e of t.values())e.length>1&&n.push(e);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 gr(e,t,n){if(typeof e!==t)throw new Et(t,n)}const yr=new RegExp("^ss(\\.(s+|0+))?$"),wr=new RegExp("^[0-9/.\\-: ]+[ap]?m?$"),vr=new RegExp("\\s+"),_r=new RegExp("[ /.-]"),br=Mr((function(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).trim().split(":");return{itemsCount:n.length,hourItem:n.indexOf("hh"),minuteItem:n.indexOf("mm"),secondItem:n.findIndex((e=>yr.test(e)))}})),Sr=Mr((function(e){const t=e.toLowerCase().trim().split(_r);return{itemsCount:t.length,dayItem:t.indexOf("dd"),monthItem:t.indexOf("mm"),shortYearItem:t.indexOf("yy"),longYearItem:t.indexOf("yyyy")}}));function Cr(e,t){var n,r,o;if(void 0===t)return;const{itemsCount:i,hourItem:s,minuteItem:a,secondItem:l}=br(t);let u;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!==i)return;const h=Number(null!==(n=e[l])&&void 0!==n?n:"0");if(!Number.isFinite(h))return;const c=Math.round(1e3*h)/1e3,d=Number(null!==(r=e[a])&&void 0!==r?r:"0");if(!Number.isFinite(d)||!Number.isInteger(d))return;const m=Number(null!==(o=e[s])&&void 0!==o?o:"0");return!Number.isFinite(m)||!Number.isInteger(m)||void 0!==u&&(m<0||m>12)?void 0:{hours:void 0!==u?m%12+(u?12:0):m,minutes:d,seconds:c}}function Er(e,t){var n;if(void 0===t)return;const{itemsCount:r,dayItem:o,monthItem:i,shortYearItem:s,longYearItem:a}=Sr(t);if(e.length!==r)return;const l=Number(e[o]);if(!Number.isFinite(l)||!Number.isInteger(l))return;const u=Number(e[i]);if(!Number.isFinite(u)||!Number.isInteger(u))return;if(e[a]&&e[s])return;const h=Number(null!==(n=e[a])&&void 0!==n?n:e[s]);return Number.isFinite(h)&&Number.isInteger(h)&&!(e[a]&&(h<1e3||h>9999)||e[s]&&(h<0||h>99))?{year:h,month:u,day:l}:void 0}function Mr(e){const t={};return n=>{const r=t[n];if(void 0!==r)return r;const o=e(n);return t[n]=o,o}}const Tr=[31,28,31,30,31,30,31,31,30,31,30,31],Rr=[0,31,59,90,120,151,181,212,243,273,304,334];function Ar(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 Nr(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 Lr={year:9999,month:12,day:31};class xr{constructor(e){this.config=e,this.minDateAbsoluteValue=this.dateToNumberFromZero(e.nullDate),this.maxDateValue=this.dateToNumber(Lr),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 Nr(t)?Ar(t)?new qe(Dr(t)+this.dateToNumber(t),n+" "+r):new Xe(Dr(t),r):Ar(t)?new $e(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<=Tr[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}),o=function(e){let t=0;return Rr[t+6]<=e&&(t+=6),Rr[t+3]<=e&&(t+=3),Rr[t+2]<=e?t+=2:Rr[t+1]<=e&&(t+=1),t}(r-(this.isLeapYear(n)&&r>=59?1:0));return{year:n,month:o+1,day:r-Rr[o]-(this.isLeapYear(n)&&o>1?1:0)+1}}numberToSimpleDateTime(e){const t=kr(e%1),n=Math.floor(t.hours/24);t.hours=t.hours%24;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:Tr[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(!Ar(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,o=0===n.length?[void 0]:n;for(const t of r)for(const n of o){const r=this.parseSingleFormat(e,t,n);if(void 0!==r)return{dateTime:r,timeFormat:n,dateFormat:t}}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+Rr[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 Or(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 Ir(e){return Math.round(3600*e*24)/86400}function kr(e){const t=24*e*60*60,n=function(e,t=1){return Math.round(e*t)/t}(t%60,1e5)%60,r=(t-n)/60,o=Math.round(r%60)%60,i=(r-o)/60;return{hours:Math.round(i),minutes:o,seconds:n}}function Dr(e){return((e.seconds/60+e.minutes)/60+e.hours)/24}function Pr(e){return{year:e.year,month:e.month,day:Math.min(30,e.day)}}const Hr=/(\\.|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,Fr=/(\\.|[#0]+(\.[#0]*)?)/g;var Yr,Vr;function Ur(e,t){return{type:e,value:t}}function Br(e,t){const n=[];let r=0;for(let o=0;o<e.length;++o){const i=e[o];if(i.index!==r){const e=t.substr(r,i.index-r);n.push(Ur(Yr.FREE_TEXT,e))}i[0].startsWith("\\")?n.push(Ur(Yr.FREE_TEXT,i[0])):n.push(Ur(Yr.FORMAT,i[0])),r=i.index+i[0].length}const o=e[e.length-1];if(o.index+o[0].length<t.length){const e=t.substr(o.index+o[0].length,t.length);n.push(Ur(Yr.FREE_TEXT,e))}return n}function Wr(e){const t=function(e){Hr.lastIndex=0;const t=[];let n;do{n=Hr.exec(e),null!==n&&t.push(n)}while(n);return t}(e);return t.every((e=>jr(e)))?void 0:{type:Vr.DATE,tokens:Br(t,e)}}function jr(e){return e[0].startsWith("\\")}function zr(e,t,n,r){const o=n.stringifyDateTime(r.numberToSimpleDateTime(e),t);if(void 0!==o)return o;const i=n.stringifyDuration(kr(e),t);if(void 0!==i)return i;const s=function(e){const t=function(e){Fr.lastIndex=0;const t=Fr.exec(e);return null!==t?[t]:[]}(e);return t.every((e=>jr(e)))?void 0:{type:Vr.NUMBER,tokens:Br(t,e)}}(t);return void 0!==s?function(e,t){let n="";for(let r=0;r<e.length;++r){const o=e[r];if(o.type===Yr.FREE_TEXT){n+=o.value;continue}const i=o.value.split("."),s=i[0],a=i[1]||"",l=i[1]?".":"",u=Number(t.toFixed(a.length)).toString().split(".");let h=u[0]||"",c=u[1]||"";s.length>h.length&&(h=Gr(h,Kr(s.substr(0,s.length-h.length),"0")+h.length)),c=$r(c,Kr(a.substr(c.length,a.length-c.length),"0")+c.length),n+=h+l+c}return n}(s.tokens,e):t}function Gr(e,t){let n=`${e}`;for(;n.length<t;)n="0"+n;return n}function $r(e,t){let n=`${e}`;for(;n.length<t;)n+="0";return n}function Kr(e,t){return e.split(t).length-1}!function(e){e.FORMAT="FORMAT",e.FREE_TEXT="FREE_TEXT"}(Yr||(Yr={})),function(e){e.DATE="DATE",e.NUMBER="NUMBER",e.STRING="STRING"}(Vr||(Vr={}));const Xr="length",qr=e=>parseInt(e,16),Qr=e=>parseInt(e,10),Jr=e=>(e+"").replace(/\-/g,""),Zr=(e,t,n)=>e.substr(t,n),eo=e=>e.codePointAt(0)-65,to={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 no=!1;function ro(e){const t={template:"missing",vars:{}};if("gpl-v3"===e||"internal-use-in-handsontable"===e)t.template="valid";else if("string"==typeof e&&function(e){if((e=(e+"").replace(/\-/g,""))[Xr]!==eo("Z"))return!1;let t=0;return[[0,eo("G")+1],[eo("H"),eo("H")-1],[eo("G")+eo("H"),eo("G")]].reduce(((n,[r,o],i)=>(n|=(Qr(`${Qr(qr(Zr(e,t+r-(0===i?0:2),o+(i?2:0)))+(qr(Zr(e,t+r+o,2))+[]).padStart(2,"0"))}`)%97||2)>>1,t+=2,n)),eo("A"))===[]+1>>1}(e)){const[o,i,s]="14/01/2025".split("/"),a=Math.floor(new Date(`${i}/${o}/${s}`).getTime()/864e5),l=25===Jr(r=e)[Xr]?qr(Zr(Jr(r),qr("12"),eo("F")))/(qr(Zr(Jr(r),eo("C"),eo("Y")>>4))||1+(![][Xr]<<3)):0;t.vars.keyValidityDate=`${["January","February","March","April","May","June","July","August","September","October","November","December"][(n=new Date(864e5*(l+1))).getMonth()]} ${n.getDate()}, ${n.getFullYear()}`,t.template=a>l?"expired":"valid"}else""!==e&&(t.template="invalid");var n,r;return no||"valid"===t.template||(console.warn(to[t.template](t.vars)),no=!0),t.template}var oo,io,so;!function(e){e.Number=class{constructor(e){this.value=e,this.value=Ge(this.value,Jn(je(this.value)))}},e.String=class{constructor(e){this.value=e}},e.Boolean=class{constructor(e){this.value=e}};class t{static getSingletonInstance(){return t.instance||(t.instance=new t),t.instance}}e.Empty=t,e.Formula=class{constructor(e){this.formula=e}},e.Error=class{constructor(e,t){this.value=new Cn(e,t)}}}(oo||(oo={}));class ao{constructor(e,t,n){this.config=e,this.dateHelper=t,this.numberLiteralsHelper=n}parse(e){if(null==e)return oo.Empty.getSingletonInstance();if("number"==typeof e)return Qn(e)?new oo.Error(sn.NUM,J.ValueLarge):new oo.Number(e);if("boolean"==typeof e)return new oo.Boolean(e);if(e instanceof Date){const t=this.dateHelper.dateToNumber({day:e.getDate(),month:e.getMonth()+1,year:e.getFullYear()})+Dr({hours:e.getHours(),minutes:e.getMinutes(),seconds:e.getSeconds()+e.getMilliseconds()/1e3});return t<0?new oo.Error(sn.NUM,J.DateBounds):t%1==0?new oo.Number(new $e(t,"Date()")):t<1?new oo.Number(new Xe(t,"Date()")):new oo.Number(new qe(t,"Date()"))}if("string"==typeof e){if(function(e){const t=e.toLowerCase();return"true"===t||"false"===t}(e))return new oo.Boolean("true"===e.toLowerCase());if(e.startsWith("="))return new oo.Formula(e);if(function(e,t){const n=e.toUpperCase();return/#[A-Za-z0-9\/]+[?!]?/.test(n)&&Object.prototype.hasOwnProperty.call(t,n)}(e,this.config.errorMapping))return new oo.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 o=this.numberLiteralsHelper.numericStringToMaybeNumber(n);if(void 0!==o){let e;return e=1===r?new Qe(o/100):2===r?new Ke(o,t):o,new oo.Number(e)}const i=this.dateHelper.dateStringToDateNumber(n);return void 0!==i?new oo.Number(i):new oo.String(e.startsWith("'")?e.slice(1):e)}}throw new Ct(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)]}}}!function(e){e[e.COPY=0]="COPY",e[e.CUT=1]="CUT"}(io||(io={})),function(e){e[e.VALUE=0]="VALUE",e[e.EMPTY=1]="EMPTY",e[e.FORMULA=2]="FORMULA",e[e.PARSING_ERROR=3]="PARSING_ERROR"}(so||(so={}));class lo{constructor(e,t,n,r,o){this.sourceLeftCorner=e,this.width=t,this.height=n,this.type=r,this.content=o}*getContent(e){if(void 0!==this.content)for(let t=0;t<this.height;++t)for(let n=0;n<this.width;++n)yield[An(e.sheet,e.col+n,e.row+t),this.content[t][n]]}}class uo{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 lo(e,t,n,io.CUT)}copy(e,t,n){const r=[];for(let o=0;o<n;++o){r[o]=[];for(let n=0;n<t;++n){const t=this.operations.getClipboardCell(An(e.sheet,e.col+n,e.row+o));r[o].push(t)}}this.clipboard=new lo(e,t,n,io.COPY,r)}abortCut(){this.clipboard&&this.clipboard.type===io.CUT&&this.clear()}clear(){this.clipboard=void 0}ensureItIsPossibleToCopyPaste(e){if(void 0===this.clipboard)return;if(Nn(e)||!this.dependencyGraph.sheetMapping.hasSheetWithId(e.sheet))throw new pt("a valid target address.");const t=Hn.spanFrom(e,this.clipboard.width,this.clipboard.height);if(t.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new ct;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===io.CUT}isCopyClipboard(){return void 0!==this.clipboard&&this.clipboard.type===io.COPY}}class ho{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 ho(this.displayName,this.address,this.added,this.options)}}class co{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 mo{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);this.mapping.get(t)&&this.mapping.delete(t)}normalizeExpressionName(e){return e.toLowerCase()}}class po{constructor(){this.nextNamedExpressionRow=0,this.workbookStore=new co,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(`^${f}$`),n=new RegExp(`^${w}$`),r=new RegExp(`^${_}$`);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 o=r.get(e);return void 0!==o?(o.added=!0,o.displayName=e,o.options=n):(o=new ho(e,this.nextAddress(),!0,n),r.add(o)),this.addressCache.set(o.address.row,o),o}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 ho(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.get(e);if(void 0===n||void 0===r||!r.added)throw Error("Named expression does not exist");n.remove(e),n instanceof mo&&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 mo,this.worksheetStores.set(e,t)),t}worksheetStore(e){return this.worksheetStores.get(e)}nextAddress(){return An(po.SHEET_FOR_WORKBOOK_EXPRESSIONS,0,this.nextNamedExpressionRow++)}}po.SHEET_FOR_WORKBOOK_EXPRESSIONS=-1;const fo=e=>{switch(e.type){case Y.EMPTY:case Y.NUMBER:case Y.STRING:case Y.ERROR:case Y.ERROR_WITH_RAW_INPUT:return!1;case Y.CELL_REFERENCE:return!e.reference.isAbsolute();case Y.CELL_RANGE:case Y.COLUMN_RANGE:case Y.ROW_RANGE:return!e.start.isAbsolute();case Y.NAMED_EXPRESSION:return!1;case Y.PERCENT_OP:case Y.PLUS_UNARY_OP:case Y.MINUS_UNARY_OP:return fo(e.value);case Y.CONCATENATE_OP:case Y.EQUALS_OP:case Y.NOT_EQUAL_OP:case Y.LESS_THAN_OP:case Y.GREATER_THAN_OP:case Y.LESS_THAN_OR_EQUAL_OP:case Y.GREATER_THAN_OR_EQUAL_OP:case Y.MINUS_OP:case Y.PLUS_OP:case Y.TIMES_OP:case Y.DIV_OP:case Y.POWER_OP:return fo(e.left)||fo(e.right);case Y.PARENTHESIS:return fo(e.expression);case Y.FUNCTION_CALL:return e.args.some((e=>fo(e)));case Y.ARRAY:return e.args.some((e=>e.some((e=>fo(e)))))}};class go{performEagerTransformations(e,t){for(const n of e.arrayFormulaNodes()){const[r,o]=this.transformSingleAst(n.getFormula(e.lazilyTransformingAstService),n.getAddress(e.lazilyTransformingAstService)),i=t.rememberNewAst(r);n.setFormula(i),n.setAddress(o)}}transformSingleAst(e,t){return[this.transformAst(e,t),this.fixNodeAddress(t)]}transformAst(e,t){switch(e.type){case Y.CELL_REFERENCE:return this.transformCellReferenceAst(e,t);case Y.CELL_RANGE:return this.transformCellRangeAst(e,t);case Y.COLUMN_RANGE:return this.transformColumnRangeAst(e,t);case Y.ROW_RANGE:return this.transformRowRangeAst(e,t);case Y.EMPTY:case Y.ERROR:case Y.NUMBER:case Y.NAMED_EXPRESSION:case Y.ERROR_WITH_RAW_INPUT:case Y.STRING:return e;case Y.PERCENT_OP:case Y.MINUS_UNARY_OP:case Y.PLUS_UNARY_OP:return Object.assign(Object.assign({},e),{value:this.transformAst(e.value,t)});case Y.FUNCTION_CALL:return Object.assign(Object.assign({},e),{procedureName:e.procedureName,args:e.args.map((e=>this.transformAst(e,t)))});case Y.PARENTHESIS:return Object.assign(Object.assign({},e),{expression:this.transformAst(e.expression,t)});case Y.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===sn.REF?j(new Cn(sn.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===sn.REF?j(new Cn(sn.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===sn.REF?j(new Cn(sn.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===sn.REF?j(new Cn(sn.REF)):e}}class yo extends go{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=In(e,t);if(n!==this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet)return!1;const r=e.toSimpleColumnAddress(t);return n===this.columnsSpan.sheet&&t.sheet!==this.columnsSpan.sheet?this.columnsSpan.columnStart<=r.col&&e.shiftedByColumns(this.columnsSpan.numberOfColumns):t.sheet===this.columnsSpan.sheet&&n!==this.columnsSpan.sheet?!e.isColumnAbsolute()&&!(t.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(-this.columnsSpan.numberOfColumns):e.isColumnAbsolute()?!(e.col<this.columnsSpan.columnStart)&&e.shiftedByColumns(this.columnsSpan.numberOfColumns):e.toSimpleColumnAddress(t).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),o=this.transformCellAddress(t,n);return r===sn.REF||o===sn.REF?sn.REF:!(!r&&!o)&&[r||e,o||t]}}class wo extends go{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=In(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),o=this.transformCellAddress(t,n);return r===sn.REF||o===sn.REF?sn.REF:!(!r&&!o)&&[r||e,o||t]}}class vo extends go{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}fixNodeAddress(e){return e}transformCellAddress(e,t){return!!e.isInvalid(t)&&sn.REF}transformCellRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&sn.REF}transformColumnRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&sn.REF}transformRowRange(e,t,n){return!(!e.isInvalid(n)&&!t.isInvalid(n))&&sn.REF}}class _o extends go{constructor(e,t,n,r){super(),this.sourceRange=e,this.toRight=t,this.toBottom=n,this.toSheet=r,this.dependentFormulaTransformer=new bo(e,t,n,r)}get sheet(){return this.sourceRange.sheet}isIrreversible(){return!0}transformSingleAst(e,t){return this.sourceRange.addressInRange(t)?[this.transformAst(e,t),this.fixNodeAddress(t)]:this.dependentFormulaTransformer.transformSingleAst(e,t)}fixNodeAddress(e){return An(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 o=e.toSimpleCellAddress(n),i=t.toSimpleCellAddress(n);if(r.addressInRange(o)&&r.addressInRange(i))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 bo extends go{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),o=this.transformCellAddress(t,n);return!(!r||!o)&&[r,o]}}class So extends go{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=In(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 sn.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=In(e,n);let o=e,i=t;if(this.columnsSpan.sheet===r){const r=e.toSimpleColumnAddress(n),s=t.toSimpleColumnAddress(n);if(this.columnsSpan.columnStart<=r.col&&this.columnsSpan.columnEnd>=s.col)return sn.REF;r.col>=this.columnsSpan.columnStart&&r.col<=this.columnsSpan.columnEnd&&(o=e.shiftedByColumns(this.columnsSpan.columnEnd-r.col+1)),s.col>=this.columnsSpan.columnStart&&s.col<=this.columnsSpan.columnEnd&&(i=t.shiftedByColumns(-(s.col-this.columnsSpan.columnStart+1)))}const s=this.transformCellAddress(o,n),a=this.transformCellAddress(i,n);if(!1===s&&!1===a)return[o,i];if(s===sn.REF||a===sn.REF)throw Error("Cannot happen");return[s||o,a||i]}}class Co extends go{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=In(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 sn.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=In(e,n);let o=e,i=t;if(this.rowsSpan.sheet===r){const r=e.toSimpleRowAddress(n),s=t.toSimpleRowAddress(n);if(this.rowsSpan.rowStart<=r.row&&this.rowsSpan.rowEnd>=s.row)return sn.REF;r.row>=this.rowsSpan.rowStart&&r.row<=this.rowsSpan.rowEnd&&(o=e.shiftedByRows(this.rowsSpan.rowEnd-r.row+1)),s.row>=this.rowsSpan.rowStart&&s.row<=this.rowsSpan.rowEnd&&(i=t.shiftedByRows(-(s.row-this.rowsSpan.rowStart+1)))}const s=this.transformCellAddress(o,n),a=this.transformCellAddress(i,n);return!1===s&&!1===a?[o,i]:s===sn.REF||a===sn.REF?sn.REF:[s||o,a||i]}}class Eo extends go{constructor(e){super(),this.sheet=e}isIrreversible(){return!0}performEagerTransformations(e,t){for(const t of e.arrayFormulaNodes()){const[n]=this.transformSingleAst(t.getFormula(e.lazilyTransformingAstService),t.getAddress(e.lazilyTransformingAstService));t.setFormula(n)}}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&&sn.REF}}function Mo(e){if(!Array.isArray(e))throw new pt("an array of arrays.");for(let t=0;t<e.length;t++)if(!Array.isArray(e[t]))throw new pt("an array of arrays.")}function To(e){let t=0,n=0,r=0;for(let o=0;o<e.length;o++){let i=0;for(let t=0;t<e[o].length;t++){null!=e[o][t]&&(i=t+1,++r)}t=Math.max(t,i),i>0&&(n=o+1)}const o=t*n;return{height:n,width:t,fill:0===o?0:r/o}}class Ro{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Oo(this.indexes)}rowsSpans(){return this.normalizedIndexes().map((e=>ot.fromNumberOfRows(this.sheet,e[0],e[1])))}}class Ao{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Io(this.indexes)}rowsSpans(){return this.normalizedIndexes().map((e=>ot.fromNumberOfRows(this.sheet,e[0],e[1])))}}class No{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Io(this.indexes)}columnsSpans(){return this.normalizedIndexes().map((e=>it.fromNumberOfColumns(this.sheet,e[0],e[1])))}}class Lo{constructor(e,t){this.sheet=e,this.indexes=t}normalizedIndexes(){return Oo(this.indexes)}columnsSpans(){return this.normalizedIndexes().map((e=>it.fromNumberOfColumns(this.sheet,e[0],e[1])))}}class xo{constructor(e,t,n,r,o,i,s,a,l){this.dependencyGraph=t,this.columnSearch=n,this.cellContentParser=r,this.parser=o,this.stats=i,this.lazilyTransformingAstService=s,this.namedExpressions=a,this.arraySizePredictor=l,this.changes=rt.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(et.TRANSFORM_ASTS,(()=>{const n=new Eo(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);return this.dependencyGraph.addressMapping.autoAddSheet(t,To([])),this.sheetMapping.fetchDisplayName(t)}renameSheet(e,t){return this.sheetMapping.renameSheet(e,t)}moveRows(e,t,n,r){const o=ot.fromNumberOfRows(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddRows(o),r<t&&(t+=n);const i=An(e,0,t),s=An(e,0,r);this.moveCells(i,Number.POSITIVE_INFINITY,n,s);const a=ot.fromNumberOfRows(e,t,n);return this.doRemoveRows(a),this.lazilyTransformingAstService.commitCombinedMode()}moveColumns(e,t,n,r){const o=it.fromNumberOfColumns(e,r,n);this.lazilyTransformingAstService.beginCombinedMode(e),this.doAddColumns(o),r<t&&(t+=n);const i=An(e,t,0),s=An(e,r,0);this.moveCells(i,n,Number.POSITIVE_INFINITY,s);const a=it.fromNumberOfColumns(e,t,n);return this.doRemoveColumns(a),this.lazilyTransformingAstService.commitCombinedMode()}moveCells(e,t,n,r){this.ensureItIsPossibleToMoveCells(e,t,n,r);const o=Hn.spanFrom(e,t,n),i=Hn.spanFrom(r,t,n),s=r.col-e.col,a=r.row-e.row,l=r.sheet,u=this.getRangeClipboardCells(i),h=this.dependencyGraph.rawValuesFromRange(i);this.columnSearch.removeValues(h);const c=this.dependencyGraph.rawValuesFromRange(o);this.columnSearch.moveValues(c,s,a,l);let d=0;this.stats.measure(et.TRANSFORM_ASTS,(()=>{const e=new _o(o,s,a,l);e.performEagerTransformations(this.dependencyGraph,this.parser),d=this.lazilyTransformingAstService.addTransformation(e)})),this.dependencyGraph.moveCells(o,s,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[o,i]of t)if(o!==i){const t=Hn.spanFrom({sheet:e,col:0,row:o},1/0,1),s=this.getRangeClipboardCells(t);r=r.concat(s),n.push(s.map((([{sheet:e,col:t},n])=>[{sheet:e,col:t,row:i},n])))}return n.forEach((t=>this.restoreClipboardCells(e,t.values()))),r}setColumnOrder(e,t){const n=[];let r=[];for(const[o,i]of t)if(o!==i){const t=Hn.spanFrom({sheet:e,col:o,row:0},1,1/0),s=this.getRangeClipboardCells(t);r=r.concat(s),n.push(s.map((([{sheet:e,col:t,row:n},r])=>[{sheet:e,col:i,row:n},r])))}return n.forEach((t=>this.restoreClipboardCells(e,t.values()))),r}addNamedExpression(e,t,n,r){const o=this.namedExpressions.addNamedExpression(e,n,r);this.storeNamedExpressionInCell(o.address,t),this.adjustNamedExpressionEdges(o,e,n)}restoreNamedExpression(e,t,n){const r=e.displayName;this.restoreCell(e.address,t);const o=this.namedExpressions.restoreNamedExpression(e,n);this.adjustNamedExpressionEdges(o,r,n)}changeNamedExpressionExpression(e,t,n,r){const o=this.namedExpressions.namedExpressionForScope(e,n);if(!o)throw new wt(e);const i=o.copy();o.options=r;const s=this.getClipboardCell(o.address);return this.storeNamedExpressionInCell(o.address,t),[i,s]}removeNamedExpression(e,t){const n=this.namedExpressions.namedExpressionForScope(e,t);if(!n)throw new wt(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(Nn(e)||!(ko(t)&&ko(n)||function(e,t,n){return 0===e.row&&ko(t)&&n===Number.POSITIVE_INFINITY||0===e.col&&ko(n)&&t===Number.POSITIVE_INFINITY}(e,t,n))||Nn(r)||!this.sheetMapping.hasSheetWithId(e.sheet)||!this.sheetMapping.hasSheetWithId(r.sheet))throw new pt("a valid range of cells to move.");const o=Hn.spanFrom(e,t,n),i=Hn.spanFrom(r,t,n);if(i.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new ct;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(o))throw new Pt;if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(i))throw new Ht}restoreClipboardCells(e,t){const n=[];for(const[r,o]of t)if(this.restoreCell(r,o),o.type===so.FORMULA){const{dependencies:t}=this.parser.fetchCachedResult(o.hash);n.push(...this.updateNamedExpressionsForTargetAddress(e,r,t))}return n}restoreCell(e,t){switch(t.type){case so.VALUE:this.setValueToCell(t,e);break;case so.FORMULA:this.setFormulaToCellFromCache(t.hash,e);break;case so.EMPTY:this.setCellEmpty(e);break;case so.PARSING_ERROR:this.setParsingErrorToCell(t.rawInput,t.errors,e)}}getOldContent(e){const t=this.dependencyGraph.getCell(e);if(void 0===t||t instanceof pn)return[e,{type:so.EMPTY}];if(t instanceof fn)return[e,Object.assign({type:so.VALUE},t.getValues())];if(t instanceof zt)return[t.getAddress(this.lazilyTransformingAstService),{type:so.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))}];if(t instanceof gn)return[e,{type:so.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 pn)return{type:so.EMPTY};if(t instanceof fn)return Object.assign({type:so.VALUE},t.getValues());if(t instanceof Gt){const n=t.getArrayCellValue(e);return n===We?{type:so.EMPTY}:{type:so.VALUE,parsedValue:n,rawValue:t.getArrayCellRawValue(e)}}if(t instanceof $t)return{type:so.FORMULA,hash:this.parser.computeHashFromAst(t.getFormula(this.lazilyTransformingAstService))};if(t instanceof gn)return{type:so.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 o=0;o<t;o++){r[o]=new Array(n);for(let t=0;t<n;t++){const n=An(e,t,o);r[o][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 oo.Formula){const t=this.parser.parse(n.formula,e),{ast:r,errors:o}=t;if(o.length>0)this.setParsingErrorToCell(n.formula,o,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(t){if(!t.message)throw t;const r={type:F.InvalidRangeSize,message:"Invalid range size."};this.setParsingErrorToCell(n.formula,[r],e)}}else n instanceof oo.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 o=An(e,r,n);this.setCellContent(o,t[n][r])}}setParsingErrorToCell(e,t,n){const r=this.dependencyGraph.getCellValue(n),o=new gn(t,e),i=this.dependencyGraph.setParsingErrorToCell(n,o);this.columnSearch.remove(je(r),n),this.columnSearch.applyChanges(i.getChanges()),this.changes.addAll(i),this.changes.addChange(o.getCellValue(),n)}setFormulaToCell(e,t,{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:o,dependencies:i}){const s=this.dependencyGraph.getCellValue(e),a=this.dependencyGraph.setFormulaToCell(e,n,Be(i,e),t,r,o);this.columnSearch.remove(je(s),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(je(n),je(e.parsedValue),t),this.columnSearch.applyChanges(r.getChanges().filter((e=>!kn(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(je(t),e),this.columnSearch.applyChanges(n.getChanges()),this.changes.addAll(n),this.changes.addChange(We,e)}setFormulaToCellFromCache(e,t){const{ast:n,hasVolatileFunction:r,hasStructuralChangeFunction:o,dependencies:i}=this.parser.fetchCachedResult(e),s=Be(i,t),[a]=new vo(t.sheet).transformSingleAst(n,t);this.parser.rememberNewAst(a);const l=s.filter((e=>e instanceof Ue||(e instanceof Hn?!(Nn(e.start)||Nn(e.end)):!Nn(e)))),u=this.arraySizePredictor.checkArraySize(n,t);this.dependencyGraph.setFormulaToCell(t,a,l,u,r,o)}rowEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getHeight(t)}getAndClearContentChanges(){const e=this.changes;return this.changes=rt.empty(),e}forceApplyPostponedTransformations(){this.dependencyGraph.forceApplyPostponedTransformations()}doRemoveRows(e){if(this.rowEffectivelyNotInSheet(e.rowStart,e.sheet))return;const t=[];for(const[n]of this.dependencyGraph.entriesFromRowsSpan(e))t.push({address:n,cellType:this.getClipboardCell(n)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeRows(e);this.columnSearch.applyChanges(r.getChanges());let o=0;return this.stats.measure(et.TRANSFORM_ASTS,(()=>{const t=new Co(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)})),this.rewriteAffectedArrays(n),{version:o,removedCells:t,rowFrom:e.rowStart,rowCount:e.numberOfRows}}doRemoveColumns(e){if(this.columnEffectivelyNotInSheet(e.columnStart,e.sheet))return;const t=[];for(const[n]of this.dependencyGraph.entriesFromColumnsSpan(e))t.push({address:n,cellType:this.getClipboardCell(n)});const{affectedArrays:n,contentChanges:r}=this.dependencyGraph.removeColumns(e);this.columnSearch.applyChanges(r.getChanges()),this.columnSearch.removeColumns(e);let o=0;return this.stats.measure(et.TRANSFORM_ASTS,(()=>{const t=new So(e);t.performEagerTransformations(this.dependencyGraph,this.parser),o=this.lazilyTransformingAstService.addTransformation(t)})),this.rewriteAffectedArrays(n),{version:o,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(et.TRANSFORM_ASTS,(()=>{const t=new wo(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(et.TRANSFORM_ASTS,(()=>{const t=new yo(e);t.performEagerTransformations(this.dependencyGraph,this.parser),this.lazilyTransformingAstService.addTransformation(t)})),this.rewriteAffectedArrays(t)}columnEffectivelyNotInSheet(e,t){return e>=this.dependencyGraph.addressMapping.getWidth(t)}adjustNamedExpressionEdges(e,t,n){if(void 0===n)return;const{vertex:r,id:o}=this.dependencyGraph.fetchCellOrCreateEmpty(e.address),i=null!=o?o:this.dependencyGraph.graph.getNodeId(r),s=this.namedExpressions.workbookNamedExpressionOrPlaceholder(t),{vertex:a,id:l}=this.dependencyGraph.fetchCellOrCreateEmpty(s.address),u=null!=l?l:this.dependencyGraph.graph.getNodeId(a);for(const t of this.dependencyGraph.graph.adjacentNodes(a))if(t instanceof $t&&t.getAddress(this.lazilyTransformingAstService).sheet===n){const n=t.getFormula(this.lazilyTransformingAstService),r=t.getAddress(this.lazilyTransformingAstService),{dependencies:o}=this.parser.fetchCachedResultForAst(n);for(const n of Be(o,r))n instanceof Ue&&n.name.toLowerCase()===e.displayName.toLowerCase()&&(this.dependencyGraph.graph.removeEdge(u,t),this.dependencyGraph.graph.addEdge(i,t))}}storeNamedExpressionInCell(e,t){const n=this.cellContentParser.parse(t);if(n instanceof oo.Formula){const t=this.parser.parse(n.formula,An(-1,0,0));if(fo(t.ast))throw new Ft;const{ast:r,hasVolatileFunction:o,hasStructuralChangeFunction:i,dependencies:s}=t;this.dependencyGraph.setFormulaToCell(e,r,Be(s,e),ur.scalar(),o,i)}else n instanceof oo.Empty?this.setCellEmpty(e):this.setValueToCell({parsedValue:n.value,rawValue:t},e)}updateNamedExpressionsForMovedCells(e,t,n,r){if(e.sheet===r.sheet)return[];const o=[],i=Hn.spanFrom(r,t,n);for(const t of i.addresses(this.dependencyGraph)){const n=this.addressMapping.fetchCell(t);if(n instanceof $t&&t.sheet!==e.sheet){const r=n.getFormula(this.lazilyTransformingAstService),{dependencies:i}=this.parser.fetchCachedResultForAst(r);o.push(...this.updateNamedExpressionsForTargetAddress(e.sheet,t,i))}}return o}updateNamedExpressionsForTargetAddress(e,t,n){if(e===t.sheet)return[];const r=[],o=this.addressMapping.fetchCell(t);for(const i of Be(n,t)){if(!(i instanceof Ue))continue;const n=i.name,s=this.dependencyGraph.fetchNamedExpressionVertex(n,e).vertex,a=this.namedExpressions.isExpressionInScope(n,t.sheet)?this.dependencyGraph.fetchNamedExpressionVertex(n,t.sheet).vertex:this.copyOrFetchGlobalNamedExpressionVertex(n,s,r);a!==s&&(this.dependencyGraph.graph.removeEdgeIfExists(s,o),this.dependencyGraph.graph.addEdge(a,o))}return r}allocateNamedExpressionAddressSpace(){this.dependencyGraph.addressMapping.addSheet(po.SHEET_FOR_WORKBOOK_EXPRESSIONS,new yn(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 $t){const e=this.parser.fetchCachedResultForAst(t.getFormula(this.lazilyTransformingAstService)),{ast:n,hasVolatileFunction:o,hasStructuralChangeFunction:i,dependencies:s}=e;this.dependencyGraph.setFormulaToCell(r.address,n,Be(s,r.address),ur.scalar(),o,i)}else t instanceof pn?this.setCellEmpty(r.address):t instanceof fn&&this.setValueToCell(t.getValues(),r.address);return this.dependencyGraph.fetchCellOrCreateEmpty(r.address).vertex}}function Oo(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],o=r[0]+r[1];return t<=o?r[1]+=Math.max(0,n-(o-t)):e.push([t,n]),e}),[t[0]]);let r=0;for(let e=0;e<n.length;++e)n[e][0]-=r,r+=n[e][1];return n}function Io(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 e=0;e<n.length;++e)n[e][0]+=r,r+=n[e][1];return n}function ko(e){return Number.isInteger(e)&&e>0}class Do{}class Po extends Do{constructor(e,t){super(),this.command=e,this.rowsRemovals=t}doUndo(e){e.undoRemoveRows(this)}doRedo(e){e.redoRemoveRows(this)}}class Ho extends Do{constructor(e,t,n,r,o,i,s){super(),this.sourceLeftCorner=e,this.width=t,this.height=n,this.destinationLeftCorner=r,this.overwrittenCellsData=o,this.addedGlobalNamedExpressions=i,this.version=s}doUndo(e){e.undoMoveCells(this)}doRedo(e){e.redoMoveCells(this)}}class Fo extends Do{constructor(e){super(),this.command=e}doUndo(e){e.undoAddRows(this)}doRedo(e){e.redoAddRows(this)}}class Yo extends Do{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 Vo extends Do{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 Uo extends Do{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 Bo extends Do{constructor(e,t,n,r,o){super(),this.sheet=e,this.startRow=t,this.numberOfRows=n,this.targetRow=r,this.version=o,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 Wo extends Do{constructor(e,t,n,r,o){super(),this.sheet=e,this.startColumn=t,this.numberOfColumns=n,this.targetColumn=r,this.version=o,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 jo extends Do{constructor(e){super(),this.command=e}doUndo(e){e.undoAddColumns(this)}doRedo(e){e.redoAddColumns(this)}}class zo extends Do{constructor(e,t){super(),this.command=e,this.columnsRemovals=t}doUndo(e){e.undoRemoveColumns(this)}doRedo(e){e.redoRemoveColumns(this)}}class Go extends Do{constructor(e){super(),this.sheetName=e}doUndo(e){e.undoAddSheet(this)}doRedo(e){e.redoAddSheet(this)}}class $o extends Do{constructor(e,t,n,r,o){super(),this.sheetName=e,this.sheetId=t,this.oldSheetContent=n,this.scopedNamedExpressions=r,this.version=o}doUndo(e){e.undoRemoveSheet(this)}doRedo(e){e.redoRemoveSheet(this)}}class Ko extends Do{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 Xo extends Do{constructor(e,t){super(),this.sheetId=e,this.oldSheetContent=t}doUndo(e){e.undoClearSheet(this)}doRedo(e){e.redoClearSheet(this)}}class qo extends Do{constructor(e){super(),this.cellContents=e}doUndo(e){e.undoSetCellContents(this)}doRedo(e){e.redoSetCellContents(this)}}class Qo extends Do{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 Jo extends Do{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 Zo extends Do{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 ei extends Do{constructor(e,t,n,r,o){super(),this.namedExpression=e,this.newContent=t,this.oldContent=n,this.scope=r,this.options=o}doUndo(e){e.undoChangeNamedExpression(this)}doRedo(e){e.redoChangeNamedExpression(this)}}class ti extends Do{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 ni{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 ti}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,[]),this.oldData.get(e).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 e=n.length-1;e>=0;--e){const r=n[e];this.operations.addRows(new Ao(t,[[r.rowFrom,r.rowCount]]));for(const{address:e,cellType:t}of r.removedCells)this.operations.restoreCell(e,t);this.restoreOldDataFromVersion(r.version-1)}}undoRemoveColumns(e){this.operations.forceApplyPostponedTransformations();const{command:{sheet:t},columnsRemovals:n}=e;for(let e=n.length-1;e>=0;--e){const r=n[e];this.operations.addColumns(new No(t,[[r.columnFrom,r.columnCount]]));for(const{address:e,cellType:t}of r.removedCells)this.operations.restoreCell(e,t);this.restoreOldDataFromVersion(r.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 Ro(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 Lo(e.command.sheet,[[r.columnStart,r.numberOfColumns]]))}}undoSetCellContents(e){for(const t of e.cellContents){const e=t.address,[n,r]=t.oldContent;kn(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 e=0;e<t.length;e++){const r=t[e];for(let t=0;t<r.length;t++){const o=r[t],i=An(n,t,e);this.operations.restoreCell(i,o)}}for(const[t,r]of e.scopedNamedExpressions)this.operations.restoreNamedExpression(t,r,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 e=0;e<t.length;e++){const r=t[e];for(let t=0;t<r.length;t++){const o=r[t],i=An(n,t,e);this.operations.restoreCell(i,o)}}}undoSetSheetContent(e){const{oldSheetContent:t,sheetId:n}=e;this.operations.clearSheet(n);for(let e=0;e<t.length;e++){const r=t[e];for(let t=0;t<r.length;t++){const o=r[t],i=An(n,t,e);this.operations.restoreCell(i,o)}}}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,o=n[0].length;for(let e=0;e<r;++e)for(let r=0;r<o;++r){const o=An(t.sheet,t.col+r,t.row+e);this.operations.restoreCell(o,n[e][r])}}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 e of t){const[t,n]=e;this.operations.setFormulaToCellFromCache(n,t)}}}class ri{constructor(e,t,n,r,o,i,s,a,l,u){this.operations=t,this.undoRedo=n,this.clipboardOperations=r,this.dependencyGraph=o,this.columnSearch=i,this.parser=s,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 Ao(e,t);this.ensureItIsPossibleToAddRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addRows(n),this.undoRedo.saveOperation(new Fo(n))}removeRows(e,...t){const n=new Ro(e,t);this.ensureItIsPossibleToRemoveRows(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeRows(n);this.undoRedo.saveOperation(new Po(n,r))}addColumns(e,...t){const n=new No(e,t);this.ensureItIsPossibleToAddColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.operations.addColumns(n),this.undoRedo.saveOperation(new jo(n))}removeColumns(e,...t){const n=new Lo(e,t);this.ensureItIsPossibleToRemoveColumns(e,...t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const r=this.operations.removeColumns(n);this.undoRedo.saveOperation(new zo(n,r))}moveCells(e,t,n,r){this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const{version:o,overwrittenCellsData:i,addedGlobalNamedExpressions:s}=this.operations.moveCells(e,t,n,r);this.undoRedo.saveOperation(new Ho(e,t,n,r,i,s,o))}moveRows(e,t,n,r){this.ensureItIsPossibleToMoveRows(e,t,n,r),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const o=this.operations.moveRows(e,t,n,r);this.undoRedo.saveOperation(new Bo(e,t,n,r,o))}moveColumns(e,t,n,r){this.ensureItIsPossibleToMoveColumns(e,t,n,r),this.undoRedo.clearRedoStack();const o=this.operations.moveColumns(e,t,n,r);this.undoRedo.saveOperation(new Wo(e,t,n,r,o))}cut(e,t,n){this.clipboardOperations.cut(e,t,n)}ensureItIsPossibleToCopy(e,t,n){if(!oi(t))throw new pt("width to be positive integer.");if(!oi(n))throw new pt("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 bt;if(this.clipboardOperations.isCutClipboard())this.moveCells(t.sourceLeftCorner,t.width,t.height,e);else if(this.clipboardOperations.isCopyClipboard()){this.clipboardOperations.ensureItIsPossibleToCopyPaste(e);const n=Hn.spanFrom(e,t.width,t.height),r=this.operations.getRangeClipboardCells(n);this.undoRedo.clearRedoStack();const o=this.operations.restoreClipboardCells(t.sourceLeftCorner.sheet,t.getContent(e));this.undoRedo.saveOperation(new Qo(e,r,t.content,o))}}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 Go(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:o}=this.operations.removeSheet(e);this.undoRedo.saveOperation(new $o(t,e,n,o,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 Ko(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 Xo(e,t))}setCellContents(e,t){if(t instanceof Array){for(let e=0;e<t.length;e++)if(!(t[e]instanceof Array))throw new pt("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 o=0;o<t[r].length;o++){const i={sheet:e.sheet,row:e.row+r,col:e.col+o},s=t[r][o];this.clipboardOperations.abortCut();const a=this.operations.setCellContent(i,s);n.push({address:i,newContent:s,oldContent:a})}this.undoRedo.saveOperation(new qo(n))}setSheetContent(e,t){this.ensureScopeIdIsValid(e),this.ensureItIsPossibleToChangeSheetContents(e,t),Mo(t),this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut();const n=this.operations.getSheetClipboardCells(e);this.operations.setSheetContent(e,t),this.undoRedo.saveOperation(new Uo(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 Yo(e,t,n))}validateSwapRowIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);this.validateRowOrColumnMapping(e,t,"row")}testColumnOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Hn.spanFrom({sheet:e,col:n,row:0},1,1/0);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Pt}}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 Vo(e,t,n))}validateSwapColumnIndexes(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);this.validateRowOrColumnMapping(e,t,"column")}testRowOrderForArrays(e,t){for(const[n,r]of t)if(n!==r){const t=Hn.spanFrom({sheet:e,col:0,row:n},1/0,1);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(t))throw new Pt}}mappingFromOrder(e,t,n){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e);if(t.length!==r)throw new pt(`number of ${n}s provided to be sheet ${"row"===n?"height":"width"}.`);const o=[];for(let e=0;e<r;e++)t[e]!==e&&o.push([e,t[e]]);return o}undo(){if(this.undoRedo.isUndoStackEmpty())throw new vt;this.clipboardOperations.abortCut(),this.undoRedo.undo()}redo(){if(this.undoRedo.isRedoStackEmpty())throw new _t;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 Jo(e,t,n,r))}changeNamedExpressionExpression(e,t,n,r){this.ensureItIsPossibleToChangeNamedExpression(e,n,t);const[o,i]=this.operations.changeNamedExpressionExpression(e,n,t,r);this.undoRedo.clearRedoStack(),this.clipboardOperations.abortCut(),this.undoRedo.saveOperation(new ei(o,n,i,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 Zo(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 wt(e);this.ensureNamedExpressionIsValid(t)}isItPossibleToRemoveNamedExpression(e,t){if(this.ensureScopeIdIsValid(t),void 0===this.namedExpressions.namedExpressionForScope(e,t))throw new wt(e)}ensureItIsPossibleToAddRows(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);if(this.dependencyGraph.getSheetHeight(e)+t.map((e=>e[1])).reduce(((e,t)=>e+t),0)>this.maxRows)throw new ct;for(const[e,n]of t)if(!ii(e)||!oi(n))throw new pt("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(!ii(n)||!ii(t))throw new pt("starting and ending row to be nonnegative.");if(t<n)throw new pt("starting row to be smaller than the ending row.");if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e)}}ensureItIsPossibleToAddColumns(e,...t){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);if(this.dependencyGraph.getSheetWidth(e)+t.map((e=>e[1])).reduce(((e,t)=>e+t),0)>this.maxColumns)throw new ct;for(const[e,n]of t)if(!ii(e)||!oi(n))throw new pt("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(!ii(n)||!ii(t))throw new pt("starting and ending column to be nonnegative.");if(t<n)throw new pt("starting column to be smaller than the ending column.");if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e)}}ensureItIsPossibleToMoveRows(e,t,n,r){this.ensureItIsPossibleToAddRows(e,[r,n]);const o=An(e,0,t),i=An(e,0,r);if(!this.sheetMapping.hasSheetWithId(e)||Nn(o)||Nn(i)||!oi(n)||r<=t+n&&r>=t)throw new pt("a valid range of rows to move.");const s=this.dependencyGraph.getSheetWidth(e),a=Hn.spanFrom(o,s,n);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new Pt;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllRows(ot.fromNumberOfRows(e,r-1,2)))throw new Ht}ensureItIsPossibleToMoveColumns(e,t,n,r){this.ensureItIsPossibleToAddColumns(e,[r,n]);const o=An(e,t,0),i=An(e,r,0);if(!this.sheetMapping.hasSheetWithId(e)||Nn(o)||Nn(i)||!oi(n)||r<=t+n&&r>=t)throw new pt("a valid range of columns to move.");const s=this.dependencyGraph.getSheetHeight(e),a=Hn.spanFrom(o,n,s);if(this.dependencyGraph.arrayMapping.isFormulaArrayInRange(a))throw new Pt;if(r>0&&this.dependencyGraph.arrayMapping.isFormulaArrayInAllColumns(it.fromNumberOfColumns(e,r-1,2)))throw new Ht}ensureItIsPossibleToAddSheet(e){if(this.sheetMapping.hasSheetWithName(e))throw new ht(e)}ensureItIsPossibleToRenameSheet(e,t){if(!this.sheetMapping.hasSheetWithId(e))throw new lt(e);const n=this.sheetMapping.get(t);if(void 0!==n&&n!==e)throw new ht(t)}ensureItIsPossibleToChangeContent(e){if(Nn(e))throw new mt(e);if(!this.sheetMapping.hasSheetWithId(e.sheet))throw new lt(e.sheet)}ensureItIsPossibleToChangeCellContents(e,t){const n=To(t),r=Hn.spanFrom(e,n.width,n.height);this.ensureRangeInSizeLimits(r);for(const e of r.addresses(this.dependencyGraph))this.ensureItIsPossibleToChangeContent(e)}ensureItIsPossibleToChangeSheetContents(e,t){const n=To(t),r=Hn.spanFrom(An(e,0,0),n.width,n.height);this.ensureRangeInSizeLimits(r)}ensureRangeInSizeLimits(e){if(e.exceedsSheetSizeLimits(this.maxColumns,this.maxRows))throw new ct}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 lt(e)}validateRowOrColumnMapping(e,t,n){const r="row"===n?this.dependencyGraph.getSheetHeight(e):this.dependencyGraph.getSheetWidth(e),o=t.map((([e,t])=>e)).sort(((e,t)=>e-t)),i=t.map((([e,t])=>t)).sort(((e,t)=>e-t));for(let e=0;e<o.length;e++){if(!ii(o[e])||o[e]>=r)throw new pt(`${n} numbers to be nonnegative integers and less than sheet ${"row"===n?"height":"width"}.`);if(o[e]===o[e+1])throw new pt(`source ${n} numbers to be unique.`);if(o[e]!==i[e])throw new pt(`target ${n} numbers to be permutation of source ${n} numbers.`)}}ensureNamedExpressionNameIsValid(e,t){if(!this.namedExpressions.isNameValid(e))throw new yt(e);if(!this.namedExpressions.isNameAvailable(e,t))throw new gt(e)}ensureNamedExpressionIsValid(e){const t=this.cellContentParser.parse(e);if(t instanceof oo.Formula){const e=this.parser.parse(t.formula,An(-1,0,0));if(fo(e.ast))throw new Ft}}}function oi(e){return Number.isInteger(e)&&e>0}function ii(e){return Number.isInteger(e)&&e>=0}class si{constructor(e,t,n,r,o,i){this.config=e,this.stats=t,this.interpreter=n,this.lazilyTransformingAstService=r,this.dependencyGraph=o,this.columnSearch=i}run(){this.stats.start(et.TOP_SORT);const{sorted:e,cycled:t}=this.dependencyGraph.topSortWithScc();this.stats.end(et.TOP_SORT),this.stats.measure(et.EVALUATION,(()=>{this.recomputeFormulas(t,e)}))}partialRun(e){const t=rt.empty();return this.stats.measure(et.EVALUATION,(()=>{this.dependencyGraph.graph.getTopSortedWithSccSubgraphFrom(e,(e=>{if(e instanceof zt){const n=e.isComputed()?e.getCellValue():void 0,r=this.recomputeFormulaVertexValue(e);if(r!==n){const o=e.getAddress(this.lazilyTransformingAstService);return t.addChange(r,o),this.columnSearch.change(je(n),je(r),o),!0}return!1}return!(e instanceof Kt&&(e.clearCache(),0))}),(e=>{if(e instanceof Kt)e.clearCache();else if(e instanceof zt){const n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.remove(je(e.valueOrUndef()),n);const r=new Cn(sn.CYCLE,void 0,e);e.setCellValue(r),t.addChange(r,n)}}))})),t}runAndForget(e,t,n){const r=[];for(const e of Be(n,t))if(e instanceof Hn){const t=e;if(void 0===this.dependencyGraph.getRange(t.start,t.end)){const e=new Kt(t);this.dependencyGraph.rangeMapping.setRange(e),r.push(e)}}const o=this.evaluateAstToCellValue(e,new Vn(t,this.config.useArrayArithmetic));return r.forEach((e=>{this.dependencyGraph.rangeMapping.removeRange(e)})),o}recomputeFormulas(e,t){e.forEach((e=>{e instanceof zt&&e.setCellValue(new Cn(sn.CYCLE,void 0,e))})),t.forEach((e=>{if(e instanceof zt){const t=this.recomputeFormulaVertexValue(e),n=e.getAddress(this.lazilyTransformingAstService);this.columnSearch.add(je(t),n)}else e instanceof Kt&&e.clearCache()}))}recomputeFormulaVertexValue(e){const t=e.getAddress(this.lazilyTransformingAstService);if(e instanceof Gt&&(e.array.size.isRef||!this.dependencyGraph.isThereSpaceForArray(e)))return e.setNoSpace();{const n=e.getFormula(this.lazilyTransformingAstService),r=this.evaluateAstToCellValue(n,new Vn(t,this.config.useArrayArithmetic,e));return e.setCellValue(r)}}evaluateAstToCellValue(e,t){const n=this.interpreter.evaluateAst(e,t);return n instanceof nt?n:n===We&&this.config.evaluateNullToZero?0:n}}class ai{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 li{constructor(e,t){this.name=e,this.newValue=t}}class ui{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===po.SHEET_FOR_WORKBOOK_EXPRESSIONS){const e=this.namedExpressions.namedExpressionInAddress(n.row);if(!e)throw new Error("Missing named expression");return new li(e.displayName,this.exportScalarOrRange(t))}if(t instanceof nt){const e=[];for(const[r,o]of t.entriesFromTopLeftCorner(n))e.push(new ai(o,this.exportValue(r)));return e}return new ai(n,this.exportValue(t))}exportValue(e){return e instanceof nt?this.detailedError(new Cn(sn.VALUE,J.ScalarExpected)):this.config.smartRounding&&Je(e)?this.cellValueRounding(je(e)):e instanceof Cn?this.detailedError(e):e===We?null:je(e)}exportScalarOrRange(e){return e instanceof nt?e.rawData().map((e=>e.map((e=>this.exportValue(e))))):this.exportValue(e)}detailedError(e){var t,n;let r;const o=null===(t=e.root)||void 0===t?void 0:t.getAddress(this.lazilyTransformingService);return void 0!==o&&(r=o.sheet===po.SHEET_FOR_WORKBOOK_EXPRESSIONS?null===(n=this.namedExpressions.namedExpressionInAddress(o.row))||void 0===n?void 0:n.displayName:x(this.sheetIndexMapping,o,-1)),new cr(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}}class hi{constructor(e,t,n,r,o,i){this.dependencyGraph=e,this.columnSearch=t,this.parser=n,this.cellContentParser=r,this.stats=o,this.arraySizePredictor=i,this.buildStrategy=new ci(e,t,n,o,r,i)}buildGraph(e,t){const n=t.measure(et.COLLECT_DEPENDENCIES,(()=>this.buildStrategy.run(e)));this.dependencyGraph.getAndClearContentChanges(),t.measure(et.PROCESS_DEPENDENCIES,(()=>this.processDependencies(n)))}processDependencies(e){e.forEach(((e,t)=>{this.dependencyGraph.processCellDependencies(e,t)}))}}class ci{constructor(e,t,n,r,o,i){this.dependencyGraph=e,this.columnIndex=t,this.parser=n,this.stats=r,this.cellContentParser=o,this.arraySizePredictor=i}run(e){const t=new Map;for(const n in e){const r=this.dependencyGraph.getSheetId(n),o=e[n];for(let e=0;e<o.length;++e){const n=o[e];for(let o=0;o<n.length;++o){const i=n[o],s=An(r,o,e),a=this.cellContentParser.parse(i);if(a instanceof oo.Formula){const e=this.stats.measure(et.PARSER,(()=>this.parser.parse(a.formula,s)));if(e.errors.length>0){this.shrinkArrayIfNeeded(s);const t=new gn(e.errors,a.formula);this.dependencyGraph.addVertex(s,t)}else{this.shrinkArrayIfNeeded(s);const n=this.arraySizePredictor.checkArraySize(e.ast,s);if(n.isScalar()){const n=new $t(e.ast,s,0);t.set(n,Be(e.dependencies,s)),this.dependencyGraph.addVertex(s,n),e.hasVolatileFunction&&this.dependencyGraph.markAsVolatile(n),e.hasStructuralChangeFunction&&this.dependencyGraph.markAsDependentOnStructureChange(n)}else{const r=new Gt(e.ast,s,new ur(n.width,n.height));t.set(r,Be(e.dependencies,s)),this.dependencyGraph.addArrayVertex(s,r)}}}else if(a instanceof oo.Empty);else{this.shrinkArrayIfNeeded(s);const e=new fn(a.value,i);this.columnIndex.add(je(a.value),s),this.dependencyGraph.addVertex(s,e)}}}}return t}shrinkArrayIfNeeded(e){const t=this.dependencyGraph.getCell(e);t instanceof Gt&&this.dependencyGraph.shrinkArrayToCorner(t)}}const di=new Map([["gpl-v3",1],["missing",2],["invalid",3],["expired",4]]);class mi extends lr{version(e,t){return this.runFunction(e.args,t,this.metadata("VERSION"),(()=>{const{licenseKeyValidityState:e,licenseKey:t}=this.config;let n;return di.has(t)?n=di.get(t):di.has(e)?n=di.get(e):"valid"===e&&(n=t.slice(-5)),`HyperFormula v${Yi.version}, ${n}`}))}}function pi(e,t){var n;let r=t.implementedFunctions[e];const o=null===(n=t.aliases)||void 0===n?void 0:n[e];if(void 0!==o){if(void 0!==r)throw new Yt(e,t.name);r=t.implementedFunctions[o]}if(void 0===r)throw kt.functionNotDeclaredInPlugin(e,t.name);return r}mi.implementedFunctions={VERSION:{method:"version",parameters:[]}};class fi{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)fi.loadPluginFunctions(t,this.instancePlugins)}else this.instancePlugins=new Map(fi.plugins);for(const[e,t]of fi.protectedFunctions())fi.loadFunctionUnprotected(t,e,this.instancePlugins);for(const[e,t]of this.instancePlugins.entries())this.categorizeFunction(e,pi(e,t))}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 Dt.cannotUnregisterFunctionWithId(e);this.plugins.delete(e)}static unregisterFunctionPlugin(e){for(const t of this.protectedPlugins())if(t===e)throw Dt.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(Yi.getRegisteredLanguagesCodes());Object.keys(e).forEach((n=>{t.has(n)&&Yi.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 Dt.cannotRegisterFunctionWithId(t);this.loadFunctionUnprotected(e,t,n)}static loadFunctionUnprotected(e,t,n){const r=pi(t,e).method;if(!Object.prototype.hasOwnProperty.call(e.prototype,r))throw kt.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 o=t.find((e=>e instanceof r));void 0===o&&(o=new r(e),t.push(o));const i=pi(n,r),s=i.method;this.functions.set(n,[s,o]);const a=i.arraySizeMethod;void 0!==a&&this.arraySizeFunctions.set(n,[a,o])}}getFunctionPlugin(e){if(!fi.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)fi.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)}}var gi;fi.plugins=new Map,fi._protectedPlugins=new Map([["VERSION",mi],["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"}(gi||(gi={}));const yi=(e,t)=>({operator:e,value:t});class wi{constructor(e){var t,n,r,o;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!==(o=null===(r=e.translationPackage.getMaybeFunctionTranslation("FALSE"))||void 0===r?void 0:r.toLowerCase())&&void 0!==o?o:"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:_i(n,t)}:void 0}parseCriterion(e,t){if("number"==typeof e||"boolean"==typeof e)return yi(gi.EQUAL,e);if("string"==typeof e){const n=vi.exec(e);let r,o;n?(o=function(e){switch(e){case">":return gi.GREATER_THAN;case">=":return gi.GREATER_THAN_OR_EQUAL;case"<":return gi.LESS_THAN;case"<=":return gi.LESS_THAN_OR_EQUAL;case"<>":return gi.NOT_EQUAL;case"=":return gi.EQUAL;default:return}}(n[1]),r=n[2]):(o=gi.EQUAL,r=e);const i=t.coerceToMaybeNumber(r),s=r.toLowerCase()===this.trueString||r.toLowerCase()!==this.falseString&&void 0;if(void 0===o)return;if(""===r)return yi(o,null);if(void 0!==i)return yi(o,je(i));if(o===gi.EQUAL||o===gi.NOT_EQUAL)return yi(o,null!=s?s:r)}}}const vi=/([<>=]+)(.*)/,_i=(e,t)=>{switch(e.operator){case gi.GREATER_THAN:return"number"==typeof e.value?n=>"number"==typeof n&&t.floatCmp(n,e.value)>0:e=>!1;case gi.GREATER_THAN_OR_EQUAL:return"number"==typeof e.value?n=>"number"==typeof n&&t.floatCmp(n,e.value)>=0:e=>!1;case gi.LESS_THAN:return"number"==typeof e.value?n=>"number"==typeof n&&t.floatCmp(n,e.value)<0:e=>!1;case gi.LESS_THAN_OR_EQUAL:return"number"==typeof e.value?n=>"number"==typeof n&&t.floatCmp(n,e.value)<=0:e=>!1;case gi.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===We;case gi.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!==We}};class bi{constructor(e,t,n,r,o,i,s,a,l,u){this.config=e,this.dependencyGraph=t,this.columnSearch=n,this.stats=r,this.arithmeticHelper=o,this.functionRegistry=i,this.namedExpressions=s,this.serialization=a,this.arraySizePredictor=l,this.dateTimeHelper=u,this.equalOp=(e,t)=>Ci(this.arithmeticHelper.eq,e,t),this.notEqualOp=(e,t)=>Ci(this.arithmeticHelper.neq,e,t),this.greaterThanOp=(e,t)=>Ci(this.arithmeticHelper.gt,e,t),this.lessThanOp=(e,t)=>Ci(this.arithmeticHelper.lt,e,t),this.greaterThanOrEqualOp=(e,t)=>Ci(this.arithmeticHelper.geq,e,t),this.lessThanOrEqualOp=(e,t)=>Ci(this.arithmeticHelper.leq,e,t),this.concatOp=(e,t)=>Ci(this.arithmeticHelper.concat,Kn(e),Kn(t)),this.plusOp=(e,t)=>Ci(this.arithmeticHelper.addWithEpsilon,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.minusOp=(e,t)=>Ci(this.arithmeticHelper.subtract,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.timesOp=(e,t)=>Ci(this.arithmeticHelper.multiply,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.powerOp=(e,t)=>Ci(this.arithmeticHelper.pow,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.divOp=(e,t)=>Ci(this.arithmeticHelper.divide,this.arithmeticHelper.coerceScalarToNumberOrError(e),this.arithmeticHelper.coerceScalarToNumberOrError(t)),this.unaryMinusOp=e=>Si(this.arithmeticHelper.unaryMinus,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.percentOp=e=>Si(this.arithmeticHelper.unaryPercent,this.arithmeticHelper.coerceScalarToNumberOrError(e)),this.unaryPlusOp=e=>this.arithmeticHelper.unaryPlus(e),this.functionRegistry.initializePlugins(this),this.criterionBuilder=new wi(e)}evaluateAst(e,t){let n=this.evaluateAstWithoutPostprocessing(e,t);if(Je(n)){if(Qn(je(n)))return new Cn(sn.NUM,J.NaN);n=Ge(n,Jn(je(n)))}return n instanceof nt&&1===n.height()&&1===n.width()&&([[n]]=n.data),function(e,t){return e instanceof Cn&&void 0!==t?e.attachRootVertex(t):e}(n,t.formulaVertex)}evaluateAstWithoutPostprocessing(e,t){switch(e.type){case Y.EMPTY:return We;case Y.CELL_REFERENCE:{const n=e.reference.toSimpleCellAddress(t.formulaAddress);return Nn(n)?new Cn(sn.REF,J.BadRef):this.dependencyGraph.getCellValue(n)}case Y.NUMBER:case Y.STRING:return e.value;case Y.CONCATENATE_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.concatOp,n,r,t)}case Y.EQUALS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.equalOp,n,r,t)}case Y.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 Y.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 Y.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 Y.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 Y.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 Y.PLUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.plusOp,n,r,t)}case Y.MINUS_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.minusOp,n,r,t)}case Y.TIMES_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.timesOp,n,r,t)}case Y.POWER_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.powerOp,n,r,t)}case Y.DIV_OP:{const n=this.evaluateAst(e.left,t),r=this.evaluateAst(e.right,t);return this.binaryRangeWrapper(this.divOp,n,r,t)}case Y.PLUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryPlusOp,n,t)}case Y.MINUS_UNARY_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.unaryMinusOp,n,t)}case Y.PERCENT_OP:{const n=this.evaluateAst(e.value,t);return this.unaryRangeWrapper(this.percentOp,n,t)}case Y.FUNCTION_CALL:{if("valid"!==this.config.licenseKeyValidityState&&!fi.functionIsProtected(e.procedureName))return new Cn(sn.LIC,J.LicenseKey(this.config.licenseKeyValidityState));const n=this.functionRegistry.getFunction(e.procedureName);return void 0!==n?n(e,new Vn(t.formulaAddress,t.arraysFlag||this.functionRegistry.isArrayFunction(e.procedureName),t.formulaVertex)):new Cn(sn.NAME,J.FunctionName(e.procedureName))}case Y.NAMED_EXPRESSION:{const n=this.namedExpressions.nearestNamedExpression(e.expressionName,t.formulaAddress.sheet);return n?this.dependencyGraph.getCellValue(n.address):new Cn(sn.NAME,J.NamedExpressionName(e.expressionName))}case Y.CELL_RANGE:{if(!this.rangeSpansOneSheet(e))return new Cn(sn.REF,J.RangeManySheets);const n=Hn.fromCellRange(e,t.formulaAddress),r=this.dependencyGraph.getArray(n);if(r){const e=r.array;if(e instanceof Bt)throw new Error("Array should be already computed");if(e instanceof Cn)return e;if(e instanceof Wt)return nt.fromRange(e.raw(),n,this.dependencyGraph);throw new Error("Unknown array")}return nt.onlyRange(n,this.dependencyGraph)}case Y.COLUMN_RANGE:{if(!this.rangeSpansOneSheet(e))return new Cn(sn.REF,J.RangeManySheets);const n=Fn.fromColumnRange(e,t.formulaAddress);return nt.onlyRange(n,this.dependencyGraph)}case Y.ROW_RANGE:{if(!this.rangeSpansOneSheet(e))return new Cn(sn.REF,J.RangeManySheets);const n=Yn.fromRowRangeAst(e,t.formulaAddress);return nt.onlyRange(n,this.dependencyGraph)}case Y.PARENTHESIS:return this.evaluateAst(e.expression,t);case Y.ARRAY:{let n;const r=[];for(const o of e.args){let e;const i=[];for(const n of o){const r=jn(this.evaluateAst(n,t)),o=r.height();if(void 0===e)e=o,i.push(...r.data);else{if(e!==o)return new Cn(sn.REF,J.SizeMismatch);for(let e=0;e<o;e++)i[e].push(...r.data[e])}}const s=i[0].length;if(void 0===n)n=s,r.push(...i);else{if(n!==s)return new Cn(sn.REF,J.SizeMismatch);r.push(...i)}}return nt.onlyValues(r)}case Y.ERROR_WITH_RAW_INPUT:case Y.ERROR:return e.error}}rangeSpansOneSheet(e){return e.start.sheet===e.end.sheet}unaryRangeWrapper(e,t,n){var r;if(t instanceof nt&&!n.arraysFlag&&(t=null!==(r=ir(t,n))&&void 0!==r?r:new Cn(sn.VALUE,J.ScalarExpected)),t instanceof Cn)return t;if(t instanceof nt){const n=t.data.map((t=>t.map(e)));return nt.onlyValues(n)}return e(t)}binaryRangeWrapper(e,t,n,r){var o,i;if(t instanceof nt&&!r.arraysFlag&&(t=null!==(o=ir(t,r))&&void 0!==o?o:new Cn(sn.VALUE,J.ScalarExpected)),t instanceof Cn)return t;if(n instanceof nt&&!r.arraysFlag&&(n=null!==(i=ir(n,r))&&void 0!==i?i:new Cn(sn.VALUE,J.ScalarExpected)),n instanceof Cn)return n;if(t instanceof nt||n instanceof nt){if(!(t instanceof nt)){if(n.isAdHoc()){const r=n.data;for(let n=0;n<r.length;n++)for(let o=0;o<r[0].length;o++)r[n][o]=e(t,r[n][o]);return nt.onlyValues(r)}t=nt.fromScalar(t)}if(!(n instanceof nt)){if(t.isAdHoc()){const r=t.data;for(let t=0;t<r.length;t++)for(let o=0;o<r[0].length;o++)r[t][o]=e(r[t][o],n);return nt.onlyValues(r)}n=nt.fromScalar(n)}if(t.width()===n.width()&&t.height()===n.height()){if(t.isAdHoc()){const r=t.data,o=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],o[t][n]);return nt.onlyValues(r)}if(n.isAdHoc()){const r=t.data,o=n.data;for(let t=0;t<r.length;t++)for(let n=0;n<r[0].length;n++)o[t][n]=e(r[t][n],o[t][n]);return nt.onlyValues(o)}}const r=Math.max(t.width(),n.width()),o=Math.max(t.height(),n.height()),i=Array(o);for(let e=0;e<o;e++)i[e]=Array(r);for(let s=0;s<o;s++){const o=1!==t.height()?s:0,a=1!==n.height()?s:0;for(let l=0;l<r;l++){const r=1!==t.width()?l:0,u=1!==n.width()?l:0;o<t.height()&&a<n.height()&&r<t.width()&&u<n.width()?i[s][l]=e(t.data[o][r],n.data[a][u]):i[s][l]=new Cn(sn.NA)}}return nt.onlyValues(i)}return e(t,n)}}function Si(e,t){return t instanceof Cn?t:e(t)}function Ci(e,t,n){return t instanceof Cn?t:n instanceof Cn?n:e(t,n)}class Ei{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}}class Mi{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 Ei(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(et.TRANSFORM_ASTS_POSTPONED);for(let r=n;r<this.transformations.length;r++){const n=this.transformations[r];n.isIrreversible()&&(this.undoRedo.storeDataForVersion(r,t,this.parser.computeHashFromAst(e)),this.parser.rememberNewAst(e));const[o,i]=n.transformSingleAst(e,t);e=o,t=i}const r=this.parser.rememberNewAst(e);return this.stats.end(et.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)}}}const Ti=-1;function Ri(e,t){return typeof e==typeof t?e===We?0:e<t?-1:e>t?1:0:e===We?-1:t===We?1:t instanceof Cn||"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}class Ai{constructor(e){this.dependencyGraph=e}advancedFind(e,t,{returnOccurrence:n}={returnOccurrence:"first"}){const r=t.range,o=void 0===r?t.valuesFromTopLeftCorner():this.dependencyGraph.computeListOfValuesInRange(r),i="first"===n?e=>e<o.length:e=>e>=0,s="first"===n?e=>e+1:e=>e-1;for(let t="first"===n?0:o.length-1;i(t);t=s(t))if(e(je(o[t])))return t;return-1}basicFind(e,t,n,{ordering:r,ifNoMatch:o,returnOccurrence:i}){const s="string"==typeof e?or(e):e,a=t.range;return void 0===a?this.findNormalizedValue(s,t.valuesFromTopLeftCorner(),o,i):"none"===r?this.findNormalizedValue(s,this.dependencyGraph.computeListOfValuesInRange(a),o,i):function(e,t,{searchCoordinate:n,orderingDirection:r,ifNoMatch:o},i){const s=t.start[n],a="col"===n?t.effectiveEndColumn(i):t.effectiveEndRow(i),l="col"===n?e=>je(i.getCellValue(An(t.sheet,e,t.start.row))):e=>je(i.getCellValue(An(t.sheet,t.start.col,e))),u="asc"===r?(e,t)=>Ri(e,t):(e,t)=>-Ri(e,t),h=function(e,t,n){let r=t,o=n;for(;r<o;){const t=Math.ceil((r+o)/2);e(t)?r=t:o=t-1}return r===o&&e(r)?r:Ti}((t=>u(e,l(t))>=0),s,a),c=l(h);if(c===e)return h-s;if("returnLowerBound"===o){if(h===Ti)return"asc"===r?Ti:0;if(typeof c!=typeof e)return Ti;if("asc"===r)return h-s;const t=h+1;return t<=a?t-s:Ti}if("returnUpperBound"===o){if(h===Ti)return"asc"===r?0:Ti;if(typeof c!=typeof e)return Ti;if("desc"===r)return h-s;const t=h+1;return t<=a?t-s:Ti}return Ti}(s,a,{searchCoordinate:n,orderingDirection:r,ifNoMatch:o},this.dependencyGraph)}findNormalizedValue(e,t,n="returnNotFound",r="first"){const o=t.map(je).map((e=>"string"==typeof e?or(e):e));if("returnNotFound"===n)return"first"===r?o.indexOf(e):o.lastIndexOf(e);const i="returnLowerBound"===n?(e,t)=>Ri(e,t):(e,t)=>-Ri(e,t);let s="returnLowerBound"===n?-1/0:1/0,a=-1;const l="first"===r?e=>e<o.length:e=>e>=0,u="first"===r?e=>e+1:e=>e-1;for(let t="first"===r?0:o.length-1;l(t);t=u(t)){const n=o[t];if(n===e)return t;i(n,e)>0||i(s,n)<0&&(s=n,a=t)}return a}}class Ni extends Ai{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)}}class Li{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 Ni(e)}add(e,t){if(!(e===We||e instanceof Cn))if(e instanceof nt)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.addSingleCellValue(je(n),r);else this.addSingleCellValue(e,t)}remove(e,t){if(void 0!==e)if(e instanceof nt)for(const[n,r]of e.entriesFromTopLeftCorner(t))this.removeSingleValue(je(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(je(t.oldValue),je(t.value),t.address)}moveValues(e,t,n,r){for(const[o,i]of e){const e=Ln(i,r,t,n);this.remove(o,i),this.add(o,e)}}removeValues(e){for(const[t,n]of e)this.remove(t,n)}find(e,t,{ordering:n,ifNoMatch:r,returnOccurrence:o}){null==o&&(o="none"===n?"first":"last");const i=this.findUsingColumnIndex(e,t,o);return void 0!==i?i:this.binarySearchStrategy.find(e,t,{ordering:n,ifNoMatch:r,returnOccurrence:o})}findUsingColumnIndex(e,t,n){const r=t.range;if(void 0===r)return;this.ensureRecentData(r.sheet,r.start.col,e);const o=this.getColumnMap(r.sheet,r.start.col);if(!o)return-1;const i="string"==typeof e?or(e):e,s=o.get(i);if(!s||!s.index||0===s.index.length)return;const a=Li.findRowBelongingToRange(s,r,n);return void 0!==a?a-r.start.row:void 0}static findRowBelongingToRange(e,t,n){const r=t.start.row,o=t.end.row,i="first"===n?xi(r,e.index,"upperBound"):xi(o,e.index,"lowerBound");if(-1===i)return;const s=e.index[i];return s>=r&&s<=o?s:void 0}advancedFind(e,t,n={returnOccurrence:"first"}){return this.binarySearchStrategy.advancedFind(e,t,n)}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 o=this.getColumnMap(e,t).get(n);return o||(o={version:this.transformingService.version(),index:[]},r.set(n,o)),o}ensureRecentData(e,t,n){const r=this.getValueIndex(e,t,n),o=this.transformingService.version();if(r.version===o)return;const i=this.transformingService.getTransformationsFrom(r.version,(t=>t.sheet===e&&(t instanceof wo||t instanceof Co)));for(const e of i)e instanceof wo?this.addRows(t,e.rowsSpan,n):e instanceof Co&&this.removeRows(t,e.rowsSpan,n);r.version=o}addSingleCellValue(e,t){this.stats.measure(et.BUILD_COLUMN_INDEX,(()=>{this.ensureRecentData(t.sheet,t.col,e),"string"==typeof e&&(e=or(e));const n=this.getValueIndex(t.sheet,t.col,e);Li.addValue(n,t.row)}))}removeSingleValue(e,t){this.stats.measure(et.BUILD_COLUMN_INDEX,(()=>{this.ensureRecentData(t.sheet,t.col,e);const n=this.getColumnMap(t.sheet,t.col);"string"==typeof e&&(e=or(e));const r=n.get(e);if(!r)return;const o=xi(t.row,r.index);o>-1&&r.index.splice(o,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);Li.shiftRows(r,t.rowStart,t.numberOfRows)}removeRows(e,t,n){const r=this.getValueIndex(t.sheet,e,n);Li.removeRowsFromValues(r,t),Li.shiftRows(r,t.rowEnd+1,-t.numberOfRows)}static addValue(e,t){const n=xi(t,e.index,"lowerBound");e.index[n]===t||e.index.splice(n+1,0,t)}static removeRowsFromValues(e,t){const n=xi(t.rowStart,e.index,"upperBound"),r=xi(t.rowEnd,e.index,"lowerBound");n>-1&&r>-1&&n<=r&&e.index[n]<=t.rowEnd&&e.index.splice(n,r-n+1)}static shiftRows(e,t,n){const r=xi(t,e.index,"upperBound");if(-1!==r)for(let t=r;t<e.index.length;++t)e.index[t]+=n}}function xi(e,t,n="upperBound"){let r=0,o=t.length-1;for(;r<=o;){const n=Math.floor((r+o)/2);if(e>t[n])r=n+1;else{if(!(e<t[n]))return n;o=n-1}}const i="lowerBound"===n?o:r;return i>=0&&i<=t.length?i:-1}class Oi{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)}}class Ii{constructor(e,t,n){this.dependencyGraph=e,this.unparser=t,this.exporter=n}getCellHyperlink(e){const t=this.dependencyGraph.getCell(e);if(t instanceof $t){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 $t){const r=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);return t=null!=t?t:e,this.unparser.unparse(r,t)}if(n instanceof Gt){const r=n.getAddress(this.dependencyGraph.lazilyTransformingAstService);if(r.row!==e.row||r.col!==e.col||r.sheet!==e.sheet)return;t=null!=t?t:e;const o=n.getFormula(this.dependencyGraph.lazilyTransformingAstService);if(void 0!==o)return this.unparser.unparse(o,t)}else if(n instanceof gn)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),o=new Array(n);for(let i=0;i<n;i++){o[i]=new Array(r);for(let n=0;n<r;n++){const r=An(e,n,i);o[i][n]=t(r)}for(let e=r-1;e>=0&&(null===o[i][e]||void 0===o[i][e]);e--)o[i].pop()}for(let e=n-1;e>=0&&0===o[e].length;e--)o.pop();return o}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 Oe(e,Ne(e),this.dependencyGraph.sheetMapping.fetchDisplayName,t);return new Ii(this.dependencyGraph,n,this.exporter)}}class ki{static buildFromSheets(e,t={},n=[]){const r=new Ui(t);return this.buildEngine(r,e,n)}static buildFromSheet(e,t={},n=[]){const r=new Ui(t),o=r.translationPackage.getUITranslation(on.NEW_SHEET_PREFIX)+"1";return this.buildEngine(r,{[o]:e},n)}static buildEmpty(e={},t=[]){return this.buildEngine(new Ui(e),{},t)}static rebuildWithConfig(e,t,n,r){return this.buildEngine(e,t,n,r)}static buildEngine(e,t={},n=[],r=(e.useStats?new st:new at)){r.start(et.BUILD_ENGINE_TOTAL);const o=new po,i=new fi(e),s=new Mi(r),a=mn.buildEmpty(s,e,i,o,r),l=function(e,t,n){return t.useColumnIndex?new Li(e,t,n):new Ni(e)}(a,e,r),u=a.sheetMapping,h=a.addressMapping;for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)){const r=t[n];Mo(r);const o=To(r);if(o.height>e.maxRows||o.width>e.maxColumns)throw new ct;const i=u.addSheet(n);h.autoAddSheet(i,o)}const c=new ke(e,i,u.get);s.parser=c;const d=new Oe(e,Ne(e),u.fetchDisplayName,o),m=new xr(e),p=new Oi(e),f=new Bn(e,m,p),g=new ao(e,m,p),y=new hr(e,i),w=new xo(e,a,l,g,c,r,s,o,y),v=new ni(e,w);s.undoRedo=v;const _=new uo(e,a,w),b=new ri(e,w,v,_,a,l,c,g,s,o);n.forEach((e=>{b.ensureItIsPossibleToAddNamedExpression(e.name,e.expression,e.scope),b.operations.addNamedExpression(e.name,e.expression,e.scope,e.options)}));const S=new ui(e,o,u.fetchDisplayName,s),C=new Ii(a,d,S),E=new bi(e,a,l,r,f,i,o,C,y,m);r.measure(et.GRAPH_BUILD,(()=>{new hi(a,l,c,g,r,y).buildGraph(t,r)}));const M=new si(e,r,E,s,a,l);return M.run(),r.end(et.BUILD_ENGINE_TOTAL),{config:e,stats:r,dependencyGraph:a,columnSearch:l,parser:c,unparser:d,cellContentParser:g,evaluator:M,lazilyTransformingAstService:s,crudOperations:b,exporter:S,namedExpressions:o,serialization:C,functionRegistry:i}}}function Di(e){return()=>{throw new Error(`The "${e}" method cannot be called because this HyperFormula instance has been destroyed`)}}var Pi,Hi=n(51504);!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"}(Pi||(Pi={}));class Fi extends Hi.TinyEmitter{emit(e,...t){return super.emit(e,...t),this}}class Yi{constructor(e,t,n,r,o,i,s,a,l,u,h,c,d,m){this._config=e,this._stats=t,this._dependencyGraph=n,this._columnSearch=r,this._parser=o,this._unparser=i,this._cellContentParser=s,this._evaluator=a,this._lazilyTransformingAstService=l,this._crudOperations=u,this._exporter=h,this._namedExpressions=c,this._serialization=d,this._functionRegistry=m,this._emitter=new Fi,this._evaluationSuspended=!1}static get defaultConfig(){return Bi({})}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(ki.buildFromSheet(e,t,n))}static buildFromSheets(e,t={},n=[]){return this.buildFromEngineState(ki.buildFromSheets(e,t,n))}static buildEmpty(e={},t=[]){return this.buildFromEngineState(ki.buildEmpty(e,t))}static getLanguage(e){gr(e,"string","languageCode");const t=this.registeredLanguages.get(e);if(void 0===t)throw new Ot;return t}static registerLanguage(e,t){if(gr(e,"string","languageCode"),this.registeredLanguages.has(e))throw new It;var n;this.registeredLanguages.set(e,(n=t,new rn(Object.assign({},n.functions),Object.assign({},n.errors),Object.assign({},n.ui))))}static unregisterLanguage(e){if(gr(e,"string","languageCode"),!this.registeredLanguages.has(e))throw new Ot;this.registeredLanguages.delete(e)}static getRegisteredLanguagesCodes(){return Array.from(this.registeredLanguages.keys())}static registerFunctionPlugin(e,t){fi.registerFunctionPlugin(e,t)}static unregisterFunctionPlugin(e){fi.unregisterFunctionPlugin(e)}static registerFunction(e,t,n){gr(e,"string","functionId"),fi.registerFunction(e,t,n)}static unregisterFunction(e){gr(e,"string","functionId"),fi.unregisterFunction(e)}static unregisterAllFunctions(){fi.unregisterAll()}static getRegisteredFunctionNames(e){gr(e,"string","code");const t=fi.getRegisteredFunctionIds();return this.getLanguage(e).getFunctionTranslations(t)}static getFunctionPlugin(e){return gr(e,"string","functionId"),fi.getFunctionPlugin(e)}static getAllFunctionPlugins(){return fi.getPlugins()}static buildFromEngineState(e){return new Yi(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(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellValue(e)}getCellFormula(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this._serialization.getCellFormula(e)}getCellHyperlink(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellHyperlink(e)}getCellSerialized(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this.ensureEvaluationIsNotSuspended(),this._serialization.getCellSerialized(e)}getSheetValues(e){return gr(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetValues(e)}getSheetFormulas(e){return gr(e,"number","sheetId"),this._serialization.getSheetFormulas(e)}getSheetSerialized(e){return gr(e,"number","sheetId"),this.ensureEvaluationIsNotSuspended(),this._serialization.getSheetSerialized(e)}getAllSheetsDimensions(){return this._serialization.genericAllSheetsGetter((e=>this.getSheetDimensions(e)))}getSheetDimensions(e){return gr(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){Object.entries(e).every((([e,t])=>this._config[e]===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(On(e))t=new Hn(e,e);else{if(!Dn(e))throw new Et("SimpleCellAddress | SimpleCellRange","address");t=new Hn(e.start,e.end)}try{this._crudOperations.ensureRangeInSizeLimits(t);for(const e of t.addresses(this._dependencyGraph))this._crudOperations.ensureItIsPossibleToChangeContent(e)}catch(e){return!1}return!0}setCellContents(e,t){return this._crudOperations.setCellContents(e,t),this.recomputeIfDependencyGraphNeedsIt()}swapRowIndexes(e,t){return gr(e,"number","sheetId"),this._crudOperations.setRowOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapRowIndexes(e,t){gr(e,"number","sheetId");try{return this._crudOperations.validateSwapRowIndexes(e,t),this._crudOperations.testRowOrderForArrays(e,t),!0}catch(e){return!1}}setRowOrder(e,t){gr(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"row");return this.swapRowIndexes(e,n)}isItPossibleToSetRowOrder(e,t){gr(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(e){return!1}}swapColumnIndexes(e,t){return gr(e,"number","sheetId"),this._crudOperations.setColumnOrder(e,t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToSwapColumnIndexes(e,t){gr(e,"number","sheetId");try{return this._crudOperations.validateSwapColumnIndexes(e,t),this._crudOperations.testColumnOrderForArrays(e,t),!0}catch(e){return!1}}setColumnOrder(e,t){gr(e,"number","sheetId");const n=this._crudOperations.mappingFromOrder(e,t,"column");return this.swapColumnIndexes(e,n)}isItPossibleToSetColumnOrder(e,t){gr(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(e){return!1}}isItPossibleToAddRows(e,...t){gr(e,"number","sheetId");const n=Io(t);try{return this._crudOperations.ensureItIsPossibleToAddRows(e,...n),!0}catch(e){return!1}}addRows(e,...t){return gr(e,"number","sheetId"),this._crudOperations.addRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveRows(e,...t){gr(e,"number","sheetId");const n=Oo(t);try{return this._crudOperations.ensureItIsPossibleToRemoveRows(e,...n),!0}catch(e){return!1}}removeRows(e,...t){return gr(e,"number","sheetId"),this._crudOperations.removeRows(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToAddColumns(e,...t){gr(e,"number","sheetId");const n=Io(t);try{return this._crudOperations.ensureItIsPossibleToAddColumns(e,...n),!0}catch(e){return!1}}addColumns(e,...t){return gr(e,"number","sheetId"),this._crudOperations.addColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveColumns(e,...t){gr(e,"number","sheetId");const n=Oo(t);try{return this._crudOperations.ensureItIsPossibleToRemoveColumns(e,...n),!0}catch(e){return!1}}removeColumns(e,...t){return gr(e,"number","sheetId"),this._crudOperations.removeColumns(e,...t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveCells(e,t){if(!On(t))throw new Et("SimpleCellAddress","destinationLeftCorner");if(!Dn(e))throw new Et("SimpleCellRange","source");try{const n=new Hn(e.start,e.end);return this._crudOperations.operations.ensureItIsPossibleToMoveCells(n.start,n.width(),n.height(),t),!0}catch(e){return!1}}moveCells(e,t){if(!On(t))throw new Et("SimpleCellAddress","destinationLeftCorner");if(!Dn(e))throw new Et("SimpleCellRange","source");const n=new Hn(e.start,e.end);return this._crudOperations.moveCells(n.start,n.width(),n.height(),t),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveRows(e,t,n,r){gr(e,"number","sheetId"),gr(t,"number","startRow"),gr(n,"number","numberOfRows"),gr(r,"number","targetRow");try{return this._crudOperations.ensureItIsPossibleToMoveRows(e,t,n,r),!0}catch(e){return!1}}moveRows(e,t,n,r){return gr(e,"number","sheetId"),gr(t,"number","startRow"),gr(n,"number","numberOfRows"),gr(r,"number","targetRow"),this._crudOperations.moveRows(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToMoveColumns(e,t,n,r){gr(e,"number","sheetId"),gr(t,"number","startColumn"),gr(n,"number","numberOfColumns"),gr(r,"number","targetColumn");try{return this._crudOperations.ensureItIsPossibleToMoveColumns(e,t,n,r),!0}catch(e){return!1}}moveColumns(e,t,n,r){return gr(e,"number","sheetId"),gr(t,"number","startColumn"),gr(n,"number","numberOfColumns"),gr(r,"number","targetColumn"),this._crudOperations.moveColumns(e,t,n,r),this.recomputeIfDependencyGraphNeedsIt()}copy(e){if(!Dn(e))throw new Et("SimpleCellRange","source");const t=new Hn(e.start,e.end);return this._crudOperations.copy(t.start,t.width(),t.height()),this.getRangeValues(e)}cut(e){if(!Dn(e))throw new Et("SimpleCellRange","source");const t=new Hn(e.start,e.end);return this._crudOperations.cut(t.start,t.width(),t.height()),this.getRangeValues(e)}paste(e){if(!On(e))throw new Et("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(!Dn(e))throw new Et("SimpleCellRange","source");return new Hn(e.start,e.end).arrayOfAddressesInRange().map((e=>e.map((e=>this.getCellValue(e)))))}getRangeFormulas(e){if(!Dn(e))throw new Et("SimpleCellRange","source");return new Hn(e.start,e.end).arrayOfAddressesInRange().map((e=>e.map((e=>this.getCellFormula(e)))))}getRangeSerialized(e){if(!Dn(e))throw new Et("SimpleCellRange","source");return new Hn(e.start,e.end).arrayOfAddressesInRange().map((e=>e.map((e=>this.getCellSerialized(e)))))}getFillRangeData(e,t,n=!1){if(!Dn(e))throw new Et("SimpleCellRange","source");if(!Dn(t))throw new Et("SimpleCellRange","target");const r=new Hn(e.start,e.end),o=new Hn(t.start,t.end);return this.ensureEvaluationIsNotSuspended(),o.arrayOfAddressesInRange().map((o=>o.map((o=>{const i=((o.row-(n?t:e).start.row)%r.height()+r.height())%r.height()+e.start.row,s=((o.col-(n?t:e).start.col)%r.width()+r.width())%r.width()+e.start.col;return this._serialization.getCellSerialized({row:i,col:s,sheet:r.sheet},o)}))))}isItPossibleToAddSheet(e){gr(e,"string","sheetName");try{return this._crudOperations.ensureItIsPossibleToAddSheet(e),!0}catch(e){return!1}}addSheet(e){void 0!==e&&gr(e,"string","sheetName");const t=this._crudOperations.addSheet(e);return this._emitter.emit(Pi.SheetAdded,t),t}isItPossibleToRemoveSheet(e){gr(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}removeSheet(e){gr(e,"number","sheetId");const t=this.sheetMapping.getDisplayName(e);this._crudOperations.removeSheet(e);const n=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(Pi.SheetRemoved,t,n),n}isItPossibleToClearSheet(e){gr(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),!0}catch(e){return!1}}clearSheet(e){return gr(e,"number","sheetId"),this._crudOperations.clearSheet(e),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToReplaceSheetContent(e,t){gr(e,"number","sheetId");try{return this._crudOperations.ensureScopeIdIsValid(e),this._crudOperations.ensureItIsPossibleToChangeSheetContents(e,t),!0}catch(e){return!1}}setSheetContent(e,t){return gr(e,"number","sheetId"),this._crudOperations.setSheetContent(e,t),this.recomputeIfDependencyGraphNeedsIt()}simpleCellAddressFromString(e,t){return gr(e,"string","cellAddress"),gr(t,"number","sheetId"),L(this.sheetMapping.get,e,t)}simpleCellRangeFromString(e,t){return gr(e,"string","cellRange"),gr(t,"number","sheetId"),((e,t,n)=>{const r=t.split(u);if(2!==r.length)return;const[o,i]=r,s=L(e,o,n);if(void 0===s)return;const a=L(e,i,s.sheet);return void 0!==a&&s.sheet===a.sheet?Pn(s,a):void 0})(this.sheetMapping.get,e,t)}simpleCellAddressToString(e,t={}){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");const n="number"==typeof t?t:t.includeSheetName?e.sheet+1:e.sheet;return x(this.sheetMapping.fetchDisplayName,e,n)}simpleCellRangeToString(e,t={}){if(!Dn(e))throw new Et("SimpleCellRange","cellRange");const n="number"==typeof t?t:t.includeSheetName?e.start.sheet+e.end.sheet+1:e.start.sheet;return((e,t,n)=>{const r=x(e,t.start,n),o=x(e,t.end,t.start.sheet);return void 0===r||void 0===o?void 0:`${r}${u}${o}`})(this.sheetMapping.fetchDisplayName,e,n)}getCellDependents(e){let t;if(On(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!Dn(e))throw new Et("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(On(e))t=this._dependencyGraph.addressMapping.getCell(e);else{if(!Dn(e))throw new Et("SimpleCellAddress | SimpleCellRange",e);t=this._dependencyGraph.rangeMapping.getRange(e.start,e.end)}return void 0===t?[]:this._dependencyGraph.dependencyQueryAddresses(t)}getSheetName(e){return gr(e,"number","sheetId"),this.sheetMapping.getDisplayName(e)}getSheetNames(){return this.sheetMapping.sheetNames()}getSheetId(e){return gr(e,"string","sheetName"),this.sheetMapping.get(e)}doesSheetExist(e){return gr(e,"string","sheetName"),this.sheetMapping.hasSheetWithName(e)}getCellType(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return t=this.dependencyGraph.getCell(e),n=e,t instanceof Gt?t.isLeftCorner(n)?an.ARRAYFORMULA:an.ARRAY:t instanceof $t||t instanceof gn?an.FORMULA:t instanceof fn?an.VALUE:an.EMPTY;var t,n}doesCellHaveSimpleValue(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this.getCellType(e)===an.VALUE}doesCellHaveFormula(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===an.FORMULA||t===an.ARRAYFORMULA}isCellEmpty(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");return this.getCellType(e)===an.EMPTY}isCellPartOfArray(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");const t=this.getCellType(e);return t===an.ARRAY||t===an.ARRAYFORMULA}getCellValueType(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return Sn(t)}getCellValueDetailedType(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return Je(n=t)?(r=n)instanceof ze?r.getDetailedType():Ze.NUMBER_RAW:Sn(n);var n,r}getCellValueFormat(e){if(!On(e))throw new Et("SimpleCellAddress","cellAddress");this.ensureEvaluationIsNotSuspended();const t=this.dependencyGraph.getCellValue(e);return Je(n=t)&&(r=n)instanceof ze?r.format:void 0;var n,r}countSheets(){return this.sheetMapping.numberOfSheets()}isItPossibleToRenameSheet(e,t){gr(e,"number","sheetId"),gr(t,"string","newName");try{return this._crudOperations.ensureItIsPossibleToRenameSheet(e,t),!0}catch(e){return!1}}renameSheet(e,t){gr(e,"number","sheetId"),gr(t,"string","newName");const n=this._crudOperations.renameSheet(e,t);void 0!==n&&this._emitter.emit(Pi.SheetRenamed,n,t)}batch(e){this.suspendEvaluation(),this._crudOperations.beginUndoRedoBatchMode();try{e()}catch(e){throw this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation(),e}return this._crudOperations.commitUndoRedoBatchMode(),this.resumeEvaluation()}suspendEvaluation(){this._evaluationSuspended=!0,this._emitter.emit(Pi.EvaluationSuspended)}resumeEvaluation(){this._evaluationSuspended=!1;const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(Pi.EvaluationResumed,e),e}isEvaluationSuspended(){return this._evaluationSuspended}isItPossibleToAddNamedExpression(e,t,n){gr(e,"string","expressionName"),void 0!==n&&gr(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToAddNamedExpression(e,t,n),!0}catch(e){return!1}}addNamedExpression(e,t,n,r){gr(e,"string","expressionName"),void 0!==n&&gr(n,"number","scope"),this._crudOperations.addNamedExpression(e,t,n,r);const o=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(Pi.NamedExpressionAdded,e,o),o}getNamedExpressionValue(e,t){gr(e,"string","expressionName"),void 0!==t&&gr(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){gr(e,"string","expressionName"),void 0!==t&&gr(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){gr(e,"string","expressionName"),void 0!==t&&gr(t,"number","scope");const n=this._namedExpressions.namedExpressionForScope(e,t);if(void 0!==n)return{name:e,scope:t,expression:this._serialization.getCellFormula(n.address),options:n.options}}isItPossibleToChangeNamedExpression(e,t,n){gr(e,"string","expressionName"),void 0!==n&&gr(n,"number","scope");try{return this._crudOperations.ensureItIsPossibleToChangeNamedExpression(e,t,n),!0}catch(e){return!1}}changeNamedExpression(e,t,n,r){return gr(e,"string","expressionName"),void 0!==n&&gr(n,"number","scope"),this._crudOperations.changeNamedExpressionExpression(e,n,t,r),this.recomputeIfDependencyGraphNeedsIt()}isItPossibleToRemoveNamedExpression(e,t){gr(e,"string","expressionName"),void 0!==t&&gr(t,"number","scope");try{return this._crudOperations.isItPossibleToRemoveNamedExpression(e,t),!0}catch(e){return!1}}removeNamedExpression(e,t){gr(e,"string","expressionName"),void 0!==t&&gr(t,"number","scope");const n=this._crudOperations.removeNamedExpression(e,t);if(n){const e=this.recomputeIfDependencyGraphNeedsIt();return this._emitter.emit(Pi.NamedExpressionRemoved,n.displayName,e),e}return[]}listNamedExpressions(e){return void 0!==e&&gr(e,"number","scope"),this._crudOperations.ensureScopeIdIsValid(e),this._namedExpressions.getAllNamedExpressionsNamesInScope(e)}getAllNamedExpressionsSerialized(){return this._serialization.getAllNamedExpressionsSerialized()}normalizeFormula(e){gr(e,"string","formulaString");const{ast:t,address:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new dt;return this._unparser.unparse(t,n)}calculateFormula(e,t){gr(e,"string","formulaString"),gr(t,"number","sheetId"),this._crudOperations.ensureScopeIdIsValid(t);const{ast:n,address:r,dependencies:o}=this.extractTemporaryFormula(e,t);if(void 0===n)throw new dt;const i=this.evaluator.runAndForget(n,r,o);return this._exporter.exportScalarOrRange(i)}getNamedExpressionsFromFormula(e){gr(e,"string","formulaString");const{ast:t,dependencies:n}=this.extractTemporaryFormula(e);if(void 0===t)throw new dt;const r=n.filter((e=>e instanceof Ue)).map((e=>e.name));return[...new Set(r)]}validateFormula(e){gr(e,"string","formulaString");const{ast:t}=this.extractTemporaryFormula(e);return void 0!==t}getRegisteredFunctionNames(){return Yi.getLanguage(this._config.language).getFunctionTranslations(this._functionRegistry.getRegisteredFunctionIds())}getFunctionPlugin(e){return gr(e,"string","functionId"),this._functionRegistry.getFunctionPlugin(e)}getAllFunctionPlugins(){return this._functionRegistry.getPlugins()}numberToDateTime(e){return gr(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDateTime(e)}numberToDate(e){return gr(e,"number","val"),this._evaluator.interpreter.dateTimeHelper.numberToSimpleDate(e)}numberToTime(e){return gr(e,"number","val"),kr(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(){!function(e){for(const[t,n]of Object.entries(e))n instanceof Function?e[t]=Di(n):delete e[t]}(this)}ensureEvaluationIsNotSuspended(){if(this._evaluationSuspended)throw new Nt}extractTemporaryFormula(e,t=1){const n=this._cellContentParser.parse(e),r={sheet:t,col:0,row:0};if(!(n instanceof oo.Formula))return{address:r,dependencies:[]};const{ast:o,errors:i,dependencies:s}=this._parser.parse(n.formula,r);return i.length>0?{address:r,dependencies:[]}:{ast:o,address:r,dependencies:s}}rebuildWithConfig(e){const t=this._config.mergeConfig(e),n=this._config.mergeConfig({language:e.language}),r=this._serialization.withNewConfig(n,this._namedExpressions).getAllSheetsSerialized(),o=this._serialization.getAllNamedExpressionsSerialized(),i=ki.rebuildWithConfig(t,r,o,this._stats);this._config=i.config,this._stats=i.stats,this._dependencyGraph=i.dependencyGraph,this._columnSearch=i.columnSearch,this._parser=i.parser,this._unparser=i.unparser,this._cellContentParser=i.cellContentParser,this._evaluator=i.evaluator,this._lazilyTransformingAstService=i.lazilyTransformingAstService,this._crudOperations=i.crudOperations,this._exporter=i.exporter,this._namedExpressions=i.namedExpressions,this._serialization=i.serialization,this._functionRegistry=i.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(Pi.ValuesUpdated,n),n}}}Yi.version="3.0.0",Yi.buildDate="14/01/2025 11:44:17",Yi.releaseDate="14/01/2025",Yi.languages={},Yi.registeredLanguages=new Map;const Vi=new WeakMap;class Ui{constructor(e={},t=!0){const{accentSensitive:n,caseSensitive:r,caseFirst:o,chooseAddressMappingPolicy:i,context:s,currencySymbol:a,dateFormats:l,decimalSeparator:u,evaluateNullToZero:h,functionArgSeparator:c,functionPlugins:d,ignorePunctuation:m,leapYear1900:p,localeLang:f,language:g,ignoreWhiteSpace:y,licenseKey:w,matchWholeCell:v,arrayColumnSeparator:_,arrayRowSeparator:b,maxRows:S,maxColumns:C,nullYear:E,nullDate:M,parseDateTime:T,precisionEpsilon:R,precisionRounding:A,stringifyDateTime:N,stringifyDuration:L,smartRounding:x,timeFormats:O,thousandSeparator:I,useArrayArithmetic:k,useStats:D,undoLimit:P,useColumnIndex:H,useRegularExpressions:F,useWildcards:Y}=e;t&&Ui.warnDeprecatedOptions(e),this.useArrayArithmetic=dr(k,"boolean","useArrayArithmetic"),this.accentSensitive=dr(n,"boolean","accentSensitive"),this.caseSensitive=dr(r,"boolean","caseSensitive"),this.caseFirst=dr(o,["upper","lower","false"],"caseFirst"),this.ignorePunctuation=dr(m,"boolean","ignorePunctuation"),this.chooseAddressMappingPolicy=null!=i?i:Ui.defaultConfig.chooseAddressMappingPolicy,this.dateFormats=[...pr(l,Array.isArray,"array","dateFormats")],this.timeFormats=[...pr(O,Array.isArray,"array","timeFormats")],this.functionArgSeparator=dr(c,"string","functionArgSeparator"),this.decimalSeparator=dr(u,[".",","],"decimalSeparator"),this.language=dr(g,"string","language"),this.ignoreWhiteSpace=dr(y,["standard","any"],"ignoreWhiteSpace"),this.licenseKey=dr(w,"string","licenseKey"),this.thousandSeparator=dr(I,["",","," ","."],"thousandSeparator"),this.arrayColumnSeparator=dr(_,[",",";"],"arrayColumnSeparator"),this.arrayRowSeparator=dr(b,[";","|"],"arrayRowSeparator"),this.localeLang=dr(f,"string","localeLang"),this.functionPlugins=[...null!=d?d:Ui.defaultConfig.functionPlugins],this.smartRounding=dr(x,"boolean","smartRounding"),this.evaluateNullToZero=dr(h,"boolean","evaluateNullToZero"),this.nullYear=dr(E,"number","nullYear"),mr(this.nullYear,"nullYear",0),function(e){if(e>100)throw new Rt("nullYear",100)}(this.nullYear),this.precisionRounding=dr(A,"number","precisionRounding"),mr(this.precisionRounding,"precisionRounding",0),this.precisionEpsilon=dr(R,"number","precisionEpsilon"),mr(this.precisionEpsilon,"precisionEpsilon",0),this.useColumnIndex=dr(H,"boolean","useColumnIndex"),this.useStats=dr(D,"boolean","useStats"),this.parseDateTime=dr(T,"function","parseDateTime"),this.stringifyDateTime=dr(N,"function","stringifyDateTime"),this.stringifyDuration=dr(L,"function","stringifyDuration"),this.translationPackage=Yi.getLanguage(this.language),this.errorMapping=this.translationPackage.buildErrorMapping(),this.nullDate=pr(M,Ar,"IDate","nullDate"),this.leapYear1900=dr(p,"boolean","leapYear1900"),this.undoLimit=dr(P,"number","undoLimit"),this.useRegularExpressions=dr(F,"boolean","useRegularExpressions"),this.useWildcards=dr(Y,"boolean","useWildcards"),this.matchWholeCell=dr(v,"boolean","matchWholeCell"),mr(this.undoLimit,"undoLimit",0),this.maxRows=dr(S,"number","maxRows"),mr(this.maxRows,"maxRows",1),this.maxColumns=dr(C,"number","maxColumns"),this.currencySymbol=this.setupCurrencySymbol(a),mr(this.maxColumns,"maxColumns",1),this.context=s,Vi.set(this,{licenseKeyValidityState:ro(this.licenseKey)}),fr({value:this.decimalSeparator,name:"decimalSeparator"},{value:this.functionArgSeparator,name:"functionArgSeparator"},{value:this.thousandSeparator,name:"thousandSeparator"}),fr({value:this.arrayRowSeparator,name:"arrayRowSeparator"},{value:this.arrayColumnSeparator,name:"arrayColumnSeparator"})}setupCurrencySymbol(e){const t=[...pr(e,Array.isArray,"array","currencySymbol")];return t.forEach((e=>{if("string"!=typeof e)throw new Et("string[]","currencySymbol");if(""===e)throw new Mt("currencySymbol")})),t}get licenseKeyValidityState(){return Vi.get(this).licenseKeyValidityState}getConfig(){return Bi(this)}mergeConfig(e){const t=Object.assign({},this.getConfig(),e);return Ui.warnDeprecatedOptions(e),new Ui(t,!1)}static warnDeprecatedOptions(e){}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 Bi(e){var t;const n={};for(const r in Ui.defaultConfig){const o=null!==(t=e[r])&&void 0!==t?t:Ui.defaultConfig[r];Array.isArray(o)?n[r]=[...o]:n[r]=o}return n}Ui.defaultConfig={accentSensitive:!1,currencySymbol:["$"],caseSensitive:!1,caseFirst:"lower",context:void 0,chooseAddressMappingPolicy:new class{call(){return wn}},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:function(e,t,n){if(void 0===t&&void 0===n)return;let r=e.replace(vr," ").trim().toLowerCase();if(!function(e){return wr.test(e)}(r))return;let o=r.substring(r.length-2);"am"===o||"pm"===o?r=r.substring(0,r.length-2).trim():(o=r.substring(r.length-1),"a"===o||"p"===o?r=r.substring(0,r.length-1).trim():o=void 0);const i=r.split(_r);i.length>=2&&i[i.length-2].includes(":")&&(i[i.length-2]=i[i.length-2]+"."+i[i.length-1],i.pop());const s=i[i.length-1].split(":");if(void 0!==o&&s.push(o),1===i.length)return Cr(s,n);if(1===s.length)return Er(i,t);const a=Er(i.slice(0,i.length-1),t),l=Cr(s,n);return void 0===a||void 0===l?void 0:Object.assign(Object.assign({},a),l)},precisionEpsilon:1e-13,precisionRounding:10,smartRounding:!0,stringifyDateTime:function(e,t){const n=Wr(t);if(void 0===n)return;const r=n.tokens;let o="",i=!1;const s=r.some((e=>e.type===Yr.FORMAT&&("a/p"===e.value||"A/P"===e.value||"am/pm"===e.value||"AM/PM"===e.value)));for(let t=0;t<r.length;t++){const n=r[t];if(n.type!==Yr.FREE_TEXT)switch(n.value.toLowerCase()){case"h":case"hh":i=!0,o+=Gr(s?(e.hours+11)%12+1:e.hours,n.value.length);break;case"d":case"dd":o+=Gr(e.day,n.value.length);break;case"s":case"ss":o+=Gr(Math.floor(e.seconds),n.value.length);break;case"m":case"mm":t+1<r.length&&r[t+1].value.startsWith(":")&&(i=!0),o+=Gr(i?e.minutes:e.month,n.value.length),i=!0;break;case"yy":o+=Gr(e.year%100,n.value.length);break;case"yyyy":o+=e.year;break;case"am/pm":case"a/p":{const[t,r]=n.value.split("/");o+=e.hours<12?t:r;break}default:if(yr.test(n.value)){const t=n.value.length-3;o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,t))/Math.pow(10,t)}`;continue}return}else o+=n.value}return o},stringifyDuration:function(e,t){const n=Wr(t);if(void 0===n)return;const r=n.tokens;let o="";for(const t of r)if(t.type!==Yr.FREE_TEXT)switch(t.value.toLowerCase()){case"h":case"hh":o+=Gr(e.hours,t.value.length),e.hours=0;break;case"[hh]":o+=Gr(e.hours,t.value.length-2),e.hours=0;break;case"m":case"mm":o+=Gr(e.minutes,t.value.length),e.minutes=0;break;case"[mm]":o+=Gr(e.minutes+60*e.hours,t.value.length-2),e.minutes=0,e.hours=0;break;case"s":case"ss":o+=Gr(Math.floor(e.seconds),t.value.length);break;default:if(yr.test(t.value)){const n=Math.max(t.value.length-3,0);o+=`${e.seconds<10?"0":""}${Math.floor(e.seconds*Math.pow(10,n))/Math.pow(10,n)}`;continue}return}else o+=t.value;return o},timeFormats:["hh:mm","hh:mm:ss.sss"],thousandSeparator:"",undoLimit:20,useRegularExpressions:!1,useWildcards:!0,useColumnIndex:!1,useStats:!1,useArrayArithmetic:!1};const Wi={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",XLOOKUP:"XLOOKUP",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 ji;!function(e){e[e.FullyAbsolute=1]="FullyAbsolute",e[e.RowAbsoluteColRelative=2]="RowAbsoluteColRelative",e[e.RowRelativeColAbsolute=3]="RowRelativeColAbsolute",e[e.FullyRelative=4]="FullyRelative"}(ji||(ji={}));class zi extends lr{verifyAddressArguments(e,t,n,r){if(r){if(e<1||t<1)return new Cn(sn.VALUE,J.LessThanOne)}else if(ji.FullyAbsolute==n){if(e<1||t<1)return new Cn(sn.VALUE,J.LessThanOne)}else if(ji.RowAbsoluteColRelative==n){if(e<1)return new Cn(sn.VALUE,J.LessThanOne)}else if(ji.RowRelativeColAbsolute==n&&t<1)return new Cn(sn.VALUE,J.LessThanOne)}address(e,t){return this.runFunction(e.args,t,this.metadata("ADDRESS"),((e,t,n,r,o)=>{const i=this.verifyAddressArguments(e,t,n,r);if(void 0!==i)return i;const s=I(t-1);let a="";null!=o&&(a=`${o}!`);const l=0==t?"C":`C[${t}]`,u=0==e?"R":`R[${e}]`;return ji.FullyRelative==n?r?`${a}${s}${e}`:`${a}${u}${l}`:ji.RowRelativeColAbsolute==n?r?`${a}$${s}${e}`:`${a}${u}C${t}`:ji.RowAbsoluteColRelative==n?r?`${a}${s}$${e}`:`${a}R${e}${l}`:r?`${a}$${s}$${e}`:`${a}R${e}C${t}`}))}}zi.implementedFunctions={ADDRESS:{method:"address",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0,defaultValue:1,minValue:1,maxValue:4},{argumentType:ar.BOOLEAN,optionalArg:!0,defaultValue:!0},{argumentType:ar.STRING,optionalArg:!0}]}};class Gi extends lr{arrayformula(e,t){return this.runFunction(e.args,t,this.metadata("ARRAYFORMULA"),(e=>e))}arrayformulaArraySize(e,t){if(1!==e.args.length)return ur.error();const n=this.metadata("ARRAYFORMULA");return e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&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,o=[];for(let e=0;e<t;e++)o.push(r[e].slice(0,n));return nt.onlyValues(o)}))}arrayconstrainArraySize(e,t){if(3!==e.args.length)return ur.error();const n=this.metadata("ARRAY_CONSTRAIN"),r=e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&r))}));let{height:o,width:i}=r[0];return e.args[1].type===Y.NUMBER&&(o=Math.min(o,e.args[1].value)),e.args[2].type===Y.NUMBER&&(i=Math.min(i,e.args[2].value)),o<1||i<1||!Number.isInteger(o)||!Number.isInteger(i)?ur.error():new ur(i,o)}filter(e,t){return this.runFunction(e.args,t,this.metadata("FILTER"),((e,...t)=>{for(const n of t)if(e.width()!==n.width()||e.height()!==n.height())return new Cn(sn.NA,J.EqualLength);if(e.width()>1&&e.height()>1)return new Cn(sn.NA,J.WrongDimension);const n=e.data,r=[];for(let o=0;o<e.height();o++){const i=[];for(let r=0;r<e.width();r++){let e=!0;for(const n of t)if(!0!==$n(n.data[o][r])){e=!1;break}e&&i.push(n[o][r])}i.length>0&&r.push(i)}return r.length>0?nt.onlyValues(r):new Cn(sn.NA,J.EmptyRange)}))}filterArraySize(e,t){if(e.args.length<=1)return ur.error();const n=this.metadata("FILTER"),r=e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&r))})),o=Math.max(...r.map((e=>e.width))),i=Math.max(...r.map((e=>e.height)));return new ur(o,i)}}Gi.implementedFunctions={ARRAYFORMULA:{method:"arrayformula",arraySizeMethod:"arrayformulaArraySize",arrayFunction:!0,parameters:[{argumentType:ar.ANY}]},ARRAY_CONSTRAIN:{method:"arrayconstrain",arraySizeMethod:"arrayconstrainArraySize",parameters:[{argumentType:ar.RANGE},{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.INTEGER,minValue:1}],vectorizationForbidden:!0},FILTER:{method:"filter",arraySizeMethod:"filterArraySize",arrayFunction:!0,parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}],repeatLastArgs:1}};class $i extends lr{abs(e,t){return this.runFunction(e.args,t,this.metadata("ABS"),Math.abs)}}$i.implementedFunctions={ABS:{method:"abs",parameters:[{argumentType:ar.NUMBER}]}};class Ki extends lr{bitlshift(e,t){return this.runFunction(e.args,t,this.metadata("BITLSHIFT"),Xi)}bitrshift(e,t){return this.runFunction(e.args,t,this.metadata("BITRSHIFT"),qi)}}function Xi(e,t){return t<0?qi(e,-t):Qi(e*Math.pow(2,t))}function qi(e,t){return t<0?Xi(e,-t):Qi(Math.floor(e/Math.pow(2,t)))}function Qi(e){return e>0xffffffffffff?new Cn(sn.NUM,J.BitshiftLong):e}Ki.implementedFunctions={BITLSHIFT:{method:"bitlshift",parameters:[{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:-53,maxValue:53}]},BITRSHIFT:{method:"bitrshift",parameters:[{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:-53,maxValue:53}]}};class Ji extends lr{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))}}Ji.implementedFunctions={BITAND:{method:"bitand",parameters:[{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:0}]},BITOR:{method:"bitor",parameters:[{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:0}]},BITXOR:{method:"bitxor",parameters:[{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:0}]}};class Zi extends lr{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 Cn(sn.NA,J.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 Cn)&&this.arithmeticHelper.eq(e,t[r]))return t[r+1];return r<n?t[r]:new Cn(sn.NA,J.NoDefault)}))}iferror(e,t){return this.runFunction(e.args,t,this.metadata("IFERROR"),((e,t)=>e instanceof Cn?t:e))}ifna(e,t){return this.runFunction(e.args,t,this.metadata("IFNA"),((e,t)=>e instanceof Cn&&e.type===sn.NA?t:e))}choose(e,t){return this.runFunction(e.args,t,this.metadata("CHOOSE"),((e,...t)=>e>t.length?new Cn(sn.NUM,J.Selector):t[e-1]))}}Zi.implementedFunctions={TRUE:{method:"literalTrue",parameters:[]},FALSE:{method:"literalFalse",parameters:[]},IF:{method:"conditionalIf",parameters:[{argumentType:ar.BOOLEAN},{argumentType:ar.SCALAR,passSubtype:!0},{argumentType:ar.SCALAR,defaultValue:!1,passSubtype:!0}]},IFS:{method:"ifs",parameters:[{argumentType:ar.BOOLEAN},{argumentType:ar.SCALAR,passSubtype:!0}],repeatLastArgs:2},AND:{method:"and",parameters:[{argumentType:ar.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},OR:{method:"or",parameters:[{argumentType:ar.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},XOR:{method:"xor",parameters:[{argumentType:ar.BOOLEAN}],repeatLastArgs:1,expandRanges:!0},NOT:{method:"not",parameters:[{argumentType:ar.BOOLEAN}]},SWITCH:{method:"switch",parameters:[{argumentType:ar.NOERROR},{argumentType:ar.SCALAR,passSubtype:!0},{argumentType:ar.SCALAR,passSubtype:!0}],repeatLastArgs:1},IFERROR:{method:"iferror",parameters:[{argumentType:ar.SCALAR,passSubtype:!0},{argumentType:ar.SCALAR,passSubtype:!0}]},IFNA:{method:"ifna",parameters:[{argumentType:ar.SCALAR,passSubtype:!0},{argumentType:ar.SCALAR,passSubtype:!0}]},CHOOSE:{method:"choose",parameters:[{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.SCALAR,passSubtype:!0}],repeatLastArgs:1}};class es extends lr{char(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(e=>e<1||e>=256?new Cn(sn.VALUE,J.CharacterCodeBounds):String.fromCharCode(Math.trunc(e))))}unichar(e,t){return this.runFunction(e.args,t,this.metadata("CHAR"),(e=>e<1||e>=1114112?new Cn(sn.VALUE,J.CharacterCodeBounds):String.fromCodePoint(Math.trunc(e))))}}es.implementedFunctions={CHAR:{method:"char",parameters:[{argumentType:ar.NUMBER}]},UNICHAR:{method:"unichar",parameters:[{argumentType:ar.NUMBER}]}};class ts extends lr{code(e,t){return this.runFunction(e.args,t,this.metadata("CODE"),(e=>0===e.length?new Cn(sn.VALUE,J.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 Cn(sn.VALUE,J.EmptyString)}))}}ts.implementedFunctions={CODE:{method:"code",parameters:[{argumentType:ar.STRING}]},UNICODE:{method:"unicode",parameters:[{argumentType:ar.STRING}]}};class ns extends lr{countblank(e,t){return this.runFunction(e.args,t,this.metadata("COUNTBLANK"),((...e)=>{let t=0;return e.forEach((e=>{e===We&&t++})),t}))}}ns.implementedFunctions={COUNTBLANK:{method:"countblank",parameters:[{argumentType:ar.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class rs extends lr{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 Cn?n.add(r.type):""!==r&&t.add(r);return t.size+n.size}))}}rs.implementedFunctions={COUNTUNIQUE:{method:"countunique",parameters:[{argumentType:ar.SCALAR}],repeatLastArgs:1,expandRanges:!0}};class os extends lr{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}),o=this.dateTimeHelper.relativeNumberToAbsoluteNumber(r),i=o+((4-o)%7+7)%7,s=Math.floor((t-1)/7)-Math.floor((i-1)/7)+1;return 0===s?this.isoweeknumCore(e-7)+1:s},this.days360Core=(e,t,n)=>{const r=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);let i,s;return n?(i=Pr(r),s=Pr(o)):[i,s]=this.dateTimeHelper.toBasisUS(r,o),360*(s.year-i.year)+30*(s.month-i.month)+s.day-i.day}}date(e,t){return this.runFunction(e.args,t,this.metadata("DATE"),((e,t,n)=>{const r=Math.trunc(n);let o=Math.trunc(t),i=Math.trunc(e);i<this.dateTimeHelper.getEpochYearZero()&&(i+=this.dateTimeHelper.getEpochYearZero());const s=Math.floor((o-1)/12);i+=s,o-=12*s;const a={year:i,month:o,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 Cn(sn.NUM,J.DateBounds):e}return new Cn(sn.VALUE,J.InvalidDate)}))}time(e,t){return this.runFunction(e.args,t,this.metadata("TIME"),((e,t,n)=>{const r=Dr({hours:Math.trunc(e),minutes:Math.trunc(t),seconds:Math.trunc(n)});return r<0?new Cn(sn.NUM,J.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(Or(n,t)));return r=this.dateTimeHelper.getWithinBounds(r),void 0===r?new Cn(sn.NUM,J.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=>kr(Ir(e)%1).hours))}minute(e,t){return this.runFunction(e.args,t,this.metadata("MINUTE"),(e=>kr(Ir(e)%1).minutes))}second(e,t){return this.runFunction(e.args,t,this.metadata("SECOND"),(e=>kr(Ir(e)%1).seconds))}text(e,t){return this.runFunction(e.args,t,this.metadata("TEXT"),((e,t)=>zr(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=as.get(t);return void 0===r?new Cn(sn.NUM,J.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),o=this.dateTimeHelper.dateToNumber({year:r.year,month:1,day:1}),i=this.dateTimeHelper.relativeNumberToAbsoluteNumber(o);if(21===t)return this.isoweeknumCore(e);const s=as.get(t);return void 0===s?new Cn(sn.NUM,J.BadMode):Math.floor((n-s)/7)-Math.floor((i-s)/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 Cn(sn.VALUE,J.IncorrectDateTime):Ar(t)?(Nr(t)?Math.trunc(Dr(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 Cn(sn.VALUE,J.IncorrectDateTime):je(t)%1}))}now(e,t){return this.runFunction(e.args,t,this.metadata("NOW"),(()=>{const e=new Date(Date.now());return Dr({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={year:(r=Or(this.dateTimeHelper.numberToSimpleDate(e),t)).year,month:r.month,day:Math.min(r.day,Tr[r.month-1])};var r;let o=this.dateTimeHelper.dateToNumber(n);return o=this.dateTimeHelper.getWithinBounds(o),void 0===o?new Cn(sn.NUM,J.DateBounds):o}))}datedif(e,t){return this.runFunction(e.args,t,this.metadata("DATEDIF"),((e,t,n)=>{if(e>t)return new Cn(sn.NUM,J.StartEndDate);if("D"===n)return Math.floor(t)-Math.floor(e);const r=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);switch(n){case"M":return 12*(o.year-r.year)+(o.month-r.month)-(o.day<r.day?1:0);case"YM":return(o.month-r.month+12-(o.day<r.day?1:0))%12;case"Y":return o.month>r.month||o.month===r.month&&o.day>=r.day?o.year-r.year:o.year-r.year-1;case"MD":if(o.day>=r.day)return o.day-r.day;{const e=1===o.month?12:o.month-1,t=1===o.month?o.year-1:o.year;return this.dateTimeHelper.daysInMonth(t,e)+o.day-r.day}case"YD":return o.month>r.month||o.month===r.month&&o.day>=r.day?Math.floor(t)-this.dateTimeHelper.dateToNumber({year:o.year,month:r.month,day:r.day}):Math.floor(t)-Math.floor(e)-365*(o.year-r.year-1)-this.dateTimeHelper.leapYearsCount(o.year-1)+this.dateTimeHelper.leapYearsCount(r.year);default:return new Cn(sn.NUM,J.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]=[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=>{const t=(e=Math.trunc(e))%60,n=(e=Math.trunc(e/60))%60,r=(e=Math.trunc(e/60))%24,o=(e=Math.trunc(e/24))%30,i=(e=Math.trunc(e/30))%12,s=Math.trunc(e/12);return"P"+(s>0?`${s}Y`:"")+(i>0?`${i}M`:"")+(o>0?`${o}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){let o=1;(e=Math.trunc(e))>(t=Math.trunc(t))&&([e,t]=[t,e],o=-1);const i=ss(n);if(i instanceof Cn)return i;const s=this.simpleRangeToFilteredHolidays(i,r);return s instanceof Cn?s:o*this.countWorkdays(e,t,i,s)}workdaycore(e,t,n,r){e=Math.trunc(e),t=Math.trunc(t);const o=ss(n);if(o instanceof Cn)return o;const i=this.simpleRangeToFilteredHolidays(o,r);if(i instanceof Cn)return i;if(t>0){let n=1;for(;this.countWorkdays(e+1,e+n,o,i)<t;)n*=2;let r=1;for(;r+1<n;){const s=Math.trunc((r+n)/2);this.countWorkdays(e+1,e+s,o,i)<t?r=s:n=s}return e+n}if(t<0){t*=-1;let n=1;for(;this.countWorkdays(e-n,e-1,o,i)<t;)n*=2;let r=1;for(;r+1<n;){const s=Math.trunc((r+n)/2);this.countWorkdays(e-s,e-1,o,i)<t?r=s:n=s}return e-n}return e}countWorkdays(e,t,n,r){const o=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)),i=Math.floor(this.dateTimeHelper.relativeNumberToAbsoluteNumber(e));let s=0;for(let e=0;e<7;e++)"0"===n.charAt(e)&&(s+=Math.floor((o+6-e)/7),s-=Math.floor((i-1+6-e)/7));return s-=is(t+1,r)-is(e,r),s}simpleRangeToFilteredHolidays(e,t){var n;const r=null!==(n=null==t?void 0:t.valuesFromTopLeftCorner())&&void 0!==n?n:[];for(const e of r)if(e instanceof Cn)return e;const o=[];for(const e of r)if(e!==We){if(!Je(e))return new Cn(sn.VALUE,J.WrongType);o.push(Math.trunc(je(e)))}return[...new Set(o)].sort(((e,t)=>e-t)).filter((t=>{const n=(this.dateTimeHelper.relativeNumberToAbsoluteNumber(t)-1)%7;return"0"===e.charAt(n)}))}}function is(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;for(;n+1<r;){const o=Math.floor((r+n)/2);t[o]>=e?r=o:n=o}return r}function ss(e){var t;return"number"!=typeof e&&"string"!=typeof e?new Cn(sn.VALUE,J.WrongType):"string"==typeof e?7===e.length&&/^(0|1)*$/.test(e)&&"1111111"!==e?e:new Cn(sn.NUM,J.WeekendString):null!==(t=ls.get(e))&&void 0!==t?t:new Cn(sn.NUM,J.BadMode)}os.implementedFunctions={DATE:{method:"date",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_DATE},TIME:{method:"time",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_TIME},MONTH:{method:"month",parameters:[{argumentType:ar.NUMBER,minValue:0}]},YEAR:{method:"year",parameters:[{argumentType:ar.NUMBER,minValue:0}]},HOUR:{method:"hour",parameters:[{argumentType:ar.NUMBER,minValue:0}]},MINUTE:{method:"minute",parameters:[{argumentType:ar.NUMBER,minValue:0}]},SECOND:{method:"second",parameters:[{argumentType:ar.NUMBER,minValue:0}]},TEXT:{method:"text",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.STRING}]},EOMONTH:{method:"eomonth",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_DATE},DAY:{method:"day",parameters:[{argumentType:ar.NUMBER,minValue:0}]},DAYS:{method:"days",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0}]},WEEKDAY:{method:"weekday",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,defaultValue:1}]},WEEKNUM:{method:"weeknum",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,defaultValue:1}]},ISOWEEKNUM:{method:"isoweeknum",parameters:[{argumentType:ar.NUMBER,minValue:0}]},DATEVALUE:{method:"datevalue",parameters:[{argumentType:ar.STRING}],returnNumberType:Ze.NUMBER_DATE},TIMEVALUE:{method:"timevalue",parameters:[{argumentType:ar.STRING}],returnNumberType:Ze.NUMBER_TIME},NOW:{method:"now",parameters:[],isVolatile:!0,returnNumberType:Ze.NUMBER_DATETIME},TODAY:{method:"today",parameters:[],isVolatile:!0,returnNumberType:Ze.NUMBER_DATE},EDATE:{method:"edate",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_DATE},DAYS360:{method:"days360",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.BOOLEAN,defaultValue:!1}]},DATEDIF:{method:"datedif",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.STRING}]},YEARFRAC:{method:"yearfrac",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.INTEGER,defaultValue:0,minValue:0,maxValue:4}]},INTERVAL:{method:"interval",parameters:[{argumentType:ar.NUMBER,minValue:0}]},NETWORKDAYS:{method:"networkdays",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.RANGE,optionalArg:!0}]},"NETWORKDAYS.INTL":{method:"networkdaysintl",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NOERROR,defaultValue:1},{argumentType:ar.RANGE,optionalArg:!0}]},WORKDAY:{method:"workday",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER},{argumentType:ar.RANGE,optionalArg:!0}]},"WORKDAY.INTL":{method:"workdayintl",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER},{argumentType:ar.NOERROR,defaultValue:1},{argumentType:ar.RANGE,optionalArg:!0}]}};const as=new Map([[1,0],[2,1],[11,1],[12,2],[13,3],[14,4],[15,5],[16,6],[17,0]]),ls=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"]]);class us extends lr{degrees(e,t){return this.runFunction(e.args,t,this.metadata("DEGREES"),(e=>e*(180/Math.PI)))}}us.implementedFunctions={DEGREES:{method:"degrees",parameters:[{argumentType:ar.NUMBER}]}};class hs extends lr{delta(e,t){return this.runFunction(e.args,t,this.metadata("DELTA"),((e,t)=>e===t?1:0))}}hs.implementedFunctions={DELTA:{method:"delta",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0}]}};class cs extends lr{exp(e,t){return this.runFunction(e.args,t,this.metadata("EXP"),Math.exp)}}cs.implementedFunctions={EXP:{method:"exp",parameters:[{argumentType:ar.NUMBER}]}};class ds extends lr{pmt(e,t){return this.runFunction(e.args,t,this.metadata("PMT"),ms)}ipmt(e,t){return this.runFunction(e.args,t,this.metadata("IPMT"),ps)}ppmt(e,t){return this.runFunction(e.args,t,this.metadata("PPMT"),gs)}fv(e,t){return this.runFunction(e.args,t,this.metadata("FV"),fs)}cumipmt(e,t){return this.runFunction(e.args,t,this.metadata("CUMIPMT"),((e,t,n,r,o,i)=>{if(r>o)return new Cn(sn.NUM,J.EndStartPeriod);let s=0;for(let a=r;a<=o;a++)s+=ps(e,a,t,n,0,i);return s}))}cumprinc(e,t){return this.runFunction(e.args,t,this.metadata("CUMPRINC"),((e,t,n,r,o,i)=>{if(r>o)return new Cn(sn.NUM,J.EndStartPeriod);let s=0;for(let a=r;a<=o;a++)s+=gs(e,a,t,n,0,i);return s}))}db(e,t){return this.runFunction(e.args,t,this.metadata("DB"),((e,t,n,r,o)=>{if(12===o&&r>n||r>n+1)return new Cn(sn.NUM,J.PeriodLong);if(t>=e)return 0;const i=Math.round(1e3*(1-Math.pow(t/e,1/n)))/1e3,s=e*i*o/12;if(1===r)return s;let a=s;for(let t=0;t<r-2;t++)a+=(e-a)*i;return r===n+1?(e-a)*i*(12-o)/12:(e-a)*i}))}ddb(e,t){return this.runFunction(e.args,t,this.metadata("DDB"),((e,t,n,r,o)=>{if(r>n)return new Cn(sn.NUM);let i,s=o/n;s>=1?(s=1,i=1===r?e:0):i=e*Math.pow(1-s,r-1);const a=e*Math.pow(1-s,r);return Math.max(i-Math.max(t,a),0)}))}dollarde(e,t){return this.runFunction(e.args,t,this.metadata("DOLLARDE"),((e,t)=>{if(t<1)return new Cn(sn.DIV_BY_ZERO);for(t=Math.trunc(t);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 Cn(sn.DIV_BY_ZERO);for(t=Math.trunc(t);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 Cn(sn.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,o)=>0===e?0===t?new Cn(sn.DIV_BY_ZERO):(-n-r)/t:(o&&(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,o,i)=>{if(i<=-1)return new Cn(sn.VALUE);const s=1e-7;let a=i;o=o?1:0;for(let i=0;i<50;i++){if(a<=-1)return new Cn(sn.NUM);let i,l;if(Math.abs(a)<s)i=n*(1+e*a)+t*(1+a*o)*e+r;else{const s=Math.pow(1+a,e);i=n*s+t*(1/a+o)*(s-1)+r}if(Math.abs(i)<s)return a;if(Math.abs(a)<s)l=n*e+t*o*e;else{const r=Math.pow(1+a,e),i=e*Math.pow(1+a,e-1);l=n*i+t*(1/a+o)*i+t*(-1/(a*a))*(r-1)}a-=i/l}return new Cn(sn.NUM)}))}pv(e,t){return this.runFunction(e.args,t,this.metadata("PV"),((e,t,n,r,o)=>(o=o?1:0,-1===e?new Cn(0===t?sn.NUM:sn.DIV_BY_ZERO):0===e?-n*t-r:((1-Math.pow(1+e,t))*n*(1+e*o)/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 Cn(sn.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 Cn(sn.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 Cn(sn.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)))return new Cn(sn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>r.year+1||o.year===r.year+1&&(o.month>r.month||o.month===r.month&&o.day>r.day))return new Cn(sn.NUM);const i=360-n*(t-e);return 0===i?0:i<0?new Cn(sn.NUM):365*n/i}))}tbillprice(e,t){return this.runFunction(e.args,t,this.metadata("TBILLPRICE"),((e,t,n)=>{if((e=Math.round(e))>=(t=Math.round(t)))return new Cn(sn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);if(o.year>r.year+1||o.year===r.year+1&&(o.month>r.month||o.month===r.month&&o.day>r.day))return new Cn(sn.NUM);const i=360-n*(t-e);return 0===i?0:i<0?new Cn(sn.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)))return new Cn(sn.NUM);const r=this.dateTimeHelper.numberToSimpleDate(e),o=this.dateTimeHelper.numberToSimpleDate(t);return o.year>r.year+1||o.year===r.year+1&&(o.month>r.month||o.month===r.month&&o.day>r.day)?new Cn(sn.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 e of n)if(e instanceof Cn)return e;for(const t of n)if(Je(t))e*=1+je(t);else if(t!==We)return new Cn(sn.VALUE,J.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 Cn?n:ys(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 Cn)return r;let o=!1,i=!1;const s=[],a=[];for(const e of r)e>0?(o=!0,s.push(e),a.push(0)):e<0?(i=!0,a.push(e),s.push(0)):(a.push(0),s.push(0));if(!o||!i)return new Cn(sn.DIV_BY_ZERO);const l=r.length,u=ys(n,s);if(u instanceof Cn)return u;const h=ys(t,a);return h instanceof Cn?h:Math.pow(-u*Math.pow(1+n,l)/h/(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 e of r)if("number"!=typeof e)return new Cn(sn.VALUE,J.NumberExpected);const o=r,i=n.valuesFromTopLeftCorner();for(const e of i)if("number"!=typeof e)return new Cn(sn.VALUE,J.NumberExpected);const s=i;if(s.length!==o.length)return new Cn(sn.NUM,J.EqualLength);const a=s.length;let l=0;if(s[0]<0)return new Cn(sn.NUM,J.ValueSmall);for(let t=0;t<a;t++){if(s[t]=Math.floor(s[t]),s[t]<s[0])return new Cn(sn.NUM,J.ValueSmall);l+=o[t]/Math.pow(1+e,(s[t]-s[0])/365)}return l}))}}function ms(e,t,n,r,o){if(0===e)return(-n-r)/t;{const i=Math.pow(1+e,t);return(r*e+n*e*i)*(o?1/(1+e):1)/(1-i)}}function ps(e,t,n,r,o,i){const s=ms(e,n,r,o,i);return 1===t?e*(i?0:-r):e*(i?fs(e,t-2,s,r,i)-s:fs(e,t-1,s,r,i))}function fs(e,t,n,r,o){if(0===e)return-r-n*t;{const i=Math.pow(1+e,t);return n*(o?1+e:1)*(1-i)/e-r*i}}function gs(e,t,n,r,o,i){return ms(e,n,r,o,i)-ps(e,t,n,r,o,i)}function ys(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 Cn(sn.DIV_BY_ZERO)}n/=1+e}return n}ds.implementedFunctions={PMT:{method:"pmt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}],returnNumberType:Ze.NUMBER_CURRENCY},IPMT:{method:"ipmt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}],returnNumberType:Ze.NUMBER_CURRENCY},PPMT:{method:"ppmt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}],returnNumberType:Ze.NUMBER_CURRENCY},FV:{method:"fv",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}],returnNumberType:Ze.NUMBER_CURRENCY},CUMIPMT:{method:"cumipmt",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.INTEGER,minValue:0,maxValue:1}],returnNumberType:Ze.NUMBER_CURRENCY},CUMPRINC:{method:"cumprinc",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.INTEGER,minValue:1},{argumentType:ar.INTEGER,minValue:0,maxValue:1}],returnNumberType:Ze.NUMBER_CURRENCY},DB:{method:"db",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.INTEGER,minValue:1,maxValue:12,defaultValue:12}],returnNumberType:Ze.NUMBER_CURRENCY},DDB:{method:"ddb",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.INTEGER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0,defaultValue:2}],returnNumberType:Ze.NUMBER_CURRENCY},DOLLARDE:{method:"dollarde",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},DOLLARFR:{method:"dollarfr",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},EFFECT:{method:"effect",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1}],returnNumberType:Ze.NUMBER_PERCENT},ISPMT:{method:"ispmt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},NOMINAL:{method:"nominal",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1}],returnNumberType:Ze.NUMBER_PERCENT},NPER:{method:"nper",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}]},PV:{method:"pv",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0}],returnNumberType:Ze.NUMBER_CURRENCY},RATE:{method:"rate",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:.1}],returnNumberType:Ze.NUMBER_PERCENT},RRI:{method:"rri",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_PERCENT},SLN:{method:"sln",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_CURRENCY},SYD:{method:"syd",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0}],returnNumberType:Ze.NUMBER_CURRENCY},TBILLEQ:{method:"tbilleq",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0}],returnNumberType:Ze.NUMBER_PERCENT},TBILLPRICE:{method:"tbillprice",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0}],returnNumberType:Ze.NUMBER_CURRENCY},TBILLYIELD:{method:"tbillyield",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0}],returnNumberType:Ze.NUMBER_PERCENT},FVSCHEDULE:{method:"fvschedule",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.RANGE}],returnNumberType:Ze.NUMBER_CURRENCY},NPV:{method:"npv",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.ANY}],repeatLastArgs:1,returnNumberType:Ze.NUMBER_CURRENCY},MIRR:{method:"mirr",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],returnNumberType:Ze.NUMBER_PERCENT},PDURATION:{method:"pduration",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0}]},XNPV:{method:"xnpv",parameters:[{argumentType:ar.NUMBER,greaterThan:-1},{argumentType:ar.RANGE},{argumentType:ar.RANGE}]}};class ws extends lr{formulatext(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("FORMULATEXT"),(()=>new Cn(sn.NA,J.WrongArgNumber)),(e=>{var t;return null!==(t=this.serialization.getCellFormula(e))&&void 0!==t?t:new Cn(sn.NA,J.Formula)}))}}ws.implementedFunctions={FORMULATEXT:{method:"formulatext",parameters:[{argumentType:ar.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,isDependentOnSheetStructureChange:!0,vectorizationForbidden:!0}};class vs extends lr{hyperlink(e,t){return this.runFunction(e.args,t,this.metadata("HYPERLINK"),((t,n)=>(e.hyperlink=t,null!=n?n:t)))}}vs.implementedFunctions={HYPERLINK:{method:"hyperlink",parameters:[{argumentType:ar.STRING},{argumentType:ar.STRING,optionalArg:!0}]}};class _s extends lr{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 Cn&&e.type!==sn.NA))}iserror(e,t){return this.runFunction(e.args,t,this.metadata("ISERROR"),(e=>e instanceof Cn))}isformula(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("ISFORMULA"),(()=>new Cn(sn.NA,J.WrongArgNumber)),(e=>this.dependencyGraph.addressMapping.getCell(e)instanceof zt))}isblank(e,t){return this.runFunction(e.args,t,this.metadata("ISBLANK"),(e=>e===We))}isna(e,t){return this.runFunction(e.args,t,this.metadata("ISNA"),(e=>e instanceof Cn&&e.type==sn.NA))}isnumber(e,t){return this.runFunction(e.args,t,this.metadata("ISNUMBER"),Je)}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 Cn&&(e.type==sn.REF||e.type==sn.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 Cn(sn.NA,J.WrongArgNumber);if(e.args.some((e=>e.type===Y.EMPTY)))return new Cn(sn.NUM,J.EmptyArg);let n=e.args[0];for(;n.type===Y.PARENTHESIS;)n=n.expression;if(n.type===Y.CELL_RANGE||n.type===Y.COLUMN_RANGE)return n.end.col-n.start.col+1;if(n.type===Y.CELL_REFERENCE)return 1;if(n.type===Y.ROW_RANGE)return this.config.maxColumns;{const e=this.evaluateAst(n,t);return e instanceof nt?e.width():e instanceof Cn?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 Cn(sn.NA,J.WrongArgNumber);if(e.args.some((e=>e.type===Y.EMPTY)))return new Cn(sn.NUM,J.EmptyArg);let n=e.args[0];for(;n.type===Y.PARENTHESIS;)n=n.expression;if(n.type===Y.CELL_RANGE||n.type===Y.ROW_RANGE)return n.end.row-n.start.row+1;if(n.type===Y.CELL_REFERENCE)return 1;if(n.type===Y.COLUMN_RANGE)return this.config.maxRows;{const e=this.evaluateAst(n,t);return e instanceof nt?e.height():e instanceof Cn?e:1}}index(e,t){return this.runFunction(e.args,t,this.metadata("INDEX"),((e,t,n)=>{var r,o,i,s,a,l;return n<1||t<1?new Cn(sn.VALUE,J.LessThanOne):n>e.width()||t>e.height()?new Cn(sn.NUM,J.ValueLarge):null!==(l=null!==(i=null===(o=null===(r=null==e?void 0:e.data)||void 0===r?void 0:r[t-1])||void 0===o?void 0:o[n-1])&&void 0!==i?i:null===(a=null===(s=null==e?void 0:e.data)||void 0===s?void 0:s[0])||void 0===a?void 0:a[0])&&void 0!==l?l:new Cn(sn.VALUE,J.CellRangeExpected)}))}na(e,t){return new Cn(sn.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 Cn(sn.NA,J.SheetRef)}))}sheets(e,t){return this.runFunctionWithReferenceArgument(e.args,t,this.metadata("SHEETS"),(()=>this.dependencyGraph.sheetMapping.numberOfSheets()),(()=>1),(()=>new Cn(sn.VALUE,J.CellRefExpected)))}}_s.implementedFunctions={COLUMN:{method:"column",parameters:[{argumentType:ar.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},COLUMNS:{method:"columns",parameters:[{argumentType:ar.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISBINARY:{method:"isbinary",parameters:[{argumentType:ar.STRING}]},ISERR:{method:"iserr",parameters:[{argumentType:ar.SCALAR}]},ISFORMULA:{method:"isformula",parameters:[{argumentType:ar.NOERROR}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ISNA:{method:"isna",parameters:[{argumentType:ar.SCALAR}]},ISREF:{method:"isref",parameters:[{argumentType:ar.SCALAR}],vectorizationForbidden:!0},ISERROR:{method:"iserror",parameters:[{argumentType:ar.SCALAR}]},ISBLANK:{method:"isblank",parameters:[{argumentType:ar.SCALAR}]},ISNUMBER:{method:"isnumber",parameters:[{argumentType:ar.SCALAR}]},ISLOGICAL:{method:"islogical",parameters:[{argumentType:ar.SCALAR}]},ISTEXT:{method:"istext",parameters:[{argumentType:ar.SCALAR}]},ISNONTEXT:{method:"isnontext",parameters:[{argumentType:ar.SCALAR}]},INDEX:{method:"index",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:1}]},NA:{method:"na",parameters:[]},ROW:{method:"row",parameters:[{argumentType:ar.NOERROR,optionalArg:!0}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},ROWS:{method:"rows",parameters:[{argumentType:ar.RANGE}],isDependentOnSheetStructureChange:!0,doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEET:{method:"sheet",parameters:[{argumentType:ar.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0},SHEETS:{method:"sheets",parameters:[{argumentType:ar.STRING}],doesNotNeedArgumentsToBeComputed:!0,vectorizationForbidden:!0}};class bs extends lr{iseven(e,t){return this.runFunction(e.args,t,this.metadata("ISEVEN"),(e=>e%2==0))}}bs.implementedFunctions={ISEVEN:{method:"iseven",parameters:[{argumentType:ar.NUMBER}]}};class Ss extends lr{isodd(e,t){return this.runFunction(e.args,t,this.metadata("ISODD"),(e=>e%2==1))}}Ss.implementedFunctions={ISODD:{method:"isodd",parameters:[{argumentType:ar.NUMBER}]}};class Cs extends lr{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)}}Cs.implementedFunctions={LOG10:{method:"log10",parameters:[{argumentType:ar.NUMBER}]},LOG:{method:"log",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,defaultValue:10,greaterThan:0}]},LN:{method:"ln",parameters:[{argumentType:ar.NUMBER}]}};const Es=parseFloat(Math.PI.toFixed(14));class Ms extends lr{pi(e,t){return this.runFunction(e.args,t,this.metadata("PI"),(()=>Es))}sqrtpi(e,t){return this.runFunction(e.args,t,this.metadata("SQRTPI"),(e=>Math.sqrt(Es*e)))}}function Ts(e,t){return new ur(t.width,e.height)}function Rs(e,t,n){return new ur(1+(e.width-t)/n,1+(e.height-t)/n)}Ms.implementedFunctions={PI:{method:"pi",parameters:[]},SQRTPI:{method:"sqrtpi",parameters:[{argumentType:ar.NUMBER,minValue:0}]}};class As extends lr{mmult(e,t){return this.runFunction(e.args,t,this.metadata("MMULT"),((e,t)=>{if(!e.hasOnlyNumbers()||!t.hasOnlyNumbers())return new Cn(sn.VALUE,J.NumberRange);if(t.height()!==e.width())return new Cn(sn.VALUE,J.ArrayDimensions);const n=Ts(e.size,t.size),r=this.createKernel((function(e,t,n){let r=0;for(let o=0;o<n;++o)r+=e[this.thread.y][o]*t[o][this.thread.x];return r}),n)(e.rawNumbers(),t.rawNumbers(),e.width());return nt.onlyNumbers(r)}))}mmultArraySize(e,t){if(2!==e.args.length)return ur.error();const n=this.metadata("MMULT"),r=e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&r))})),[o,i]=r;return Ts(o,i)}maxpool(e,t){return this.runFunction(e.args,t,this.metadata("MAXPOOL"),((e,t,n=t)=>{if(!e.hasOnlyNumbers())return new Cn(sn.VALUE,J.NumberRange);const r=Rs(e.size,t,n),o=this.createKernel((function(e,t,n){const r=this.thread.x*n,o=this.thread.y*n;let i=e[o][r];for(let n=0;n<t;n++)for(let s=0;s<t;s++)i=Math.max(i,e[o+n][r+s]);return i}),r)(e.rawNumbers(),t,n);return nt.onlyNumbers(o)}))}medianpool(e,t){return this.runFunction(e.args,t,this.metadata("MEDIANPOOL"),((e,t,n=t)=>{if(!e.hasOnlyNumbers())return new Cn(sn.VALUE,J.NumberRange);const r=Rs(e.size,t,n),o=this.createKernel((function(e,t,n){const r=this.thread.x*n,o=this.thread.y*n;let i=e[o][r];for(let n=0;n<t;n++)for(let s=0;s<t;s++)i=Math.max(i,e[o+n][r+s]);let s=e[o][r];for(let n=0;n<t;n++)for(let i=0;i<t;i++)s=Math.min(s,e[o+n][r+i]);const a=t*t;let l=s,u=i,h=42;for(let n=0;n<32;n++){const n=(l+u)/2;let i=0;for(let s=0;s<t;s++)for(let a=0;a<t;a++)e[o+s][r+a]>n&&i++;if(t%2==0){if(i===a/2){h=n;break}i>a/2?l=n:u=n}else{if(i===(a-1)/2){h=n;break}i>(a-1)/2?l=n:u=n}}return h}),r)(e.rawNumbers(),t,n);return nt.onlyNumbers(o)}))}maxpoolArraySize(e,t){if(e.args.length<2||e.args.length>3)return ur.error();const n=this.metadata("MAXPOOL"),r=e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&r))}))[0],o=e.args[1];let i;i=o.type===Y.NUMBER?o.value:1;let s=i;if(3===e.args.length){const t=e.args[2];s=t.type===Y.NUMBER?t.value:1}return i>r.width||i>r.height||s>i||(r.width-i)%s!==0||(r.height-i)%s!==0?ur.error():Rs(r,i,s)}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 e=0;e<n.width;++e){r[e]=[];for(let o=0;o<n.height;++o)r[e][o]=t[o][e]}return nt.onlyValues(r)}))}transposeArraySize(e,t){if(1!==e.args.length)return ur.error();const n=this.metadata("TRANSPOSE"),r=e.args.map((e=>{var r;return this.arraySizeForAst(e,new Vn(t.formulaAddress,t.arraysFlag||null!==(r=null==n?void 0:n.arrayFunction)&&void 0!==r&&r))})),[o]=r;return new ur(o.height,o.width)}createKernel(e,t){return function(...n){const r=[];for(let o=0;o<t.height;++o){r.push([]);for(let i=0;i<t.width;++i)r[o][i]=e.apply({thread:{x:i,y:o}},n)}return r}}}As.implementedFunctions={MMULT:{method:"mmult",arraySizeMethod:"mmultArraySize",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}],vectorizationForbidden:!0},TRANSPOSE:{method:"transpose",arraySizeMethod:"transposeArraySize",parameters:[{argumentType:ar.RANGE}],vectorizationForbidden:!0},MAXPOOL:{method:"maxpool",arraySizeMethod:"maxpoolArraySize",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0}],vectorizationForbidden:!0},MEDIANPOOL:{method:"medianpool",arraySizeMethod:"medianpoolArraySize",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0}],vectorizationForbidden:!0}};class Ns extends lr{median(e,t){return this.runFunction(e.args,t,this.metadata("MEDIAN"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);return t instanceof Cn?t:0===t.length?new Cn(sn.NUM,J.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 Cn?n:(n.sort(((e,t)=>e-t)),(t=Math.trunc(t))>n.length?new Cn(sn.NUM,J.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 Cn?n:(n.sort(((e,t)=>e-t)),(t=Math.trunc(t))>n.length?new Cn(sn.NUM,J.ValueLarge):n[t-1])}))}}Ns.implementedFunctions={MEDIAN:{method:"median",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},LARGE:{method:"large",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER,minValue:1}]},SMALL:{method:"small",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER,minValue:1}]}};class Ls extends lr{mod(e,t){return this.runFunction(e.args,t,this.metadata("MOD"),((e,t)=>0===t?new Cn(sn.DIV_BY_ZERO):e%t))}}function xs(e){return Je(e)&&!Number.isFinite(je(e))?0:e}Ls.implementedFunctions={MOD:{method:"mod",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]}};class Os{constructor(e,t,n){this.sumsq=e,this.sum=t,this.count=n}static single(e){return new Os(e*e,e,1)}compose(e){return new Os(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}}Os.empty=new Os(0,0,0);class Is extends lr{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(je(e),2)),ks)}max(e,t){return this.doMax(e.args,t)}maxa(e,t){return xs(this.reduce(e.args,t,Number.NEGATIVE_INFINITY,"MAXA",((e,t)=>Math.max(e,t)),je,Ds))}min(e,t){return this.doMin(e.args,t)}mina(e,t){return xs(this.reduce(e.args,t,Number.POSITIVE_INFINITY,"MINA",((e,t)=>Math.min(e,t)),je,Ds))}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,Os.empty,"_AGGREGATE_A",((e,t)=>e.compose(t)),(e=>Os.single(je(e))),Ds);return r instanceof Cn?r:null!==(n=r.averageValue())&&void 0!==n?n:new Cn(sn.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 Cn?r:null!==(n=r.varSValue())&&void 0!==n?n:new Cn(sn.DIV_BY_ZERO)}varpa(e,t){var n;const r=this.reduceAggregateA(e.args,t);return r instanceof Cn?r:null!==(n=r.varPValue())&&void 0!==n?n:new Cn(sn.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 Cn)return n;{const e=n.varSValue();return void 0===e?new Cn(sn.DIV_BY_ZERO):Math.sqrt(e)}}stdevpa(e,t){const n=this.reduceAggregateA(e.args,t);if(n instanceof Cn)return n;{const e=n.varPValue();return void 0===e?new Cn(sn.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 Cn(sn.NA,J.WrongArgNumber);const n=this.coerceToType(this.evaluateAst(e.args[0],t),{argumentType:ar.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 Cn(sn.VALUE,J.BadMode)}}reduceAggregate(e,t){return this.reduce(e,t,Os.empty,"_AGGREGATE",((e,t)=>e.compose(t)),(e=>Os.single(je(e))),ks)}reduceAggregateA(e,t){return this.reduce(e,t,Os.empty,"_AGGREGATE_A",((e,t)=>e.compose(t)),(e=>Os.single(je(e))),Ds)}doAverage(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof Cn?r:null!==(n=r.averageValue())&&void 0!==n?n:new Cn(sn.DIV_BY_ZERO)}doVarS(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof Cn?r:null!==(n=r.varSValue())&&void 0!==n?n:new Cn(sn.DIV_BY_ZERO)}doVarP(e,t){var n;const r=this.reduceAggregate(e,t);return r instanceof Cn?r:null!==(n=r.varPValue())&&void 0!==n?n:new Cn(sn.DIV_BY_ZERO)}doStdevS(e,t){const n=this.reduceAggregate(e,t);if(n instanceof Cn)return n;{const e=n.varSValue();return void 0===e?new Cn(sn.DIV_BY_ZERO):Math.sqrt(e)}}doStdevP(e,t){const n=this.reduceAggregate(e,t);if(n instanceof Cn)return n;{const e=n.varPValue();return void 0===e?new Cn(sn.DIV_BY_ZERO):Math.sqrt(e)}}doCount(e,t){return this.reduce(e,t,0,"COUNT",((e,t)=>e+t),je,(e=>Je(e)?1:0))}doCounta(e,t){return this.reduce(e,t,0,"COUNTA",((e,t)=>e+t),je,(e=>e===We?0:1))}doMax(e,t){return xs(this.reduce(e,t,Number.NEGATIVE_INFINITY,"MAX",((e,t)=>Math.max(e,t)),je,ks))}doMin(e,t){return xs(this.reduce(e,t,Number.POSITIVE_INFINITY,"MIN",((e,t)=>Math.min(e,t)),je,ks))}doSum(e,t){return this.reduce(e,t,0,"SUM",this.addWithEpsilonRaw,je,ks)}doProduct(e,t){return this.reduce(e,t,1,"PRODUCT",((e,t)=>e*t),je,ks)}reduce(e,t,n,r,o,i,s){return e.length<1?new Cn(sn.NA,J.WrongArgNumber):e.reduce(((e,a)=>{if(e instanceof Cn)return e;if(a.type===Y.CELL_RANGE||a.type===Y.COLUMN_RANGE||a.type===Y.ROW_RANGE){const l=this.evaluateRange(a,t,n,r,o,i,s);return l instanceof Cn?l:o(l,e)}let l;if(l=this.evaluateAst(a,t),l instanceof nt){const t=Array.from(l.valuesFromTopLeftCorner()).map(s).filter((e=>void 0!==e));return t.map((e=>e instanceof Cn?e:i(e))).reduce(((e,t)=>e instanceof Cn?e:t instanceof Cn?t:o(e,t)),e)}if(a.type===Y.CELL_REFERENCE){if(l=s(l),void 0===l)return e}else if(l=this.coerceScalarToNumberOrError(l),l=s(l),void 0===l)return e;return l instanceof Cn?l:o(e,i(l))}),n)}evaluateRange(e,t,n,r,o,i,s){let a;try{a=Hn.fromAst(e,t.formulaAddress)}catch(e){if(e instanceof ft)return new Cn(sn.REF,J.RangeManySheets);throw e}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);return void 0===u&&(u=this.getRangeValues(r,a,l,i,s).reduce(((e,t)=>e instanceof Cn?e:t instanceof Cn?t:o(e,t)),n),l.setFunctionValue(r,u)),u}getRangeValues(e,t,n,r,o){const i=[],{smallerRangeVertex:s,restRange:a}=this.dependencyGraph.rangeMapping.findSmallerRange(t);let l;if(void 0!==s&&this.dependencyGraph.existsEdge(s,n)){const t=s.getFunctionValue(e);if(void 0!==t)i.push(t);else for(const e of s.range.addresses(this.dependencyGraph)){const t=o(this.dependencyGraph.getScalarValue(e));t instanceof Cn?i.push(t):void 0!==t&&i.push(r(t))}l=a}else l=t;for(const e of l.addresses(this.dependencyGraph)){const t=o(this.dependencyGraph.getScalarValue(e));t instanceof Cn?i.push(t):void 0!==t&&i.push(r(t))}return i}}function ks(e){return Je(e)||e instanceof Cn?e:void 0}function Ds(e){return"boolean"==typeof e?zn(e):Je(e)||e instanceof Cn?e:"string"==typeof e?0:void 0}Is.implementedFunctions={SUM:{method:"sum",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},SUMSQ:{method:"sumsq",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},MAX:{method:"max",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},MIN:{method:"min",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},MAXA:{method:"maxa",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},MINA:{method:"mina",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},COUNT:{method:"count",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},COUNTA:{method:"counta",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},AVERAGE:{method:"average",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},AVERAGEA:{method:"averagea",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},PRODUCT:{method:"product",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},"VAR.S":{method:"vars",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},"VAR.P":{method:"varp",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},VARA:{method:"vara",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},VARPA:{method:"varpa",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},"STDEV.S":{method:"stdevs",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},"STDEV.P":{method:"stdevp",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},STDEVA:{method:"stdeva",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},STDEVPA:{method:"stdevpa",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},SUBTOTAL:{method:"subtotal",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.ANY}],repeatLastArgs:1}},Is.aliases={VAR:"VAR.S",VARP:"VAR.P",STDEV:"STDEV.S",STDEVP:"STDEV.P",VARS:"VAR.S",STDEVS:"STDEV.S"};class Ps extends lr{power(e,t){return this.runFunction(e.args,t,this.metadata("POWER"),Math.pow)}}Ps.implementedFunctions={POWER:{method:"power",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]}};class Hs extends lr{radians(e,t){return this.runFunction(e.args,t,this.metadata("RADIANS"),(e=>e*(Math.PI/180)))}}Hs.implementedFunctions={RADIANS:{method:"radians",parameters:[{argumentType:ar.NUMBER}]}};const Fs=10;class Ys extends lr{dec2bin(e,t){return this.runFunction(e.args,t,this.metadata("DEC2BIN"),((e,t)=>Us(e,2,t)))}dec2oct(e,t){return this.runFunction(e.args,t,this.metadata("DEC2OCT"),((e,t)=>Us(e,8,t)))}dec2hex(e,t){return this.runFunction(e.args,t,this.metadata("DEC2HEX"),((e,t)=>Us(e,16,t)))}bin2dec(e,t){return this.runFunction(e.args,t,this.metadata("BIN2DEC"),(e=>{const t=Vs(e,2,Fs);return void 0===t?new Cn(sn.NUM,J.NotBinary):zs(t,2)}))}bin2oct(e,t){return this.runFunction(e.args,t,this.metadata("BIN2OCT"),((e,t)=>{const n=Vs(e,2,Fs);return void 0===n?new Cn(sn.NUM,J.NotBinary):Us(zs(n,2),8,t)}))}bin2hex(e,t){return this.runFunction(e.args,t,this.metadata("BIN2HEX"),((e,t)=>{const n=Vs(e,2,Fs);return void 0===n?new Cn(sn.NUM,J.NotBinary):Us(zs(n,2),16,t)}))}oct2dec(e,t){return this.runFunction(e.args,t,this.metadata("OCT2DEC"),(e=>{const t=Vs(e,8,Fs);return void 0===t?new Cn(sn.NUM,J.NotOctal):zs(t,8)}))}oct2bin(e,t){return this.runFunction(e.args,t,this.metadata("OCT2BIN"),((e,t)=>{const n=Vs(e,8,Fs);return void 0===n?new Cn(sn.NUM,J.NotOctal):Us(zs(n,8),2,t)}))}oct2hex(e,t){return this.runFunction(e.args,t,this.metadata("OCT2HEX"),((e,t)=>{const n=Vs(e,8,Fs);return void 0===n?new Cn(sn.NUM,J.NotOctal):Us(zs(n,8),16,t)}))}hex2dec(e,t){return this.runFunction(e.args,t,this.metadata("HEX2DEC"),(e=>{const t=Vs(e,16,Fs);return void 0===t?new Cn(sn.NUM,J.NotHex):zs(t,16)}))}hex2bin(e,t){return this.runFunction(e.args,t,this.metadata("HEX2BIN"),((e,t)=>{const n=Vs(e,16,Fs);return void 0===n?new Cn(sn.NUM,J.NotHex):Us(zs(n,16),2,t)}))}hex2oct(e,t){return this.runFunction(e.args,t,this.metadata("HEX2OCT"),((e,t)=>{const n=Vs(e,16,Fs);return void 0===n?new Cn(sn.NUM,J.NotHex):Us(zs(n,16),8,t)}))}base(e,t){return this.runFunction(e.args,t,this.metadata("BASE"),Ws)}decimal(e,t){return this.runFunction(e.args,t,this.metadata("DECIMAL"),((e,t)=>{const n=Vs(e,t,255);return void 0===n?new Cn(sn.NUM,J.NotHex):parseInt(n,t)}))}}function Vs(e,t,n){const r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ".substr(0,t),o=new RegExp(`^[${r}]+$`);if(!(e.length>n)&&o.test(e))return e}function Us(e,t,n){if(e>function(e){return-Bs(e)-1}(t))return new Cn(sn.NUM,J.ValueBaseLarge);if(e<Bs(t))return new Cn(sn.NUM,J.ValueBaseSmall);const r=js(e,t);return void 0===n||e<0?r:r.length>n?new Cn(sn.NUM,J.ValueBaseLong):Gr(r,n)}function Bs(e){return-Math.pow(e,Fs)/2}function Ws(e,t,n){const r=js(e,t);return void 0!==n&&n>r.length?Gr(r,n):r}function js(e,t){return(e+(e<0?Math.pow(t,Fs):0)).toString(t).toUpperCase()}function zs(e,t){const n=parseInt(e,t),r=Math.pow(t,Fs);return n>=r/2?n-r:n}Ys.implementedFunctions={DEC2BIN:{method:"dec2bin",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2OCT:{method:"dec2oct",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},DEC2HEX:{method:"dec2hex",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0,minValue:1,maxValue:10}]},BIN2DEC:{method:"bin2dec",parameters:[{argumentType:ar.STRING}]},BIN2OCT:{method:"bin2oct",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},BIN2HEX:{method:"bin2hex",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},OCT2DEC:{method:"oct2dec",parameters:[{argumentType:ar.STRING}]},OCT2BIN:{method:"oct2bin",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},OCT2HEX:{method:"oct2hex",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},HEX2DEC:{method:"hex2dec",parameters:[{argumentType:ar.STRING}]},HEX2BIN:{method:"hex2bin",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},HEX2OCT:{method:"hex2oct",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:Fs}]},DECIMAL:{method:"decimal",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,minValue:2,maxValue:36}]},BASE:{method:"base",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:2,maxValue:36},{argumentType:ar.NUMBER,optionalArg:!0,minValue:0,maxValue:255}]}};class Gs extends lr{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 Cn(sn.NUM,J.WrongOrder):((e=Math.ceil(e))===(t=Math.floor(t)+1)&&(t+=1),e+Math.floor(Math.random()*(t-e)))))}}function $s(e){const t=Math.ceil(e);return t%2==1?t:t+1}function Ks(e){const t=Math.ceil(e);return t%2==0?t:t+1}Gs.implementedFunctions={RAND:{method:"rand",parameters:[],isVolatile:!0},RANDBETWEEN:{method:"randbetween",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}],isVolatile:!0}};class Xs extends lr{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?-Ks(-e):Ks(e)))}odd(e,t){return this.runFunction(e.args,t,this.metadata("ODD"),(e=>e<0?-$s(-e):$s(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 Cn(sn.DIV_BY_ZERO):e>0&&t<0?new Cn(sn.NUM,J.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 Cn(sn.DIV_BY_ZERO):e>0&&t<0?new Cn(sn.NUM,J.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)))}}Xs.implementedFunctions={ROUNDUP:{method:"roundup",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0}]},ROUNDDOWN:{method:"rounddown",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0}]},ROUND:{method:"round",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:0}]},INT:{method:"intFunc",parameters:[{argumentType:ar.NUMBER}]},EVEN:{method:"even",parameters:[{argumentType:ar.NUMBER}]},ODD:{method:"odd",parameters:[{argumentType:ar.NUMBER}]},"CEILING.MATH":{method:"ceilingmath",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:1},{argumentType:ar.NUMBER,defaultValue:0}]},CEILING:{method:"ceiling",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},"CEILING.PRECISE":{method:"ceilingprecise",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:1}]},"FLOOR.MATH":{method:"floormath",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:1},{argumentType:ar.NUMBER,defaultValue:0}]},FLOOR:{method:"floor",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},"FLOOR.PRECISE":{method:"floorprecise",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,defaultValue:1}]}},Xs.aliases={"ISO.CEILING":"CEILING.PRECISE",TRUNC:"ROUNDDOWN"};class qs extends lr{sqrt(e,t){return this.runFunction(e.args,t,this.metadata("SQRT"),Math.sqrt)}}function*Qs(){}function Js(e){const t=e[Symbol.iterator](),{done:n,value:r}=t.next();return n?{rest:Qs()}:{value:r,rest:t}}qs.implementedFunctions={SQRT:{method:"sqrt",parameters:[{argumentType:ar.NUMBER}]}};class Zs{constructor(e,t,n,r,o){this.interpreter=e,this.cacheKey=t,this.reduceInitialValue=n,this.composeFunction=r,this.mapFunction=o,this.dependencyGraph=this.interpreter.dependencyGraph}compute(e,t){for(const n of t)if(!n.conditionRange.sameDimensionsAs(e))return new Cn(sn.VALUE,J.EqualLength);const n=this.tryToGetRangeVertexForRangeValue(e),r=t.map((e=>this.tryToGetRangeVertexForRangeValue(e.conditionRange)));if(n&&r.every((e=>void 0!==e))){const o=t.map((e=>e.criterionPackage.raw)).join(","),i=this.findAlreadyComputedValueInCache(n,this.cacheKey(t),o);if(void 0!==i)return this.interpreter.stats.incrementCriterionFunctionFullCacheUsed(),i;const s=this.buildNewCriterionCache(this.cacheKey(t),t.map((e=>e.conditionRange.range)),e.range);return s.has(o)||s.set(o,[this.evaluateRangeValue(e,t),t.map((e=>e.criterionPackage.lambda))]),n.setCriterionFunctionValues(this.cacheKey(t),s),r.forEach((e=>{void 0!==e&&e.addDependentCacheRange(n)})),s.get(o)[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](),o=na(n,t.map((e=>e.conditionRange.iterateValuesFromTopLeftCorner())),r);return this.reduceFunction(o)}buildNewCriterionCache(e,t,n){const r=this.dependencyGraph.getRange(n.start,n.end),{smallerRangeVertex:o,restConditionRanges:i,restValuesRange:s}=((e,t,n)=>{if(n.end.row>n.start.row){const r=An(n.end.sheet,n.end.col,n.end.row-1),o=e.getRange(n.start,r);if(void 0!==o)return{smallerRangeVertex:o,restValuesRange:n.withStart(An(n.start.sheet,n.start.col,n.end.row)),restConditionRanges:t.map((e=>e.withStart(An(e.start.sheet,e.start.col,e.end.row))))}}return{restValuesRange:n,restConditionRanges:t}})(this.dependencyGraph,t,n);let a;a=void 0!==o&&this.dependencyGraph.existsEdge(o,r)?o.getCriterionFunctionValues(e):new Map;const l=new Map;return a.forEach((([e,t],n)=>{const r=na(t,i.map((e=>ta(this.dependencyGraph,e))),Array.from(ta(this.dependencyGraph,s)).map(this.mapFunction)[Symbol.iterator]()),o=this.composeFunction(e,this.reduceFunction(r));this.interpreter.stats.incrementCriterionFunctionPartialCacheUsed(),l.set(n,[o,t])})),l}}class ea{constructor(e,t){this.conditionRange=e,this.criterionPackage=t}}function*ta(e,t){for(const n of t.addresses(e))yield je(e.getScalarValue(n))}function*na(e,t,n){for(const r of n){const n=t.map((e=>Js(e)));if(!n.every((e=>Object.prototype.hasOwnProperty.call(e,"value"))))return;ra(n.map((e=>je(e.value))),e).every((([e,t])=>t(e)))&&(yield r),t=n.map((e=>e.rest))}}function ra(e,t){const n=[];for(let r=0;r<Math.min(e.length,t.length);r++)n.push([e[r],t[r]]);return n}class oa{constructor(e,t){this.sum=e,this.count=t}static single(e){return new oa(e,1)}compose(e){return new oa(this.sum+e.sum,this.count+e.count)}averageValue(){return this.count>0?this.sum/this.count:void 0}}function ia(e){return Je(e)&&!Number.isFinite(je(e))?0:e}function sa(e){return e instanceof Cn?e:Je(e)?je(e):void 0}oa.empty=new oa(0,0);class aa extends lr{sumif(e,t){const n="SUMIF";return this.runFunction(e.args,t,this.metadata(n),((e,t,r)=>this.computeConditionalAggregationFunction(null!=r?r:e,[e,t],n,0,((e,t)=>this.arithmeticHelper.nonstrictadd(e,t)),sa)))}sumifs(e,t){const n="SUMIFS";return this.runFunction(e.args,t,this.metadata(n),((e,...t)=>this.computeConditionalAggregationFunction(e,t,n,0,((e,t)=>this.arithmeticHelper.nonstrictadd(e,t)),sa)))}averageif(e,t){const n="AVERAGEIF";return this.runFunction(e.args,t,this.metadata(n),((e,t,r)=>{const o=this.computeConditionalAggregationFunction(null!=r?r:e,[e,t],n,oa.empty,((e,t)=>e.compose(t)),(e=>Je(e)?oa.single(je(e)):oa.empty));return o instanceof Cn?o:o.averageValue()||new Cn(sn.DIV_BY_ZERO)}))}countif(e,t){const n="COUNTIF";return this.runFunction(e.args,t,this.metadata(n),((e,t)=>this.computeConditionalAggregationFunction(e,[e,t],n,0,((e,t)=>e+t),(()=>1))))}countifs(e,t){const n="COUNTIFS";return this.runFunction(e.args,t,this.metadata(n),((...e)=>this.computeConditionalAggregationFunction(e[0],e,n,0,((e,t)=>e+t),(()=>1))))}minifs(e,t){const n="MINIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.min(e,t);return this.runFunction(e.args,t,this.metadata(n),((e,...t)=>ia(this.computeConditionalAggregationFunction(e,t,n,Number.POSITIVE_INFINITY,r,sa))))}maxifs(e,t){const n="MAXIFS",r=(e,t)=>void 0===t||void 0===e?void 0===t?e:t:Math.max(e,t);return this.runFunction(e.args,t,this.metadata(n),((e,...t)=>ia(this.computeConditionalAggregationFunction(e,t,n,Number.NEGATIVE_INFINITY,r,sa))))}computeConditionalAggregationFunction(e,t,n,r,o,i){const s=[];for(let e=0;e<t.length;e+=2){const n=t[e],r=this.interpreter.criterionBuilder.fromCellValue(t[e+1],this.arithmeticHelper);if(void 0===r)return new Cn(sn.VALUE,J.BadCriterion);s.push(new ea(n,r))}return new Zs(this.interpreter,function(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(",")}}(n),r,o,i).compute(e,s)}}aa.implementedFunctions={SUMIF:{method:"sumif",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NOERROR},{argumentType:ar.RANGE,optionalArg:!0}]},COUNTIF:{method:"countif",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NOERROR}]},AVERAGEIF:{method:"averageif",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NOERROR},{argumentType:ar.RANGE,optionalArg:!0}]},SUMIFS:{method:"sumifs",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE},{argumentType:ar.NOERROR}],repeatLastArgs:2},COUNTIFS:{method:"countifs",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NOERROR}],repeatLastArgs:2},MINIFS:{method:"minifs",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE},{argumentType:ar.NOERROR}],repeatLastArgs:2},MAXIFS:{method:"maxifs",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE},{argumentType:ar.NOERROR}],repeatLastArgs:2}};class la extends lr{sumproduct(e,t){return this.runFunction(e.args,t,this.metadata("SUMPRODUCT"),((...e)=>{const t=e[0].width(),n=e[0].height();for(const r of e)if(r.width()!==t||r.height()!==n)return new Cn(sn.VALUE,J.EqualLength);let r=0;const o=e.map((e=>e.iterateValuesFromTopLeftCorner()));for(let e=0;e<t*n;e++){let e=1;for(const t of o){const n=t.next().value;if(n instanceof Cn)return n;const r=this.coerceScalarToNumberOrError(n);Je(r)?e*=je(r):e=0}r+=e}return r}))}}la.implementedFunctions={SUMPRODUCT:{method:"sumproduct",parameters:[{argumentType:ar.RANGE}],repeatLastArgs:1}};class ua extends lr{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 Cn(sn.VALUE,J.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 Cn(sn.VALUE,J.NegativeCount):e.repeat(t)))}right(e,t){return this.runFunction(e.args,t,this.metadata("RIGHT"),((e,t)=>t<0?new Cn(sn.VALUE,J.NegativeLength):0===t?"":e.slice(-t)))}left(e,t){return this.runFunction(e.args,t,this.metadata("LEFT"),((e,t)=>t<0?new Cn(sn.VALUE,J.NegativeLength):e.slice(0,t)))}mid(e,t){return this.runFunction(e.args,t,this.metadata("MID"),((e,t,n)=>t<1?new Cn(sn.VALUE,J.LessThanOne):n<0?new Cn(sn.VALUE,J.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 Cn(sn.VALUE,J.LessThanOne):n<0?new Cn(sn.VALUE,J.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 Cn(sn.VALUE,J.LengthBounds);const r=e.toLowerCase(),o=t.substring(n-1).toLowerCase(),i=this.arithmeticHelper.requiresRegex(r)?this.arithmeticHelper.searchString(r,o):o.indexOf(r);return i>-1?i+n:new Cn(sn.VALUE,J.PatternNotFound)}))}substitute(e,t){return this.runFunction(e.args,t,this.metadata("SUBSTITUTE"),((e,t,n,r)=>{const o=this.escapeRegExpSpecialCharacters(t),i=new RegExp(o,"g");if(void 0===r)return e.replace(i,n);if(r<1)return new Cn(sn.VALUE,J.LessThanOne);let s,a=0;for(;null!==(s=i.exec(e));)if(r===++a)return e.substring(0,s.index)+n+e.substring(i.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 Cn(sn.VALUE,J.IndexBounds);const r=t.substring(n-1).indexOf(e)+n;return r>0?r:new Cn(sn.VALUE,J.PatternNotFound)}))}t(e,t){return this.runFunction(e.args,t,this.metadata("T"),(e=>e instanceof Cn||"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,"\\$&")}}ua.implementedFunctions={CONCATENATE:{method:"concatenate",parameters:[{argumentType:ar.STRING}],repeatLastArgs:1,expandRanges:!0},EXACT:{method:"exact",parameters:[{argumentType:ar.STRING},{argumentType:ar.STRING}]},SPLIT:{method:"split",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER}]},LEN:{method:"len",parameters:[{argumentType:ar.STRING}]},LOWER:{method:"lower",parameters:[{argumentType:ar.STRING}]},MID:{method:"mid",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},TRIM:{method:"trim",parameters:[{argumentType:ar.STRING}]},T:{method:"t",parameters:[{argumentType:ar.SCALAR}]},PROPER:{method:"proper",parameters:[{argumentType:ar.STRING}]},CLEAN:{method:"clean",parameters:[{argumentType:ar.STRING}]},REPT:{method:"rept",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER}]},RIGHT:{method:"right",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,defaultValue:1}]},LEFT:{method:"left",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER,defaultValue:1}]},REPLACE:{method:"replace",parameters:[{argumentType:ar.STRING},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.STRING}]},SEARCH:{method:"search",parameters:[{argumentType:ar.STRING},{argumentType:ar.STRING},{argumentType:ar.NUMBER,defaultValue:1}]},SUBSTITUTE:{method:"substitute",parameters:[{argumentType:ar.STRING},{argumentType:ar.STRING},{argumentType:ar.STRING},{argumentType:ar.NUMBER,optionalArg:!0}]},FIND:{method:"find",parameters:[{argumentType:ar.STRING},{argumentType:ar.STRING},{argumentType:ar.NUMBER,defaultValue:1}]},UPPER:{method:"upper",parameters:[{argumentType:ar.STRING}]}};class ha extends lr{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 Cn(sn.DIV_BY_ZERO):Math.atan2(t,e)))}cot(e,t){return this.runFunction(e.args,t,this.metadata("COT"),(e=>0===e?new Cn(sn.DIV_BY_ZERO):1/Math.tan(e)))}acot(e,t){return this.runFunction(e.args,t,this.metadata("ACOT"),(e=>0===e?Es/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 Cn(sn.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 Cn(sn.DIV_BY_ZERO):1/Math.tanh(e)))}acoth(e,t){return this.runFunction(e.args,t,this.metadata("ACOTH"),(e=>0===e?new Cn(sn.NUM,J.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 Cn(sn.DIV_BY_ZERO):1/Math.sinh(e)))}}ha.implementedFunctions={ACOS:{method:"acos",parameters:[{argumentType:ar.NUMBER}]},ASIN:{method:"asin",parameters:[{argumentType:ar.NUMBER}]},COS:{method:"cos",parameters:[{argumentType:ar.NUMBER}]},SIN:{method:"sin",parameters:[{argumentType:ar.NUMBER}]},TAN:{method:"tan",parameters:[{argumentType:ar.NUMBER}]},ATAN:{method:"atan",parameters:[{argumentType:ar.NUMBER}]},ATAN2:{method:"atan2",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},COT:{method:"cot",parameters:[{argumentType:ar.NUMBER}]},SEC:{method:"sec",parameters:[{argumentType:ar.NUMBER}]},CSC:{method:"csc",parameters:[{argumentType:ar.NUMBER}]},SINH:{method:"sinh",parameters:[{argumentType:ar.NUMBER}]},COSH:{method:"cosh",parameters:[{argumentType:ar.NUMBER}]},TANH:{method:"tanh",parameters:[{argumentType:ar.NUMBER}]},COTH:{method:"coth",parameters:[{argumentType:ar.NUMBER}]},SECH:{method:"sech",parameters:[{argumentType:ar.NUMBER}]},CSCH:{method:"csch",parameters:[{argumentType:ar.NUMBER}]},ACOT:{method:"acot",parameters:[{argumentType:ar.NUMBER}]},ASINH:{method:"asinh",parameters:[{argumentType:ar.NUMBER}]},ACOSH:{method:"acosh",parameters:[{argumentType:ar.NUMBER}]},ATANH:{method:"atanh",parameters:[{argumentType:ar.NUMBER}]},ACOTH:{method:"acoth",parameters:[{argumentType:ar.NUMBER}]}};class ca extends Ai{constructor(e){super(e),this.dependencyGraph=e}find(e,t,n){return this.basicFind(e,t,"col",n)}}class da extends lr{constructor(){super(...arguments),this.rowSearch=new ca(this.dependencyGraph)}vlookup(e,t){return this.runFunction(e.args,t,this.metadata("VLOOKUP"),((e,t,n,r)=>{const o=t.range;if(void 0===o)return new Cn(sn.VALUE,J.WrongType);if(n<1)return new Cn(sn.VALUE,J.LessThanOne);if(n>o.width())return new Cn(sn.REF,J.IndexLarge);const i={ordering:r?"asc":"none",ifNoMatch:r?"returnLowerBound":"returnNotFound"};return this.doVlookup(Xn(e),t,n-1,i)}))}hlookup(e,t){return this.runFunction(e.args,t,this.metadata("HLOOKUP"),((e,t,n,r)=>{const o=t.range;if(void 0===o)return new Cn(sn.VALUE,J.WrongType);if(n<1)return new Cn(sn.VALUE,J.LessThanOne);if(n>o.height())return new Cn(sn.REF,J.IndexLarge);const i={ordering:r?"asc":"none",ifNoMatch:r?"returnLowerBound":"returnNotFound"};return this.doHlookup(Xn(e),t,n-1,i)}))}xlookup(e,t){return this.runFunction(e.args,t,this.metadata("XLOOKUP"),((e,t,n,r,o,i)=>{if(![0,-1,1,2].includes(o))return new Cn(sn.VALUE,J.BadMode);if(![1,-1,2,-2].includes(i))return new Cn(sn.VALUE,J.BadMode);const s=t instanceof nt?t:nt.fromScalar(t),a=n instanceof nt?n:nt.fromScalar(n),l=2===o,u={ordering:2===i?"asc":-2===i?"desc":"none",returnOccurrence:-1===i?"last":"first",ifNoMatch:-1===o?"returnLowerBound":1===o?"returnUpperBound":"returnNotFound"};return this.doXlookup(Xn(e),s,a,r,l,u)}))}xlookupArraySize(e){var t,n;const r=null===(t=null==e?void 0:e.args)||void 0===t?void 0:t[1],o=null===(n=null==e?void 0:e.args)||void 0===n?void 0:n[2];if(null==(null==r?void 0:r.start)||null==(null==r?void 0:r.end)||null==(null==o?void 0:o.start)||null==(null==o?void 0:o.end))return ur.error();const i=r.end.row-r.start.row+1,s=r.end.col-r.start.col+1,a=o.end.row-o.start.row+1,l=o.end.col-o.start.col+1,u=1===s&&a===i;return u||1===i&&l===s?u?new ur(l,1):new ur(1,a):ur.error()}match(e,t){return this.runFunction(e.args,t,this.metadata("MATCH"),((e,t,n)=>this.doMatch(Xn(e),t,n)))}searchInRange(e,t,n,r,o){return n&&"string"==typeof e&&this.arithmeticHelper.requiresRegex(e)?o.advancedFind(this.arithmeticHelper.eqMatcherFunction(e),t,{returnOccurrence:r.returnOccurrence}):o.find(e,t,r)}doVlookup(e,t,n,r){this.dependencyGraph.stats.start(et.VLOOKUP);const o=t.range;let i;i=void 0===o?nt.onlyValues(t.data.map((e=>[e[0]]))):nt.onlyRange(Hn.spanFrom(o.start,1,o.height()),this.dependencyGraph);const s=this.searchInRange(e,i,"none"===r.ordering,r,this.columnSearch);if(this.dependencyGraph.stats.end(et.VLOOKUP),-1===s)return new Cn(sn.NA,J.ValueNotFound);let a;if(void 0===o)a=t.data[s][n];else{const e=An(o.sheet,o.start.col+n,o.start.row+s);a=this.dependencyGraph.getCellValue(e)}return a instanceof nt?new Cn(sn.VALUE,J.WrongType):a}doHlookup(e,t,n,r){const o=t.range;let i;i=void 0===o?nt.onlyValues([t.data[0]]):nt.onlyRange(Hn.spanFrom(o.start,o.width(),1),this.dependencyGraph);const s=this.searchInRange(e,i,"none"===r.ordering,r,this.rowSearch);if(-1===s)return new Cn(sn.NA,J.ValueNotFound);let a;if(void 0===o)a=t.data[n][s];else{const e=An(o.sheet,o.start.col+s,o.start.row+n);a=this.dependencyGraph.getCellValue(e)}return a instanceof nt?new Cn(sn.VALUE,J.WrongType):a}doXlookup(e,t,n,r,o,i){const s=1===t.width()&&n.height()===t.height(),a=1===t.height()&&n.width()===t.width();if(!s&&!a)return new Cn(sn.VALUE,J.WrongDimension);const l=s?this.columnSearch:this.rowSearch,u=this.searchInRange(e,t,o,i,l);if(-1===u)return r==sn.NA?new Cn(sn.NA,J.ValueNotFound):r;const h=s?[n.data[u]]:n.data.map((e=>[e[u]]));return nt.onlyValues(h)}doMatch(e,t,n){if(![-1,0,1].includes(n))return new Cn(sn.VALUE,J.BadMode);if(t.width()>1&&t.height()>1)return new Cn(sn.NA);const r=0===n?{ordering:"none",ifNoMatch:"returnNotFound"}:{ordering:-1===n?"desc":"asc",ifNoMatch:-1===n?"returnUpperBound":"returnLowerBound"},o=(1===t.width()?this.columnSearch:this.rowSearch).find(e,t,r);return-1===o?new Cn(sn.NA,J.ValueNotFound):o+1}}da.implementedFunctions={VLOOKUP:{method:"vlookup",parameters:[{argumentType:ar.NOERROR},{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.BOOLEAN,defaultValue:!0}]},HLOOKUP:{method:"hlookup",parameters:[{argumentType:ar.NOERROR},{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.BOOLEAN,defaultValue:!0}]},XLOOKUP:{method:"xlookup",arraySizeMethod:"xlookupArraySize",parameters:[{argumentType:ar.NOERROR},{argumentType:ar.RANGE},{argumentType:ar.RANGE},{argumentType:ar.SCALAR,optionalArg:!0,defaultValue:sn.NA},{argumentType:ar.NUMBER,optionalArg:!0,defaultValue:0},{argumentType:ar.NUMBER,optionalArg:!0,defaultValue:1}]},MATCH:{method:"match",parameters:[{argumentType:ar.NOERROR},{argumentType:ar.RANGE},{argumentType:ar.NUMBER,defaultValue:1}]}};class ma extends lr{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=je(this.coerceScalarToNumberOrError(t)))instanceof Cn?t:(t=Math.trunc(t))<0?new Cn(sn.VALUE,J.ValueSmall):t>4?new Cn(sn.VALUE,J.ValueLarge):function(e,t){const n={val:e%1e3,acc:"M".repeat(Math.floor(e/1e3))};return 4===t&&(fa(n,"IM",999,1e3),fa(n,"ID",499,500)),t>=3&&(fa(n,"VM",995,1e3),fa(n,"VD",495,500)),t>=2&&(fa(n,"XM",990,1e3),fa(n,"XD",490,500)),t>=1&&(fa(n,"LM",950,1e3),fa(n,"LD",450,500)),fa(n,"CM",900,1e3),fa(n,"CD",400,500),fa(n,"D",500,900),n.acc+="C".repeat(Math.floor(n.val/100)),n.val%=100,t>=2&&(fa(n,"IC",99,100),fa(n,"IL",49,50)),t>=1&&(fa(n,"VC",95,100),fa(n,"VL",45,50)),fa(n,"XC",90,100),fa(n,"XL",40,50),fa(n,"L",50,90),n.acc+="X".repeat(Math.floor(n.val/10)),n.val%=10,fa(n,"IX",9,10),fa(n,"IV",4,5),fa(n,"V",5,9),n.acc+="I".repeat(n.val),n.acc}(e,t))))}arabic(e,t){return this.runFunction(e.args,t,this.metadata("ARABIC"),(e=>{let t=!1;if((e=e.trim().toUpperCase()).startsWith("-")&&(t=!0,""===(e=e.slice(1))))return new Cn(sn.VALUE,J.InvalidRoman);const n={input:e,acc:0};return pa(n,{token:"MMM",val:3e3},{token:"MM",val:2e3},{token:"M",val:1e3}),pa(n,{token:"IM",val:999},{token:"VM",val:995},{token:"XM",val:990},{token:"LM",val:950},{token:"CM",val:900}),pa(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}),pa(n,{token:"CCC",val:300},{token:"CC",val:200},{token:"C",val:100}),pa(n,{token:"IC",val:99},{token:"VC",val:95},{token:"XC",val:90}),pa(n,{token:"L",val:50},{token:"IL",val:49},{token:"VL",val:45},{token:"XL",val:40}),pa(n,{token:"XXX",val:30},{token:"XX",val:20},{token:"X",val:10}),pa(n,{token:"IX",val:9}),pa(n,{token:"V",val:5},{token:"IV",val:4}),pa(n,{token:"III",val:3},{token:"II",val:2},{token:"I",val:1}),""!==n.input?new Cn(sn.VALUE,J.InvalidRoman):t?-n.acc:n.acc}))}}function pa(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 fa(e,t,n,r){e.val>=n&&e.val<r&&(e.val-=n,e.acc+=t)}ma.implementedFunctions={ROMAN:{method:"roman",parameters:[{argumentType:ar.NUMBER,minValue:1,lessThan:4e3},{argumentType:ar.NOERROR,optionalArg:!0,defaultValue:0}]},ARABIC:{method:"arabic",parameters:[{argumentType:ar.STRING}]}};class ga extends lr{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)}}ga.implementedFunctions={"HF.ADD":{method:"add",parameters:[{argumentType:ar.NUMBER,passSubtype:!0},{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.CONCAT":{method:"concat",parameters:[{argumentType:ar.STRING,passSubtype:!0},{argumentType:ar.STRING,passSubtype:!0}]},"HF.DIVIDE":{method:"divide",parameters:[{argumentType:ar.NUMBER,passSubtype:!0},{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.EQ":{method:"eq",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.GT":{method:"gt",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.GTE":{method:"gte",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.LT":{method:"lt",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.LTE":{method:"lte",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.MINUS":{method:"minus",parameters:[{argumentType:ar.NUMBER,passSubtype:!0},{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.MULTIPLY":{method:"multiply",parameters:[{argumentType:ar.NUMBER,passSubtype:!0},{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.NE":{method:"ne",parameters:[{argumentType:ar.NOERROR,passSubtype:!0},{argumentType:ar.NOERROR,passSubtype:!0}]},"HF.POW":{method:"pow",parameters:[{argumentType:ar.NUMBER,passSubtype:!0},{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.UMINUS":{method:"uminus",parameters:[{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.UNARY_PERCENT":{method:"upercent",parameters:[{argumentType:ar.NUMBER,passSubtype:!0}]},"HF.UPLUS":{method:"uplus",parameters:[{argumentType:ar.NUMBER,passSubtype:!0}]}};var ya=Math;function wa(e,t){for(var n=0,r=0;n<e.length;++n)r=t*r+e[n];return r}function va(e,t,n,r,o){if(0===t)return n;if(1===t)return r;for(var i=2/e,s=r,a=1;a<t;++a)s=r*a*i+o*n,n=r,r=s;return s}function _a(e,t,n,r,o){return function(n,i){if(r){if(0===n)return 1==r?-1/0:1/0;if(n<0)return NaN}return 0===i?e(n):1===i?t(n):i<0?NaN:va(n,i|=0,e(n),t(n),o)}}var ba,Sa,Ca,Ea,Ma,Ta,Ra,Aa,Na,La,xa,Oa,Ia,ka=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(),o=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34935152e-8].reverse();function i(i){var s=0,a=0,l=0,u=i*i;if(i<8)s=(a=wa(t,u))/(l=wa(n,u));else{var h=i-.785398164;a=wa(r,u=64/u),l=wa(o,u),s=ya.sqrt(e/i)*(ya.cos(h)*a-ya.sin(h)*l*8/i)}return s}var s=[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 h(t){var n=0,r=0,o=0,i=t*t,h=ya.abs(t)-2.356194491;return Math.abs(t)<8?n=(r=t*wa(s,i))/(o=wa(a,i)):(r=wa(l,i=64/i),o=wa(u,i),n=ya.sqrt(e/ya.abs(t))*(ya.cos(h)*r-ya.sin(h)*o*8/ya.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 i(t);if(1===n)return h(t);if(0===t)return 0;var r=0;if(t>n)r=va(t,n,i(t),h(t),-1);else{for(var o=!1,s=0,a=0,l=1,u=0,c=2/t,d=2*ya.floor((n+ya.floor(ya.sqrt(40*n)))/2);d>0;d--)u=d*c*l-s,s=l,l=u,ya.abs(l)>1e10&&(l*=1e-10,s*=1e-10,r*=1e-10,a*=1e-10),o&&(a+=l),o=!o,d==n&&(r=s);r/=a=2*a-l}return r}}(),Da=(ba=.636619772,Sa=[-2957821389,7062834065,-512359803.6,10879881.29,-86327.92757,228.4622733].reverse(),Ca=[40076544269,745249964.8,7189466.438,47447.2647,226.1030244,1].reverse(),Ea=[1,-.001098628627,2734510407e-14,-2073370639e-15,2.093887211e-7].reverse(),Ma=[-.01562499995,.0001430488765,-6911147651e-15,7.621095161e-7,-9.34945152e-8].reverse(),Ta=[-4900604943e3,127527439e4,-51534381390,734926455.1,-4237922.726,8511.937935].reverse(),Ra=[249958057e5,424441966400,3733650367,22459040.02,102042.605,354.9632885,1].reverse(),Aa=[1,.00183105,-3516396496e-14,2457520174e-15,-2.40337019e-7].reverse(),Na=[.04687499995,-.0002002690873,8449199096e-15,-8.8228987e-7,1.05787412e-7].reverse(),_a((function(e){var t=0,n=0,r=0,o=e*e,i=e-.785398164;return e<8?t=(n=wa(Sa,o))/(r=wa(Ca,o))+ba*ka(e,0)*ya.log(e):(n=wa(Ea,o=64/o),r=wa(Ma,o),t=ya.sqrt(ba/e)*(ya.sin(i)*n+ya.cos(i)*r*8/e)),t}),(function(e){var t=0,n=0,r=0,o=e*e,i=e-2.356194491;return e<8?t=(n=e*wa(Ta,o))/(r=wa(Ra,o))+ba*(ka(e,1)*ya.log(e)-1/e):(n=wa(Aa,o=64/o),r=wa(Na,o),t=ya.sqrt(ba/e)*(ya.sin(i)*n+ya.cos(i)*r*8/e)),t}),0,1,-1)),Pa=(La=[1,3.5156229,3.0899424,1.2067492,.2659732,.0360768,.0045813].reverse(),xa=[.39894228,.01328592,.00225319,-.00157565,.00916281,-.02057706,.02635537,-.01647633,.00392377].reverse(),Oa=[.5,.87890594,.51498869,.15084934,.02658733,.00301532,32411e-8].reverse(),Ia=[.39894228,-.03988024,-.00362018,.00163801,-.01031555,.02282967,-.02895312,.01787654,-.00420059].reverse(),function e(t,n){if(0===(n=Math.round(n)))return function(e){return e<=3.75?wa(La,e*e/14.0625):ya.exp(ya.abs(e))/ya.sqrt(ya.abs(e))*wa(xa,3.75/ya.abs(e))}(t);if(1===n)return function(e){return e<3.75?e*wa(Oa,e*e/14.0625):(e<0?-1:1)*ya.exp(ya.abs(e))/ya.sqrt(ya.abs(e))*wa(Ia,3.75/ya.abs(e))}(t);if(n<0)return NaN;if(0===ya.abs(t))return 0;if(t==1/0)return 1/0;var r,o=0,i=2/ya.abs(t),s=0,a=1,l=0;for(r=2*ya.round((n+ya.round(ya.sqrt(40*n)))/2);r>0;r--)l=r*i*a+s,s=a,a=l,ya.abs(a)>1e10&&(a*=1e-10,s*=1e-10,o*=1e-10),r==n&&(o=s);return o*=e(t,0)/a,t<0&&n%2?-o:o}),Ha=function(){var e=[-.57721566,.4227842,.23069756,.0348859,.00262698,1075e-7,74e-7].reverse(),t=[1.25331414,-.07832358,.02189568,-.01062446,.00587872,-.0025154,53208e-8].reverse(),n=[1,.15443144,-.67278579,-.18156897,-.01919402,-.00110404,-4686e-8].reverse(),r=[1.25331414,.23498619,-.0365562,.01504268,-.00780353,.00325614,-68245e-8].reverse();return _a((function(n){return n<=2?-ya.log(n/2)*Pa(n,0)+wa(e,n*n/4):ya.exp(-n)/ya.sqrt(n)*wa(t,2/n)}),(function(e){return e<=2?ya.log(e/2)*Pa(e,1)+1/e*wa(n,e*e/4):ya.exp(-e)/ya.sqrt(e)*wa(r,2/e)}),0,2,1)}();function Fa(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,o,i,s=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;s>0;s--)o=l,l=r*l-u+t[s],u=o;return i=n*Math.exp(-e*e+.5*(t[0]+r*l)-u),a?i-1:1-i}function Ya(e){return 1-Fa(e)}function Va(e){let t,n,r,o,i=0;if(e>=2)return-100;if(e<=0)return 100;for(o=e<1?e:2-e,r=Math.sqrt(-2*Math.log(o/2)),t=-.70711*((2.30753+.27061*r)/(1+r*(.99229+.04481*r))-r);i<2;i++)n=Ya(t)-o,t+=n/(1.1283791670955126*Math.exp(-t*t)-t*n);return e<1?t:-t}function Ua(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,o,i,s,a=!1,l=0,u=0,h=0,c=e;if(e>171.6243769536076)return 1/0;if(c<=0){if(s=c%1,!s)return 1/0;a=(1&c?-1:1)*Math.PI/Math.sin(Math.PI*s),c=1-c}for(i=c,o=c<1?c++:(c-=l=(0|c)-1)-1,r=0;r<8;++r)h=(h+t[r])*o,u=u*o+n[r];if(s=h/u+1,i<c)s/=i;else if(i>c)for(r=0;r<l;++r)s*=c,c++;return a&&(s=a/s),s}const Ba=function(e,t,n){return za(e,t)*n};function Wa(e){let t=0;const n=[76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];let r,o,i,s=1.000000000190015;for(i=(o=r=e)+5.5,i-=(r+.5)*Math.log(i);t<6;t++)s+=n[t]/++o;return Math.log(2.5066282746310007*s/r)-i}function ja(e,t){const n=Wa(e);let r=e,o=1/e,i=o,s=t+1-e,a=1/1e-30,l=1/s,u=l,h=1;const c=-~(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(;h<=c;h++)o+=i*=t/++r;return o*Math.exp(-t+e*Math.log(t)-n)}for(;h<=c;h++)d=-h*(h-e),s+=2,l=d*l+s,a=s+d/a,l=1/l,u*=l*a;return 1-u*Math.exp(-t+e*Math.log(t)-n)}function za(e,t){let n=0;const r=t-1,o=Wa(t);let i,s,a,l,u,h,c;if(e>=1)return Math.max(100,t+100*Math.sqrt(t));if(e<=0)return 0;for(t>1?(h=Math.log(r),c=Math.exp(r*(h-1)-o),u=e<.5?e:1-e,a=Math.sqrt(-2*Math.log(u)),i=(2.30753+.27061*a)/(1+a*(.99229+.04481*a))-a,e<.5&&(i=-i),i=Math.max(.001,t*Math.pow(1-1/(9*t)-i/(3*Math.sqrt(t)),3))):(a=1-t*(.253+.12*t),i=e<a?Math.pow(e/a,1/t):1-Math.log(1-(e-a)/(1-a)));n<12;n++){if(i<=0)return 0;if(s=ja(t,i)-e,a=t>1?c*Math.exp(-(i-r)+r*(Math.log(i)-h)):Math.exp(-i+r*Math.log(i)-o),l=s/a,i-=a=l/(1-.5*Math.min(1,l*((t-1)/i-1))),i<=0&&(i=.5*(i+a)),Math.abs(a)<1e-8*i)break}return i}const Ga=function(e,t,n){return Math.exp(-.5*Math.log(2*Math.PI)-Math.log(n)-Math.pow(e-t,2)/(2*n*n))},$a=function(e,t,n){return.5*(1+Fa((e-t)/Math.sqrt(2*n*n)))},Ka=function(e,t,n){return-1.4142135623730951*n*Va(2*e)+t};function Xa(e,t){if(!(e<=0||t<=0))return e+t>170?Math.exp(qa(e,t)):Ua(e)*Ua(t)/Ua(e+t)}function qa(e,t){return Wa(e)+Wa(t)-Wa(e+t)}function Qa(e,t,n){var r,o,i,s,a,l,u,h,c,d,m=t-1,p=n-1,f=0;if(e<=0)return 0;if(e>=1)return 1;for(t>=1&&n>=1?(i=e<.5?e:1-e,l=(2.30753+.27061*(s=Math.sqrt(-2*Math.log(i))))/(1+s*(.99229+.04481*s))-s,e<.5&&(l=-l),u=(l*l-3)/6,h=2/(1/(2*t-1)+1/(2*n-1)),c=l*Math.sqrt(u+h)/h-(1/(2*n-1)-1/(2*t-1))*(u+5/6-2/(3*h)),l=t/(t+n*Math.exp(2*c))):(r=Math.log(t/(t+n)),o=Math.log(n/(t+n)),l=e<(s=Math.exp(t*r)/t)/(c=s+(a=Math.exp(n*o)/n))?Math.pow(t*c*e,1/t):1-Math.pow(n*c*(1-e),1/n)),d=-Wa(t)-Wa(n)+Wa(t+n);f<10;f++){if(0===l||1===l)return l;if((l-=s=(a=(Ja(l,t,n)-e)/(s=Math.exp(m*Math.log(l)+p*Math.log(1-l)+d)))/(1-.5*Math.min(1,a*(m/l-p/(1-l)))))<=0&&(l=.5*(l+s)),l>=1&&(l=.5*(l+s+1)),Math.abs(s)<1e-8*l&&f>0)break}return l}function Ja(e,t,n){var r=0===e||1===e?0:Math.exp(Wa(t+n)-Wa(t)-Wa(n)+t*Math.log(e)+n*Math.log(1-e));return!(e<0||e>1)&&(e<(t+1)/(t+n+2)?r*Za(e,t,n)/t:1-r*Za(1-e,n,t)/n)}function Za(e,t,n){var r,o,i,s,a=1e-30,l=1,u=t+n,h=t+1,c=t-1,d=1,m=1-u*e/h;for(Math.abs(m)<a&&(m=a),s=m=1/m;l<=100&&(m=1+(o=l*(n-l)*e/((c+(r=2*l))*(t+r)))*m,Math.abs(m)<a&&(m=a),d=1+o/d,Math.abs(d)<a&&(d=a),s*=(m=1/m)*d,m=1+(o=-(t+l)*(u+l)*e/((t+r)*(h+r)))*m,Math.abs(m)<a&&(m=a),d=1+o/d,Math.abs(d)<a&&(d=a),s*=i=(m=1/m)*d,!(Math.abs(i-1)<3e-7));l++);return s}const el=function(e,t,n){return 0===n||1===n?t*n===e?1:0:rl(t,e)*Math.pow(n,e)*Math.pow(1-n,t-e)},tl=function(e,t,n){var r,o=1e-10;if(e<0)return 0;if(e>=t)return 1;if(n<0||n>1||t<=0)return NaN;var i=n,s=(e=Math.floor(e))+1,a=t-e,l=s+a,u=Math.exp(Wa(l)-Wa(a)-Wa(s)+s*Math.log(i)+a*Math.log(1-i));return r=i<(s+1)/(l+2)?u*nl(i,s,a,o):1-u*nl(1-i,a,s,o),Math.round(1/o*(1-r))/(1/o)};function nl(e,t,n,r){for(var o,i=0,s=1,a=1,l=1,u=0,h=0;Math.abs((a-h)/a)>r;)h=a,s=l+(o=-(t+u)*(t+n+u)*e/(t+2*u)/(t+2*u+1))*s,a=(i=a+o*i)+(o=(u+=1)*(n-u)*e/(t+2*u-1)/(t+2*u))*a,i/=l=s+o*l,s/=l,a/=l,l=1;return a/t}function rl(e,t){return e>170||t>170?Math.exp(function(e,t){return ol(e)-ol(t)-ol(e-t)}(e,t)):il(e)/il(t)/il(e-t)}function ol(e){return e<0?NaN:Wa(e+1)}function il(e){return e<0?NaN:Ua(e+1)}const sl=function(e,t){return e<0?0:ja(t/2,e/2)},al=function(e,t){return 2*za(e,.5*t)},ll=function(e,t,n){return e<0?0:Ja(t*e/(t*e+n),t/2,n/2)},ul=function(e,t,n){return n/(t*(1/Qa(e,t/2,n/2)-1))},hl={pdf:function(e,t){return t<0||e%1!=0||e<0?0:Math.pow(t,e)*Math.exp(-t)/il(e)},cdf:function(e,t){var n=0;if(e<0)return 0;for(var r=0;n<=e;n++)r+=hl.pdf(n,t);return r}},cl={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?cl.pdf(t-n-r+e,t,t-n,t-r):cl.pdf(r-e,t,t-n,r);if(2*r>t)return cl.pdf(n-e,t,n,t-r);if(n<r)return cl.pdf(e,t,r,n);for(var o=1,i=0,s=0;s<e;s++){for(;o>1&&i<r;)o*=1-n/(t-i),i++;o*=(r-s)*(n-s)/((s+1)*(t-n-r+s+1))}for(;i<r;i++)o*=1-n/(t-i);return Math.min(1,Math.max(0,o))},cdf:function e(t,n,r,o){if(t<0||t<r-(n-o))return 0;if(t>=o||t>=r)return 1;if(2*r>n)return 2*o>n?e(n-r-o+t,n,n-r,n-o):1-cl.cdf(o-t-1,n,n-r,o);if(2*o>n)return 1-cl.cdf(r-t-1,n,r,n-o);if(r<o)return cl.cdf(t,n,o,r);for(var i=1,s=1,a=0,l=0;l<t;l++){for(;i>1&&a<o;){var u=1-r/(n-a);s*=u,i*=u,a++}i+=s*=(o-l)*(r-l)/((l+1)*(n-r-o+l+1))}for(;a<o;a++)i*=1-r/(n-a);return Math.min(1,Math.max(0,i))}},dl=function(e,t){var n=t/2;return Ja((e+Math.sqrt(e*e+t))/(2*Math.sqrt(e*e+t)),n,n)},ml=function(e,t){var n=Qa(2*Math.min(e,1-e),.5*t,.5);return n=Math.sqrt(t*(1-n)/n),e>.5?n:-n},pl={pdf:function(e,t,n){return e===e>>>0&&(e<0?0:rl(e+t-1,t-1)*Math.pow(1-n,e)*Math.pow(n,t))},cdf:function(e,t,n){var r=0,o=0;if(e<0)return 0;for(;o<=e;o++)r+=pl.pdf(o,t,n);return r}};function fl(e){for(var t=0,n=e.length;--n>=0;)t+=e[n];return t}function gl(e){return fl(e)/e.length}function yl(e){for(var t,n=gl(e),r=0,o=e.length;--o>=0;)r+=(t=e[o]-n)*t;return r}function wl(e,t){return yl(e)/(e.length-(t?1:0))}function vl(e,t){return Math.sqrt(wl(e,t))}function _l(e,t){var n,r=gl(e),o=gl(t),i=e.length,s=new Array(i);for(n=0;n<i;n++)s[n]=(e[n]-r)*(t[n]-o);return fl(s)/(i-1)}function bl(e,t){return _l(e,t)/vl(e,1)/vl(t,1)}class Sl extends lr{erf(e,t){return this.runFunction(e.args,t,this.metadata("ERF"),((e,t)=>void 0===t?Fa(e):Fa(t)-Fa(e)))}erfc(e,t){return this.runFunction(e.args,t,this.metadata("ERFC"),Ya)}expondist(e,t){return this.runFunction(e.args,t,this.metadata("EXPON.DIST"),((e,t,n)=>n?((e,t)=>e<0?0:1-Math.exp(-t*e))(e,t):((e,t)=>e<0?0:t*Math.exp(-t*e))(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"),Ua)}gammadist(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.DIST"),((e,t,n,r)=>{return r?(i=t,s=n,(o=e)<0?0:ja(i,o/s)):function(e,t,n){return e<0?0:0===e&&1===t?1/n:Math.exp((t-1)*Math.log(e)-e/n-Wa(t)-t*Math.log(n))}(e,t,n);var o,i,s}))}gammaln(e,t){return this.runFunction(e.args,t,this.metadata("GAMMALN"),Wa)}gammainv(e,t){return this.runFunction(e.args,t,this.metadata("GAMMA.INV"),Ba)}gauss(e,t){return this.runFunction(e.args,t,this.metadata("GAUSS"),(e=>$a(e,0,1)-.5))}betadist(e,t){return this.runFunction(e.args,t,this.metadata("BETA.DIST"),((e,t,n,r,o,i)=>e<=o?new Cn(sn.NUM,J.ValueSmall):e>=i?new Cn(sn.NUM,J.ValueLarge):(e=(e-o)/(i-o),r?function(e,t,n){return e>1||e<0?+(e>1):Ja(e,t,n)}(e,t,n):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)/Xa(t,n):Math.exp((t-1)*Math.log(e)+(n-1)*Math.log(1-e)-qa(t,n))}(e,t,n))))}betainv(e,t){return this.runFunction(e.args,t,this.metadata("BETA.INV"),((e,t,n,r,o)=>r>=o?new Cn(sn.NUM,J.WrongOrder):function(e,t,n){return Qa(e,t,n)}(e,t,n)*(o-r)+r))}binomialdist(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.DIST"),((e,t,n,r)=>e>t?new Cn(sn.NUM,J.WrongOrder):(e=Math.trunc(e),t=Math.trunc(t),r?tl(e,t,n):el(e,t,n))))}binomialinv(e,t){return this.runFunction(e.args,t,this.metadata("BINOM.INV"),((e,t,n)=>{let r=-1,o=e=Math.trunc(e);for(;o>r+1;){const i=Math.trunc((r+o)/2);tl(i,e,t)>=n?o=i:r=i}return o}))}besselifn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELI"),((e,t)=>Pa(e,Math.trunc(t))))}besseljfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELJ"),((e,t)=>ka(e,Math.trunc(t))))}besselkfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELK"),((e,t)=>Ha(e,Math.trunc(t))))}besselyfn(e,t){return this.runFunction(e.args,t,this.metadata("BESSELY"),((e,t)=>Da(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?sl(e,t):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)-Wa(t/2))}(e,t))))}chisqdistrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.DIST.RT"),((e,t)=>1-sl(e,Math.trunc(t))))}chisqinv(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV"),((e,t)=>al(e,Math.trunc(t))))}chisqinvrt(e,t){return this.runFunction(e.args,t,this.metadata("CHISQ.INV.RT"),((e,t)=>al(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?ll(e,t,n):function(e,t,n){return e<0?0:t<=2?0===e&&t<2?1/0:0===e&&2===t?1:1/Xa(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):t*(n/(n+e*t))/2*el((t-2)/2,(t+n-2)/2,t*e/(n+e*t))}(e,t,n))))}fdistrt(e,t){return this.runFunction(e.args,t,this.metadata("F.DIST.RT"),((e,t,n)=>1-ll(e,Math.trunc(t),Math.trunc(n))))}finv(e,t){return this.runFunction(e.args,t,this.metadata("F.INV"),((e,t,n)=>ul(e,Math.trunc(t),Math.trunc(n))))}finvrt(e,t){return this.runFunction(e.args,t,this.metadata("F.INV.RT"),((e,t,n)=>ul(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?function(e,t,n){return e<0?0:1-Math.exp(-Math.pow(e/t,n))}(e,n,t):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))}(e,n,t)))}poissondist(e,t){return this.runFunction(e.args,t,this.metadata("POISSON.DIST"),((e,t,n)=>(e=Math.trunc(e),n?hl.cdf(e,t):hl.pdf(e,t))))}hypgeomdist(e,t){return this.runFunction(e.args,t,this.metadata("HYPGEOM.DIST"),((e,t,n,r,o)=>e>t||e>n||t>r||n>r||e+r<n+t?new Cn(sn.NUM,J.ValueLarge):(e=Math.trunc(e),t=Math.trunc(t),n=Math.trunc(n),r=Math.trunc(r),o?cl.cdf(e,r,n,t):cl.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?dl(e,t):function(e,t){return t=t>1e100?1e100:t,1/(Math.sqrt(t)*Xa(.5,t/2))*Math.pow(1+e*e/t,-(t+1)/2)}(e,t))))}tdist2t(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.2T"),((e,t)=>2*(1-dl(e,Math.trunc(t)))))}tdistrt(e,t){return this.runFunction(e.args,t,this.metadata("T.DIST.RT"),((e,t)=>1-dl(e,Math.trunc(t))))}tdistold(e,t){return this.runFunction(e.args,t,this.metadata("TDIST"),((e,t,n)=>n*(1-dl(e,Math.trunc(t)))))}tinv(e,t){return this.runFunction(e.args,t,this.metadata("T.INV"),((e,t)=>ml(e,Math.trunc(t))))}tinv2t(e,t){return this.runFunction(e.args,t,this.metadata("T.INV.2T"),((e,t)=>ml(1-e/2,Math.trunc(t))))}lognormdist(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.DIST"),((e,t,n,r)=>r?function(e,t,n){return e<0?0:.5+.5*Fa((Math.log(e)-t)/Math.sqrt(2*n*n))}(e,t,n):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))}(e,t,n)))}lognorminv(e,t){return this.runFunction(e.args,t,this.metadata("LOGNORM.INV"),((e,t,n)=>function(e,t,n){return Math.exp(-1.4142135623730951*n*Va(2*e)+t)}(e,t,n)))}normdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.DIST"),((e,t,n,r)=>r?$a(e,t,n):Ga(e,t,n)))}norminv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.INV"),((e,t,n)=>Ka(e,t,n)))}normsdist(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.DIST"),((e,t)=>t?$a(e,0,1):Ga(e,0,1)))}normsinv(e,t){return this.runFunction(e.args,t,this.metadata("NORM.S.INV"),(e=>Ka(e,0,1)))}phi(e,t){return this.runFunction(e.args,t,this.metadata("PHI"),(e=>Ga(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?pl.cdf(e,t,n):pl.pdf(e,t,n))))}confidencenorm(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.NORM"),((e,t,n)=>function(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(Ka(t[1]/2,0,1)*t[2]/Math.sqrt(t[3])):Math.abs(Ka(t[1]/2,0,1)*vl(t[2])/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}(1,e,t,Math.trunc(n))[1]-1))}confidencet(e,t){return this.runFunction(e.args,t,this.metadata("CONFIDENCE.T"),((e,t,n)=>1===(n=Math.trunc(n))?new Cn(sn.DIV_BY_ZERO):function(){var e,t=[].slice.call(arguments),n=new Array(2);return e=4===t.length?Math.abs(ml(t[1]/2,t[3]-1)*t[2]/Math.sqrt(t[3])):Math.abs(ml(t[1]/2,t[2].length-1)*vl(t[2],!0)/Math.sqrt(t[2].length)),n[0]=t[0]-e,n[1]=t[0]+e,n}(1,e,t,n)[1]-1))}standardize(e,t){return this.runFunction(e.args,t,this.metadata("STANDARDIZE"),((e,t,n)=>(e-t)/n))}}Sl.implementedFunctions={ERF:{method:"erf",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0}]},ERFC:{method:"erfc",parameters:[{argumentType:ar.NUMBER}]},"EXPON.DIST":{method:"expondist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},FISHER:{method:"fisher",parameters:[{argumentType:ar.NUMBER,greaterThan:-1,lessThan:1}]},FISHERINV:{method:"fisherinv",parameters:[{argumentType:ar.NUMBER}]},GAMMA:{method:"gamma",parameters:[{argumentType:ar.NUMBER}]},"GAMMA.DIST":{method:"gammadist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},GAMMALN:{method:"gammaln",parameters:[{argumentType:ar.NUMBER,greaterThan:0}]},"GAMMA.INV":{method:"gammainv",parameters:[{argumentType:ar.NUMBER,minValue:0,lessThan:1},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0}]},GAUSS:{method:"gauss",parameters:[{argumentType:ar.NUMBER}]},"BETA.DIST":{method:"betadist",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:1}]},"BETA.INV":{method:"betainv",parameters:[{argumentType:ar.NUMBER,greaterThan:0,maxValue:1},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,defaultValue:0},{argumentType:ar.NUMBER,defaultValue:1}]},"BINOM.DIST":{method:"binomialdist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.BOOLEAN}]},"BINOM.INV":{method:"binomialinv",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.NUMBER,greaterThan:0,lessThan:1}]},BESSELI:{method:"besselifn",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},BESSELJ:{method:"besseljfn",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},BESSELK:{method:"besselkfn",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},BESSELY:{method:"besselyfn",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:0}]},"CHISQ.DIST":{method:"chisqdist",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:1,maxValue:1e10},{argumentType:ar.BOOLEAN}]},"CHISQ.DIST.RT":{method:"chisqdistrt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV":{method:"chisqinv",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.NUMBER,minValue:1,maxValue:1e10}]},"CHISQ.INV.RT":{method:"chisqinvrt",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.NUMBER,minValue:1}]},"F.DIST":{method:"fdist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.BOOLEAN}]},"F.DIST.RT":{method:"fdistrt",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.NUMBER,minValue:1}]},"F.INV":{method:"finv",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.NUMBER,minValue:1}]},"F.INV.RT":{method:"finvrt",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.NUMBER,minValue:1}]},"WEIBULL.DIST":{method:"weibulldist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},"POISSON.DIST":{method:"poissondist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.BOOLEAN}]},"HYPGEOM.DIST":{method:"hypgeomdist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},"T.DIST":{method:"tdist",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.BOOLEAN}]},"T.DIST.2T":{method:"tdist2t",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1}]},"T.DIST.RT":{method:"tdistrt",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,minValue:1}]},TDIST:{method:"tdistold",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.INTEGER,minValue:1,maxValue:2}]},"T.INV":{method:"tinv",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1},{argumentType:ar.NUMBER,minValue:1}]},"T.INV.2T":{method:"tinv2t",parameters:[{argumentType:ar.NUMBER,greaterThan:0,maxValue:1},{argumentType:ar.NUMBER,minValue:1}]},"LOGNORM.DIST":{method:"lognormdist",parameters:[{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},"LOGNORM.INV":{method:"lognorminv",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0}]},"NORM.DIST":{method:"normdist",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.BOOLEAN}]},"NORM.INV":{method:"norminv",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0}]},"NORM.S.DIST":{method:"normsdist",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.BOOLEAN}]},"NORM.S.INV":{method:"normsinv",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1}]},PHI:{method:"phi",parameters:[{argumentType:ar.NUMBER}]},"NEGBINOM.DIST":{method:"negbinomdist",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:1},{argumentType:ar.NUMBER,minValue:0,maxValue:1},{argumentType:ar.BOOLEAN}]},"CONFIDENCE.NORM":{method:"confidencenorm",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,minValue:1}]},"CONFIDENCE.T":{method:"confidencet",parameters:[{argumentType:ar.NUMBER,greaterThan:0,lessThan:1},{argumentType:ar.NUMBER,greaterThan:0},{argumentType:ar.NUMBER,minValue:1}]},STANDARDIZE:{method:"standardize",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,greaterThan:0}]}},Sl.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"};class Cl extends lr{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=>{let t=1;for(let n=e=Math.trunc(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 Cn(sn.NUM,J.WrongOrder):El(e=Math.trunc(e),t=Math.trunc(t))))}combina(e,t){return this.runFunction(e.args,t,this.metadata("COMBINA"),((e,t)=>(e=Math.trunc(e))+(t=Math.trunc(t))-1>=1030?new Cn(sn.NUM,J.ValueLarge):0===e&&0===t?1:El(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 Cn)return t;let n=0;for(const e of t){if(e<0)return new Cn(sn.NUM,J.ValueSmall);n=Ml(n,Math.trunc(e))}return n>Number.MAX_SAFE_INTEGER?new Cn(sn.NUM,J.ValueLarge):n}))}lcm(e,t){return this.runFunction(e.args,t,this.metadata("LCM"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersCoerceRangesDropNulls(e);if(t instanceof Cn)return t;let n=1;for(const e of t){if(e<0)return new Cn(sn.NUM,J.ValueSmall);r=n,o=Math.trunc(e),n=0===r||0===o?0:r*(o/Ml(r,o))}var r,o;return n>Number.MAX_SAFE_INTEGER?new Cn(sn.NUM,J.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 Cn(sn.NUM,J.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 Cn(sn.NUM,J.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 Cn(sn.DIV_BY_ZERO):Math.trunc(e/t)))}seriessum(e,t){return this.runFunction(e.args,t,this.metadata("SERIESSUM"),((e,t,n,r)=>{const o=this.arithmeticHelper.manyToOnlyNumbersDropNulls(r.valuesFromTopLeftCorner());if(o instanceof Cn)return o;let i=0;o.reverse();for(const t of o)i*=Math.pow(e,n),i+=t;return i*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 Cn(sn.NA,J.EqualLength);const o=n.length;let i=0;for(let e=0;e<o;e++){const t=n[e],o=r[e];if(t instanceof Cn)return t;if(o instanceof Cn)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t,2)-Math.pow(o,2))}return i}))}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 Cn(sn.NA,J.EqualLength);const o=n.length;let i=0;for(let e=0;e<o;e++){const t=n[e],o=r[e];if(t instanceof Cn)return t;if(o instanceof Cn)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t,2)+Math.pow(o,2))}return i}))}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 Cn(sn.NA,J.EqualLength);const o=n.length;let i=0;for(let e=0;e<o;e++){const t=n[e],o=r[e];if(t instanceof Cn)return t;if(o instanceof Cn)return o;"number"==typeof t&&"number"==typeof o&&(i+=Math.pow(t-o,2))}return i}))}}function El(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 Ml(e,t){for(e<t&&([e,t]=[t,e]);t>0;)[e,t]=[t,e%t];return e}Cl.implementedFunctions={FACT:{method:"fact",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:170}]},FACTDOUBLE:{method:"factdouble",parameters:[{argumentType:ar.NUMBER,minValue:0,maxValue:288}]},COMBIN:{method:"combin",parameters:[{argumentType:ar.NUMBER,minValue:0,lessThan:1030},{argumentType:ar.NUMBER,minValue:0}]},COMBINA:{method:"combina",parameters:[{argumentType:ar.NUMBER,minValue:0},{argumentType:ar.NUMBER,minValue:0}]},GCD:{method:"gcd",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},LCM:{method:"lcm",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},MROUND:{method:"mround",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},MULTINOMIAL:{method:"multinomial",parameters:[{argumentType:ar.NUMBER}],repeatLastArgs:1,expandRanges:!0},QUOTIENT:{method:"quotient",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER}]},SERIESSUM:{method:"seriessum",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.RANGE}]},SIGN:{method:"sign",parameters:[{argumentType:ar.NUMBER}]},SUMX2MY2:{method:"sumx2my2",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},SUMX2PY2:{method:"sumx2py2",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},SUMXMY2:{method:"sumxmy2",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]}};class Tl extends lr{complex(e,t){return this.runFunction(e.args,t,this.metadata("COMPLEX"),((e,t,n)=>"i"!==n&&"j"!==n?new Cn(sn.VALUE,J.ShouldBeIorJ):Wn([e,t],n)))}imabs(e,t){return this.runFunction(e.args,t,this.metadata("IMABS"),Dl)}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 Cn(sn.DIV_BY_ZERO):Math.atan2(t,e)))}imconjugate(e,t){return this.runFunction(e.args,t,this.metadata("IMCONJUGATE"),(([e,t])=>Wn([e,-t])))}imcos(e,t){return this.runFunction(e.args,t,this.metadata("IMCOS"),(e=>Wn(Ll(e))))}imcosh(e,t){return this.runFunction(e.args,t,this.metadata("IMCOSH"),(e=>Wn(xl(e))))}imcot(e,t){return this.runFunction(e.args,t,this.metadata("IMCOT"),(e=>Wn(Nl(Ll(e),Ol(e)))))}imcsc(e,t){return this.runFunction(e.args,t,this.metadata("IMCSC"),(e=>Wn(Nl([1,0],Ol(e)))))}imcsch(e,t){return this.runFunction(e.args,t,this.metadata("IMCSCH"),(e=>Wn(Nl([1,0],Il(e)))))}imsec(e,t){return this.runFunction(e.args,t,this.metadata("IMSEC"),(e=>Wn(Nl([1,0],Ll(e)))))}imsech(e,t){return this.runFunction(e.args,t,this.metadata("IMSECH"),(e=>Wn(Nl([1,0],xl(e)))))}imsin(e,t){return this.runFunction(e.args,t,this.metadata("IMSIN"),(e=>Wn(Ol(e))))}imsinh(e,t){return this.runFunction(e.args,t,this.metadata("IMSINH"),(e=>Wn(Il(e))))}imtan(e,t){return this.runFunction(e.args,t,this.metadata("IMTAN"),(e=>Wn(Nl(Ol(e),Ll(e)))))}imdiv(e,t){return this.runFunction(e.args,t,this.metadata("IMDIV"),((e,t)=>Wn(Nl(e,t))))}improduct(e,t){return this.runFunction(e.args,t,this.metadata("IMPRODUCT"),((...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof Cn)return t;let n=[1,0];for(const e of t)n=Al(n,e);return Wn(n)}))}imsum(e,t){return this.runFunction(e.args,t,this.metadata("IMSUM"),((...e)=>{const t=this.arithmeticHelper.coerceComplexExactRanges(e);if(t instanceof Cn)return t;let n=[0,0];for(const e of t)n=Rl(n,e);return Wn(n)}))}imsub(e,t){return this.runFunction(e.args,t,this.metadata("IMSUB"),((e,t)=>Wn(function([e,t],[n,r]){return[e-n,t-r]}(e,t))))}imexp(e,t){return this.runFunction(e.args,t,this.metadata("IMEXP"),(e=>Wn(kl(e))))}imln(e,t){return this.runFunction(e.args,t,this.metadata("IMLN"),(e=>Wn(Pl(e))))}imlog10(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG10"),(e=>{const[t,n]=Pl(e),r=Math.log(10);return Wn([t/r,n/r])}))}imlog2(e,t){return this.runFunction(e.args,t,this.metadata("IMLOG2"),(e=>{const[t,n]=Pl(e),r=Math.log(2);return Wn([t/r,n/r])}))}impower(e,t){return this.runFunction(e.args,t,this.metadata("IMPOWER"),((e,t)=>Wn(Hl(e,t))))}imsqrt(e,t){return this.runFunction(e.args,t,this.metadata("IMSQRT"),(e=>Wn(Hl(e,.5))))}}function Rl([e,t],[n,r]){return[e+n,t+r]}function Al([e,t],[n,r]){return[e*n-t*r,e*r+n*t]}function Nl([e,t],[n,r]){const o=Math.pow(n,2)+Math.pow(r,2),[i,s]=Al([e,t],[n,-r]);return[i/o,s/o]}function Ll([e,t]){return[Math.cos(e)*Math.cosh(t),-Math.sin(e)*Math.sinh(t)]}function xl([e,t]){return[Math.cosh(e)*Math.cos(t),Math.sinh(e)*Math.sin(t)]}function Ol([e,t]){return[Math.sin(e)*Math.cosh(t),Math.cos(e)*Math.sinh(t)]}function Il([e,t]){return[Math.sinh(e)*Math.cos(t),Math.cosh(e)*Math.sin(t)]}function kl([e,t]){return[Math.exp(e)*Math.cos(t),Math.exp(e)*Math.sin(t)]}function Dl([e,t]){return Math.sqrt(e*e+t*t)}function Pl([e,t]){return[Math.log(Dl([e,t])),Math.atan2(t,e)]}function Hl(e,t){const[n,r]=Pl(e);return kl([t*n,t*r])}Tl.implementedFunctions={COMPLEX:{method:"complex",parameters:[{argumentType:ar.NUMBER},{argumentType:ar.NUMBER},{argumentType:ar.STRING,defaultValue:"i"}]},IMABS:{method:"imabs",parameters:[{argumentType:ar.COMPLEX}]},IMAGINARY:{method:"imaginary",parameters:[{argumentType:ar.COMPLEX}]},IMREAL:{method:"imreal",parameters:[{argumentType:ar.COMPLEX}]},IMARGUMENT:{method:"imargument",parameters:[{argumentType:ar.COMPLEX}]},IMCONJUGATE:{method:"imconjugate",parameters:[{argumentType:ar.COMPLEX}]},IMCOS:{method:"imcos",parameters:[{argumentType:ar.COMPLEX}]},IMCOSH:{method:"imcosh",parameters:[{argumentType:ar.COMPLEX}]},IMCOT:{method:"imcot",parameters:[{argumentType:ar.COMPLEX}]},IMCSC:{method:"imcsc",parameters:[{argumentType:ar.COMPLEX}]},IMCSCH:{method:"imcsch",parameters:[{argumentType:ar.COMPLEX}]},IMSEC:{method:"imsec",parameters:[{argumentType:ar.COMPLEX}]},IMSECH:{method:"imsech",parameters:[{argumentType:ar.COMPLEX}]},IMSIN:{method:"imsin",parameters:[{argumentType:ar.COMPLEX}]},IMSINH:{method:"imsinh",parameters:[{argumentType:ar.COMPLEX}]},IMTAN:{method:"imtan",parameters:[{argumentType:ar.COMPLEX}]},IMDIV:{method:"imdiv",parameters:[{argumentType:ar.COMPLEX},{argumentType:ar.COMPLEX}]},IMPRODUCT:{method:"improduct",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},IMSUM:{method:"imsum",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},IMSUB:{method:"imsub",parameters:[{argumentType:ar.COMPLEX},{argumentType:ar.COMPLEX}]},IMEXP:{method:"imexp",parameters:[{argumentType:ar.COMPLEX}]},IMLN:{method:"imln",parameters:[{argumentType:ar.COMPLEX}]},IMLOG10:{method:"imlog10",parameters:[{argumentType:ar.COMPLEX}]},IMLOG2:{method:"imlog2",parameters:[{argumentType:ar.COMPLEX}]},IMPOWER:{method:"impower",parameters:[{argumentType:ar.COMPLEX},{argumentType:ar.NUMBER}]},IMSQRT:{method:"imsqrt",parameters:[{argumentType:ar.COMPLEX}]}};class Fl extends lr{avedev(e,t){return this.runFunction(e.args,t,this.metadata("AVEDEV"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof Cn)return t;if(0===t.length)return new Cn(sn.DIV_BY_ZERO);const n=gl(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 Cn?t:0===t.length?0:yl(t)}))}geomean(e,t){return this.runFunction(e.args,t,this.metadata("GEOMEAN"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof Cn)return t;if(0===t.length)return new Cn(sn.NUM,J.OneValue);for(const e of t)if(e<=0)return new Cn(sn.NUM,J.ValueSmall);return n=t,Math.pow(function(e){for(var t=1,n=e.length;--n>=0;)t*=e[n];return t}(n),1/n.length);var n}))}harmean(e,t){return this.runFunction(e.args,t,this.metadata("HARMEAN"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof Cn)return t;if(0===t.length)return new Cn(sn.NUM,J.OneValue);for(const e of t)if(e<=0)return new Cn(sn.NUM,J.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 Cn(sn.NA,J.EqualLength);const n=Yl(e,t);return n instanceof Cn?n:n[0].length<=1?new Cn(sn.DIV_BY_ZERO,J.TwoValues):bl(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 Cn(sn.NA,J.EqualLength);const n=Yl(e,t);return n instanceof Cn?n:n[0].length<=1?new Cn(sn.DIV_BY_ZERO,J.TwoValues):Math.pow(bl(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 Cn(sn.NA,J.EqualLength);const n=Yl(e,t);if(n instanceof Cn)return n;const r=n[0].length;return r<1?new Cn(sn.DIV_BY_ZERO,J.OneValue):1===r?0:_l(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 Cn(sn.NA,J.EqualLength);const n=Yl(e,t);return n instanceof Cn?n:n[0].length<=1?new Cn(sn.DIV_BY_ZERO,J.TwoValues):_l(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 Cn)return r;const o=r.length;if(void 0===n){if(o<2)return new Cn(sn.DIV_BY_ZERO,J.TwoValues);n=vl(r,!0)}return o<1?new Cn(sn.NA,J.OneValue):0===n?new Cn(sn.DIV_BY_ZERO):1-$a((gl(r)-t)/(n/Math.sqrt(o)),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 Cn)return n;if(r instanceof Cn)return r;if(n.length<=1||r.length<=1)return new Cn(sn.DIV_BY_ZERO);const o=wl(n,!0),i=wl(r,!0);if(0===o||0===i)return new Cn(sn.DIV_BY_ZERO);const s=ll(o/i,n.length-1,r.length-1);return 2*Math.min(s,1-s)}))}steyx(e,t){return this.runFunction(e.args,t,this.metadata("STEYX"),((e,t)=>{if(e.numberOfElements()!==t.numberOfElements())return new Cn(sn.NA,J.EqualLength);const n=Yl(e,t);if(n instanceof Cn)return n;const r=n[0].length;return r<=2?new Cn(sn.DIV_BY_ZERO,J.ThreeValues):Math.sqrt((yl(n[0])-Math.pow(_l(n[0],n[1])*(r-1),2)/yl(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 Cn(sn.NA,J.EqualLength);const n=Yl(e,t);if(n instanceof Cn)return n;const r=n[0].length;return r<=1?new Cn(sn.DIV_BY_ZERO,J.TwoValues):_l(n[0],n[1])*(r-1)/yl(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 Cn(sn.NA,J.EqualLength);const o=Yl(e,t);if(o instanceof Cn)return o;if(o[0].length<=1)return new Cn(sn.DIV_BY_ZERO,J.TwoValues);let i=0;for(let e=0;e<o[0].length;e++){if(0===o[1][e])return new Cn(sn.DIV_BY_ZERO);i+=Math.pow(o[0][e]-o[1][e],2)/o[1][e]}return i<0?new Cn(sn.NUM,J.NaN):1-sl(i,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 o=this.arithmeticHelper.manyToExactNumbers(e.valuesFromTopLeftCorner()),i=this.arithmeticHelper.manyToExactNumbers(t.valuesFromTopLeftCorner());if(o instanceof Cn)return o;if(i instanceof Cn)return i;const s=o.length,a=i.length;if(1===r){if(a!==s)return new Cn(sn.NA,J.EqualLength);if(s<=1)return new Cn(sn.DIV_BY_ZERO,J.TwoValues);const e=Array(s);for(let t=0;t<s;t++)e[t]=o[t]-i[t];const t=vl(e,!0);if(0===t)return new Cn(sn.DIV_BY_ZERO);const r=Math.abs(Math.sqrt(s)*gl(e)/t);return n*(1-dl(r,s-1))}if(2===r){if(s<=1||a<=1)return new Cn(sn.DIV_BY_ZERO,J.TwoValues);const e=(yl(o)+yl(i))/(s+a-2);if(0===e)return new Cn(sn.DIV_BY_ZERO);const t=Math.abs((gl(o)-gl(i))/Math.sqrt(e*(1/s+1/a)));return n*(1-dl(t,s+a-2))}{if(s<=1||a<=1)return new Cn(sn.DIV_BY_ZERO,J.TwoValues);const e=wl(o,!0),t=wl(i,!0);if(0===e&&0===t)return new Cn(sn.DIV_BY_ZERO);const r=Math.abs((gl(o)-gl(i))/Math.sqrt(e/s+t/a)),l=Math.pow(e/s+t/a,2)/(Math.pow(e/s,2)/(s-1)+Math.pow(t/a,2)/(a-1));return n*(1-dl(r,l))}}))}skew(e,t){return this.runFunction(e.args,t,this.metadata("SKEW"),((...e)=>{const t=this.arithmeticHelper.coerceNumbersExactRanges(e);if(t instanceof Cn)return t;const n=t.length;if(n<3)return new Cn(sn.DIV_BY_ZERO,J.ThreeValues);const r=gl(t),o=vl(t,!0);return 0===o?new Cn(sn.DIV_BY_ZERO):t.reduce(((e,t)=>e+Math.pow((t-r)/o,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 Cn)return t;const n=t.length;if(n<3)return new Cn(sn.DIV_BY_ZERO,J.ThreeValues);const r=gl(t),o=vl(t,!1);return 0===o?new Cn(sn.DIV_BY_ZERO):t.reduce(((e,t)=>e+Math.pow((t-r)/o,3)),0)/n}))}}function Yl(e,t){const n=e.iterateValuesFromTopLeftCorner(),r=t.iterateValuesFromTopLeftCorner();let o,i;const s=[],a=[];for(;o=n.next(),i=r.next(),!o.done&&!i.done;){const e=o.value,t=i.value;if(e instanceof Cn)return e;if(t instanceof Cn)return t;Je(e)&&Je(t)&&(s.push(je(e)),a.push(je(t)))}return[s,a]}Fl.implementedFunctions={AVEDEV:{method:"avedev",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},DEVSQ:{method:"devsq",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},GEOMEAN:{method:"geomean",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},HARMEAN:{method:"harmean",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},CORREL:{method:"correl",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},RSQ:{method:"rsq",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},"COVARIANCE.P":{method:"covariancep",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},"COVARIANCE.S":{method:"covariances",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},"Z.TEST":{method:"ztest",parameters:[{argumentType:ar.RANGE},{argumentType:ar.NUMBER},{argumentType:ar.NUMBER,optionalArg:!0}]},"F.TEST":{method:"ftest",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},STEYX:{method:"steyx",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},SLOPE:{method:"slope",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},"CHISQ.TEST":{method:"chisqtest",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE}]},"T.TEST":{method:"ttest",parameters:[{argumentType:ar.RANGE},{argumentType:ar.RANGE},{argumentType:ar.INTEGER,minValue:1,maxValue:2},{argumentType:ar.INTEGER,minValue:1,maxValue:3}]},SKEW:{method:"skew",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1},"SKEW.P":{method:"skewp",parameters:[{argumentType:ar.ANY}],repeatLastArgs:1}},Fl.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 Vl extends Yi{}Vl.HyperFormula=Yi,Vl.ErrorType=sn,Vl.CellError=Cn,Vl.CellType=an,Vl.CellValueType=vn,Vl.CellValueDetailedType=_n,Vl.DetailedCellError=cr,Vl.ExportedCellChange=ai,Vl.ExportedNamedExpressionChange=li,Vl.ConfigValueTooBigError=Rt,Vl.ConfigValueTooSmallError=Tt,Vl.EvaluationSuspendedError=Nt,Vl.ExpectedOneOfValuesError=At,Vl.ExpectedValueOfTypeError=Et,Vl.ArraySize=ur,Vl.SimpleRangeValue=nt,Vl.EmptyValue=We,Vl.FunctionPlugin=lr,Vl.FunctionArgumentType=ar,Vl.FunctionPluginValidationError=kt,Vl.InvalidAddressError=mt,Vl.InvalidArgumentsError=pt,Vl.LanguageNotRegisteredError=Ot,Vl.LanguageAlreadyRegisteredError=It,Vl.MissingTranslationError=Lt,Vl.NamedExpressionDoesNotExistError=wt,Vl.NamedExpressionNameIsAlreadyTakenError=gt,Vl.NamedExpressionNameIsInvalidError=yt,Vl.NoOperationToRedoError=_t,Vl.NoOperationToUndoError=vt,Vl.NoRelativeAddressesAllowedError=Ft,Vl.NoSheetWithIdError=lt,Vl.NoSheetWithNameError=ut,Vl.NotAFormulaError=dt,Vl.NothingToPasteError=bt,Vl.ProtectedFunctionTranslationError=xt,Vl.SheetNameAlreadyTakenError=ht,Vl.SheetSizeLimitExceededError=ct,Vl.SourceLocationHasArrayError=Pt,Vl.TargetLocationHasArrayError=Ht,Vl.UnableToParseError=Ct;const Ul=Ui.defaultConfig.language;Yi.registerLanguage(Ul,Wi),Yi.languages[Wi.langCode]=Wi;for(const e of Object.getOwnPropertyNames(i))e.startsWith("_")||Yi.registerFunctionPlugin(i[e])},37237:(e,t,n)=>{"use strict";n.d(t,{um:()=>rS}),n(16280),n(44114),n(98992),n(54520),n(72577),n(8872);var r=n(95239),o=n(20091),i=n(25155),s=n(32919),a=n(79720);const l="handsontableEditor";class u extends r.t{static get EDITOR_TYPE(){return"handsontable"}open(){super.open();const e=this.htContainer.style;this.htEditor&&(this.htEditor.destroy(),e.width="",e.height="",e.overflow=""),"none"===e.display&&(e.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(),(0,o.vZ)(this.TEXTAREA,0,this.TEXTAREA.value.length),this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),this.refreshDimensions()}close(){this.htEditor&&(this.htEditor.rootElement.style.display="none"),this.removeHooksByKey("beforeKeyDown"),super.close()}prepare(e,t,n,r,o,i){super.prepare(e,t,n,r,o,i);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,themeName:this.hot.getCurrentThemeName(),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&&(0,s.X$)(l,i.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)}getHeight(){return this.htEditor.view.getTableHeight()+1}getWidth(){return this.htEditor.view.getTableWidth()}assignHooks(){this.hot.addHook("afterDestroy",(()=>{var e;null===(e=this.htEditor)||void 0===e||e.destroy()})),this.hot.addHook("afterSetTheme",((e,t)=>{var n;t||null===(n=this.htEditor)||void 0===n||n.useTheme(e)}))}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor");super.registerShortcuts();const t={group:l,relativeToGroup:a.b,position:"before"},n=(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(),(0,i.CA)(t),this.hot.listen(),this.TEXTAREA.focus(),!1};e.addShortcuts([{keys:[["ArrowUp"]],callback:e=>{const t=this.htEditor;let r,o;return!t.getSelectedLast()&&t.flipped?r=t.countRows()-1:t.getSelectedLast()&&(t.flipped?(o=t.getSelectedLast()[0],r=Math.max(0,o-1)):(o=t.getSelectedLast()[0],r=o-1)),n(r,e)},preventDefault:!1},{keys:[["ArrowDown"]],callback:e=>{const t=this.htEditor;let r,o;if(t.getSelectedLast()||t.flipped){if(t.getSelectedLast())if(t.flipped)r=t.getSelectedLast()[0]+1;else if(!t.flipped){const e=t.countRows()-1;o=t.getSelectedLast()[0],r=Math.min(e,o+1)}}else r=0;return n(r,e)},preventDefault:!1}],t)}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(l)}}var h=n(77325),c=n(65615),d=n(24360),m=n(38419),p=n(92182),f=n(66422),g=n(83986);function y(e,t,n){w(e,t),t.set(e,n)}function w(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=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _(e,t){return e.get(b(e,t))}function b(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 S=new WeakMap,C=new WeakMap,E=new WeakSet;class M extends u{constructor(){var e;super(...arguments),w(this,e=E),e.add(this),v(this,"query",null),v(this,"strippedChoices",[]),v(this,"rawChoices",[]),y(this,S,this.hot.guid.slice(0,9)),y(this,C,(0,g.sg)((()=>{this.focus()}),100)),v(this,"sortByRelevance",(function(e,t,n){const r=[],o=[],i=e.length;let s,a,l,u,h=t.length;if(0===i){for(l=0;l<h;l++)o.push(l);return o}for(l=0;l<h;l++){if(a=(0,d.Kq)((0,c.As)(t[l])),n)u=a.indexOf(e);else{const t=this.cellProperties.locale;u=a.toLocaleLowerCase(t).indexOf(e.toLocaleLowerCase(t))}-1!==u&&(s=a.length-u-i,r.push({baseIndex:l,index:u,charsLeft:s,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,h=r.length;l<h;l++)o.push(r[l].baseIndex);return o}))}static get EDITOR_TYPE(){return"autocomplete"}getValue(){const e=this.rawChoices.find((e=>this.stripValueIfNeeded(e)===this.TEXTAREA.value));return(0,c.O9)(e)?e:this.TEXTAREA.value}createElements(){super.createElements(),(0,o.iQ)(this.htContainer,"autocompleteEditor"),(0,o.iQ)(this.htContainer,-1===this.hot.rootWindow.navigator.platform.indexOf("Mac")?"":"htMacScroll"),this.hot.getSettings().ariaTags&&(0,o.Bq)(this.TEXTAREA,[(0,f.ZW)(),(0,f.B6)(),(0,f.wP)("listbox"),(0,f.gq)()])}prepare(e,t,n,r,i,s){super.prepare(e,t,n,r,i,s),this.hot.getSettings().ariaTags&&(0,o.Bq)(this.TEXTAREA,[(0,f.dV)("false"),(0,f.Ku)(`${_(S,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.length,{row:i,col:s}=this;this.showEditableElement(),this.focus(),this.addHook("beforeKeyDown",(e=>this.onBeforeKeyDown(e))),this.htEditor.addHook("afterScroll",_(C,this)),this.htEditor.updateSettings({colWidths:e?[(0,o.Gq)(this.TEXTAREA)-2]:void 0,autoColumnSize:!0,renderer:(e,i,s,a,l,u,h)=>{(0,p.F)(e,i,s,a,l,u,h);const{filteringCaseSensitive:d,allowHtml:m,locale:g}=this.cellProperties,y=this.query;let w,v,_=(0,c.As)(u);_&&!m&&(w=!0===d?_.indexOf(y):_.toLocaleLowerCase(g).indexOf(y.toLocaleLowerCase(g)),-1!==w&&(v=_.substr(w,y.length),_=_.replace(v,`<strong>${v}</strong>`))),t&&(0,o.Bq)(i,[(0,f.n)(),...n?[(0,f.DY)(r)]:[],...n?[(0,f.Vy)(n.indexOf(u)+1)]:[],["id",`${this.htEditor.rootElement.id}_${s}-${a}`]]),i.innerHTML=_},afterSelectionEnd:(e,n)=>{if(t){const t=e=>{(0,o.Bq)(e,[(0,f.H0)()]),(0,o.Bq)(this.TEXTAREA,...(0,f.VN)(e.id))},r=this.htEditor.getCell(e,n,!0);null!==r?t(r):this.htEditor.addHookOnce("afterScrollVertically",(()=>{const r=this.htEditor.getCell(e,n,!0);t(r)}))}}}),t&&((0,o.Bq)(this.htEditor.view._wt.wtOverlays.wtTable.TABLE,...(0,f.gg)()),(0,o.Bq)(this.htEditor.rootElement,[(0,f.$o)(),(0,f.S2)("polite"),(0,f.rE)("text"),["id",`${_(S,this)}-listbox-${i}-${s}`]]),(0,o.Bq)(this.TEXTAREA,...(0,f.dV)("true"))),this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}))}close(){this.removeHooksByKey("beforeKeyDown"),super.close(),this.hot.getSettings().ariaTags&&(0,o.Bq)(this.TEXTAREA,[(0,f.dV)("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=(0,o.JC)(this.TEXTAREA),n=(0,o.Xu)(this.TEXTAREA),r=this.cellProperties.sortByRelevance,i=this.cellProperties.filter;let s=null,a=null,l=e;r&&(s=this.sortByRelevance(this.stripValueIfNeeded(this.getValue()),l,this.cellProperties.filteringCaseSensitive));const u=Array.isArray(s)?s.length:0;if(!1===i)u&&(a=s[0]);else{const e=[];for(let t=0,n=l.length;t<n&&!(r&&u<=t);t++)u?e.push(l[s[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((0,h.h9)([l])),l.length>0&&(this.updateDropdownDimensions(),this.flipDropdownIfNeeded(),!0===this.cellProperties.strict&&this.highlightBestMatchingChoice(a)),this.hot.listen(),(0,o.vZ)(this.TEXTAREA,t,t===n?void 0:n)}flipDropdownIfNeeded(){const e=this.getEditedCellRect(),t=e.height;let n=e.top;if(this.hot.view.isVerticallyScrollableByWindow()){const e=this.hot.view.getTableOffset().top-this.hot.rootWindow.scrollY;n=Math.max(n+e,0)}const r=this.getHeight(),o=this.hot.view.getWorkspaceHeight()-n-t,i=r>o&&n>o+t;return i?this.flipDropdown(r):this.unflipDropdown(),this.limitDropdownIfNeeded(i?n:o,r),i}limitDropdownIfNeeded(e,t){if(t>e){let n=0,r=0,o=0,i=null;do{o=this.htEditor.getRowHeight(r)||this.htEditor.view.getDefaultRowHeight(),n+=o,r+=1}while(n<e);i=n-o,this.htEditor.flipped&&(this.htEditor.rootElement.style.top=parseInt(this.htEditor.rootElement.style.top,10)+t-i+"px"),this.setDropdownHeight(n-o)}}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(){this.htEditor.updateSettings({width:this.getWidth(),height:this.getHeight()}),b(E,this,T).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}setDropdownHeight(e){this.htEditor.updateSettings({height:e}),b(E,this,T).call(this),this.htEditor.view._wt.wtTable.alignOverlaysWithTrimmingContainer()}highlightBestMatchingChoice(e){"number"==typeof e?this.htEditor.selectCell(e,0,void 0,void 0,void 0,!1):this.htEditor.deselectCell()}getHeight(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderTopWidth,10)+parseInt(e.borderBottomWidth,10),n=Math.min(this.cellProperties.visibleRows,this.strippedChoices.length);return Array.from({length:n},((e,t)=>t)).reduce(((e,t)=>e+(this.htEditor.getRowHeight(t)||this.htEditor.view.getDefaultRowHeight())),0)+t+1}getWidth(){const e=this.hot.rootWindow.getComputedStyle(this.htContainer.querySelector(".htCore")),t=parseInt(e.borderInlineStartWidth,10)+parseInt(e.borderInlineEndWidth,10);return this.htEditor.getColWidth(0)+t}stripValueIfNeeded(e){return this.stripValuesIfNeeded([e])[0]}stripValuesIfNeeded(e){const{allowHtml:t}=this.cellProperties,n=(0,h.YD)(e,(e=>(0,c.As)(e)));return(0,h.YD)(n,(e=>t?e:(0,d.Kq)(e)))}allowKeyEventPropagation(e){const t=this.htEditor.getSelectedRangeLast(),n=t?t.from.row:-1;let r=!1;return e===m.Lb.ARROW_DOWN&&n>0&&n<this.htEditor.countRows()-1&&(r=!0),e===m.Lb.ARROW_UP&&n>-1&&(r=!0),r}onBeforeKeyDown(e){if((0,m.aE)(e.keyCode)||e.keyCode===m.Lb.BACKSPACE||e.keyCode===m.Lb.DELETE||e.keyCode===m.Lb.INSERT){let t=10;if(e.keyCode===m.Lb.C&&(e.ctrlKey||e.metaKey))return;this.isOpened()||(t+=10),this.htEditor&&this.hot._registerTimeout((()=>{this.queryChoices(this.TEXTAREA.value)}),t)}}}function T(){this.htEditor.view.hasVerticalScroll()&&this.htEditor.updateSettings({width:this.getWidth()+(0,o.XJ)(this.hot.rootDocument)})}var R=n(32564);class A extends R.b7{static get EDITOR_TYPE(){return"checkbox"}beginEditing(e,t){if(t&&"mouseup"===t.type&&"TD"===t.target.nodeName){const e=this.TD.querySelector('input[type="checkbox"]');(0,o.nB)(e,"htBadValue")||e.click()}}finishEditing(){}init(){}open(){}close(){}getValue(){}setValue(){}focus(){}}var N=n(95093);const L=()=>window,x=()=>window.document,O=(e,t)=>window.setTimeout(e,t),I=function(e,t,n,r){e.addEventListener(t,n,!!r)},k=function(e,t,n,r){e.removeEventListener(t,n,!!r)},D=function(e,t){return-1!==(" "+e.className+" ").indexOf(" "+t+" ")},P=function(e,t){D(e,t)||(e.className=""===e.className?t:e.className+" "+t)},H=function(e,t){var n;e.className=(n=(" "+e.className+" ").replace(" "+t+" "," ")).trim?n.trim():n.replace(/^\s+|\s+$/g,"")},F=function(e){return/Array/.test(Object.prototype.toString.call(e))},Y=function(e){return/Date/.test(Object.prototype.toString.call(e))&&!isNaN(e.getTime())},V=function(e){let t=e.getDay();return 0===t||6===t},U=function(e){return e%4==0&&e%100!=0||e%400==0},B=function(e,t){return[31,U(e)?29:28,31,30,31,30,31,31,30,31,30,31][t]},W=function(e){Y(e)&&e.setHours(0,0,0,0)},j=function(e,t){return e.getTime()===t.getTime()},z=function(e,t,n){let r,o;for(r in t)o=void 0!==e[r],o&&"object"==typeof t[r]&&null!==t[r]&&void 0===t[r].nodeName?Y(t[r])?n&&(e[r]=new Date(t[r].getTime())):F(t[r])?n&&(e[r]=t[r].slice(0)):e[r]=z({},t[r],n):!n&&o||(e[r]=t[r]);return e},G=function(e,t,n){let r=x().createEvent("HTMLEvents");r.initEvent(t,!0,!1),r=z(r,n),e.dispatchEvent(r)},$=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},K={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},X=function(e,t,n){for(t+=e.firstDay;t>=7;)t-=7;return n?e.i18n.weekdaysShort[t]:e.i18n.weekdays[t]},q=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>"},Q=function(e,t,n,r,o){let i=new Date(r,n,t),s=e.hasMoment?e.moment(i).isoWeek():function(e,t){e.setHours(0,0,0,0);let n=e.getDate(),r=e.getDay(),o=t,i=o-1,s=function(e){return(e+7-1)%7};e.setDate(n+i-s(r));let a=new Date(e.getFullYear(),0,o),l=(e.getTime()-a.getTime())/864e5;return 1+Math.round((l-i+s(a.getDay()))/7)}(i,o);return'<td class="pika-week">'+s+"</td>"},J=function(e,t,n,r){return'<tr class="pika-row'+(n?" pick-whole-week":"")+(r?" is-selected":"")+'">'+(t?e.reverse():e).join("")+"</tr>"},Z=function(e,t,n,r,o,i){let s,a,l,u,h,c=e._o,d=n===c.minYear,m=n===c.maxYear,p='<div id="'+i+'" class="pika-title" role="heading" aria-live="polite">',f=!0,g=!0;for(l=[],s=0;s<12;s++)l.push('<option value="'+(n===o?s-t:12+s-t)+'"'+(s===r?' selected="selected"':"")+(d&&s<c.minMonth||m&&s>c.maxMonth?' disabled="disabled"':"")+">"+c.i18n.months[s]+"</option>");for(u='<div class="pika-label">'+c.i18n.months[r]+'<select class="pika-select pika-select-month" tabindex="-1">'+l.join("")+"</select></div>",F(c.yearRange)?(s=c.yearRange[0],a=c.yearRange[1]+1):(s=n-c.yearRange,a=1+n+c.yearRange),l=[];s<a&&s<=c.maxYear;s++)s>=c.minYear&&l.push('<option value="'+s+'"'+(s===n?' selected="selected"':"")+">"+s+"</option>");return h='<div class="pika-label">'+n+c.yearSuffix+'<select class="pika-select pika-select-year" tabindex="-1">'+l.join("")+"</select></div>",c.showMonthAfterYear?p+=h+u:p+=u+h,d&&(0===r||c.minMonth>=r)&&(f=!1),m&&(11===r||c.maxMonth<=r)&&(g=!1),0===t&&(p+='<button class="pika-prev'+(f?"":" is-disabled")+'" type="button">'+c.i18n.previousMonth+"</button>"),t===e._o.numberOfMonths-1&&(p+='<button class="pika-next'+(g?"":" is-disabled")+'" type="button">'+c.i18n.nextMonth+"</button>"),p+"</div>"};function ee(e){let t=this,n=t.config(e);t._onMouseDown=function(e){if(!t._v)return;let r=(e=e||L().event).target||e.srcElement;if(r)if(D(r,"is-disabled")||(!D(r,"pika-button")||D(r,"is-empty")||D(r.parentNode,"is-disabled")?D(r,"pika-prev")?t.prevMonth():D(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&&O((function(){t.hide(),n.blurFieldOnSelect&&n.field&&n.field.blur()}),100))),D(r,"pika-select"))t._c=!0;else{if(!e.preventDefault)return e.returnValue=!1,!1;e.preventDefault()}},t._onChange=function(e){let n=(e=e||L().event).target||e.srcElement;n&&(D(n,"pika-select-month")?t.gotoMonth(n.value):D(n,"pika-select-year")&&t.gotoYear(n.value))},t._onKeyChange=function(e){if(e=e||L().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)}},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(),Y(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(D(e,"pika-single"))return}while(e=e.parentNode);t._c||(t._b=O((function(){t.hide()}),50)),t._c=!1},t._onClick=function(e){let r=(e=e||L().event).target||e.srcElement,o=r;if(r){!hasEventListeners&&D(r,"pika-select")&&(r.onchange||(r.setAttribute("onchange","return;"),I(r,"change",t._onChange)));do{if(D(o,"pika-single")||o===n.trigger)return}while(o=o.parentNode);t._v&&r!==n.trigger&&o!==n.trigger&&t.hide()}},t.el=x().createElement("div"),t.el.className="pika-single"+(n.isRTL?" is-rtl":"")+(n.theme?" "+n.theme:""),I(t.el,"mousedown",t._onMouseDown,!0),I(t.el,"touchend",t._onMouseDown,!0),I(t.el,"change",t._onChange),n.keyboardInput&&I(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),I(n.field,"change",t._onInputChange),n.defaultDate||(n.defaultDate=t._parseFieldValue(),n.setDefaultDate=!0));let r=n.defaultDate;Y(r)?n.setDefaultDate?t.setDate(r,!0):t.gotoDate(r):t.gotoDate(new Date),n.bound?(this.hide(),t.el.className+=" is-bound",I(n.trigger,"click",t._onInputClick),I(n.trigger,"focus",t._onInputFocus),I(n.trigger,"blur",t._onInputBlur)):this.show()}ee.prototype={config:function(e){this._o||(this._o=z({},K,!0));let t=z(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,Y(t.minDate)||(t.minDate=!1),Y(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),F(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))||K.yearRange,t.yearRange>100&&(t.yearRange=100);return t},toString:function(e){return e=e||this._o.format,Y(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 Y(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="",G(this._o.field,"change",{firedBy:this})),this.draw();if("string"==typeof e&&(e=new Date(Date.parse(e))),!Y(e))return;let n=this._o.minDate,r=this._o.maxDate;Y(n)&&e<n?e=n:Y(r)&&e>r&&(e=r),this._d=new Date(e.getTime()),W(this._d),this.gotoDate(this._d),this._o.field&&(this._o.field.value=this.toString(),G(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(Y(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),o=e.getTime();r.setMonth(r.getMonth()+1),r.setDate(r.getDate()-1),t=o<n.getTime()||r.getTime()<o}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,o=24*parseInt(t)*60*60*1e3;"add"===e?n=new Date(r.valueOf()+o):"subtract"===e&&(n=new Date(r.valueOf()-o)),this.setDate(n)},adjustCalendars:function(){this.calendars[0]=$(this.calendars[0]);for(let e=1;e<this._o.numberOfMonths;e++)this.calendars[e]=$({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?(W(e),this._o.minDate=e,this._o.minYear=e.getFullYear(),this._o.minMonth=e.getMonth()):(this._o.minDate=K.minDate,this._o.minYear=K.minYear,this._o.minMonth=K.minMonth,this._o.startRange=K.startRange),this.draw()},setMaxDate:function(e){e instanceof Date?(W(e),this._o.maxDate=e,this._o.maxYear=e.getFullYear(),this._o.maxMonth=e.getMonth()):(this._o.maxDate=K.maxDate,this._o.maxYear=K.maxYear,this._o.maxMonth=K.maxMonth,this._o.endRange=K.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,o=n.maxYear,i=n.minMonth,s=n.maxMonth,a="";this._y<=r&&(this._y=r,!isNaN(i)&&this._m<i&&(this._m=i)),this._y>=o&&(this._y=o,!isNaN(s)&&this._m>s&&(this._m=s));for(let e=0;e<n.numberOfMonths;e++)t="pika-title-"+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,2),a+='<div class="pika-lendar">'+Z(this,e,this.calendars[e].year,this.calendars[e].month,this.calendars[0].year,t)+this.render(this.calendars[e].year,this.calendars[e].month,t)+"</div>";this.el.innerHTML=a,n.bound&&"hidden"!==n.field.type&&O((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,o,i,s,a,l,u,h;this._o.container||(this.el.style.position="absolute",e=this._o.trigger,t=this.el.offsetWidth,n=this.el.offsetHeight,r=L().innerWidth||x().documentElement.clientWidth,o=L().innerHeight||x().documentElement.clientHeight,i=x().body.scrollTop||x().documentElement.scrollTop,u=!0,h=!0,l=e.getBoundingClientRect(),s=l.left+L().pageXOffset,a=l.bottom+L().pageYOffset,(this._o.reposition&&s+t>r||this._o.position.indexOf("right")>-1&&s-t+e.offsetWidth>0)&&(s=s-t+e.offsetWidth,u=!1),(this._o.reposition&&a+n>o+i||this._o.position.indexOf("top")>-1&&a-n-e.offsetHeight>0)&&(a=a-n-e.offsetHeight,h=!1),s<0&&(s=0),a<0&&(a=0),this.el.style.left=s+"px",this.el.style.top=a+"px",P(this.el,u?"left-aligned":"right-aligned"),P(this.el,h?"bottom-aligned":"top-aligned"),H(this.el,u?"right-aligned":"left-aligned"),H(this.el,h?"top-aligned":"bottom-aligned"))},render:function(e,t,n){let r=this._o,o=new Date,i=B(e,t),s=new Date(e,t,1).getDay(),a=[],l=[];W(o),r.firstDay>0&&(s-=r.firstDay,s<0&&(s+=7));let u=0===t?11:t-1,h=11===t?0:t+1,c=0===t?e-1:e,d=11===t?e+1:e,m=B(c,u),p=i+s,f=p;for(;f>7;)f-=7;p+=7-f;let g=!1;for(let n=0,f=0;n<p;n++){let p=new Date(e,t,n-s+1),y=!!Y(this._d)&&j(p,this._d),w=j(p,o),v=-1!==r.events.indexOf(p.toDateString()),_=n<s||n>=i+s,b=n-s+1,S=t,C=e,E=r.startRange&&j(r.startRange,p),M=r.endRange&&j(r.endRange,p),T=r.startRange&&r.endRange&&r.startRange<p&&p<r.endRange;_&&(n<s?(b=m+b,S=u,C=c):(b-=i,S=h,C=d));let R={day:b,month:S,year:C,hasEvent:v,isSelected:y,isToday:w,isDisabled:r.minDate&&p<r.minDate||r.maxDate&&p>r.maxDate||r.disableWeekends&&V(p)||r.disableDayFn&&r.disableDayFn(p),isEmpty:_,isStartRange:E,isEndRange:M,isInRange:T,showDaysInNextAndPreviousMonths:r.showDaysInNextAndPreviousMonths,enableSelectionDaysInNextAndPreviousMonths:r.enableSelectionDaysInNextAndPreviousMonths};r.pickWholeWeek&&y&&(g=!0),l.push(q(R)),7===++f&&(r.showWeekNumber&&l.unshift(Q(this,n-s,t,e,r.firstWeekOfYearMinDays)),a.push(J(l,r.isRTL,r.pickWholeWeek,g)),l=[],f=0,g=!1)}return function(e,t,n){return'<table cellpadding="0" cellspacing="0" class="pika-table" role="grid" aria-labelledby="'+n+'">'+function(e){let t,n=[];for(e.showWeekNumber&&n.push("<th></th>"),t=0;t<7;t++)n.push('<th scope="col"><abbr title="'+X(e,t)+'">'+X(e,t,!0)+"</abbr></th>");return"<thead><tr>"+(e.isRTL?n.reverse():n).join("")+"</tr></thead>"}(e)+"<tbody>"+t.join("")+"</tbody></table>"}(r,a,n)},isVisible:function(){return this._v},show:function(){this.isVisible()||(this._v=!0,this.draw(),H(this.el,"is-hidden"),this._o.bound&&(I(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&&k(x(),"click",this._onClick),this._o.container||(this.el.style.position="static",this.el.style.left="auto",this.el.style.top="auto"),P(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(),k(this.el,"mousedown",this._onMouseDown,!0),k(this.el,"touchend",this._onMouseDown,!0),k(this.el,"change",this._onChange),e.keyboardInput&&k(x(),"keydown",this._onKeyChange),e.field&&(k(e.field,"change",this._onInputChange),e.bound&&(k(e.trigger,"click",this._onInputClick),k(e.trigger,"focus",this._onInputFocus),k(e.trigger,"blur",this._onInputBlur))),this.el.parentNode&&this.el.parentNode.removeChild(this.el)}};var te=n(58002);function ne(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function re(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 oe="date",ie="dateEditor";var se=new WeakSet;class ae extends r.t{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=se),t.add(e),ne(this,"parentDestroyed",!1),ne(this,"$datePicker",null)}static get EDITOR_TYPE(){return oe}init(){if("function"!=typeof N)throw new Error("You need to include moment.js to your project.");super.init(),this.hot.addHook("afterDestroy",(()=>{this.parentDestroyed=!0,this.destroyElements()})),this.hot.addHook("afterSetTheme",((e,t)=>{t||((0,o.vy)(this.datePicker,/ht-theme-.*/g),(0,o.iQ)(this.datePicker,e))}))}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"),(0,o.iQ)(this.datePicker,"htDatepickerHolder");const e=this.hot.getCurrentThemeName();(0,o.vy)(this.datePicker,/ht-theme-.*/g),(0,o.iQ)(this.datePicker,e),this.hot.rootDocument.body.appendChild(this.datePicker),this.eventManager.addEventListener(this.datePicker,"mousedown",(e=>{(0,o.nB)(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,o,i){super.prepare(e,t,n,r,o,i)}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=this.hot.getShortcutManager().getContext("editor");this.showDatepicker(e),super.open(),t.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:ie})}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()})),this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(ie),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=re(se,this,le).call(this),n=this.hot.view.isMouseDown(),r=!!e&&(0,m.Yf)(e.keyCode);let o;this.datePicker.style.display="block",this.$datePicker=new ee(this.getDatePickerConfig()),"function"==typeof this.$datePicker.useMoment&&this.$datePicker.useMoment(N),this.$datePicker._onInputFocus=function(){},this.originalValue?(o=this.originalValue,N(o,t,!0).isValid()&&this.$datePicker.setMoment(N(o,t),!0),this.getValue()!==this.originalValue&&this.setValue(this.originalValue),r||n||this.setValue("")):this.cellProperties.defaultDate?(o=this.cellProperties.defaultDate,N(o,t,!0).isValid()&&this.$datePicker.setMoment(N(o,t),!0),r||n||this.setValue("")):this.$datePicker.gotoToday()}hideDatepicker(){this.datePickerStyle.display="none",this.$datePicker.hide()}getDatePickerConfig(){var e;const t=this.TEXTAREA,n={};this.cellProperties&&this.cellProperties.datePickerConfig&&(0,s.zw)(n,this.cellProperties.datePickerConfig);const r=n.onSelect,o=n.onClose;return n.field=t,n.trigger=t,n.container=this.datePicker,n.bound=!1,n.keyboardInput=!1,n.format=null!==(e=n.format)&&void 0!==e?e:re(se,this,le).call(this),n.reposition=n.reposition||!1,n.isRTL=!1,n.onSelect=e=>{let t=e;isNaN(t.getTime())||(t=N(t).format(re(se,this,le).call(this))),this.setValue(t),r&&r(),(0,te.rr)()&&this.hideDatepicker()},n.onClose=()=>{this.parentDestroyed||this.finishEditing(!1),o&&o()},n}refreshDimensions(e){var t;if(super.refreshDimensions(e),this.state!==R._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.hideDatepicker();const{rowIndexMapper:n,columnIndexMapper:r}=this.hot,{wtOverlays:i}=this.hot.view._wt,{wtTable:s}=null!==(t=i.getParentOverlay(this.TD))&&void 0!==t?t:this.hot.view._wt,a=n.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleRow()),l=n.getVisualFromRenderableIndex(s.getLastPartiallyVisibleRow()),u=r.getVisualFromRenderableIndex(s.getFirstPartiallyVisibleColumn()),h=r.getVisualFromRenderableIndex(s.getLastPartiallyVisibleColumn());if(this.row>=a&&this.row<=l&&this.col>=u&&this.col<=h){const e=this.TD.getBoundingClientRect();this.datePickerStyle.top=`${this.hot.rootWindow.pageYOffset+e.top+(0,o.DK)(this.TD)}px`;let t=this.hot.rootWindow.pageXOffset;this.hot.isRtl()?t+=e.right-(0,o.Gq)(this.datePicker):t+=e.left,this.datePickerStyle.left=`${t}px`}else this.hideDatepicker()}}function le(){var e;return null!==(e=this.cellProperties.dateFormat)&&void 0!==e?e:"DD/MM/YYYY"}class ue extends M{static get EDITOR_TYPE(){return"dropdown"}prepare(e,t,n,r,o,i){i.filter=!1,i.strict=!0,super.prepare(e,t,n,r,o,i)}}class he extends r.t{static get EDITOR_TYPE(){return"numeric"}}var ce=n(83023);class de extends r.t{constructor(){var e,t,n;super(...arguments),e=this,t="autoResize",n=(0,ce.j)(this.hot.rootDocument,{textContent:e=>"•".repeat(e.value.length)}),(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get EDITOR_TYPE(){return"password"}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,(0,o.Ie)(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)}}const me="ht_editor_visible",pe="selectEditor";class fe extends R.b7{static get EDITOR_TYPE(){return"select"}init(){this.selectWrapper=this.hot.rootDocument.createElement("div"),this.select=this.hot.rootDocument.createElement("select"),this.select.setAttribute("data-hot-input","true"),this.selectWrapper.style.display="none";const e=this.hot.rootDocument.createElement("DIV"),t=this.hot.getSettings().ariaTags;e.className="htAutocompleteArrow",t&&e.setAttribute(...(0,f.MG)()),e.appendChild(this.hot.rootDocument.createTextNode(String.fromCharCode(9660))),(0,o.iQ)(this.selectWrapper,"htSelectEditor"),this.selectWrapper.appendChild(this.select),this.selectWrapper.insertBefore(e,this.selectWrapper.firstChild),this.hot.rootElement.appendChild(this.selectWrapper),this.registerHooks()}getValue(){return this.select.value}setValue(e){this.select.value=e}open(){this._opened=!0,this.refreshDimensions(),this.selectWrapper.style.display="",this.hot.getShortcutManager().setActiveContextName("editor"),this.registerShortcuts()}close(){this._opened=!1,this.selectWrapper.style.display="none",(0,o.nB)(this.selectWrapper,me)&&(0,o.vy)(this.selectWrapper,me),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,i,a){super.prepare(e,t,n,r,i,a);const l=this.cellProperties.selectOptions;let u;u="function"==typeof l?this.prepareOptions(l(this.row,this.col,this.prop)):this.prepareOptions(l),(0,o.Ie)(this.select),(0,s.v4)(u,((e,t)=>{const n=this.hot.rootDocument.createElement("OPTION");n.value=t,(0,o.Mv)(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!==R._T.EDITING)return;if(this.TD=this.getEditedCell(),!this.TD)return void this.close();const{top:e,start:t,width:n,height:r}=this.getEditedCellRect(),i=this.selectWrapper.style;i.height=`${r}px`,i.width=`${n}px`,i.top=`${e}px`,i[this.hot.isRtl()?"right":"left"]=`${t}px`,i.margin="0px",(0,o.iQ)(this.selectWrapper,me)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={group:pe};this.isInFullEditMode()&&e.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)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(pe)}}class ge extends r.t{static get EDITOR_TYPE(){return"time"}prepare(e,t,n,r,o,i){super.prepare(e,t,n,r,o,i),this.TEXTAREA.dir="ltr"}}var ye=n(11080),we=n(69478);function ve(e,t,n,r,i,s,a){we.j.apply(this,[e,t,n,r,i,s,a]),(0,o.Mv)(t,null==s?"":s,!1)}ve.RENDERER_TYPE="html";var _e=n(28061);function be(e,t,n,r,i,s,a){const{rootDocument:l}=e,u=a.allowHtml?ve:p.F,h=l.createElement("DIV"),c=e.getSettings().ariaTags;if(h.className="htAutocompleteArrow",c&&h.setAttribute(...(0,f.MG)()),h.appendChild(l.createTextNode(String.fromCharCode(9660))),u.apply(this,[e,t,n,r,i,s,a]),t.firstChild||t.appendChild(l.createTextNode(String.fromCharCode(160))),t.insertBefore(h,t.firstChild),(0,o.iQ)(t,"htAutocomplete"),!e.acArrowListener){const i=new _e.A(e);e.acArrowListener=function(i){(0,o.nB)(i.target,"htAutocompleteArrow")&&e.view._wt.getSetting("onCellDblClick",null,e._createCellCoords(n,r),t)},i.addEventListener(e.rootElement,"mousedown",e.acArrowListener),e.addHookOnce("afterDestroy",(()=>{i.destroy()}))}}function Se(e,t,n,r,o,i,s){be.apply(this,[e,t,n,r,o,i,s])}be.RENDERER_TYPE="autocomplete",Se.RENDERER_TYPE="dropdown",n(23215),n(81454);var Ce=n(63487),Ee=n(49138);const Me=new WeakMap,Te=new WeakMap,Re="htBadValue",Ae="data-row",Ne="data-col",Le="checkboxRenderer",xe="checkbox";function Oe(e,t,n,r,i,s,l){const{rootDocument:u}=e,h=e.getSettings().ariaTags;we.j.apply(this,[e,t,n,r,i,s,l]),function(e){let t=Te.get(e);if(!t){const{rootElement:n}=e;t=new _e.A(e),t.addEventListener(n,"click",(t=>function(e,t){const{target:n}=e;if(!Ie(n))return;if(!n.hasAttribute(Ae)||!n.hasAttribute(Ne))return;const r=parseInt(n.getAttribute(Ae),10),o=parseInt(n.getAttribute(Ne),10);t.getCellMeta(r,o).readOnly&&e.preventDefault()}(t,e))),t.addEventListener(n,"mouseup",(t=>function(e,t){const{target:n}=e;Ie(n)&&n.hasAttribute(Ae)&&n.hasAttribute(Ne)&&setTimeout(t.listen,10)}(t,e))),t.addEventListener(n,"change",(t=>function(e,t){const{target:n}=e;if(!Ie(n))return;if(!n.hasAttribute(Ae)||!n.hasAttribute(Ne))return;const r=parseInt(n.getAttribute(Ae),10),o=parseInt(n.getAttribute(Ne),10),i=t.getCellMeta(r,o);if(!i.readOnly){let n=null;n=e.target.checked?void 0===i.uncheckedTemplate||i.checkedTemplate:void 0!==i.uncheckedTemplate&&i.uncheckedTemplate,t.setDataAtCell(r,o,n)}}(t,e))),Te.set(e,t)}}(e);let d=function(e){const t=e.createElement("input");return t.className="htCheckboxRendererInput",t.type="checkbox",t.setAttribute("tabindex","-1"),t.cloneNode(!1)}(u);const m=l.label;let p=!1;if(void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1),(0,o.Ie)(t),s===l.checkedTemplate||(0,c.As)(s).toLocaleLowerCase(l.locale)===(0,c.As)(l.checkedTemplate).toLocaleLowerCase(l.locale)?d.checked=!0:s===l.uncheckedTemplate||(0,c.As)(s).toLocaleLowerCase(l.locale)===(0,c.As)(l.uncheckedTemplate).toLocaleLowerCase(l.locale)?d.checked=!1:(0,c.Im)(s)?(0,o.iQ)(d,"noValue"):(d.style.display="none",(0,o.iQ)(d,Re),p=!0),(0,o.Bq)(d,[[Ae,n],[Ne,r]]),h&&(0,o.Bq)(d,[(0,f.SM)(d.checked?e.getTranslatedPhrase(Ee.CHECKBOX_CHECKED):e.getTranslatedPhrase(Ee.CHECKBOX_UNCHECKED)),(0,f.Xq)(d.checked),(0,f.Pk)()]),!p&&m){let o="";if(m.value)o="function"==typeof m.value?m.value.call(this,n,r,i,s):m.value;else if(m.property){const t=e.getDataAtRowProp(n,m.property);o=null!==t?t:""}const a=function(e,t,n){const r=e.createElement("label");r.className="htCheckboxRendererLabel "+(n?"fullWidth":"");const o=e.createTextNode(t);if(n){const t=e.createElement("span");t.appendChild(o),r.appendChild(t)}else r.appendChild(o);return r.cloneNode(!0)}(u,o,!0!==m.separated);"before"===m.position?m.separated?(t.appendChild(a),t.appendChild(d)):(a.appendChild(d),d=a):m.position&&"after"!==m.position||(m.separated?(t.appendChild(d),t.appendChild(a)):(a.insertBefore(d,a.firstChild),d=a))}function g(){let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=e.getSelectedRange(),r=[],o=new Map;let i=[],s=0;if(n){for(let a=0;a<n.length;a++){const{row:l,col:u}=n[a].getTopStartCorner(),{row:h,col:c}=n[a].getBottomEndCorner();for(let n=l;n<=h;n+=1)for(let a=u;a<=c;a+=1){const l=e.getCellMeta(n,a);if(l.hidden)continue;const u={checkedTemplate:l.checkedTemplate,uncheckedTemplate:l.uncheckedTemplate};if("checkbox"!==l.type){!0!==t||l.readOnly||(o.has(r.length)?o.set(r.length,[...o.get(r.length),[n,a,null]]):o.set(r.length,[[n,a,null]]));continue}if(!0===l.readOnly)continue;void 0===l.checkedTemplate&&(l.checkedTemplate=!0),void 0===l.uncheckedTemplate&&(l.uncheckedTemplate=!1);const h=e.getDataAtCell(n,a);!1===t?[l.checkedTemplate,l.checkedTemplate.toString()].includes(h)?i.push([n,a,l.uncheckedTemplate,u]):[l.uncheckedTemplate,l.uncheckedTemplate.toString(),null,void 0].includes(h)&&i.push([n,a,l.checkedTemplate,u]):i.push([n,a,l.uncheckedTemplate,u]),s+=1}r.push(s),s=0}i=i.every((e=>{let[,,t]=e;return t===i[0][2]}))?i.map((e=>{let[t,n,r]=e;return[t,n,r]})):i.map((e=>{let[t,n,,r]=e;return[t,n,r.checkedTemplate]})),i.length>0&&r.forEach(((t,n)=>{let r=i.splice(0,t);o.size&&o.has(n)&&(r=[...r,...o.get(n)]),e.setDataAtCell(r)}))}}function y(){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++){if(e.getCellMeta(t,n).readOnly)continue;const r=e.getCell(t,n);if((0,o.sb)(r)&&r.querySelectorAll("input[type=checkbox]").length>0)return!0}}return!1}}(!m||m&&!m.separated)&&t.appendChild(d),p&&t.appendChild(u.createTextNode("#bad-value#")),Me.has(e)||(Me.set(e,!0),function(){const t=e.getShortcutManager().getContext("grid"),n={group:Le,relativeToGroup:a.b,position:"before"};t.addShortcuts([{keys:[["space"]],callback:()=>(g(),!y()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}},{keys:[["enter"]],callback:()=>(g(),!y()),runOnlyIf:()=>{const t=e.getSelectedRangeLast();return e.getSettings().enterBeginsEditing&&(null==t?void 0:t.highlight.isCell())&&!e.selection.isMultiple()}},{keys:[["delete"],["backspace"]],callback:()=>(g(!0),!y()),runOnlyIf:()=>{var t;return null===(t=e.getSelectedRangeLast())||void 0===t?void 0:t.highlight.isCell()}}],n)}())}function Ie(e){return"INPUT"===e.tagName&&"checkbox"===e.getAttribute("type")}function ke(e,t,n,r,o,i,s){be.apply(this,[e,t,n,r,o,i,s])}Ce.R.getSingleton().add("modifyAutoColumnSizeSeed",(function(e,t,n){const{label:r,type:o,row:i,column:s,prop:a}=t;if(o===xe){if(r){const{value:t,property:o}=r;let l=n;if(t)l="function"==typeof t?t(i,s,a,n):t;else if(o){const e=this.getDataAtRowProp(i,o);l=null!==e?e:n}e=l}return e}})),Oe.RENDERER_TYPE=xe,ke.RENDERER_TYPE="handsontable";var De,Pe,He,Fe,Ye,Ve,Ue="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{};function Be(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function We(){return Pe||(Pe=1,De={languageTag:"en-US",delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},spaceSeparated:!1,ordinal:function(e){let t=e%10;return 1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th"},bytes:{binarySuffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],decimalSuffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]},currency:{symbol:"$",position:"prefix",code:"USD"},currencyFormat:{thousandSeparated:!0,totalLength:4,spaceSeparated:!0,spaceSeparatedCurrency:!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}}}),De}function je(){if(Fe)return He;Fe=1;const e=[{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 t(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function n(r,o,i,s,a,l,u){if(!isNaN(+r))return+r;let h="",c=r.replace(/(^[^(]*)\((.*)\)([^)]*$)/,"$1$2$3");if(c!==r)return-1*n(c,o,i,s,a,l);for(let t=0;t<e.length;t++){let u=e[t];if(h=r.replace(RegExp(`([0-9 ])(${u.key})$`),"$1"),h!==r)return n(h,o,i,s,a,l)*u.factor}if(h=r.replace("%",""),h!==r)return n(h,o,i,s,a,l)/100;let d=parseFloat(r);if(isNaN(d))return;let m=s(d);if(m&&"."!==m&&(h=r.replace(new RegExp(`${t(m)}$`),""),h!==r))return n(h,o,i,s,a,l);let p={};Object.keys(l).forEach((e=>{p[l[e]]=e}));let f=Object.keys(p).sort().reverse(),g=f.length;for(let e=0;e<g;e++){let t=f[e],u=p[t];if(h=r.replace(t,""),h!==r){let e;switch(u){case"thousand":e=Math.pow(10,3);break;case"million":e=Math.pow(10,6);break;case"billion":e=Math.pow(10,9);break;case"trillion":e=Math.pow(10,12)}return n(h,o,i,s,a,l)*e}}}function r(e,r,o="",i,s,a,l){if(""===e)return;if(e===s)return 0;let u=function(e,n,r){let o=e.replace(r,"");return o=o.replace(new RegExp(`([0-9])${t(n.thousands)}([0-9])`,"g"),"$1$2"),o=o.replace(n.decimal,"."),o}(e,r,o);return n(u,r,o,i,s,a)}return He={unformat:function(e,t){const n=Xe();let o,i=n.currentDelimiters(),s=n.currentCurrency().symbol,a=n.currentOrdinal(),l=n.getZeroFormat(),u=n.currentAbbreviations();if("string"==typeof e)o=function(e,t){if(!e.indexOf(":")||":"===t.thousands)return!1;let n=e.split(":");if(3!==n.length)return!1;let r=+n[0],o=+n[1],i=+n[2];return!isNaN(r)&&!isNaN(o)&&!isNaN(i)}(e,i)?function(e){let t=e.split(":"),n=+t[0],r=+t[1];return+t[2]+60*r+3600*n}(e):r(e,i,s,a,l,u);else{if("number"!=typeof e)return;o=e}if(void 0!==o)return o}},He}function ze(){if(Ve)return Ye;Ve=1;let e=je();const t=/^[a-z]{2,3}(-[a-zA-Z]{4})?(-([A-Z]{2}|[0-9]{3}))?$/,n={output:{type:"string",validValues:["currency","percent","byte","time","ordinal","number"]},base:{type:"string",validValues:["decimal","binary","general"],restriction:(e,t)=>"byte"===t.output,message:"`base` must be provided only when the output is `byte`",mandatory:e=>"byte"===e.output},characteristic:{type:"number",restriction:e=>e>=0,message:"value must be positive"},prefix:"string",postfix:"string",forceAverage:{type:"string",validValues:["trillion","billion","million","thousand"]},average:"boolean",lowPrecision:{type:"boolean",restriction:(e,t)=>!0===t.average,message:"`lowPrecision` must be provided only when the option `average` is set"},currencyPosition:{type:"string",validValues:["prefix","infix","postfix"]},currencySymbol:"string",totalLength:{type:"number",restrictions:[{restriction:e=>e>=0,message:"value must be positive"},{restriction:(e,t)=>!t.exponential,message:"`totalLength` is incompatible with `exponential`"}]},mantissa:{type:"number",restriction:e=>e>=0,message:"value must be positive"},optionalMantissa:"boolean",trimMantissa:"boolean",roundingFunction:"function",optionalCharacteristic:"boolean",thousandSeparated:"boolean",spaceSeparated:"boolean",spaceSeparatedCurrency:"boolean",spaceSeparatedAbbreviation:"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:(e,t)=>"percent"===t.output,message:"`prefixSymbol` can be provided only when the output is `percent`"}},r={languageTag:{type:"string",mandatory:!0,restriction:e=>e.match(t),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",spaceSeparatedCurrency:"boolean",ordinal:{type:"function",mandatory:!0},bytes:{type:"object",children:{binarySuffixes:"object",decimalSuffixes:"object"}},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 o(t){return void 0!==e.unformat(t)}function i(e,t,r,o=!1){let s=Object.keys(e).map((o=>{if(!t[o])return console.error(`${r} Invalid key: ${o}`),!1;let s=e[o],a=t[o];if("string"==typeof a&&(a={type:a}),"format"===a.type){if(!i(s,n,`[Validate ${o}]`,!0))return!1}else if(typeof s!==a.type)return console.error(`${r} ${o} type mismatched: "${a.type}" expected, "${typeof s}" provided`),!1;if(a.restrictions&&a.restrictions.length){let t=a.restrictions.length;for(let n=0;n<t;n++){let{restriction:t,message:i}=a.restrictions[n];if(!t(s,e))return console.error(`${r} ${o} invalid value: ${i}`),!1}}return a.restriction&&!a.restriction(s,e)?(console.error(`${r} ${o} invalid value: ${a.message}`),!1):a.validValues&&-1===a.validValues.indexOf(s)?(console.error(`${r} ${o} invalid value: must be among ${JSON.stringify(a.validValues)}, "${s}" provided`),!1):!(a.children&&!i(s,a.children,`[Validate ${o}]`))}));return o||s.push(...Object.keys(t).map((n=>{let o=t[n];if("string"==typeof o&&(o={type:o}),o.mandatory){let t=o.mandatory;if("function"==typeof t&&(t=t(e)),t&&void 0===e[n])return console.error(`${r} Missing mandatory key "${n}"`),!1}return!0}))),s.reduce(((e,t)=>e&&t),!0)}function s(e){return i(e,n,"[Validate format]")}return Ye={validate:function(e,t){let n=o(e),r=s(t);return n&&r},validateFormat:s,validateInput:o,validateLanguage:function(e){return i(e,r,"[Validate language]")}},Ye}var Ge,$e,Ke={parseFormat:function(e,t={}){return"string"!=typeof e?e:(e=function(e,t){let n=e.match(/^{([^}]*)}/);return n?(t.prefix=n[1],e.slice(n[0].length)):e}(e,t),e=function(e,t){let n=e.match(/{([^}]*)}$/);return n?(t.postfix=n[1],e.slice(0,-n[0].length)):e}(e,t),function(e,t){if(-1===e.indexOf("$")){if(-1===e.indexOf("%"))return-1!==e.indexOf("bd")?(t.output="byte",void(t.base="general")):-1!==e.indexOf("b")?(t.output="byte",void(t.base="binary")):-1!==e.indexOf("d")?(t.output="byte",void(t.base="decimal")):void(-1===e.indexOf(":")?-1!==e.indexOf("o")&&(t.output="ordinal"):t.output="time");t.output="percent"}else t.output="currency"}(e,t),function(e,t){let n=e.match(/[1-9]+[0-9]*/);n&&(t.totalLength=+n[0])}(e,t),function(e,t){let n=e.split(".")[0].match(/0+/);n&&(t.characteristic=n[0].length)}(e,t),function(e,t){if(-1!==e.indexOf(".")){let n=e.split(".")[0];t.optionalCharacteristic=-1===n.indexOf("0")}}(e,t),function(e,t){-1!==e.indexOf("a")&&(t.average=!0)}(e,t),function(e,t){-1!==e.indexOf("K")?t.forceAverage="thousand":-1!==e.indexOf("M")?t.forceAverage="million":-1!==e.indexOf("B")?t.forceAverage="billion":-1!==e.indexOf("T")&&(t.forceAverage="trillion")}(e,t),function(e,t){let n=e.split(".")[1];if(n){let e=n.match(/0+/);e&&(t.mantissa=e[0].length)}}(e,t),function(e,t){e.match(/\[\.]/)?t.optionalMantissa=!0:e.match(/\./)&&(t.optionalMantissa=!1)}(e,t),function(e,t){const n=e.split(".")[1];n&&(t.trimMantissa=-1!==n.indexOf("["))}(e,t),function(e,t){-1!==e.indexOf(",")&&(t.thousandSeparated=!0)}(e,t),function(e,t){-1!==e.indexOf(" ")&&(t.spaceSeparated=!0,t.spaceSeparatedCurrency=!0,(t.average||t.forceAverage)&&(t.spaceSeparatedAbbreviation=!0))}(e,t),function(e,t){e.match(/^\+?\([^)]*\)$/)&&(t.negative="parenthesis"),e.match(/^\+?-/)&&(t.negative="sign")}(e,t),function(e,t){e.match(/^\+/)&&(t.forceSign=!0)}(e,t),t)}};function Xe(){if($e)return Ge;$e=1;const e=We(),t=ze(),n=Ke;let r,o={},i={},s=null,a={};function l(e){r=e}function u(){return i[r]}return o.languages=()=>Object.assign({},i),o.currentLanguage=()=>r,o.currentBytes=()=>u().bytes||{},o.currentCurrency=()=>u().currency,o.currentAbbreviations=()=>u().abbreviations,o.currentDelimiters=()=>u().delimiters,o.currentOrdinal=()=>u().ordinal,o.currentDefaults=()=>Object.assign({},u().defaults,a),o.currentOrdinalDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().ordinalFormat),o.currentByteDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().byteFormat),o.currentPercentageDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().percentageFormat),o.currentCurrencyDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().currencyFormat),o.currentTimeDefaultFormat=()=>Object.assign({},o.currentDefaults(),u().timeFormat),o.setDefaults=e=>{e=n.parseFormat(e),t.validateFormat(e)&&(a=e)},o.getZeroFormat=()=>s,o.setZeroFormat=e=>s="string"==typeof e?e:null,o.hasZeroFormat=()=>null!==s,o.languageData=e=>{if(e){if(i[e])return i[e];throw new Error(`Unknown tag "${e}"`)}return u()},o.registerLanguage=(e,n=!1)=>{if(!t.validateLanguage(e))throw new Error("Invalid language data");i[e.languageTag]=e,n&&l(e.languageTag)},o.setLanguage=(t,n=e.languageTag)=>{if(!i[t]){let e=t.split("-")[0],r=Object.keys(i).find((t=>t.split("-")[0]===e));return i[r]?void l(r):void l(n)}l(t)},o.registerLanguage(e),r=e.languageTag,Ge=o}var qe,Qe={exports:{}};qe=Qe,function(e){var t,n=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,r=Math.ceil,o=Math.floor,i="[BigNumber Error] ",s=i+"Number primitive has more than 15 significant digits: ",a=1e14,l=14,u=9007199254740991,h=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],c=1e7,d=1e9;function m(e){var t=0|e;return e>0||e===t?t:t-1}function p(e){for(var t,n,r=1,o=e.length,i=e[0]+"";r<o;){for(t=e[r++]+"",n=l-t.length;n--;t="0"+t);i+=t}for(o=i.length;48===i.charCodeAt(--o););return i.slice(0,o+1||1)}function f(e,t){var n,r,o=e.c,i=t.c,s=e.s,a=t.s,l=e.e,u=t.e;if(!s||!a)return null;if(n=o&&!o[0],r=i&&!i[0],n||r)return n?r?0:-a:s;if(s!=a)return s;if(n=s<0,r=l==u,!o||!i)return r?0:!o^n?1:-1;if(!r)return l>u^n?1:-1;for(a=(l=o.length)<(u=i.length)?l:u,s=0;s<a;s++)if(o[s]!=i[s])return o[s]>i[s]^n?1:-1;return l==u?0:l>u^n?1:-1}function g(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(i+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function y(e){var t=e.c.length-1;return m(e.e/l)==t&&e.c[t]%2!=0}function w(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function v(e,t,n){var r,o;if(t<0){for(o=n+".";++t;o+=n);e=o+e}else if(++t>(r=e.length)){for(o=n,t-=r;--t;o+=n);e+=o}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}t=function e(t){var _,b,S,C,E,M,T,R,A,N,L=j.prototype={constructor:j,toString:null,valueOf:null},x=new j(1),O=20,I=4,k=-7,D=21,P=-1e7,H=1e7,F=!1,Y=1,V=0,U={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},B="0123456789abcdefghijklmnopqrstuvwxyz",W=!0;function j(e,t){var r,i,a,h,c,d,m,p,f=this;if(!(f instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return f.s=e.s,void(!e.c||e.e>H?f.c=f.e=null:e.e<P?f.c=[f.e=0]:(f.e=e.e,f.c=e.c.slice()));if((d="number"==typeof e)&&0*e==0){if(f.s=1/e<0?(e=-e,-1):1,e===~~e){for(h=0,c=e;c>=10;c/=10,h++);return void(h>H?f.c=f.e=null:(f.e=h,f.c=[e]))}p=String(e)}else{if(!n.test(p=String(e)))return S(f,p,d);f.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(h=p.indexOf("."))>-1&&(p=p.replace(".","")),(c=p.search(/e/i))>0?(h<0&&(h=c),h+=+p.slice(c+1),p=p.substring(0,c)):h<0&&(h=p.length)}else{if(g(t,2,B.length,"Base"),10==t&&W)return K(f=new j(e),O+f.e+1,I);if(p=String(e),d="number"==typeof e){if(0*e!=0)return S(f,p,d,t);if(f.s=1/e<0?(p=p.slice(1),-1):1,j.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(s+e)}else f.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(r=B.slice(0,t),h=c=0,m=p.length;c<m;c++)if(r.indexOf(i=p.charAt(c))<0){if("."==i){if(c>h){h=m;continue}}else if(!a&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){a=!0,c=-1,h=0;continue}return S(f,String(e),d,t)}d=!1,(h=(p=b(p,t,10,f.s)).indexOf("."))>-1?p=p.replace(".",""):h=p.length}for(c=0;48===p.charCodeAt(c);c++);for(m=p.length;48===p.charCodeAt(--m););if(p=p.slice(c,++m)){if(m-=c,d&&j.DEBUG&&m>15&&(e>u||e!==o(e)))throw Error(s+f.s*e);if((h=h-c-1)>H)f.c=f.e=null;else if(h<P)f.c=[f.e=0];else{if(f.e=h,f.c=[],c=(h+1)%l,h<0&&(c+=l),c<m){for(c&&f.c.push(+p.slice(0,c)),m-=l;c<m;)f.c.push(+p.slice(c,c+=l));c=l-(p=p.slice(c)).length}else c-=m;for(;c--;p+="0");f.c.push(+p)}}else f.c=[f.e=0]}function z(e,t,n,r){var o,i,s,a,l;if(null==n?n=I:g(n,0,8),!e.c)return e.toString();if(o=e.c[0],s=e.e,null==t)l=p(e.c),l=1==r||2==r&&(s<=k||s>=D)?w(l,s):v(l,s,"0");else if(i=(e=K(new j(e),t,n)).e,a=(l=p(e.c)).length,1==r||2==r&&(t<=i||i<=k)){for(;a<t;l+="0",a++);l=w(l,i)}else if(t-=s,l=v(l,i,"0"),i+1>a){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=i-a)>0)for(i+1==a&&(l+=".");t--;l+="0");return e.s<0&&o?"-"+l:l}function G(e,t){for(var n,r,o=1,i=new j(e[0]);o<e.length;o++)(!(r=new j(e[o])).s||(n=f(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function $(e,t,n){for(var r=1,o=t.length;!t[--o];t.pop());for(o=t[0];o>=10;o/=10,r++);return(n=r+n*l-1)>H?e.c=e.e=null:n<P?e.c=[e.e=0]:(e.e=n,e.c=t),e}function K(e,t,n,i){var s,u,c,d,m,p,f,g=e.c,y=h;if(g){e:{for(s=1,d=g[0];d>=10;d/=10,s++);if((u=t-s)<0)u+=l,c=t,m=g[p=0],f=o(m/y[s-c-1]%10);else if((p=r((u+1)/l))>=g.length){if(!i)break e;for(;g.length<=p;g.push(0));m=f=0,s=1,c=(u%=l)-l+1}else{for(m=d=g[p],s=1;d>=10;d/=10,s++);f=(c=(u%=l)-l+s)<0?0:o(m/y[s-c-1]%10)}if(i=i||t<0||null!=g[p+1]||(c<0?m:m%y[s-c-1]),i=n<4?(f||i)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||i||6==n&&(u>0?c>0?m/y[s-c]:0:g[p-1])%10&1||n==(e.s<0?8:7)),t<1||!g[0])return g.length=0,i?(t-=e.e+1,g[0]=y[(l-t%l)%l],e.e=-t||0):g[0]=e.e=0,e;if(0==u?(g.length=p,d=1,p--):(g.length=p+1,d=y[l-u],g[p]=c>0?o(m/y[s-c]%y[c])*d:0),i)for(;;){if(0==p){for(u=1,c=g[0];c>=10;c/=10,u++);for(c=g[0]+=d,d=1;c>=10;c/=10,d++);u!=d&&(e.e++,g[0]==a&&(g[0]=1));break}if(g[p]+=d,g[p]!=a)break;g[p--]=0,d=1}for(u=g.length;0===g[--u];g.pop());}e.e>H?e.c=e.e=null:e.e<P&&(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<=k||n>=D?w(t,n):v(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(i+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(g(n=e[t],0,d,t),O=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(g(n=e[t],0,8,t),I=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(g(n[0],-d,0,t),g(n[1],0,d,t),k=n[0],D=n[1]):(g(n,-d,d,t),k=-(D=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)g(n[0],-d,-1,t),g(n[1],1,d,t),P=n[0],H=n[1];else{if(g(n,-d,d,t),!n)throw Error(i+t+" cannot be zero: "+n);P=-(H=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(i+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw F=!n,Error(i+"crypto unavailable");F=n}else F=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(g(n=e[t],0,9,t),Y=n),e.hasOwnProperty(t="POW_PRECISION")&&(g(n=e[t],0,d,t),V=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(i+t+" not an object: "+n);U=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(i+t+" invalid: "+n);W="0123456789"==n.slice(0,10),B=n}}return{DECIMAL_PLACES:O,ROUNDING_MODE:I,EXPONENTIAL_AT:[k,D],RANGE:[P,H],CRYPTO:F,MODULO_MODE:Y,POW_PRECISION:V,FORMAT:U,ALPHABET:B}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,s=e.e,u=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===u||-1===u)&&s>=-d&&s<=d&&s===o(s)){if(0===r[0]){if(0===s&&1===r.length)return!0;break e}if((t=(s+1)%l)<1&&(t+=l),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=a||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===s&&(null===u||1===u||-1===u))return!0;throw Error(i+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return G(arguments,-1)},j.minimum=j.min=function(){return G(arguments,1)},j.random=(C=9007199254740992,E=Math.random()*C&2097151?function(){return o(Math.random()*C)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,s,a,u,c=0,m=[],p=new j(x);if(null==e?e=O:g(e,0,d),a=r(e/l),F)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));c<a;)(u=131072*t[c]+(t[c+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[c]=n[0],t[c+1]=n[1]):(m.push(u%1e14),c+=2);c=a/2}else{if(!crypto.randomBytes)throw F=!1,Error(i+"crypto unavailable");for(t=crypto.randomBytes(a*=7);c<a;)(u=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])>=9e15?crypto.randomBytes(7).copy(t,c):(m.push(u%1e14),c+=7);c=a/7}if(!F)for(;c<a;)(u=E())<9e15&&(m[c++]=u%1e14);for(a=m[--c],e%=l,a&&e&&(u=h[l-e],m[c]=o(a/u)*u);0===m[c];m.pop(),c--);if(c<0)m=[s=0];else{for(s=-1;0===m[0];m.splice(0,1),s-=l);for(c=1,u=m[0];u>=10;u/=10,c++);c<l&&(s-=l-c)}return p.e=s,p.c=m,p}),j.sum=function(){for(var e=1,t=arguments,n=new j(t[0]);e<t.length;)n=n.plus(t[e++]);return n},b=function(){var e="0123456789";function t(e,t,n,r){for(var o,i,s=[0],a=0,l=e.length;a<l;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(a++)),o=0;o<s.length;o++)s[o]>n-1&&(null==s[o+1]&&(s[o+1]=0),s[o+1]+=s[o]/n|0,s[o]%=n)}return s.reverse()}return function(n,r,o,i,s){var a,l,u,h,c,d,m,f,g=n.indexOf("."),y=O,w=I;for(g>=0&&(h=V,V=0,n=n.replace(".",""),d=(f=new j(r)).pow(n.length-g),V=h,f.c=t(v(p(d.c),d.e,"0"),10,o,e),f.e=f.c.length),u=h=(m=t(n,r,o,s?(a=B,e):(a=e,B))).length;0==m[--h];m.pop());if(!m[0])return a.charAt(0);if(g<0?--u:(d.c=m,d.e=u,d.s=i,m=(d=_(d,f,y,w,o)).c,c=d.r,u=d.e),g=m[l=u+y+1],h=o/2,c=c||l<0||null!=m[l+1],c=w<4?(null!=g||c)&&(0==w||w==(d.s<0?3:2)):g>h||g==h&&(4==w||c||6==w&&1&m[l-1]||w==(d.s<0?8:7)),l<1||!m[0])n=c?v(a.charAt(1),-y,a.charAt(0)):a.charAt(0);else{if(m.length=l,c)for(--o;++m[--l]>o;)m[l]=0,l||(++u,m=[1].concat(m));for(h=m.length;!m[--h];);for(g=0,n="";g<=h;n+=a.charAt(m[g++]));n=v(n,u,a.charAt(0))}return n}}(),_=function(){function e(e,t,n){var r,o,i,s,a=0,l=e.length,u=t%c,h=t/c|0;for(e=e.slice();l--;)a=((o=u*(i=e[l]%c)+(r=h*i+(s=e[l]/c|0)*u)%c*c+a)/n|0)+(r/c|0)+h*s,e[l]=o%n;return a&&(e=[a].concat(e)),e}function t(e,t,n,r){var o,i;if(n!=r)i=n>r?1:-1;else for(o=i=0;o<n;o++)if(e[o]!=t[o]){i=e[o]>t[o]?1:-1;break}return i}function n(e,t,n,r){for(var o=0;n--;)e[n]-=o,o=e[n]<t[n]?1:0,e[n]=o*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,i,s,u,h){var c,d,p,f,g,y,w,v,_,b,S,C,E,M,T,R,A,N=r.s==i.s?1:-1,L=r.c,x=i.c;if(!(L&&L[0]&&x&&x[0]))return new j(r.s&&i.s&&(L?!x||L[0]!=x[0]:x)?L&&0==L[0]||!x?0*N:N/0:NaN);for(_=(v=new j(N)).c=[],N=s+(d=r.e-i.e)+1,h||(h=a,d=m(r.e/l)-m(i.e/l),N=N/l|0),p=0;x[p]==(L[p]||0);p++);if(x[p]>(L[p]||0)&&d--,N<0)_.push(1),f=!0;else{for(M=L.length,R=x.length,p=0,N+=2,(g=o(h/(x[0]+1)))>1&&(x=e(x,g,h),L=e(L,g,h),R=x.length,M=L.length),E=R,S=(b=L.slice(0,R)).length;S<R;b[S++]=0);A=x.slice(),A=[0].concat(A),T=x[0],x[1]>=h/2&&T++;do{if(g=0,(c=t(x,b,R,S))<0){if(C=b[0],R!=S&&(C=C*h+(b[1]||0)),(g=o(C/T))>1)for(g>=h&&(g=h-1),w=(y=e(x,g,h)).length,S=b.length;1==t(y,b,w,S);)g--,n(y,R<w?A:x,w,h),w=y.length,c=1;else 0==g&&(c=g=1),w=(y=x.slice()).length;if(w<S&&(y=[0].concat(y)),n(b,y,S,h),S=b.length,-1==c)for(;t(x,b,R,S)<1;)g++,n(b,R<S?A:x,S,h),S=b.length}else 0===c&&(g++,b=[0]);_[p++]=g,b[0]?b[S++]=L[E]||0:(b=[L[E]],S=1)}while((E++<M||null!=b[0])&&N--);f=null!=b[0],_[0]||_.splice(0,1)}if(h==a){for(p=1,N=_[0];N>=10;N/=10,p++);K(v,s+(v.e=p+d*l-1)+1,u,f)}else v.e=d,v.r=+f;return v}}(),M=/^(-?)0([xbo])(?=\w[\w.]*$)/i,T=/^([^.]+)\.$/,R=/^\.([^.]+)$/,A=/^-?(Infinity|NaN)$/,N=/^\s*\+(?=[\w.])|^\s+|\s+$/g,S=function(e,t,n,r){var o,s=n?t:t.replace(N,"");if(A.test(s))e.s=isNaN(s)?null:s<0?-1:1;else{if(!n&&(s=s.replace(M,(function(e,t,n){return o="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=o?e:t})),r&&(o=r,s=s.replace(T,"$1").replace(R,"0.$1")),t!=s))return new j(s,o);if(j.DEBUG)throw Error(i+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},L.absoluteValue=L.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},L.comparedTo=function(e,t){return f(this,new j(e,t))},L.decimalPlaces=L.dp=function(e,t){var n,r,o,i=this;if(null!=e)return g(e,0,d),null==t?t=I:g(t,0,8),K(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((o=n.length-1)-m(this.e/l))*l,o=n[o])for(;o%10==0;o/=10,r--);return r<0&&(r=0),r},L.dividedBy=L.div=function(e,t){return _(this,new j(e,t),O,I)},L.dividedToIntegerBy=L.idiv=function(e,t){return _(this,new j(e,t),0,1)},L.exponentiatedBy=L.pow=function(e,t){var n,s,a,u,h,c,d,m,p=this;if((e=new j(e)).c&&!e.isInteger())throw Error(i+"Exponent not an integer: "+X(e));if(null!=t&&(t=new j(t)),h=e.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!e.c||!e.c[0])return m=new j(Math.pow(+X(p),h?e.s*(2-y(e)):+X(e))),t?m.mod(t):m;if(c=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(s=!c&&p.isInteger()&&t.isInteger())&&(p=p.mod(t))}else{if(e.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||h&&p.c[1]>=24e7:p.c[0]<8e13||h&&p.c[0]<=9999975e7)))return u=p.s<0&&y(e)?-0:0,p.e>-1&&(u=1/u),new j(c?1/u:u);V&&(u=r(V/l+2))}for(h?(n=new j(.5),c&&(e.s=1),d=y(e)):d=(a=Math.abs(+X(e)))%2,m=new j(x);;){if(d){if(!(m=m.times(p)).c)break;u?m.c.length>u&&(m.c.length=u):s&&(m=m.mod(t))}if(a){if(0===(a=o(a/2)))break;d=a%2}else if(K(e=e.times(n),e.e+1,1),e.e>14)d=y(e);else{if(0===(a=+X(e)))break;d=a%2}p=p.times(p),u?p.c&&p.c.length>u&&(p.c.length=u):s&&(p=p.mod(t))}return s?m:(c&&(m=x.div(m)),t?m.mod(t):u?K(m,V,I,void 0):m)},L.integerValue=function(e){var t=new j(this);return null==e?e=I:g(e,0,8),K(t,t.e+1,e)},L.isEqualTo=L.eq=function(e,t){return 0===f(this,new j(e,t))},L.isFinite=function(){return!!this.c},L.isGreaterThan=L.gt=function(e,t){return f(this,new j(e,t))>0},L.isGreaterThanOrEqualTo=L.gte=function(e,t){return 1===(t=f(this,new j(e,t)))||0===t},L.isInteger=function(){return!!this.c&&m(this.e/l)>this.c.length-2},L.isLessThan=L.lt=function(e,t){return f(this,new j(e,t))<0},L.isLessThanOrEqualTo=L.lte=function(e,t){return-1===(t=f(this,new j(e,t)))||0===t},L.isNaN=function(){return!this.s},L.isNegative=function(){return this.s<0},L.isPositive=function(){return this.s>0},L.isZero=function(){return!!this.c&&0==this.c[0]},L.minus=function(e,t){var n,r,o,i,s=this,u=s.s;if(t=(e=new j(e,t)).s,!u||!t)return new j(NaN);if(u!=t)return e.s=-t,s.plus(e);var h=s.e/l,c=e.e/l,d=s.c,p=e.c;if(!h||!c){if(!d||!p)return d?(e.s=-t,e):new j(p?s:NaN);if(!d[0]||!p[0])return p[0]?(e.s=-t,e):new j(d[0]?s:3==I?-0:0)}if(h=m(h),c=m(c),d=d.slice(),u=h-c){for((i=u<0)?(u=-u,o=d):(c=h,o=p),o.reverse(),t=u;t--;o.push(0));o.reverse()}else for(r=(i=(u=d.length)<(t=p.length))?u:t,u=t=0;t<r;t++)if(d[t]!=p[t]){i=d[t]<p[t];break}if(i&&(o=d,d=p,p=o,e.s=-e.s),(t=(r=p.length)-(n=d.length))>0)for(;t--;d[n++]=0);for(t=a-1;r>u;){if(d[--r]<p[r]){for(n=r;n&&!d[--n];d[n]=t);--d[n],d[r]+=a}d[r]-=p[r]}for(;0==d[0];d.splice(0,1),--c);return d[0]?$(e,d,c):(e.s=3==I?-1:1,e.c=[e.e=0],e)},L.modulo=L.mod=function(e,t){var n,r,o=this;return e=new j(e,t),!o.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||o.c&&!o.c[0]?new j(o):(9==Y?(r=e.s,e.s=1,n=_(o,e,0,3),e.s=r,n.s*=r):n=_(o,e,0,Y),(e=o.minus(n.times(e))).c[0]||1!=Y||(e.s=o.s),e)},L.multipliedBy=L.times=function(e,t){var n,r,o,i,s,u,h,d,p,f,g,y,w,v,_,b=this,S=b.c,C=(e=new j(e,t)).c;if(!(S&&C&&S[0]&&C[0]))return!b.s||!e.s||S&&!S[0]&&!C||C&&!C[0]&&!S?e.c=e.e=e.s=null:(e.s*=b.s,S&&C?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=m(b.e/l)+m(e.e/l),e.s*=b.s,(h=S.length)<(f=C.length)&&(w=S,S=C,C=w,o=h,h=f,f=o),o=h+f,w=[];o--;w.push(0));for(v=a,_=c,o=f;--o>=0;){for(n=0,g=C[o]%_,y=C[o]/_|0,i=o+(s=h);i>o;)n=((d=g*(d=S[--s]%_)+(u=y*d+(p=S[s]/_|0)*g)%_*_+w[i]+n)/v|0)+(u/_|0)+y*p,w[i--]=d%v;w[i]=n}return n?++r:w.splice(0,1),$(e,w,r)},L.negated=function(){var e=new j(this);return e.s=-e.s||null,e},L.plus=function(e,t){var n,r=this,o=r.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,r.minus(e);var i=r.e/l,s=e.e/l,u=r.c,h=e.c;if(!i||!s){if(!u||!h)return new j(o/0);if(!u[0]||!h[0])return h[0]?e:new j(u[0]?r:0*o)}if(i=m(i),s=m(s),u=u.slice(),o=i-s){for(o>0?(s=i,n=h):(o=-o,n=u),n.reverse();o--;n.push(0));n.reverse()}for((o=u.length)-(t=h.length)<0&&(n=h,h=u,u=n,t=o),o=0;t;)o=(u[--t]=u[t]+h[t]+o)/a|0,u[t]=a===u[t]?0:u[t]%a;return o&&(u=[o].concat(u),++s),$(e,u,s)},L.precision=L.sd=function(e,t){var n,r,o,i=this;if(null!=e&&e!==!!e)return g(e,1,d),null==t?t=I:g(t,0,8),K(new j(i),e,t);if(!(n=i.c))return null;if(r=(o=n.length-1)*l+1,o=n[o]){for(;o%10==0;o/=10,r--);for(o=n[0];o>=10;o/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},L.shiftedBy=function(e){return g(e,-9007199254740991,u),this.times("1e"+e)},L.squareRoot=L.sqrt=function(){var e,t,n,r,o,i=this,s=i.c,a=i.s,l=i.e,u=O+4,h=new j("0.5");if(1!==a||!s||!s[0])return new j(!a||a<0&&(!s||s[0])?NaN:s?i:1/0);if(0==(a=Math.sqrt(+X(i)))||a==1/0?(((t=p(s)).length+l)%2==0&&(t+="0"),a=Math.sqrt(+t),l=m((l+1)/2)-(l<0||l%2),n=new j(t=a==1/0?"5e"+l:(t=a.toExponential()).slice(0,t.indexOf("e")+1)+l)):n=new j(a+""),n.c[0])for((a=(l=n.e)+u)<3&&(a=0);;)if(o=n,n=h.times(o.plus(_(i,o,u,1))),p(o.c).slice(0,a)===(t=p(n.c)).slice(0,a)){if(n.e<l&&--a,"9999"!=(t=t.slice(a-3,a+1))&&(r||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(K(n,n.e+O+2,1),e=!n.times(n).eq(i));break}if(!r&&(K(o,o.e+O+2,0),o.times(o).eq(i))){n=o;break}u+=4,a+=4,r=1}return K(n,n.e+O+1,I,e)},L.toExponential=function(e,t){return null!=e&&(g(e,0,d),e++),z(this,e,t,1)},L.toFixed=function(e,t){return null!=e&&(g(e,0,d),e=e+this.e+1),z(this,e,t)},L.toFormat=function(e,t,n){var r,o=this;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(i+"Argument not an object: "+n);if(r=o.toFixed(e,t),o.c){var s,a=r.split("."),l=+n.groupSize,u=+n.secondaryGroupSize,h=n.groupSeparator||"",c=a[0],d=a[1],m=o.s<0,p=m?c.slice(1):c,f=p.length;if(u&&(s=l,l=u,u=s,f-=s),l>0&&f>0){for(s=f%l||l,c=p.substr(0,s);s<f;s+=l)c+=h+p.substr(s,l);u>0&&(c+=h+p.slice(s)),m&&(c="-"+c)}r=d?c+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?d.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):d):c}return(n.prefix||"")+r+(n.suffix||"")},L.toFraction=function(e){var t,n,r,o,s,a,u,c,d,m,f,g,y=this,w=y.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(x)))throw Error(i+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+X(u));if(!w)return new j(y);for(t=new j(x),d=n=new j(x),r=c=new j(x),g=p(w),s=t.e=g.length-y.e-1,t.c[0]=h[(a=s%l)<0?l+a:a],e=!e||u.comparedTo(t)>0?s>0?t:d:u,a=H,H=1/0,u=new j(g),c.c[0]=0;m=_(u,t,0,1),1!=(o=n.plus(m.times(r))).comparedTo(e);)n=r,r=o,d=c.plus(m.times(o=d)),c=o,t=u.minus(m.times(o=t)),u=o;return o=_(e.minus(n),r,0,1),c=c.plus(o.times(d)),n=n.plus(o.times(r)),c.s=d.s=y.s,f=_(d,r,s*=2,I).minus(y).abs().comparedTo(_(c,n,s,I).minus(y).abs())<1?[d,r]:[c,n],H=a,f},L.toNumber=function(){return+X(this)},L.toPrecision=function(e,t){return null!=e&&g(e,1,d),z(this,e,t,2)},L.toString=function(e){var t,n=this,r=n.s,o=n.e;return null===o?r?(t="Infinity",r<0&&(t="-"+t)):t="NaN":(null==e?t=o<=k||o>=D?w(p(n.c),o):v(p(n.c),o,"0"):10===e&&W?t=v(p((n=K(new j(n),O+o+1,I)).c),n.e,"0"):(g(e,2,B.length,"Base"),t=b(v(p(n.c),o,"0"),10,e,r,!0)),r<0&&n.c[0]&&(t="-"+t)),t},L.valueOf=L.toJSON=function(){return X(this)},L._isBigNumber=!0,null!=t&&j.set(t),j}(),t.default=t.BigNumber=t,qe.exports?qe.exports=t:(e||(e="undefined"!=typeof self&&self?self:window),e.BigNumber=t)}(Ue);var Je=Qe.exports;const Ze=Xe(),et=ze(),tt=Ke,nt=Je,rt={trillion:Math.pow(10,12),billion:Math.pow(10,9),million:Math.pow(10,6),thousand:Math.pow(10,3)},ot={totalLength:0,characteristic:0,forceAverage:!1,average:!1,mantissa:-1,optionalMantissa:!0,thousandSeparated:!1,spaceSeparated:!1,negative:"sign",forceSign:!1,roundingFunction:Math.round,spaceSeparatedAbbreviation:!1},{binarySuffixes:it,decimalSuffixes:st}=Ze.currentBytes(),at={general:{scale:1024,suffixes:st,marker:"bd"},binary:{scale:1024,suffixes:it,marker:"b"},decimal:{scale:1e3,suffixes:st,marker:"d"}};function lt(e,t,n){let r=t[0],o=Math.abs(e);if(o>=n){for(let i=1;i<t.length;++i){let s=Math.pow(n,i),a=Math.pow(n,i+1);if(o>=s&&o<a){r=t[i],e/=s;break}}r===t[0]&&(e/=Math.pow(n,t.length-1),r=t[t.length-1])}return{value:e,suffix:r}}function ut(e){let t="";for(let n=0;n<e;n++)t+="0";return t}function ht({instance:e,providedFormat:t,state:n=Ze,decimalSeparator:r,defaults:o=n.currentDefaults()}){let i=e._value;if(0===i&&n.hasZeroFormat())return n.getZeroFormat();if(!isFinite(i))return i.toString();let s=Object.assign({},ot,o,t),a=s.totalLength,l=a?0:s.characteristic,u=s.optionalCharacteristic,h=s.forceAverage,c=s.lowPrecision,d=!!a||!!h||s.average,m=a?-1:d&&void 0===t.mantissa?0:s.mantissa,p=!a&&(void 0===t.optionalMantissa?-1===m:s.optionalMantissa),f=s.trimMantissa,g=s.thousandSeparated,y=s.spaceSeparated,w=s.negative,v=s.forceSign,_=s.exponential,b=s.roundingFunction,S="";if(d){let e=function({value:e,forceAverage:t,lowPrecision:n=!0,abbreviations:r,spaceSeparated:o=!1,totalLength:i=0,roundingFunction:s=Math.round}){let a="",l=Math.abs(e),u=-1;if(t&&r[t]&&rt[t]?(a=r[t],e/=rt[t]):l>=rt.trillion||n&&1===s(l/rt.trillion)?(a=r.trillion,e/=rt.trillion):l<rt.trillion&&l>=rt.billion||n&&1===s(l/rt.billion)?(a=r.billion,e/=rt.billion):l<rt.billion&&l>=rt.million||n&&1===s(l/rt.million)?(a=r.million,e/=rt.million):(l<rt.million&&l>=rt.thousand||n&&1===s(l/rt.thousand))&&(a=r.thousand,e/=rt.thousand),a&&(a=(o?" ":"")+a),i){let t=e<0,n=e.toString().split(".")[0],r=t?n.length-1:n.length;u=Math.max(i-r,0)}return{value:e,abbreviation:a,mantissaPrecision:u}}({value:i,forceAverage:h,lowPrecision:c,abbreviations:n.currentAbbreviations(),spaceSeparated:y,roundingFunction:b,totalLength:a});i=e.value,S+=e.abbreviation,a&&(m=e.mantissaPrecision)}if(_){let e=function({value:e,characteristicPrecision:t}){let[n,r]=e.toExponential().split("e"),o=+n;return t?(1<t&&(o*=Math.pow(10,t-1),r=+r-(t-1),r=r>=0?`+${r}`:r),{value:o,abbreviation:`e${r}`}):{value:o,abbreviation:`e${r}`}}({value:i,characteristicPrecision:l});i=e.value,S=e.abbreviation+S}let C=function(e,t,n,r,o,i){if(-1===r)return e;let s=function(e,t,n=Math.round){return-1!==e.toString().indexOf("e")?function(e,t){let n=e.toString(),[r,o]=n.split("e"),[i,s=""]=r.split(".");if(+o>0)n=i+s+ut(o-s.length);else{let e=".";e=+i<0?`-0${e}`:`0${e}`;let r=(ut(-o-1)+Math.abs(i)+s).substr(0,t);r.length<t&&(r+=ut(t-r.length)),n=e+r}return+o>0&&t>0&&(n+=`.${ut(t)}`),n}(e,t):new nt(n(+`${e}e+${t}`)/Math.pow(10,t)).toFixed(t)}(t,r,i),[a,l=""]=s.toString().split(".");if(l.match(/^0+$/)&&(n||o))return a;let u=l.match(/0+$/);return o&&u?`${a}.${l.toString().slice(0,u.index)}`:s.toString()}(i.toString(),i,p,m,f,b);return C=function(e,t,n,r){let o=e,[i,s]=o.toString().split(".");if(i.match(/^-?0$/)&&n)return s?`${i.replace("0","")}.${s}`:i.replace("0","");const a=t<0&&0===i.indexOf("-");if(a&&(i=i.slice(1),o=o.slice(1)),i.length<r){let e=r-i.length;for(let t=0;t<e;t++)o=`0${o}`}return a&&(o=`-${o}`),o.toString()}(C,i,u,l),C=function(e,t,n,r,o){let i=r.currentDelimiters(),s=i.thousands;o=o||i.decimal;let a=i.thousandsSize||3,l=e.toString(),u=l.split(".")[0],h=l.split(".")[1];const c=t<0&&0===u.indexOf("-");if(n){c&&(u=u.slice(1));let e=function(e,t){let n=[],r=0;for(let o=e;o>0;o--)r===t&&(n.unshift(o),r=0),r++;return n}(u.length,a);e.forEach(((e,t)=>{u=u.slice(0,e+t)+s+u.slice(e+t)})),c&&(u=`-${u}`)}return l=h?u+o+h:u,l}(C,i,g,n,r),(d||_)&&(C=function(e,t){return e+t}(C,S)),(v||i<0)&&(C=function(e,t,n){return 0===t?e:0===+e?e.replace("-",""):t>0?`+${e}`:"sign"===n?e:`(${e.replace("-","")})`}(C,i,w)),C}function ct(e,t){if(!e)return t;let n=Object.keys(e);return 1===n.length&&"output"===n[0]?t:e}const dt=Je;function mt(e,t,n){let r=new dt(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new dt(o),e._value=r.minus(o).toNumber(),e}const pt=Xe(),ft=ze(),gt=(e=>({loadLanguagesInNode:t=>function(e,t){e.forEach((e=>{let n;try{n=function(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}(`../languages/${e}`)}catch(t){console.error(`Unable to load "${e}". No matching language file found.`)}n&&t.registerLanguage(n)}))}(t,e)}))(Ct),yt=je();let wt=(e=>({format:(...t)=>function(e,t={},n){if("string"==typeof t&&(t=tt.parseFormat(t)),!et.validateFormat(t))return"ERROR: invalid format";let r=t.prefix||"",o=t.postfix||"",i=function(e,t,n){switch(t.output){case"currency":return function(e,t,n){const r=n.currentCurrency();let o,i=Object.assign({},t),s=Object.assign({},ot,i),a="",l=!!s.totalLength||!!s.forceAverage||s.average,u=i.currencyPosition||r.position,h=i.currencySymbol||r.symbol;const c=void 0!==s.spaceSeparatedCurrency?s.spaceSeparatedCurrency:s.spaceSeparated;void 0===i.lowPrecision&&(i.lowPrecision=!1),c&&(a=" "),"infix"===u&&(o=a+h+a);let d=ht({instance:e,providedFormat:i,state:n,decimalSeparator:o});return"prefix"===u&&(d=e._value<0&&"sign"===s.negative?`-${a}${h}${d.slice(1)}`:e._value>0&&s.forceSign?`+${a}${h}${d.slice(1)}`:h+a+d),u&&"postfix"!==u||(a=!s.spaceSeparatedAbbreviation&&l?"":a,d=d+a+h),d}(e,t=ct(t,Ze.currentCurrencyDefaultFormat()),Ze);case"percent":return function(e,t,n,r){let o=t.prefixSymbol,i=ht({instance:r(100*e._value),providedFormat:t,state:n}),s=Object.assign({},ot,t);return o?`%${s.spaceSeparated?" ":""}${i}`:`${i}${s.spaceSeparated?" ":""}%`}(e,t=ct(t,Ze.currentPercentageDefaultFormat()),Ze,n);case"byte":return function(e,t,n,r){let o=t.base||"binary",i=Object.assign({},ot,t);const{binarySuffixes:s,decimalSuffixes:a}=n.currentBytes();let l={general:{scale:1024,suffixes:a||st,marker:"bd"},binary:{scale:1024,suffixes:s||it,marker:"b"},decimal:{scale:1e3,suffixes:a||st,marker:"d"}}[o],{value:u,suffix:h}=lt(e._value,l.suffixes,l.scale);return`${ht({instance:r(u),providedFormat:t,state:n,defaults:n.currentByteDefaultFormat()})}${i.spaceSeparated?" ":""}${h}`}(e,t=ct(t,Ze.currentByteDefaultFormat()),Ze,n);case"time":return t=ct(t,Ze.currentTimeDefaultFormat()),function(e){let t=Math.floor(e._value/60/60),n=Math.floor((e._value-60*t*60)/60),r=Math.round(e._value-60*t*60-60*n);return`${t}:${n<10?"0":""}${n}:${r<10?"0":""}${r}`}(e);case"ordinal":return function(e,t,n){let r=n.currentOrdinal(),o=Object.assign({},ot,t),i=ht({instance:e,providedFormat:t,state:n}),s=r(e._value);return`${i}${o.spaceSeparated?" ":""}${s}`}(e,t=ct(t,Ze.currentOrdinalDefaultFormat()),Ze);default:return ht({instance:e,providedFormat:t,numbro:n})}}(e,t,n);return i=function(e,t){return t+e}(i,r),i=function(e,t){return e+t}(i,o),i}(...t,e),getByteUnit:(...t)=>function(e){let t=at.general;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),getBinaryByteUnit:(...t)=>function(e){let t=at.binary;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),getDecimalByteUnit:(...t)=>function(e){let t=at.decimal;return lt(e._value,t.suffixes,t.scale).suffix}(...t,e),formatOrDefault:ct}))(Ct),vt=(e=>({add:(t,n)=>function(e,t,n){let r=new dt(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new dt(o),e._value=r.plus(o).toNumber(),e}(t,n,e),subtract:(t,n)=>mt(t,n,e),multiply:(t,n)=>function(e,t,n){let r=new dt(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new dt(o),e._value=r.times(o).toNumber(),e}(t,n,e),divide:(t,n)=>function(e,t,n){let r=new dt(e._value),o=t;return n.isNumbro(t)&&(o=t._value),o=new dt(o),e._value=r.dividedBy(o).toNumber(),e}(t,n,e),set:(t,n)=>function(e,t,n){let r=t;return n.isNumbro(t)&&(r=t._value),e._value=r,e}(t,n,e),difference:(t,n)=>function(e,t,n){let r=n(e._value);return mt(r,t,n),Math.abs(r._value)}(t,n,e),BigNumber:dt}))(Ct);const _t=Ke;class bt{constructor(e){this._value=e}clone(){return Ct(this._value)}format(e={}){return wt.format(this,e)}formatCurrency(e){return"string"==typeof e&&(e=_t.parseFormat(e)),(e=wt.formatOrDefault(e,pt.currentCurrencyDefaultFormat())).output="currency",wt.format(this,e)}formatTime(e={}){return e.output="time",wt.format(this,e)}binaryByteUnits(){return wt.getBinaryByteUnit(this)}decimalByteUnits(){return wt.getDecimalByteUnit(this)}byteUnits(){return wt.getByteUnit(this)}difference(e){return vt.difference(this,e)}add(e){return vt.add(this,e)}subtract(e){return vt.subtract(this,e)}multiply(e){return vt.multiply(this,e)}divide(e){return vt.divide(this,e)}set(e){return vt.set(this,St(e))}value(){return this._value}valueOf(){return this._value}}function St(e){let t=e;return Ct.isNumbro(e)?t=e._value:"string"==typeof e?t=Ct.unformat(e):isNaN(e)&&(t=NaN),t}function Ct(e){return new bt(St(e))}Ct.version="2.5.0",Ct.isNumbro=function(e){return e instanceof bt},Ct.language=pt.currentLanguage,Ct.registerLanguage=pt.registerLanguage,Ct.setLanguage=pt.setLanguage,Ct.languages=pt.languages,Ct.languageData=pt.languageData,Ct.zeroFormat=pt.setZeroFormat,Ct.defaultFormat=pt.currentDefaults,Ct.setDefaults=pt.setDefaults,Ct.defaultCurrencyFormat=pt.currentCurrencyDefaultFormat,Ct.validate=ft.validate,Ct.loadLanguagesInNode=gt.loadLanguagesInNode,Ct.unformat=yt.unformat,Ct.BigNumber=vt.BigNumber;var Et=Be(Ct),Mt=n(71409);function Tt(e,t){if((0,Mt.kf)(e)){const n=t.numericFormat,r=n&&n.culture||"-",o=n&&n.pattern;if(void 0!==r&&!Et.languages()[r]){const e=r.replace("-",""),t=Et.allLanguages?Et.allLanguages[r]:Et[e];t&&Et.registerLanguage(t)}Et.setLanguage(r),e=Et(e).format(o||"0")}return e}function Rt(e,t,n,r,o,i,s){let a=i;if((0,Mt.kf)(a)){let e=[];if(Array.isArray(s.className))e=s.className;else{var l;const t=null!==(l=s.className)&&void 0!==l?l:"";t.length&&(e=t.split(" "))}a=Tt(a,s),e.indexOf("htLeft")<0&&e.indexOf("htCenter")<0&&e.indexOf("htRight")<0&&e.indexOf("htJustify")<0&&e.push("htRight"),e.indexOf("htNumeric")<0&&e.push("htNumeric"),s.className=e.join(" "),t.dir="ltr"}(0,p.F)(e,t,n,r,o,a,s)}function At(e,t,n,r,i,s,a){p.F.apply(this,[e,t,n,r,i,s,a]);const l=a.hashLength||t.innerHTML.length,u=a.hashSymbol||"*";let h="";(0,Mt.Ti)(l-1,(()=>{h+=u})),(0,o.Mv)(t,h)}function Nt(e,t,n,r,o,i,s){p.F.apply(this,[e,t,n,r,o,i,s])}function Lt(e,t,n,r,o,i,s){p.F.apply(this,[e,t,n,r,o,i,s]),t.dir="ltr"}Rt.RENDERER_TYPE="numeric",At.RENDERER_TYPE="password",Nt.RENDERER_TYPE="select",Lt.RENDERER_TYPE="time";var xt=n(54950);function Ot(e,t){let n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):this.strict&&this.source?"function"==typeof this.source?this.source(n,It(n,t)):It(n,t)(this.source):t(!0)}function It(e,t){const n=e;return function(e){let r=!1;for(let t=0,o=e.length;t<o;t++)if(n===e[t]){r=!0;break}t(r)}}function kt(e,t){const n=(0,ye.L3)(oe,this.instance);let r=e,o=!0;null==r&&(r="");let i=N(r,this.dateFormat||n.defaultDateFormat,!0).isValid(),s=N(new Date(r)).isValid()||i;if(this.allowEmpty&&""===r&&(s=!0,i=!0),s||(o=!1),!s&&i&&(o=!0),s&&!i)if(!0===this.correctFormat){const e=function(e,t){const n=N(function(e){const t=new Date(e);return isNaN(new Date(`${e}T00:00`).getDate())?t:new Date(t.getTime()+6e4*t.getTimezoneOffset())}(e)),r=N(e,t),o=e.search(/[A-Za-z]/g)>-1;let i;return i=n.isValid()&&n.format("x")===r.format("x")||!r.isValid()||o?n:r,i.format(t)}(r,this.dateFormat);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"dateValidator"),o=!0}else o=!1;t(o)}function Dt(e,t){Ot.apply(this,[e,t])}function Pt(e,t){let n=e;null==n&&(n=""),this.allowEmpty&&""===n?t(!0):t(""!==n&&(0,Mt.kf)(e))}Ot.VALIDATOR_TYPE="autocomplete",kt.VALIDATOR_TYPE="date",Dt.VALIDATOR_TYPE="dropdown",Pt.VALIDATOR_TYPE="numeric";const Ht=["YYYY-MM-DDTHH:mm:ss.SSSZ","X","x"];function Ft(e,t){const n=this.timeFormat||"h:mm:ss a";let r=!0,o=e;null===o&&(o=""),o=/^\d{3,}$/.test(o)?parseInt(o,10):o;const i=/^\d{1,2}$/.test(o);i&&(o+=":00");const s=N(o,Ht,!0).isValid()?N(o):N(o,n);let a=s.isValid(),l=N(o,n,!0).isValid()&&!i;if(this.allowEmpty&&""===o&&(a=!0,l=!0),a||(r=!1),!a&&l&&(r=!0),a&&!l)if(!0===this.correctFormat){const e=s.format(n);this.instance.setDataAtCell(this.visualRow,this.visualCol,e,"timeValidator"),r=!0}else r=!1;t(r)}Ft.VALIDATOR_TYPE="time";var Yt=n(82993);const Vt={CELL_TYPE:"autocomplete",editor:M,renderer:be,validator:Ot},Ut={CELL_TYPE:"checkbox",editor:A,renderer:Oe};function Bt(e,t,n,r,o,i,s){be.apply(this,[e,t,n,r,o,i,s])}Bt.RENDERER_TYPE="date";const Wt={CELL_TYPE:"date",editor:ae,renderer:Bt,validator:kt},jt={CELL_TYPE:"dropdown",editor:ue,renderer:Se,validator:Dt,filter:!1,strict:!0},zt={CELL_TYPE:"handsontable",editor:u,renderer:ke},Gt={CELL_TYPE:"numeric",editor:he,renderer:Rt,validator:Pt,dataType:"number"},$t={CELL_TYPE:"password",editor:de,renderer:At,copyable:!1},Kt={CELL_TYPE:"select",editor:fe,renderer:Nt};var Xt=n(34675);const qt={CELL_TYPE:"time",editor:ge,renderer:Lt,validator:Ft};var Qt=n(87979);n(3949);var Jt=n(6833);function Zt(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function en(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tn(e,t){return e.get(nn(e,t))}function nn(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 rn=new Map([["plugin",Jt.Mt],["cell-type",Qt.L4],["editor",ye.aZ],["renderer",xt.sl],["validator",Yt.tR]]),on=Symbol("mainSetting"),sn=[];let an=null;var ln=new WeakMap,un=new WeakSet;class hn{static get PLUGIN_KEY(){return"base"}static get SETTING_KEYS(){return[this.PLUGIN_KEY]}static get DEFAULT_SETTINGS(){return{}}constructor(e){var t;Zt(this,t=un),t.add(this),en(this,"eventManager",new _e.A(this)),en(this,"pluginName",null),en(this,"pluginsInitializedCallbacks",[]),en(this,"isPluginsReady",!1),en(this,"enabled",!1),en(this,"initialized",!1),function(e,t){Zt(e,t),t.set(e,{})}(this,ln),(0,s.LH)(this,"hot",e,{writable:!1}),an=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(!rn.has(n))throw new Error(`Unknown plugin dependency type "${n}" was found.`);rn.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("");sn.push(t)}}if(an||(an=(0,Jt.f4)()),an.indexOf(this.pluginName)>=0&&an.splice(an.indexOf(this.pluginName),1),this.hot.addHookOnce("afterPluginsInitialized",(()=>{this.isEnabled&&this.isEnabled()&&this.enablePlugin()})),0===an.length){if(sn.length>0){const e=[`${sn.join("\n")}\n`,"You have to import and register them manually."].join("");throw sn.length=0,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}getSetting(e){const t=this.hot.getSettings()[this.constructor.PLUGIN_KEY];if(void 0===e)return t;const n=this.constructor.DEFAULT_SETTINGS;var r,o;return(Array.isArray(t)||(0,s.Gv)(t))&&n[on]===e?Array.isArray(t)?t:null!==(r=t[e])&&void 0!==r?r:n[e]:(0,s.Gv)(t)&&null!==(o=t[e])&&void 0!==o?o:n[e]}addHook(e,t,n){tn(ln,this)[e]=tn(ln,this)[e]||[];const r=tn(ln,this)[e];this.hot.addHook(e,t,n),r.push(t),tn(ln,this)[e]=r}removeHooks(e){(0,h.z0)(tn(ln,this)[e]||[],(t=>{this.hot.removeHook(e,t)}))}clearHooks(){const e=tn(ln,this);(0,s.v4)(e,((e,t)=>this.removeHooks(t))),e.length=0}callOnPluginsReady(e){this.isPluginsReady?e():this.pluginsInitializedCallbacks.push(e)}onAfterPluginsInitialized(){(0,h.z0)(this.pluginsInitializedCallbacks,(e=>e())),this.pluginsInitializedCallbacks.length=0,this.isPluginsReady=!0}onUpdateSettings(e){const t=nn(un,this,cn).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(),(0,s.v4)(this,((e,t)=>{"hot"!==t&&(this[t]=null)})),delete this.t,delete this.hot}}function cn(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}var dn=n(13968);function mn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const pn=class{constructor(e){mn(this,"hot",null),mn(this,"container",null),mn(this,"injected",!1),mn(this,"rows",[]),mn(this,"columns",[]),mn(this,"samples",null),mn(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)),0===e&&(0,o.iQ)(this.table.table,"htGhostTableFirstRow"),this.container.container.appendChild(this.table.fragment),n.table=this.table.table}addColumnHeadersRow(e){if(null!=this.hot.getColHeader(0)){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,void 0,-1),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(),(0,h.z0)(this.rows,(t=>{const{height:n}=t.table.getBoundingClientRect();e(t.row,Math.ceil(n))}))}getWidths(e){this.injected||this.injectTable(),(0,h.z0)(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=>{(0,h.z0)(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=>{(0,h.z0)(r.strings,(r=>{const o=r.col,i=this.hot.getCellMeta(e,o),s=this.hot.getCellRenderer(i),a=t.createElement("td");a.setAttribute("ghost-table",1),s(this.hot,a,e,o,this.hot.colToProp(o),r.value,i),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=>{(0,h.z0)(r.strings,(r=>{const o=r.col,i=e.createElement("th");n.push([o,i]),t.appendChild(i)}))})),this.table.tHead.appendChild(t),(0,h.z0)(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=>{(0,h.z0)(r.strings,(r=>{const o=r.row,i=this.hot.getCellMeta(o,e),s=this.hot.getCellRenderer(i),a=t.createElement("td"),l=t.createElement("tr");a.setAttribute("ghost-table",1),s(this.hot,a,o,e,this.hot.colToProp(e),r.value,i),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 o=this.hot.getColWidth(e);if(r>1)for(let t=e+1;t<e+r;t++)o+=this.hot.getColWidth(t);return n.style.width=`${o}px`,n}createTable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const{rootDocument:t}=this.hot,n=t.createDocumentFragment(),r=t.createElement("table"),i=t.createElement("thead"),s=t.createElement("tbody"),a=t.createElement("colgroup"),l=t.createElement("tr"),u=t.createElement("th");return this.isVertical()&&r.appendChild(a),this.isHorizontal()&&(l.appendChild(u),i.appendChild(l),r.style.tableLayout="auto",r.style.width="auto"),r.appendChild(i),this.isVertical()&&s.appendChild(l),r.appendChild(s),(0,o.iQ)(r,e),n.appendChild(r),{fragment:n,table:r,tHead:i,tBody:s,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(),r=t.createElement("div"),i=`htGhostTable htAutoSize ${e.trim()}`;return(0,o.iQ)(r,i),n.appendChild(r),{fragment:n,container:r}}isVertical(){return!(!this.rows.length||this.columns.length)}isHorizontal(){return!(!this.columns.length||this.rows.length)}};function fn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class gn{static get SAMPLE_COUNT(){return 3}constructor(e){fn(this,"samples",null),fn(this,"dataFactory",null),fn(this,"customSampleCount",null),fn(this,"allowDuplicates",!1),this.dataFactory=e}getSampleCount(){return this.customSampleCount?this.customSampleCount:gn.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:o,to:i}="number"==typeof n?{from:n,to:n}:n;return(0,Mt.Ti)(o,i,(n=>{const o=this.generateSample(e,t,n);r.set(n,o)})),r}generateSample(e,t,n){if("row"!==e&&"col"!==e)throw new Error("Unsupported sample type");const r=new Map,o="row"===e?"col":"row",i=[];return(0,Mt.Ti)(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,h="string"==typeof u&&u.length>0;let d;d=h?u:(0,s.Gv)(l)?`${Object.keys(l).length}`:Array.isArray(l)?`${l.length}`:`${(0,c.As)(l).length}`,r.has(d)||r.set(d,{needed:this.getSampleCount(),strings:[]});const m=r.get(d);m.needed&&(!(i.indexOf(l)>-1)||this.allowDuplicates||h)&&(m.strings.push({value:l,[o]:t}),i.push(l),m.needed-=1)})),r}}const yn=gn;var wn=n(94726),vn=n(48386);function _n(e,t,n){bn(e,t),t.set(e,n)}function bn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(e,t){return e.get(Mn(e,t))}function En(e,t,n){return e.set(Mn(e,t),n),n}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")}Ce.R.getSingleton().register("modifyAutoColumnSizeSeed");const Tn="autoColumnSize";var Rn=new WeakMap,An=new WeakMap,Nn=new WeakMap,Ln=new WeakSet;class xn extends hn{static get PLUGIN_KEY(){return Tn}static get PLUGIN_PRIORITY(){return 10}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 50}constructor(e){var t;super(e),bn(this,t=Ln),t.add(this),Sn(this,"ghostTable",new pn(this.hot)),Sn(this,"samplesGenerator",new yn(((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 o=this.hot.getCellMeta(e,t);let i="";o.spanned||(i=this.hot.getDataAtCell(e,t));let s="";return this.hot.hasHook("modifyAutoColumnSizeSeed")&&(s=this.hot.runHooks("modifyAutoColumnSizeSeed",s,o,i)),{value:i,bundleSeed:s}}))),Sn(this,"inProgress",!1),Sn(this,"measuredColumns",0),Sn(this,"columnWidthsMap",new vn._),_n(this,Rn,!1),_n(this,An,[]),_n(this,Nn,[]),this.hot.columnIndexMapper.registerMap("autoColumnSize",this.columnWidthsMap),this.addHook("beforeColumnResize",((e,t,n)=>Mn(Ln,this,Fn).call(this,e,t,n)))}isEnabled(){return!1!==this.hot.getSettings()[Tn]&&!this.hot.getSettings().colWidths}enablePlugin(){var e=this;if(this.enabled)return;this.ghostTable.setSetting("useHeaders",this.getSetting("useHeaders")),this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Mn(Ln,e,Pn).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 Mn(Ln,e,Hn).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 Mn(Ln,e,Vn).call(e,...n)})),this.addHook("beforeRender",(()=>Mn(Ln,this,Dn).call(this))),this.addHook("modifyColWidth",((e,t)=>this.getColumnWidth(t,e))),this.addHook("init",(()=>Mn(Ln,this,Yn).call(this))),super.enablePlugin()}updatePlugin(){En(Nn,this,this.findColumnsWhereHeaderWasChanged()),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.addHook("beforeColumnResize",((e,t,n)=>Mn(Ln,this,Fn).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.forceFullRender;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,o="number"==typeof t?{from:t,to:t}:t;(0,Mt.Ti)(r.from,r.to,(e=>{let t=this.hot.toPhysicalColumn(e);null===t&&(t=e),(n||null===this.columnWidthsMap.getValueAtIndex(t)&&!this.hot._getColWidthFromSettings(t))&&Mn(Ln,this,In).call(this,e,o)})),this.ghostTable.columns.length&&(Mn(Ln,this,kn).call(this),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 o=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,dn.uU)(o),void(this.inProgress=!1);this.calculateColumnsWidth({from:n,to:Math.min(n+xn.CALCULATION_STEP,r)},e,t),n=n+xn.CALCULATION_STEP+1,n<r?o=(0,dn.xi)(i):((0,dn.uU)(o),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateColumnsWidth({from:0,to:s},e,t),n=s+1),n<r?i():this.inProgress=!1}recalculateAllColumnsWidth(){this.hot.view.isVisible()&&this.calculateAllColumnsWidth({from:0,to:this.hot.countRows()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[Tn];let t=xn.SYNC_CALCULATION_LIMIT;const n=this.hot.countCols()-1;return(0,s.Gv)(e)&&(t=e.syncLimit,(0,d.Pi)(t)?t=(0,Mt.B5)(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,wn.j))),r}getFirstVisibleColumn(){var e;return null!==(e=this.hot.getFirstRenderedVisibleColumn())&&void 0!==e?e:-1}getLastVisibleColumn(){var e;return null!==(e=this.hot.getLastRenderedVisibleColumn())&&void 0!==e?e:-1}findColumnsWhereHeaderWasChanged(){return this.hot.getColHeader().reduce(((e,t,n)=>{const r=Cn(An,this).length;return(r-1<n||Cn(An,this)[n]!==t)&&e.push(this.hot.toVisualColumn(n)),r-1<n?Cn(An,this).push(t):Cn(An,this)[n]=t,e}),[])}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);null!==n&&(this.hot._getColWidthFromSettings(n)||Mn(Ln,this,In).call(this,e,t))})),this.ghostTable.columns.length&&(Mn(Ln,this,kn).call(this),this.ghostTable.clean())}function In(e,t){this.samplesGenerator.generateColumnSamples(e,t).forEach(((e,t)=>this.ghostTable.addColumn(t,e)))}function kn(){this.hot.batchExecution((()=>{this.ghostTable.getWidths(((e,t)=>{const n=this.hot.toPhysicalColumn(e);this.columnWidthsMap.setValueAtIndex(n,t)}))}),!0)}function Dn(){this.calculateVisibleColumnsWidth(),this.inProgress||(Mn(Ln,this,On).call(this,Cn(Nn,this)),En(Nn,this,[]))}function Pn(e,t){t||this.recalculateAllColumnsWidth()}function Hn(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}),[]);Cn(Nn,this).push(...t)}function Fn(e,t,n){let r=e;return n&&(this.calculateColumnsWidth(t,void 0,!0),r=this.getColumnWidth(t,void 0,!1)),r}function Yn(){En(An,this,this.hot.getColHeader()),this.recalculateAllColumnsWidth(),En(Rn,this,!0)}function Vn(e){if(!Cn(Rn,this))return;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}),[]);Cn(Nn,this).push(...t)}const Un={horizontal:"horizontal",vertical:"vertical"};function Bn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Wn(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")}Ce.R.getSingleton().register("modifyAutofillRange"),Ce.R.getSingleton().register("beforeAutofill"),Ce.R.getSingleton().register("afterAutofill");const jn="autofill",zn=["fillHandle"];var Gn=new WeakSet;class $n extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Gn),t.add(e),Bn(this,"addingStarted",!1),Bn(this,"mouseDownOnCellCorner",!1),Bn(this,"mouseDragOutside",!1),Bn(this,"handleDraggedCells",0),Bn(this,"directions",[]),Bn(this,"autoInsertRow",!1)}static get PLUGIN_KEY(){return jn}static get PLUGIN_PRIORITY(){return 20}static get SETTING_KEYS(){return[jn,...zn]}isEnabled(){return this.hot.getSettings().fillHandle}enablePlugin(){this.enabled||(this.mapSettings(),this.registerEvents(),this.addHook("afterOnCellCornerMouseDown",(e=>Wn(Gn,this,Xn).call(this,e))),this.addHook("afterOnCellCornerDblClick",(e=>Wn(Gn,this,Kn).call(this,e))),this.addHook("beforeOnCellMouseOver",((e,t)=>Wn(Gn,this,qn).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:o}=e.getBottomEndCorner(),i=this.hot.runHooks("modifyCopyableRange",[{startRow:t,startCol:n,endRow:r,endCol:o}]),s=[],a=[],l=[];return(0,h.z0)(i,(e=>{for(let t=e.startRow;t<=e.endRow;t+=1)-1===s.indexOf(t)&&s.push(t);for(let t=e.startCol;t<=e.endCol;t+=1)-1===a.indexOf(t)&&a.push(t)})),(0,h.z0)(s,(e=>{const t=[];(0,h.z0)(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(),o=this.hot.getSelectedRangeLast(),i=o.getTopStartCorner(),s=o.getBottomEndCorner();this.resetSelectionOfDraggedArea();const a=[i.row,i.col,s.row,s.col],l=this.hot.runHooks("modifyAutofillRange",[Math.min(i.row,e),Math.min(i.col,t),Math.max(s.row,n),Math.max(s.col,r)],a),{directionOfDrag:u,startOfDragCoords:h,endOfDragCoords:c}=function(e,t,n){let r,o,i;return t[0]===e[0]&&t[1]<e[1]?(i="left",r=n(t[0],t[1]),o=n(t[2],e[1]-1)):t[2]===e[2]&&t[0]===e[0]&&t[3]>e[3]?(i="right",r=n(t[0],e[3]+1),o=n(t[2],t[3])):t[0]<e[0]&&t[1]===e[1]?(i="up",r=n(t[0],t[1]),o=n(e[0]-1,t[3])):t[2]>e[2]&&t[1]===e[1]&&(i="down",r=n(e[2]+1,t[1]),o=n(t[2],t[3])),r&&r.normalize(),o&&o.normalize(),{directionOfDrag:i,startOfDragCoords:r,endOfDragCoords:o}}(a,l,((e,t)=>this.hot._createCellCoords(e,t)));if(h&&h.row>-1&&h.col>-1){const e=this.getSelectionData(),t=o.clone(),n=this.hot._createCellRange(h,h,c),r=this.hot.runHooks("beforeAutofill",e,t,n,u);if(!1===r)return this.hot.selection.highlight.getFill().clear(),this.hot.render(),!1;let i=r;const s=r;if(["up","left"].indexOf(u)>-1&&(1!==s.length||0!==s[0].length))if(i=[],"up"===u){const e=c.row-h.row+1,t=e%s.length;for(let n=0;n<e;n++)i.push(s[(n+(s.length-t))%s.length])}else{const e=c.col-h.col+1,t=e%s[0].length;for(let n=0;n<s.length;n++){i.push([]);for(let r=0;r<e;r++)i[n].push(s[n][(r+(s[n].length-t))%s[n].length])}}this.hot.populateFromArray(h.row,h.col,i,c.row,c.col,`${this.pluginName}.fill`,null),this.setSelection(l),this.hot.runHooks("afterAutofill",i,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(Un.vertical)&&this.directions.includes(Un.horizontal)){const o=t.getTopStartCorner();(n.col<=e.col||o.col>=e.col)&&(r=this.hot._createCellCoords(n.row,e.col)),(n.row<e.row||o.row>e.row)&&(r=this.hot._createCellCoords(e.row,n.col))}else if(this.directions.includes(Un.vertical))r=this.hot._createCellCoords(e.row,n.col);else{if(!this.directions.includes(Un.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("insert_row_below",void 0,1,`${this.pluginName}.fill`),this.addingStarted=!1}),200)}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 o=e[2]+1;o<n;o++){for(let n=e[1];n<=e[3];n++){const e=t[o][n];if(!(0,c.Im)(e))return-1}const n=t[o][e[1]-1],i=t[o][e[3]+1];(0,c.Im)(n)&&(0,c.Im)(i)||(r=o)}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(...(0,h.YD)(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=(0,o.cY)(this.hot.table).top-(this.hot.rootWindow.pageYOffset||t.scrollTop)+(0,o.DK)(this.hot.table),r=(0,o.cY)(this.hot.table).left-(this.hot.rootWindow.pageXOffset||t.scrollLeft)+(0,o.Gq)(this.hot.table);return e.clientY>n&&e.clientX<=r}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mouseup",(()=>Wn(Gn,this,Qn).call(this))),this.eventManager.addEventListener(e,"mousemove",(e=>Wn(Gn,this,Jn).call(this,e)))}clearMappedSettings(){this.directions.length=0,this.autoInsertRow=!1}mapSettings(){const e=function(e){const t={};return!0===e?(t.directions=Object.keys(Un),t.autoInsertRow=!0):(0,s.Gv)(e)?((0,c.O9)(e.autoInsertRow)?e.direction===Un.horizontal?t.autoInsertRow=!1:t.autoInsertRow=e.autoInsertRow:t.autoInsertRow=!1,(0,c.O9)(e.direction)?t.directions=[e.direction]:t.directions=Object.keys(Un)):"string"==typeof e?(t.directions=[e],t.autoInsertRow=!0):(t.directions=[],t.autoInsertRow=!1),t}(this.hot.getSettings().fillHandle);this.directions=e.directions,this.autoInsertRow=e.autoInsertRow}destroy(){super.destroy()}}function Kn(){this.selectAdjacent()&&this.fillIn()}function Xn(){this.handleDraggedCells=1,this.mouseDownOnCellCorner=!0}function qn(e){this.mouseDownOnCellCorner&&!this.hot.view.isMouseDown()&&this.handleDraggedCells&&(this.handleDraggedCells+=1,this.showBorder(e),this.addNewRowIfNeeded())}function Qn(){this.handleDraggedCells&&(this.handleDraggedCells>1&&this.fillIn(),this.handleDraggedCells=0,this.mouseDownOnCellCorner=!1)}function Jn(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 Zn(e,t,n){er(e,t),t.set(e,n)}function er(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nr(e,t,n){return e.set(or(e,t),n),n}function rr(e,t){return e.get(or(e,t))}function or(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="autoRowSize";var sr=new WeakMap,ar=new WeakMap,lr=new WeakSet;class ur extends hn{static get PLUGIN_KEY(){return ir}static get PLUGIN_PRIORITY(){return 40}static get SETTING_KEYS(){return!0}static get DEFAULT_SETTINGS(){return{useHeaders:!0,samplingRatio:null,allowSampleDuplicates:!1}}static get CALCULATION_STEP(){return 50}static get SYNC_CALCULATION_LIMIT(){return 500}constructor(e){var t;super(e),er(this,t=lr),t.add(this),tr(this,"headerHeight",null),tr(this,"ghostTable",new pn(this.hot)),tr(this,"samplesGenerator",new yn(((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&&this.hot.getCellMeta(e,t).hidden)return!1;let o;return e>=0?o=this.hot.getDataAtCell(e,t):-1===e&&(o=this.hot.getColHeader(t)),{value:o}}))),tr(this,"inProgress",!1),tr(this,"measuredRows",0),tr(this,"rowHeightsMap",new vn._),Zn(this,sr,[]),Zn(this,ar,!1),this.hot.rowIndexMapper.registerMap("autoRowSize",this.rowHeightsMap),this.addHook("beforeRowResize",((e,t,n)=>or(lr,this,dr).call(this,e,t,n)))}isEnabled(){const e=this.hot.getSettings()[ir];return!0===e||(0,s.Gv)(e)}enablePlugin(){var e=this;if(this.enabled)return;this.samplesGenerator.setAllowDuplicates(this.getSetting("allowSampleDuplicates"));const t=this.getSetting("samplingRatio");t&&!isNaN(t)&&this.samplesGenerator.setSampleCount(parseInt(t,10)),this.addHook("afterLoadData",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return or(lr,e,mr).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 or(lr,e,pr).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 or(lr,e,gr).call(e,...n)})),this.addHook("beforeRender",(()=>or(lr,this,cr).call(this))),this.addHook("modifyRowHeight",((e,t)=>this.getRowHeight(t,e))),this.addHook("init",(()=>or(lr,this,fr).call(this))),this.addHook("modifyColumnHeaderHeight",(()=>this.getColumnHeaderHeight())),super.enablePlugin()}disablePlugin(){this.headerHeight=null,super.disablePlugin(),this.addHook("beforeRowResize",((e,t,n)=>or(lr,this,dr).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.forceFullRender;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,o="number"==typeof t?{from:t,to:t}:t;if(null!==this.hot.getColHeader(0)){const e=this.samplesGenerator.generateRowSamples(-1,o);this.ghostTable.addColumnHeadersRow(e.get(-1))}(0,Mt.Ti)(r.from,r.to,(e=>{let t=this.hot.toPhysicalRow(e);null===t&&(t=e),(n||null===this.rowHeightsMap.getValueAtIndex(t))&&this.samplesGenerator.generateRowSamples(e,o).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 o=null;this.inProgress=!0;const i=()=>{if(!this.hot)return(0,dn.uU)(o),void(this.inProgress=!1);this.calculateRowsHeight({from:n,to:Math.min(n+ur.CALCULATION_STEP,r)},e,t),n=n+ur.CALCULATION_STEP+1,n<r?o=(0,dn.xi)(i):((0,dn.uU)(o),this.inProgress=!1,this.hot.view.adjustElementsSize())},s=this.getSyncCalculationLimit();s>=0&&(this.calculateRowsHeight({from:0,to:s},e,t),n=s+1),n<r?i():(this.inProgress=!1,this.hot.view.adjustElementsSize())}recalculateAllRowsHeight(){this.hot.view.isVisible()&&this.calculateAllRowsHeight({from:0,to:this.hot.countCols()-1},!0)}getSyncCalculationLimit(){const e=this.hot.getSettings()[ir];let t=ur.SYNC_CALCULATION_LIMIT;const n=this.hot.countRows()-1;return(0,s.Gv)(e)&&(t=e.syncLimit,(0,d.Pi)(t)?t=(0,Mt.B5)(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.getFirstRenderedVisibleRow())&&void 0!==e?e:-1}getLastVisibleRow(){var e;return null!==(e=this.hot.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((()=>{(0,Mt.Ti)(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 hr(e){const t={from:0,to:this.hot.countCols()-1};e.forEach((e=>{this.samplesGenerator.generateRowSamples(e,t).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 cr(){this.calculateVisibleRowsHeight(),this.inProgress||(or(lr,this,hr).call(this,rr(sr,this)),nr(sr,this,[]))}function dr(e,t,n){let r=e;return n&&(this.calculateRowsHeight(t,void 0,!0),r=this.getRowHeight(t)),r}function mr(e,t){t||this.recalculateAllRowsHeight()}function pr(e){const t=e.reduce(((e,t)=>{let[n]=t;return-1===e.indexOf(n)&&e.push(n),e}),[]);rr(sr,this).push(...t)}function fr(){this.recalculateAllRowsHeight(),nr(ar,this,!0)}function gr(e){if(!rr(ar,this))return;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}),[]);rr(sr,this).push(...t)}var yr=n(48046),wr=n(77792);const vr=new Map([["indexesSequence",{getListWithInsertedItems:yr.N,getListWithRemovedItems:yr.H}],["physicallyIndexed",{getListWithInsertedItems:wr.N,getListWithRemovedItems:wr.H}]]),_r=e=>{if(!1===vr.has(e))throw new Error(`Alter strategy with ID '${e}' does not exist.`);return vr.get(e)};var br=n(41895),Sr=n(13317);const{getListWithInsertedItems:Cr,getListWithRemovedItems:Er}=_r("physicallyIndexed");class Mr extends br.n{constructor(){super((e=>e))}insert(e,t){const n=(0,Sr.z)(this.indexedValues,t);this.indexedValues=Cr(n,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){const t=Er(this.indexedValues,e);this.indexedValues=(0,Sr.v)(t,e),super.remove(e)}}const Tr=Mr,{getListWithInsertedItems:Rr,getListWithRemovedItems:Ar}=_r("physicallyIndexed");class Nr extends br.n{constructor(){super((e=>e))}insert(e,t){this.indexedValues=Rr(this.indexedValues,e,t,((e,t)=>this.getNextValue(t))),super.insert(e,t)}remove(e){this.indexedValues=Ar(this.indexedValues,e),super.remove(e)}getNextValue(e){return Math.max(...this.getValues())+1+e}}const Lr="bindRowsWithHeaders",xr=new Map([["loose",Tr],["strict",Nr]]);var Or=new WeakSet;class Ir extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Or),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"headerIndexes",null)}static get PLUGIN_KEY(){return Lr}static get PLUGIN_PRIORITY(){return 210}isEnabled(){return!!this.hot.getSettings()[Lr]}enablePlugin(){var e;if(this.enabled)return;const t=null!==(e=xr.get(this.getSetting()))&&void 0!==e?e:xr.get("loose");this.headerIndexes=this.hot.rowIndexMapper.registerMap("bindRowsWithHeaders",new t),this.addHook("modifyRowHeader",(e=>function(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")}(Or,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 Dr=n(82617);function Pr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hr(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fr(e,t){return e.get(Vr(e,t))}function Yr(e,t,n){return e.set(Vr(e,t),n),n}function Vr(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="collapsibleColumns",Br=["nestedHeaders"],Wr="collapsibleIndicator",jr=Ur,zr=new Map([["collapse",{hideColumn:!0,beforeHook:"beforeColumnCollapse",afterHook:"afterColumnCollapse"}],["expand",{hideColumn:!1,beforeHook:"beforeColumnExpand",afterHook:"afterColumnExpand"}]]);var Gr=new WeakMap,$r=new WeakSet;class Kr extends hn{constructor(){var e;super(...arguments),Pr(this,e=$r),e.add(this),Hr(this,"nestedHeadersPlugin",null),Hr(this,"headerStateManager",null),function(e,t){Pr(e,t),t.set(e,null)}(this,Gr)}static get PLUGIN_KEY(){return Ur}static get PLUGIN_PRIORITY(){return 290}static get PLUGIN_DEPS(){return["plugin:NestedHeaders"]}static get SETTING_KEYS(){return[Ur,...Br]}isEnabled(){return!!this.hot.getSettings()[Ur]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();t||(0,Dr.R8)("You need to configure the Nested Headers plugin in order to use collapsible headers."),Yr(Gr,this,this.hot.columnIndexMapper.createAndRegisterIndexMap(this.pluginName,"hiding")),this.nestedHeadersPlugin=this.hot.getPlugin("nestedHeaders"),this.headerStateManager=this.nestedHeadersPlugin.getStateManager(),this.addHook("init",(()=>Vr($r,this,Qr).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 Vr($r,e,Jr).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 Vr($r,e,Xr).call(e,...n)})),this.addHook("beforeOnCellMouseDown",((e,t,n)=>Vr($r,this,qr).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),Yr(Gr,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:o,columnIndex:i}=null!==(e=this.headerStateManager.getHeaderTreeNodeData(t,n))&&void 0!==e?e:{};if(r)return o?this.expandSection({row:t,col:i}):this.collapseSection({row:t,col:i}),!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:jr,relativeToGroup:a.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(jr)}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,o=function(e){e&&e.parentNode.removeChild(e)};(0,Mt.Ti)(0,e-1,(e=>{const i=t.childNodes[e],s=n.childNodes[e],a=r?r.childNodes[e]:null;(0,Mt.Ti)(0,i.childNodes.length-1,(e=>{let t=i.childNodes[e].querySelector(`.${Wr}`);o(t),s&&s.childNodes[e]&&(t=s.childNodes[e].querySelector(`.${Wr}`),o(t)),r&&a&&a.childNodes[e]&&(t=a.childNodes[e].querySelector(`.${Wr}`),o(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:o,columnIndex:i,isCollapsed:s}=t;if(!0===n&&r>1&&(s&&"expand"===e||!s&&"collapse"===e))return{row:this.headerStateManager.levelToRowCoords(o),col:i}}));this.toggleCollapsibleSection(t,e)}collapseAll(){this.toggleAllCollapsibleSections("collapse")}expandAll(){this.toggleAllCollapsibleSections("expand")}toggleCollapsibleSection(e,t){if(!zr.has(t))throw new Error(`Unsupported action is passed (${t}).`);if(!Array.isArray(e))return;const n=(0,h.y0)(e,(e=>{let{row:t}=e;return t<0}));let r=n.length>0;(0,h.z0)(n,(e=>{var n;let{row:o,col:i}=e;const{collapsible:s,isCollapsed:a}=null!==(n=this.headerStateManager.getHeaderSettings(o,i))&&void 0!==n?n:{};if(!s||a&&"collapse"===t||!a&&"expand"===t)return r=!1,!1}));const o=[],i=[];r&&(0,h.z0)(n,(e=>{let{row:n,col:r}=e;const{colspanCompensation:s,affectedColumns:a,rollbackModification:l}=this.headerStateManager.triggerNodeModification(t,n,r);s>0&&(i.push(...a),o.push(l))}));const s=this.getCollapsedColumns();let a=[];"collapse"===t?a=(0,h.jF)([...s,...i]):"expand"===t&&(a=(0,h.y0)(s,(e=>!i.includes(e))));const l=zr.get(t);if(!1===this.hot.runHooks(l.beforeHook,s,a,r))return void(0,h.z0)(o,(e=>{e()}));this.hot.batchExecution((()=>{(0,h.z0)(i,(e=>{Fr(Gr,this).setValueAtIndex(this.hot.toPhysicalColumn(e),l.hideColumn)}))}),!0);const u=this.getCollapsedColumns().length!==s.length,c=this.hot.getSelectedRangeLast();if("collapse"===t&&u&&c){const{row:e,col:t}=c.highlight;if((this.hot.rowIndexMapper.isHidden(e)||this.hot.columnIndexMapper.isHidden(t))&&i.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,s,a,r,u),this.hot.render(),this.hot.view.adjustElementsSize()}getCollapsedColumns(){return Fr(Gr,this).getHiddenIndexes()}destroy(){Yr(Gr,this,null),super.destroy()}}function Xr(e,t,n){var r;const{collapsible:i,origColspan:s,isCollapsed:a}=null!==(r=this.headerStateManager.getHeaderSettings(n,e))&&void 0!==r?r:{},l=i&&s>1&&e>=this.hot.getSettings().fixedColumnsStart,u=this.hot.getSettings().ariaTags;let h=t.querySelector(`.${Wr}`);var c;(0,o.De)(t,[(0,f.dV)("")[0]]),l?(h||(h=this.hot.rootDocument.createElement("div"),(0,o.iQ)(h,Wr),t.querySelector("div:first-child").appendChild(h)),(0,o.vy)(h,["collapsed","expanded"]),a?((0,o.iQ)(h,"collapsed"),(0,o.c6)(h,"+"),u&&(0,o.Bq)(t,...(0,f.dV)(!1))):((0,o.iQ)(h,"expanded"),(0,o.c6)(h,"-"),u&&(0,o.Bq)(t,...(0,f.dV)(!0))),u&&(0,o.Bq)(h,...(0,f.MG)())):null===(c=h)||void 0===c||c.remove()}function qr(e,t){(0,o.nB)(e.target,Wr)&&((0,o.nB)(e.target,"expanded")?(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"collapse")):(0,o.nB)(e.target,"collapsed")&&(this.eventManager.fireEvent(e.target,"mouseup"),this.toggleCollapsibleSection([t],"expand")),(0,i.CA)(e))}function Qr(){this.updatePlugin()}function Jr(e,t){t||this.updatePlugin()}var Zr=n(85408),eo=n(31803);function to(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const no=["sortEmptyCells","indicator","headerAction","compareFunctionFactory"];class ro{constructor(e,t){to(this,"hot",void 0),to(this,"sortingStates",new eo.z),to(this,"sortEmptyCells",!1),to(this,"indicator",!0),to(this,"headerAction",!0),to(this,"compareFunctionFactory",void 0),to(this,"mapName",void 0),this.hot=e,this.mapName=t,this.hot.columnIndexMapper.registerMap(t,this.sortingStates)}updateAllColumnsProperties(e){(0,s.Gv)(e)&&(0,s.v4)(e,((e,t)=>{no.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(0,s.Gv)(this.sortingStates.getValueAtIndex(this.hot.toPhysicalColumn(e)))}getSortStates(){return null===this.sortingStates?[]:this.sortingStates.getEntries().map((e=>{let[t,n]=e;return{column:this.hot.toVisualColumn(t),...n}}))}getColumnSortState(e){const t=this.getSortOrderOfColumn(e);if((0,c.O9)(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}}function oo(e,t,n){const r=t.locale;return function(t,o){const{sortEmptyCells:i}=n;return"string"==typeof t&&(t=t.toLocaleLowerCase(r)),"string"==typeof o&&(o=o.toLocaleLowerCase(r)),t===o?po:(0,c.Im)(t)?(0,c.Im)(o)?po:i&&"asc"===e?fo:go:(0,c.Im)(o)?i&&"asc"===e?go:fo:isNaN(t)&&!isNaN(o)?"asc"===e?go:fo:!isNaN(t)&&isNaN(o)?"asc"===e?fo:go:(isNaN(t)||isNaN(o)||(t=parseFloat(t),o=parseFloat(o)),t<o?"asc"===e?fo:go:t>o?"asc"===e?go:fo:po)}}n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(37550);const io="default";var so=n(34647);const{register:ao,getItem:lo,hasItem:uo}=(0,so.A)("sorting.compareFunctionFactory"),{register:ho,getItem:co}=(0,so.A)("sorting.mainSortComparator");function mo(e){return uo(e)?lo(e):lo(io)}ao("checkbox",(function(e,t,n){const r=t.checkedTemplate,o=t.uncheckedTemplate,{sortEmptyCells:i}=n;return function(s,a){const l=(0,c.Im)(s),u=(0,c.Im)(a),h=l?o:s,d=u?o:a,m=h===o||h===r,p=d===o||d===r;if(!1===i){if(l&&!1===u)return go;if(!1===l&&u)return fo}return!1===m&&p?"asc"===e?fo:go:m&&!1===p?"asc"===e?go:fo:!1===m&&!1===p?oo(e,t,n)(s,a):h===o&&d===r?"asc"===e?fo:go:h===r&&d===o?"asc"===e?go:fo:po}})),ao("date",(function(e,t,n){return Mo(e,t.dateFormat,n)})),ao(io,oo),ao("numeric",(function(e,t,n){return function(t,r){const o=parseFloat(t),i=parseFloat(r),{sortEmptyCells:s}=n;if(o===i||isNaN(o)&&isNaN(i))return po;if(s){if((0,c.Im)(t))return"asc"===e?fo:go;if((0,c.Im)(r))return"asc"===e?go:fo}return isNaN(o)?go:isNaN(i)?fo:o<i?"asc"===e?fo:go:o>i?"asc"===e?go:fo:po}})),ao("time",(function(e,t,n){return Mo(e,t.timeFormat,n)}));const po=0,fo=-1,go=1;var yo=n(85975);const wo="asc",vo="desc",_o="colHeader";function bo(e){if(e!==vo)return e===wo?vo:wo}function So(e){return e.querySelector(`.${_o}`)}function Co(e,t){if(e<0||!t.parentNode)return!1;const n=t.parentNode.parentNode.childNodes;return-1===Array.from(n).indexOf(t.parentNode)-n.length}function Eo(e,t,n){return-1===e&&t>=0&&!1===(0,i.nO)(n)}function Mo(e,t,n){return function(r,o){const{sortEmptyCells:i}=n;if(r===o)return po;if((0,c.Im)(r))return(0,c.Im)(o)?po:i&&"asc"===e?fo:go;if((0,c.Im)(o))return i&&"asc"===e?go:fo;const s=N(r,t),a=N(o,t);return s.isValid()?a.isValid()?a.isAfter(s)?"asc"===e?fo:go:a.isBefore(s)?"asc"===e?go:fo:po:fo:go}}const To="indicatorDisabled",Ro="columnSorting",Ao="sortAction",No=new Map([[wo,"ascending"],[vo,"descending"]]);function Lo(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function xo(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 Oo="columnSorting",Io="append",ko=Oo;ho(Oo,(function(e,t){return function(n,r){const[,...o]=n,[,...i]=r;return function(){const n=e[0],r=t[0],s=o[0],a=i[0],l=r.columnSorting;return(l.compareFunctionFactory?l.compareFunctionFactory:mo(r.type))(n,r,l)(s,a)}()}})),Ce.R.getSingleton().register("beforeColumnSort"),Ce.R.getSingleton().register("afterColumnSort");const Do=new WeakMap;var Po=new WeakSet;class Ho extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Po),t.add(e),Lo(this,"columnStatesManager",null),Lo(this,"columnMetaCache",null),Lo(this,"pluginKey",Oo),Lo(this,"indexesSequenceCache",null)}static get PLUGIN_KEY(){return Oo}static get PLUGIN_PRIORITY(){return 50}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){var e,t,n=this;if(Do.has(this.hot)&&Do.get(this.hot)!==this.pluginKey)return this.hot.updateSettings({[this.pluginKey]:!1}),e=Do.get(this.hot),t=this.pluginKey,void(0,Dr.R8)(yo.O`Plugins \`columnSorting\` and \`multiColumnSorting\` should not be enabled simultaneously.\x20
  27. Only \`${e}\` will work. The \`${t}\` plugin will remain disabled.`);this.enabled||(Do.set(this.hot,this.pluginKey),this.columnStatesManager=new ro(this.hot,`${this.pluginKey}.sortingStates`),this.columnMetaCache=new vn._((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)=>xo(Po,this,Yo).call(this,e,t))),this.addHook("beforeOnCellMouseDown",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xo(Po,n,Uo).call(n,...t)})),this.addHook("afterOnCellMouseDown",((e,t)=>this.onAfterOnCellMouseDown(e,t))),this.addHook("afterInit",(()=>xo(Po,this,Fo).call(this))),this.addHook("afterLoadData",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return xo(Po,n,Vo).call(n,...t)})),this.hot.view&&xo(Po,this,Fo).call(this),this.registerShortcuts(),super.enablePlugin())}disablePlugin(){const e=(e,t)=>{const n=So(t);!1!==Co(e,t)&&null!==n&&this.updateHeaderClasses(n)};Do.delete(this.hot),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.b,position:"before",group:ko})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(ko)}sort(e){const t=this.getSortConfig(),n=this.getNormalizedSortConfigs(e),r=this.areValidSortConfigs(n);!1!==this.hot.runHooks("beforeColumnSort",t,n,r)&&(0===t.length&&null===this.indexesSequenceCache&&(this.indexesSequenceCache=this.hot.rowIndexMapper.registerMap(this.pluginKey,new Zr.K),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())}clearSort(){this.sort([])}isSorted(){return this.enabled&&!this.columnStatesManager.isListOfSortedColumnsEmpty()}getSortConfig(e){return(0,c.O9)(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 function(e){if(e.some((e=>!1===function(e){if(!1===(0,s.Gv)(e))return!1;const{column:t,sortOrder:n}=e;return Number.isInteger(t)&&[wo,vo].includes(n)}(e))))return!1;const t=e.map((e=>{let{column:t}=e;return t}));return new Set(t).size===t.length}(e)&&e.every((e=>{let{column:n}=e;return n<=t&&n>=0}))}saveAllSortSettings(e){const t=this.columnStatesManager.getAllColumnsProperties();t.initialConfig=(0,h.YD)(e,(e=>{let{column:t,...n}=e;return{column:this.hot.toPhysicalColumn(t),...n}})),this.hot.runHooks("persistentStateSave","columnSorting",t)}getAllSavedSortSettings(){const e={};this.hot.runHooks("persistentStateLoad","columnSorting",e);const t=e.value;return(0,c.O9)(t)&&Array.isArray(t.initialConfig)&&(t.initialConfig=(0,h.YD)(t.initialConfig,(e=>{let{column:t,...n}=e;return{column:this.hot.toVisualColumn(t),...n}}))),t}getColumnNextConfig(e){const t=this.columnStatesManager.getSortOrderOfColumn(e);if((0,c.O9)(t)){const n=bo(t);return(0,c.O9)(n)?{column:e,sortOrder:n}:void 0}const n=this.hot.countCols();if(Number.isInteger(e)&&e>=0&&e<n)return{column:e,sortOrder:bo()}}getNextSortConfig(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Io;const n=this.columnStatesManager.getIndexOfColumnInSortQueue(e),r=-1!==n,o=this.getSortConfig(),i=this.getColumnNextConfig(e);if(r){if((0,c.b0)(i))return[...o.slice(0,n),...o.slice(n+1)];if(t===Io)return[...o.slice(0,n),...o.slice(n+1),i];if("replace"===t)return[...o.slice(0,n),i,...o.slice(n+1)]}return(0,c.O9)(i)?o.concat(i):o}getPluginColumnConfig(e){if((0,s.Gv)(e)){const t=e[this.pluginKey];if((0,s.Gv)(t))return t}return{}}getMergedPluginSettings(e){const t=this.hot.getSettings()[this.pluginKey],n=this.columnStatesManager.getAllColumnsProperties(),r=this.hot.getCellMeta(0,e),o=Object.getPrototypeOf(r);return Array.isArray(o.columns)?Object.assign(n,t,this.getPluginColumnConfig(o.columns[e])):(0,g.Tn)(o.columns)?Object.assign(n,t,this.getPluginColumnConfig(o.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=>(0,h.YD)(e,(e=>this.hot.getDataAtCell(t,e.column)));for(let e=0;e<this.getNumberOfRowsToSort(n);e+=1)t.push([this.hot.toPhysicalRow(e)].concat(r(e)));const o=(0,h.YD)(t,(e=>e[0]));!function(e,t){const n=co(t);for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];e.sort(n(...o))}(t,this.pluginKey,(0,h.YD)(e,(e=>e.sortOrder)),(0,h.YD)(e,(e=>this.getFirstCellSettings(e.column))));for(let e=t.length;e<n;e+=1)t.push([e].concat(r(e)));const i=(0,h.YD)(t,(e=>e[0])),s=new Map((0,h.YD)(o,((e,t)=>[e,i[t]]))),a=(0,h.YD)(this.hot.rowIndexMapper.getIndexesSequence(),(e=>s.has(e)?s.get(e):e));this.hot.rowIndexMapper.setIndexesSequence(a)}sortBySettings(e){if((0,s.Gv)(e)){this.columnStatesManager.updateAllColumnsProperties(e);const t=e.initialConfig;(Array.isArray(t)||(0,s.Gv)(t))&&this.sort(t)}else this.hot.render()}updateHeaderClasses(e){if((0,o.vy)(e,Array.from(No.values()).concat(Ao,To,Ro)),!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];(0,o.iQ)(e,function(e,t,n,r){const o=[Ro];if(r&&o.push(Ao),!1===n)return o.push(To),o;const i=e.getSortOrderOfColumn(t);return(0,c.O9)(i)&&o.push(No.get(i)),o}(...n))}}onUpdateSettings(e){super.onUpdateSettings(e),null!==this.columnMetaCache&&this.columnMetaCache.init(this.hot.columnIndexMapper.getNumberOfIndexes()),(0,c.O9)(e[this.pluginKey])&&this.sortBySettings(e[this.pluginKey])}wasClickableHeaderClicked(e,t){return this.getFirstCellSettings(t)[this.pluginKey].headerAction&&(0,o.nB)(e.target,_o)}onAfterOnCellMouseDown(e,t){if(!1!==Eo(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&&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 Fo(){const e=this.getAllSavedSortSettings();if((0,s.Gv)(e))this.sortBySettings(e);else{const e=this.hot.getSettings()[this.pluginKey];this.sortBySettings(e)}}function Yo(e,t){const n=So(t);if(!1===Co(e,t)||null===n)return;const r=this.getFirstCellSettings(e)[this.pluginKey],i=r.indicator,s=r.headerAction;if(this.updateHeaderClasses(n,this.columnStatesManager,e,i,s),this.hot.getSettings().ariaTags){const n=this.columnStatesManager.getSortOrderOfColumn(e);(0,o.Bq)(t,...(0,f._h)(n?`${n}ending`:"none"))}}function Vo(e){!0===e&&this.hot.view&&xo(Po,this,Fo).call(this)}function Uo(e,t,n,r){!1!==Eo(t.row,t.col,e)&&this.wasClickableHeaderClicked(e,t.col)&&this.hot.getShortcutManager().isCtrlPressed()&&(r.column=!0)}function Bo(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Wo=class{constructor(e,t){Bo(this,"plugin",void 0),Bo(this,"hot",void 0),Bo(this,"endpoints",[]),Bo(this,"settings",void 0),Bo(this,"settingsType","array"),Bo(this,"currentEndpoint",null),Bo(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),(0,h.z0)(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",o=this.getAllEndpoints();(0,h.z0)(o,(o=>{"row"===r&&o.destinationRow>=t&&("insert_row"===e?o.alterRowOffset=n:"remove_row"===e&&(o.alterRowOffset=-1*n)),"col"===r&&o.destinationColumn>=t&&("insert_col"===e?o.alterColumnOffset=n:"remove_col"===e&&(o.alterColumnOffset=-1*n))})),this.resetAllEndpoints(o,!1)}resetSetupAfterStructureAlteration(e,t,n,r,o){let i=!(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 s=e.indexOf("row")>-1?"row":"col",a=e.indexOf("remove")>-1?-1:1,l=this.getAllEndpoints(),u=0===e.indexOf("move_row"),c=t;(0,h.z0)(l,(e=>{"row"===s&&e.destinationRow>=c&&(e.alterRowOffset=a*n),"col"===s&&e.destinationColumn>=c&&(e.alterColumnOffset=a*n)})),this.resetAllEndpoints(l,!u),u?(0,h.z0)(l,(e=>{this.extendEndpointRanges(e,c,r[0],r.length),this.recreatePhysicalRanges(e),this.clearOffsetInformation(e)})):(0,h.z0)(l,(e=>{this.shiftEndpointCoordinates(e,c)})),i&&this.refreshAllEndpoints()}clearOffsetInformation(e){e.alterRowOffset=void 0,e.alterColumnOffset=void 0}extendEndpointRanges(e,t,n,r){(0,h.z0)(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=[];(0,h.z0)(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)})),(0,h.z0)(r,(e=>{let t=[];(0,h.z0)(e,((r,o)=>{0===o?t.push(r):e[o]!==e[o-1]+1&&(t.push(e[o-1]),n.push(t),t=[],t.push(r)),o===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,(0,h.z0)(e.ranges,(n=>{(0,h.z0)(n,((r,o)=>{r>=t&&(n[o]+=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];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()}))||(this.cellsToSetCache=[],(0,h.z0)(e,(e=>{this.resetEndpointValue(e,t)})),this.hot.setDataAtCell(this.cellsToSetCache,"ColumnSummary.reset"),this.cellsToSetCache=[])}refreshAllEndpoints(){this.cellsToSetCache=[],(0,h.z0)(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=[],(0,h.z0)(e,((e,n,r)=>{`${e[2]||""}`!=`${e[3]}`&&(0,h.z0)(this.getAllEndpoints(),((e,o)=>{this.hot.propToCol(r[n][1])===e.sourceColumn&&-1===t.indexOf(o)&&t.push(o)}))})),(0,h.z0)(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 o=this.hot.toVisualRow(e.destinationRow);if(null!==o){const n=this.hot.getCellMeta(o,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(){(0,Dr.R8)("One of the Column Summary plugins' destination points you provided is beyond the table boundaries!")}};function jo(e){return null==e||isNaN(e)}function zo(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 Go="columnSummary";var $o=new WeakSet;class Ko extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=$o),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"endpoints",null)}static get PLUGIN_KEY(){return Go}static get PLUGIN_PRIORITY(){return 220}isEnabled(){return!!this.hot.getSettings()[Go]}enablePlugin(){var e=this;this.enabled||(this.settings=this.hot.getSettings()[Go],this.endpoints=new Wo(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 zo($o,e,Xo).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 zo($o,e,Qo).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 zo($o,e,qo).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 zo($o,e,Jo).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":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)}}calculateSum(e){let t=0;return(0,s.v4)(e.ranges,(n=>{t+=this.getPartialSum(n,e.sourceColumn)})),t}getPartialSum(e,t){let n=0,r=e[1]||e[0],o=null,i=0;do{if(o=this.getCellValue(r,t),o=jo(o)?null:o,null!==o){const e=(`${o}`.split(".")[1]||[]).length||1;e>i&&(i=e)}n+=o||0,r-=1}while(r>=e[0]);return Math.round(n*10**i)/10**i}calculateMinMax(e,t){let n=null;return(0,s.v4)(e.ranges,(r=>{const o=this.getPartialMinMax(r,e.sourceColumn,t);if(null===n&&null!==o&&(n=o),null!==o)switch(t){case"min":n=Math.min(n,o);break;case"max":n=Math.max(n,o)}})),null===n?"Not enough data":n}getPartialMinMax(e,t,n){let r,o=null,i=e[1]||e[0];do{if(r=this.getCellValue(i,t),r=jo(r)?null:r,null===o)o=r;else if(null!==r)switch(n){case"min":o=Math.min(o,r);break;case"max":o=Math.max(o,r)}i-=1}while(i>=e[0]);return o}countEmpty(e,t){let n,r=0,o=e[1]||e[0];do{n=this.getCellValue(o,t),n=jo(n)?null:n,null===n&&(r+=1),o-=1}while(o>=e[0]);return r}countEntries(e){let t=0;const n=e.ranges;return(0,s.v4)(n,(n=>{const r=void 0===n[1]?1:n[1]-n[0]+1,o=this.countEmpty(n,e.sourceColumn);t+=r,t-=o})),t}calculateAverage(e){return this.calculateSum(e)/this.countEntries(e)}getCellValue(e,t){const n=this.hot.toVisualRow(e),r=this.hot.toVisualColumn(t);let o=this.hot.getSourceDataAtCell(e,t),i="";if(null!==n&&null!==r&&(i=this.hot.getCellMeta(n,r).className||""),i.indexOf("columnSummaryResult")>-1)return null;if(this.endpoints.currentEndpoint.forceNumeric&&("string"==typeof o&&(o=o.replace(/,/,".")),o=parseFloat(o)),isNaN(o)&&!this.endpoints.currentEndpoint.suppressDataTypeErrors)throw new Error(yo.O`ColumnSummary plugin: cell at (${e}, ${t}) is not in a\x20
  28. numeric format. Cannot do the calculation.`);return o}}function Xo(){this.endpoints.initEndpoints()}function qo(e){void 0!==e.columns&&this.endpoints.refreshCellMetas()}function Qo(e,t){e&&"ColumnSummary.reset"!==t&&"ColumnSummary.set"!==t&&"loadData"!==t&&this.endpoints.refreshChangedEndpoints(e)}function Jo(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 Zo=n(77710);function ei(e,t,n){ti(e,t),t.set(e,n)}function ti(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ni(e,t){return e.get(oi(e,t))}function ri(e,t,n){return e.set(oi(e,t),n),n}function oi(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 ii=new WeakMap,si=new WeakMap,ai=new WeakMap,li=new WeakSet;class ui{constructor(){var e;ti(this,e=li),e.add(this),ei(this,ii,!0),ei(this,si,null),ei(this,ai,new ResizeObserver((e=>oi(li,this,hi).call(this,e))))}setObservedElement(e){ri(si,this,e)}unobserve(){ni(ai,this).unobserve(ni(si,this))}observe(){ri(ii,this,!0),ni(ai,this).observe(ni(si,this))}destroy(){ni(ai,this).disconnect()}}function hi(e){!ni(ii,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)})):ri(ii,this,!1)}function ci(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function di(e,t){return e.get(pi(e,t))}function mi(e,t,n){return e.set(pi(e,t),n),n}function pi(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")}(0,s.co)(ui,Zo.A);var fi=new WeakMap,gi=new WeakMap,yi=new WeakMap,wi=new WeakMap,vi=new WeakMap,_i=new WeakMap,bi=new WeakMap;class Si{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;ci(this,fi,void 0),ci(this,gi,!1),ci(this,yi,null),ci(this,wi,void 0),ci(this,vi,void 0),ci(this,_i,!0),ci(this,bi,new ui),mi(fi,this,e),mi(gi,this,t),mi(wi,this,this.createEditor()),mi(vi,this,di(wi,this).style),di(bi,this).setObservedElement(this.getInputElement()),di(bi,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){di(vi,this).left=`${e}px`,di(vi,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:(0,o.Gq)(this.getInputElement()),height:(0,o.DK)(this.getInputElement())}}observeSize(){di(bi,this).observe()}resetSize(){const e=this.getInputElement();e.style.width="",e.style.height=""}setReadOnlyState(e){this.getInputElement().readOnly=e}show(){di(vi,this).display="block",mi(_i,this,!1)}hide(){di(bi,this).unobserve(),di(_i,this)||(di(vi,this).display="none"),mi(_i,this,!0)}isVisible(){return"block"===di(vi,this).display}setValue(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"")||"";this.getInputElement().value=e}getValue(){return this.getInputElement().value}isFocused(){return di(fi,this).activeElement===this.getInputElement()}focus(){this.getInputElement().focus()}createEditor(){const e=di(fi,this).createElement("div"),t=di(fi,this).createElement("textarea");return e.style.display="none",mi(yi,this,di(fi,this).createElement("div")),di(yi,this).setAttribute("dir",di(gi,this)?"rtl":"ltr"),(0,o.iQ)(di(yi,this),Si.CLASS_EDITOR_CONTAINER),di(fi,this).body.appendChild(di(yi,this)),(0,o.iQ)(e,Si.CLASS_EDITOR),(0,o.iQ)(t,Si.CLASS_INPUT),t.setAttribute("data-hot-input",!0),e.appendChild(t),di(yi,this).appendChild(e),e}getInputElement(){return di(wi,this).querySelector(`.${Si.CLASS_INPUT}`)}getEditorElement(){return di(wi,this)}destroy(){const e=di(yi,this)?di(yi,this).parentNode:null;di(wi,this).parentNode.removeChild(di(wi,this)),mi(wi,this,null),mi(vi,this,null),di(bi,this).destroy(),e&&e.removeChild(di(yi,this))}}(0,s.co)(Si,Zo.A);const Ci=Si;function Ei(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Mi{constructor(e){Ei(this,"wasLastActionShow",!0),Ei(this,"showDebounced",null),Ei(this,"hidingTimer",null),this.updateDelay(e)}hide(){this.wasLastActionShow=!1,this.hidingTimer=setTimeout((()=>{!1===this.wasLastActionShow&&this.runLocalHooks("hide")}),250)}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]:250;this.showDebounced=(0,g.sg)((e=>{this.wasLastActionShow&&this.runLocalHooks("show",e.from.row,e.from.col)}),e)}destroy(){this.clearLocalHooks()}}(0,s.co)(Mi,Zo.A);const Ti=Mi,Ri="---------";function Ai(e,t){const n={};return(0,h.z0)(e,(e=>{e.forAll(((e,r)=>{e>=0&&r>=0&&(n[e]||(n[e]=[]),n[e][r]=t(e,r))}))})),n}function Ni(e,t,n,r,o){(0,h.z0)(e,(e=>{e.forAll(((e,i)=>{e>=0&&i>=0&&function(e,t,n,r,o,i){const s=o(e,t);let a=r;s.className&&(a="vertical"===n?function(e,t){return-1!==e.indexOf(t)?e:`${e.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ","")} ${t}`}(s.className,r):function(e,t){return-1!==e.indexOf(t)?e:`${e.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ","")} ${t}`}(s.className,r)),i(e,t,"className",a)}(e,i,t,n,r,o)}))}))}function Li(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}function xi(e,t){let n=!1;return Array.isArray(e)&&(0,h.z0)(e,(e=>(e.forAll(((e,r)=>{if(e>=0&&r>=0&&t(e,r))return n=!0,!1})),n))),n}function Oi(e,t){const n={top:0,left:0};if(t!==e.ownerDocument){const{frameElement:e}=t.defaultView,{top:r,left:o}=e.getBoundingClientRect();n.top=r,n.left=o}return n}function Ii(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 Di(e,t,n){return e.set(Hi(e,t),n),n}function Pi(e,t){return e.get(Hi(e,t))}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")}const Fi="comments",Yi="comment",Vi="value",Ui="style",Bi="readOnly",Wi=Fi,ji=`plugin:${Fi}`;var zi=new WeakMap,Gi=new WeakMap,$i=new WeakMap,Ki=new WeakMap,Xi=new WeakMap,qi=new WeakMap,Qi=new WeakSet;class Ji extends hn{constructor(){var e;super(...arguments),ki(this,e=Qi),e.add(this),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"range",{}),Ii(this,zi,null),Ii(this,Gi,null),Ii(this,$i,!1),Ii(this,Ki,!1),Ii(this,Xi,null),Ii(this,qi,"")}static get PLUGIN_KEY(){return Fi}static get PLUGIN_PRIORITY(){return 60}static get DEFAULT_SETTINGS(){return{displayDelay:250}}isEnabled(){return!!this.hot.getSettings()[Fi]}enablePlugin(){var e=this;this.enabled||(Pi(zi,this)||(Di(zi,this,new Ci(this.hot.rootDocument,this.hot.isRtl())),Pi(zi,this).addLocalHook("resize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hi(Qi,e,ss).call(e,...n)}))),Pi(Gi,this)||Di(Gi,this,new Ti(this.getSetting("displayDelay"))),this.addHook("afterContextMenuDefaultOptions",(e=>this.addToContextMenu(e))),this.addHook("afterRenderer",((e,t,n,r,o,i)=>Hi(Qi,this,rs).call(this,e,i))),this.addHook("afterScroll",(()=>Hi(Qi,this,ls).call(this))),this.addHook("afterBeginEditing",(()=>this.hide())),this.addHook("afterDocumentKeyDown",(e=>Hi(Qi,this,as).call(this,e))),this.addHook("beforeCompositionStart",(e=>Hi(Qi,this,as).call(this,e))),this.addHook("afterSetTheme",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Hi(Qi,e,us).call(e,...n)})),Pi(Gi,this).addLocalHook("hide",(()=>this.hide())),Pi(Gi,this).addLocalHook("show",((e,t)=>this.showAtCell(e,t))),this.registerShortcuts(),this.registerListeners(),super.enablePlugin())}updatePlugin(){Pi(Gi,this).updateDelay(this.getSetting("displayDelay")),super.updatePlugin()}disablePlugin(){this.unregisterShortcuts(),super.disablePlugin()}registerShortcuts(){const e=this.hot.getShortcutManager(),t=e.getContext("grid"),n=e.addContext(ji);t.addShortcut({keys:[["Control","Alt","M"]],callback:()=>{const t=this.hot.getSelectedRangeLast();Di(Ki,this,!0),this.hot.scrollToFocusedCell((()=>{this.setRange(t),this.show(),this.focusEditor(),e.setActiveContextName(ji),this.hot._registerTimeout((()=>{Di(Ki,this,!1)}))}))},stopPropagation:!0,runOnlyIf:()=>{var e;return null===(e=this.hot.getSelectedRangeLast())||void 0===e?void 0:e.highlight.isCell()},group:Wi}),n.addShortcut({keys:[["Escape"]],callback:()=>{Pi(zi,this).setValue(Pi(qi,this)),this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Pi(zi,this).isVisible()&&Pi(zi,this).isFocused(),group:Wi}),n.addShortcut({keys:[["Control/Meta","Enter"]],callback:()=>{this.hide(),e.setActiveContextName("grid")},runOnlyIf:()=>Pi(zi,this).isVisible()&&Pi(zi,this).isFocused(),group:Wi}),n.addShortcut({keys:[["Shift","Tab"],["Tab"]],forwardToContext:e.getContext("grid"),callback:()=>{Pi(zi,this).setValue(Pi(zi,this).getValue()),this.hide(),e.setActiveContextName("grid")},group:Wi})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Wi)}registerListeners(){const{rootDocument:e}=this.hot,t=this.getEditorInputElement();this.eventManager.addEventListener(e,"mouseover",(e=>Hi(Qi,this,ts).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>Hi(Qi,this,Zi).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Hi(Qi,this,ns).call(this))),this.eventManager.addEventListener(t,"focus",(()=>Hi(Qi,this,is).call(this))),this.eventManager.addEventListener(t,"blur",(()=>Hi(Qi,this,os).call(this))),this.eventManager.addEventListener(this.getEditorInputElement(),"mousedown",(e=>Hi(Qi,this,es).call(this,e)))}setRange(e){this.range=e}clearRange(){this.range={}}targetIsCellWithComment(e){const t=(0,o.kp)(e.target,"TD","TBODY");return!!(t&&(0,o.nB)(t,"htCommentCell")&&(0,o.kp)(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=Pi(zi,this).getValue();let n="";null!=e?n=e:null!=t&&(n=t);const r=this.range.from.row,o=this.range.from.col;this.updateCommentMeta(r,o,{[Vi]: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,Yi),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,Vi)}getCommentAtCell(e,t){return this.getCommentMeta(e,t,Vi)}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 Pi(Gi,this).cancelHiding(),Pi(zi,this).setValue(null!==(e=r[Yi]?r[Yi][Vi]:null)&&void 0!==e?e:""),Pi(zi,this).show(),this.refreshEditor(!0),!0}showAtCell(e,t){return this.setRange({from:this.hot._createCellCoords(e,t)}),this.show()}hide(){Pi(zi,this).hide()}refreshEditor(){if(!(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.range.from&&Pi(zi,this).isVisible()))return;const{rowIndexMapper:e,columnIndexMapper:t}=this.hot,{row:n,col:r}=this.range.from;let i=e.getRenderableFromVisualIndex(n),s=t.getRenderableFromVisualIndex(r);const a=null===i;Pi(zi,this).setPosition(0,0),null===i&&(i=e.getRenderableFromVisualIndex(e.getNearestNotHiddenIndex(n,-1))),null===s&&(s=t.getRenderableFromVisualIndex(t.getNearestNotHiddenIndex(r,-1)));const l=null===i,u=null===s;i=null!=i?i:0,s=null!=s?s:0;const{rootWindow:h,view:{_wt:c}}=this.hot,{wtTable:d}=c,m=c.getCell({row:i,col:s},!0),p=this.getCommentMeta(n,r,Ui);p?Pi(zi,this).setSize(p.width,p.height):Pi(zi,this).resetSize();const f=u?0:d.getColumnWidth(s),g=a&&!l?(0,o.DK)(m):0,{left:y,top:w,width:v,height:_}=m.getBoundingClientRect(),{width:b,height:S}=Pi(zi,this).getSize(),{innerWidth:C,innerHeight:E}=this.hot.rootWindow,M=this.hot.rootDocument.documentElement,T=(0,o.XJ)(this.hot.rootDocument),R=(0,o.D1)(this.hot.rootWindow)?T:0,A=(0,o.zO)(this.hot.rootWindow)?T:0;let N=y+h.scrollX+f,L=w+h.scrollY+g;this.hot.isRtl()&&(N-=b+f),this.hot.isLtr()&&y+v+b>C-R?N=y+h.scrollX-b-1:this.hot.isRtl()&&N<-(M.scrollWidth-M.clientWidth)&&(N=y+h.scrollX+f+1),w+S>E-A&&(L-=S-_+1),Pi(zi,this).setPosition(N,L),Pi(zi,this).setReadOnlyState(this.getCommentMeta(n,r,Bi)),Pi(zi,this).observeSize()}focusEditor(){Pi(zi,this).focus()}updateCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t)[Yi];let o;r?(o=(0,s.Go)(r),(0,s.zw)(o,n)):o=n,this.hot.setCellMeta(e,t,Yi,o)}getCommentMeta(e,t,n){const r=this.hot.getCellMeta(e,t);if(r[Yi])return r[Yi][n]}addToContextMenu(e){var t;e.items.push({name:Ri},(t=this,{key:"commentsAddEdit",name(){var e;const n=null===(e=this.getSelectedRangeLast())||void 0===e?void 0:e.highlight;return null!=n&&n.isCell()&&t.getCommentAtCell(n.row,n.col)?this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_EDIT_COMMENT):this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ADD_COMMENT)},callback(){const e=this.getSelectedRangeLast();t.setRange(e),t.show(),t.focusEditor()},disabled(){const e=this.getSelectedRangeLast();return!!(!e||e.highlight.isHeader()||this.selection.isEntireRowSelected()&&this.selection.isEntireColumnSelected()||0===this.countRenderedRows()||0===this.countRenderedCols())}}),function(e){return{key:"commentsRemove",name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_REMOVE_COMMENT)},callback(){this.getSelectedRangeLast().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())}}}(this),function(e){return{key:"commentsReadOnly",name(){const t=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT);return xi(this.getSelectedRange(),((t,n)=>e.getCommentMeta(t,n,Bi)))?Li(t):t},callback(){this.getSelectedRangeLast().forAll(((t,n)=>{if(t>=0&&n>=0){const r=!!e.getCommentMeta(t,n,Bi);e.updateCommentMeta(t,n,{[Bi]:!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())}}}(this))}getEditorInputElement(){return Pi(zi,this).getInputElement()}destroy(){var e,t;null===(e=Pi(zi,this))||void 0===e||e.destroy(),null===(t=Pi(Gi,this))||void 0===t||t.destroy(),super.destroy()}}function Zi(e){if(this.hot.view&&this.hot.view._wt&&!Pi($i,this)&&!this.targetIsCommentTextArea(e)){const t=(0,o.kp)(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 es(e){e.stopPropagation()}function ts(e){const{rootDocument:t}=this.hot;if(!(Pi($i,this)||Pi(zi,this).isFocused()||(0,o.nB)(e.target,"wtBorder")||Pi(Xi,this)===e.target)&&Pi(zi,this))if(Di(Xi,this,t.elementFromPoint(e.clientX,e.clientY)),this.targetIsCellWithComment(e)){const t=this.hot._createCellRange(this.hot.getCoords(e.target));Pi(Gi,this).show(t)}else(0,o.aO)(e.target,t)&&!this.targetIsCommentTextArea(e)&&Pi(Gi,this).hide()}function ns(){Di($i,this,!1)}function rs(e,t){t[Yi]&&t[Yi][Vi]&&(0,o.iQ)(e,t.commentedCellClassName)}function os(){Di(qi,this,""),this.hot.getShortcutManager().setActiveContextName("grid"),this.setComment()}function is(){Di(qi,this,this.getComment()),this.hot.listen(),this.hot.getShortcutManager().setActiveContextName(ji)}function ss(e,t){this.updateCommentMeta(this.range.from.row,this.range.from.col,{[Ui]:{width:e,height:t}})}function as(e){Pi(zi,this).isFocused()&&(0,i.CA)(e)}function ls(){Pi(Ki,this)||this.hide()}function us(){const e=Pi(zi,this).getEditorElement();(0,o.vy)(e,/ht-theme-.*/g),(0,o.iQ)(e,this.hot.getCurrentThemeName())}function hs(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(13609);class cs{constructor(e){hs(this,"hot",void 0),hs(this,"commands",{}),hs(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 o=e.split(":"),i=o[0],a=2===o.length?o[1]:null;let l=this.commands[i];if(!l)throw new Error(`Menu command '${i}' not exists.`);if(a&&l.submenu&&(l=function(e,t){let n;return(0,h.z0)(t,(t=>{const r=t.key?t.key.split(":"):null;if(Array.isArray(r)&&r[1]===e)return n=t,!1})),n}(a,l.submenu.items)),!0===l.disabled)return;if("function"==typeof l.disabled&&!0===l.disabled.call(this.hot))return;if((0,s.mQ)(l,"submenu"))return;const u=[];"function"==typeof l.callback&&u.push(l.callback),"function"==typeof this.commonCallback&&u.push(this.commonCallback),n.unshift(o.join(":")),(0,h.z0)(u,(e=>e.apply(this.hot,n)))}}const ds="alignment",ms="clear_column",ps="col_left",fs="col_right",gs="make_read_only",ys="redo";var ws=n(76396);const vs="remove_col",_s="remove_row",bs="row_above",Ss="row_below",Cs="no_items",Es="undo",Ms=[bs,Ss,ps,fs,ms,_s,vs,Es,ys,gs,ds,Ri,Cs],Ts={[Ri]:function(){return{name:Ri}},[Cs]:function(){return{key:Cs,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_NO_ITEMS)},disabled:!0,isCommand:!1}},[bs]:function(){return{key:bs,name(){return this.getTranslatedPhrase(Ee.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();return!!(!e||this.selection.isSelectedByColumnHeader()||e.isSingleHeader()&&e.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)||!!this.selection.isSelectedByCorner()&&0===this.countRows()},hidden(){return!this.getSettings().allowInsertRow}}},[Ss]:function(){return{key:Ss,name(){return this.getTranslatedPhrase(Ee.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||this.selection.isSelectedByColumnHeader()||e.isSingleHeader()&&e.highlight.row<0||this.countSourceRows()>=this.getSettings().maxRows)},hidden(){return!this.getSettings().allowInsertRow}}},[ps]:function(){return{key:ps,name(){return this.getTranslatedPhrase(Ee.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();return!!(!e||this.selection.isSelectedByRowHeader()||e.isSingleHeader()&&e.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)||!!this.selection.isSelectedByCorner()&&0===this.countCols()},hidden(){return!this.getSettings().allowInsertColumn}}},[fs]:function(){return{key:fs,name(){return this.getTranslatedPhrase(Ee.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||this.selection.isSelectedByRowHeader()||e.isSingleHeader()&&e.highlight.col<0||this.countSourceCols()>=this.getSettings().maxCols)},hidden(){return!this.getSettings().allowInsertColumn}}},[ms]:function(){return{key:ms,name(){return this.getTranslatedPhrase(Ee.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();if(!e||e.isSingleHeader()&&e.highlight.col<0||!this.selection.isSelectedByColumnHeader())return!0;let t=!1;return e.forAll(((e,n)=>{if(e<0||n<0)return!0;const{readOnly:r}=this.getCellMeta(e,n);return!!r||(t=!0,!1)})),!t}}},[_s]:function(){return{key:_s,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(Ee.CONTEXTMENU_ITEMS_REMOVE_ROW,t)},callback(){this.alter("remove_row",(0,ws.f7)(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}}},[vs]:function(){return{key:vs,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(Ee.CONTEXTMENU_ITEMS_REMOVE_COLUMN,t)},callback(){this.alter("remove_col",(0,ws.NB)(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}}},[Es]:function(){return{key:Es,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_UNDO)},callback(){this.getPlugin("undoRedo").undo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isUndoAvailable()}}},[ys]:function(){return{key:ys,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_REDO)},callback(){this.getPlugin("undoRedo").redo()},hidden(){const e=this.getPlugin("undoRedo");return!e||!e.isEnabled()},disabled(){return!this.getPlugin("undoRedo").isRedoAvailable()}}},[gs]:function(){return{key:gs,checkable:!0,ariaChecked(){return xi(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))},ariaLabel(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_READ_ONLY)},name(){let e=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_READ_ONLY);return xi(this.getSelectedRange(),((e,t)=>this.getCellMeta(e,t).readOnly))&&(e=Li(e)),e},callback(){const e=this.getSelectedRange(),t=xi(e,((e,t)=>this.getCellMeta(e,t).readOnly));(0,h.z0)(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)}}},[ds]:function(){return{key:ds,name(){return this.getTranslatedPhrase(Ee.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:`${ds}:left`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",r="htLeft";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{key:`${ds}:center`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",r="htCenter";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{key:`${ds}:right`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",r="htRight";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{key:`${ds}:justify`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="horizontal",r="htJustify";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{name:Ri},{key:`${ds}:top`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_TOP)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",r="htTop";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{key:`${ds}:middle`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",r="htMiddle";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1},{key:`${ds}:bottom`,name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM)},callback(){const e=this.getSelectedRange(),t=Ai(e,((e,t)=>this.getCellMeta(e,t).className)),n="vertical",r="htBottom";this.runHooks("beforeCellAlignment",t,e,n,r),Ni(e,n,r,((e,t)=>this.getCellMeta(e,t)),((e,t,n,r)=>this.setCellMeta(e,t,n,r))),this.render()},disabled:!1}]}}}};function Rs(){const e={};return(0,s.v4)(Ts,((t,n)=>{e[n]=t()})),e}function As(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ns{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;As(this,"hot",void 0),As(this,"predefinedItems",Rs()),As(this,"defaultOrderPattern",void 0),this.hot=e,this.defaultOrderPattern=t}setPredefinedItems(e){const t={};this.defaultOrderPattern.length=0,(0,s.v4)(e,((e,n)=>{let r="";e.name===Ri?(t[Ri]=e,r=Ri):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(){return function(){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const n=[];let r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return r&&r.items?r=r.items:Array.isArray(r)||(r=e),(0,s.Gv)(r)?(0,s.v4)(r,((e,r)=>{let o=t["string"==typeof e?e:r];o||(o=e),(0,s.Gv)(e)?(0,s.X$)(o,e):"string"==typeof o&&(o={name:o}),void 0===o.key&&(o.key=r),n.push(o)})):(0,h.z0)(r,((e,r)=>{let o=t[e];!o&&Ms.indexOf(e)>=0||(o||(o={name:e,key:`${r}`}),(0,s.Gv)(e)&&(0,s.X$)(o,e),void 0===o.key&&(o.key=r),n.push(o))})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,this.defaultOrderPattern,this.predefinedItems)}}function Ls(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class xs{constructor(e,t){Ls(this,"top",void 0),Ls(this,"topRelative",void 0),Ls(this,"left",void 0),Ls(this,"leftRelative",void 0),Ls(this,"scrollTop",void 0),Ls(this,"scrollLeft",void 0),Ls(this,"cellHeight",void 0),Ls(this,"cellWidth",void 0);const n=t.scrollY,r=t.scrollX;let o,i,s,a,l,u;this.rootWindow=t,this.type=this.getSourceType(e),"literal"===this.type?(o=parseInt(e.top,10),s=parseInt(e.left,10),l=e.height||0,u=e.width||0,i=o,a=s,o+=n,s+=r):"event"===this.type&&(o=parseInt(e.pageY,10),s=parseInt(e.pageX,10),l=e.target.clientHeight,u=e.target.clientWidth,i=o-n,a=s-r),this.top=o,this.topRelative=i,this.left=s,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 Os(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Is(e,t){return e.get(Ds(e,t))}function ks(e,t,n){return e.set(Ds(e,t),n),n}function Ds(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 WeakMap,Hs=new WeakMap,Fs=new WeakMap,Ys=new WeakMap,Vs=new WeakMap;class Us{constructor(e){Os(this,Ps,void 0),Os(this,Hs,void 0),Os(this,Fs,void 0),Os(this,Ys,!1),Os(this,Vs,{above:0,below:0,left:0,right:0}),ks(Ys,this,e)}setOffset(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Is(Vs,this)[e]=t,this}setElement(e){return ks(Ps,this,e),this}setParentElement(e){return ks(Hs,this,e),this}updatePosition(e){ks(Fs,this,new xs(e,Is(Ps,this).ownerDocument.defaultView)),Is(Ys,this)?(Is(Fs,this).fitsBelow(Is(Ps,this))?this.setPositionBelowCursor():Is(Fs,this).fitsAbove(Is(Ps,this))?this.setPositionAboveCursor():this.setPositionBelowCursor(),this.updateHorizontalPosition()):(this.setPositionBelowCursor(),this.setPositionOnRightOfCursor())}updateHorizontalPosition(){"rtl"===Is(Ps,this).dir?Is(Fs,this).fitsOnLeft(Is(Ps,this))?this.setPositionOnLeftOfCursor():this.setPositionOnRightOfCursor():Is(Fs,this).fitsOnRight(Is(Ps,this))?this.setPositionOnRightOfCursor():this.setPositionOnLeftOfCursor()}setPositionAboveCursor(){let e=Is(Vs,this).above+Is(Fs,this).top-Is(Ps,this).offsetHeight;if(Is(Hs,this)){const t=Is(Hs,this).ownerDocument.defaultView.getComputedStyle(Is(Hs,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),r=Number.parseInt(t.borderTop,10);e=Is(Fs,this).top+Is(Fs,this).cellHeight-Is(Ps,this).scrollHeight+n+r}Is(Ps,this).style.top=`${e}px`}setPositionBelowCursor(){let e=Is(Vs,this).below+Is(Fs,this).top+1;if(Is(Hs,this)){const t=Is(Hs,this).ownerDocument.defaultView.getComputedStyle(Is(Hs,this).querySelector(".ht_master")),n=Number.parseInt(t.paddingTop,10),r=Number.parseInt(t.borderTop,10);e=Is(Fs,this).top-n-r-1}Is(Ps,this).style.top=`${e}px`}setPositionOnRightOfCursor(){let e=Is(Fs,this).left;if(Is(Hs,this)){const t=Is(Hs,this).ownerDocument.defaultView,n=Number.parseInt(t.getComputedStyle(Is(Hs,this).querySelector(".htCore")).borderRightWidth,10);e+=Is(Fs,this).cellWidth+n}else e+=Is(Vs,this).right;Is(Ps,this).style.left=`${e}px`}setPositionOnLeftOfCursor(){let e=Is(Vs,this).left+Is(Fs,this).left-Is(Ps,this).offsetWidth;if(Is(Hs,this)){const t=Is(Hs,this).ownerDocument.defaultView;e-=Number.parseInt(t.getComputedStyle(Is(Hs,this).querySelector(".htCore")).borderLeftWidth,10)}Is(Ps,this).style.left=`${e}px`}}function Bs(e){let{initialPage:t=-1,size:n=()=>0,onItemSelect:r=()=>{},onClear:o=()=>{}}=e;const i=new Set;let s=(0,Mt.qE)(t,-1,l()-1);function a(e,t){const n=l()-1;return e<0&&(e=n),e>n&&(e=0),i.has(e)?-1:(i.add(e),!1===r(e,!1)&&(e=a(1===t?++e:--e,t)),e)}function l(){return Math.max(n(),0)}return{setCurrentPage:function(e){e>-1&&e<l()&&!1!==r(e,!0)&&(s=e)},getCurrentPage:function(){return s},toFirstItem:function(){l()>0&&(i.clear(),s=a(0,1))},toLastItem:function(){l()>0&&(i.clear(),s=a(l()-1,-1))},toNextItem:function(){l()>0&&(i.clear(),s=a(++s,1))},toPreviousItem:function(){l()>0&&(i.clear(),s=a(--s,-1))},getSize:l,clear:function(){i.clear(),s=t,o()}}}function Ws(e){return(0,s.mQ)(e,"submenu")}function js(e){return new RegExp(Ri,"i").test(e.name)}function zs(e,t){return!0===e.disabled||"function"==typeof e.disabled&&!0===e.disabled.call(t)}function Gs(e){return(0,s.mQ)(e,"disableSelection")}function $s(e,t){const n=e.slice(0);for(let e=0;e<n.length&&n[e].name===t;)n.shift();return n}const Ks="menu",Xs=Ks;function qs(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Qs(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Js(e,t,n){return e.set(ea(e,t),n),n}function Zs(e,t){return e.get(ea(e,t))}function ea(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 ta=new WeakMap,na=new WeakMap,ra=new WeakMap;class oa{get tableBorderWidth(){return void 0===Zs(ra,this)&&this.hotMenu&&Js(ra,this,parseInt(this.hotMenu.rootWindow.getComputedStyle(this.hotMenu.view._wt.wtTable.TABLE).borderWidth,10)),Zs(ra,this)}constructor(e,t){var n=this;Qs(this,"hot",void 0),Qs(this,"options",void 0),Qs(this,"eventManager",new _e.A(this)),Qs(this,"container",void 0),Qs(this,"positioner",void 0),Qs(this,"hotMenu",null),Qs(this,"hotSubMenus",{}),Qs(this,"parentMenu",void 0),Qs(this,"menuItems",null),Qs(this,"origOutsideClickDeselects",null),qs(this,ta,void 0),qs(this,na,void 0),qs(this,ra,void 0),this.hot=e,this.options=t||{parent:null,name:null,className:"",keepInViewport:!0,standalone:!1,minWidth:215,container:this.hot.rootDocument.documentElement},this.container=this.createContainer(this.options.name),this.positioner=new Us(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)})),this.hot.addHook("afterSetTheme",((e,t)=>{var n;t||null===(n=this.hotMenu)||void 0===n||n.useTheme(e)}))}registerEvents(){let e=this.hot.rootWindow;for(;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=(0,o.Ly)(e)}setMenuItems(e){this.menuItems=e}getNavigator(){return Zs(ta,this)}getKeyboardShortcutsCtrl(){return Zs(na,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=(0,g.sg)((e=>this.openSubMenu(e)),300),t=this.options.minWidth||215;let n=!1,r=(0,h.y0)(this.menuItems,(e=>(e.key===Cs&&(n=!0),function(e,t){return!e.hidden||!("function"==typeof e.hidden&&e.hidden.call(t))}(e,this.hot))));if(r.length<1&&!n)r.push(Rs()[Cs]);else if(0===r.length)return;r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ri,n=e.slice(0);return n=$s(n,t),n=function(e,t){let n=e.slice(0);return n.reverse(),n=$s(n,t),n.reverse(),n}(n,t),n=function(e){const t=[];return(0,h.z0)(e,((e,n)=>{n>0?t[t.length-1].name!==e.name&&t.push(e):t.push(e)})),t}(n),n}(r,Ri);let s=!1;const a={data:r,colHeaders:!1,autoColumnSize:!0,autoWrapRow:!1,modifyColWidth:e=>(0,c.O9)(e)&&e<t?t:e,autoRowSize:!1,readOnly:!0,editor:!1,copyPaste:!1,hiddenRows:!0,maxCols:1,columns:[{data:"name",renderer:(l=this.hot,(e,t,n,r,i,s)=>{const a=e.getSourceDataAtRow(n),u=l.rootDocument.createElement("div"),h="function"==typeof s?s.call(l):s,c="function"==typeof a.ariaLabel?a.ariaLabel.call(l):a.ariaLabel,d="function"==typeof a.ariaChecked?a.ariaChecked.call(l):a.ariaChecked;if((0,o.Ie)(t),(0,o.iQ)(u,"htItemWrapper"),l.getSettings().ariaTags){const e=!zs(a,l)&&!Gs(a)&&!js(a);(0,o.Bq)(t,[...(m=a,!0===m.checkable?[(0,f.pt)(),(0,f.SM)(c),(0,f.Xq)(d)]:[(0,f.ZA)(),(0,f.SM)(h)]),...e?[(0,f.vC)(-1)]:[],...zs(a,l)?[(0,f._R)()]:[],...Ws(a)?[(0,f.dV)(!1)]:[]])}var m;t.className="",t.appendChild(u),js(a)?(0,o.iQ)(t,"htSeparator"):"function"==typeof a.renderer?((0,o.iQ)(t,"htCustomMenuRenderer"),t.appendChild(a.renderer(e,u,n,r,i,h))):(0,o.Mv)(u,h),zs(a,l)?(0,o.iQ)(t,"htDisabled"):Gs(a)?(0,o.iQ)(t,"htSelectionDisabled"):Ws(a)&&(0,o.iQ)(t,"htSubmenu")})}],renderAllRows:!0,fragmentSelection:!1,outsideClickDeselects:!1,disableVisualSelection:"area",layoutDirection:this.hot.isRtl()?"rtl":"ltr",ariaTags:!1,themeName:this.hot.getCurrentThemeName(),beforeRefreshDimensions:()=>!1,beforeOnCellMouseOver:(e,t)=>{Zs(ta,this).setCurrentPage(t.row)},afterOnCellMouseOver:(t,n)=>{this.isAllSubMenusClosed()?e(n.row):this.openSubMenu(n.row)},afterOnCellContextMenu:e=>{e.preventDefault(),(0,te.Yh)()&&s&&this.hasSelectedItem()&&this.close(!0)},afterSelection:(e,t,n,r,o)=>{this.hotMenu.view.isMouseDown()&&(o.value=!0),this.runLocalHooks("afterSelectionChange",this.getSelectedItem())},beforeOnCellMouseUp:e=>{this.hasSelectedItem()&&(s=!this.isCommandPassive(this.getSelectedItem()),this.executeCommand(e))},afterOnCellMouseUp:e=>{(0,te.Yh)()&&(0,i.nO)(e)||!s||!this.hasSelectedItem()||((0,te.rr)()||(0,te.zG)()?this.hot._registerTimeout((()=>this.close(!0)),325):this.close(!0))},afterUnlisten:()=>{!this.hasSelectedItem()&&this.isOpened()&&this.hotMenu.listen()}};var l,u;this.origOutsideClickDeselects=this.hot.getSettings().outsideClickDeselects,this.hot.getSettings().outsideClickDeselects=!1,this.hotMenu=new this.hot.constructor(this.container,a),this.hotMenu.addHook("afterInit",(()=>this.onAfterInit())),this.hotMenu.init(),Js(ta,this,(u=this.hotMenu,Bs({size:()=>u.countRows(),onItemSelect(e,t){const n=u.getCell(e,0);if(!n||function(e){return(0,o.nB)(e,"htSeparator")}(n)||function(e){return(0,o.nB)(e,"htDisabled")}(n)||function(e){return(0,o.nB)(e,"htSelectionDisabled")}(n))return!1;u.selectCell(e,0,...t?[e,0,!1,!1]:[])},onClear(){u.deselectCell()}}))),Js(na,this,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];const n=[];function r(e,t){s(t).addShortcuts(e,{group:Ks})}function o(e,t){const o=s(t);e.forEach((e=>{let{keys:t}=e;t.forEach((e=>o.removeShortcutsByKeys(e)))})),n.push({shortcuts:e,contextName:t}),r(e,t)}function i(e){return e?`${Xs}:${e}`:Xs}function s(t){var n;const r=e.hotMenu.getShortcutManager(),o=i(t);return null!==(n=r.getContext(o))&&void 0!==n?n:r.addContext(o)}return r(function(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 o=t.getSettings(),i="function"==typeof o.tabMoves?o.tabMoves(n):o.tabMoves;r.includes("shift")?t.selection.transformStart(-i.row,-i.col):t.selection.transformStart(i.row,i.col),e.close(!0)}},{keys:[["Escape"]],callback:()=>e.close()},{keys:[["ArrowDown"]],callback:()=>e.getNavigator().toNextItem()},{keys:[["ArrowUp"]],callback:()=>e.getNavigator().toPreviousItem()},{keys:[[t.isRtl()?"ArrowLeft":"ArrowRight"]],callback:()=>{const t=n.getSelectedLast();if(t){const n=e.openSubMenu(t[0]);n&&n.getNavigator().toFirstItem()}}},{keys:[[t.isRtl()?"ArrowRight":"ArrowLeft"]],callback:()=>{n.getSelectedLast()&&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:()=>{n.getSelectedLast()?n.selection.transformStart(-n.countVisibleRows(),0):e.getNavigator().toFirstItem()}},{keys:[["PageDown"]],callback:()=>{n.getSelectedLast()?n.selection.transformStart(n.countVisibleRows(),0):e.getNavigator().toLastItem()}}]}(e)),t.forEach((e=>{let{shortcuts:t,contextName:n}=e;o(t,n)})),{addCustomShortcuts:o,getCustomShortcuts:function(){return[...n]},getContext:s,listen:function(t){e.hotMenu.getShortcutManager().setActiveContextName(i(t))}}}(this)),Zs(na,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(Zs(ta,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);(0,o.Bq)(t,[(0,f.dV)(!1)])}}this.parentMenu.hotMenu.listen()}}openSubMenu(e){if(!this.hotMenu)return!1;const t=this.hotMenu.getCell(e,0);if(this.closeAllSubMenus(),!t||!function(e){return(0,o.nB)(e,"htSubmenu")}(t))return!1;const n=this.hotMenu.getSourceDataAtRow(e),r=new oa(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&&(0,o.Bq)(t,[(0,f.dV)(!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&&(0,o.Bq)(r,[(0,f.dV)(!1)])}}closeAllSubMenus(){(0,h.z0)(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?function(e){return(0,h.YD)(e,(e=>({start:e.getTopStartCorner(),end:e.getBottomEndCorner()})))}(n):[];this.runLocalHooks("executeCommand",t.key,r,e),this.isSubMenu()&&this.parentMenu.runLocalHooks("executeCommand",t.key,r,e)}isCommandPassive(e){return!1===e.isCommand||js(e)||zs(e,this.hot)||Ws(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 e=this.hotMenu.view.getStylesHandler(),{wtTable:t}=this.hotMenu.view._wt,n=this.hotMenu.getSettings().data,r=t.hider.style,i=t.holder.style,s=parseInt(r.width,10),a=(0,h.mu)(n,((e,t,n)=>{const r=this.hotMenu.getCell(n,0)?(0,o.DK)(this.hotMenu.getCell(n,0)):0;return e+(t.name===Ri?1:r)}),0);e.isClassicTheme()?(i.width=`${s+3}px`,i.height=`${a+3}px`):(i.width=`${s}px`,i.height=`${a}px`),r.height=i.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&&((0,g.Tn)(r)&&(r=r.call(this.hot),r=null===r||(0,c.b0)(r)?"":r.toString()),r=r.replace(/[^A-Za-z0-9]/g,"_"),r=`${this.options.className}Sub_${r}`,n=t.querySelector(`.${this.options.className}.${r}`)),n||(n=t.createElement("div"),(0,o.iQ)(n,`htMenu handsontable ${this.options.className}`),r&&(0,o.iQ)(n,r),this.options.container.appendChild(n)),n}onAfterInit(){this.updateMenuDimensions(),this.hot.getSettings().ariaTags&&(0,o.Bq)(this.hotMenu.rootElement,[(0,f.nF)(),(0,f.vC)(-1)])}onDocumentMouseDown(e){this.isOpened()&&(this.options.standalone&&this.hotMenu&&!(0,o.aO)(e.target,this.hotMenu.rootElement)?this.close(!0):!this.isAllSubMenusClosed()&&!this.isSubMenu()||(0,o.aO)(e.target,".htMenu")||this.close(!0))}onDocumentContextMenu(e){this.isOpened()&&(0,o.nB)(e.target,"htCore")&&(0,o.aO)(e.target,this.hotMenu.rootElement)&&e.preventDefault()}}function ia(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function sa(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")}(0,s.co)(oa,Zo.A);const aa="contextMenu",la=aa;Ce.R.getSingleton().register("afterContextMenuDefaultOptions"),Ce.R.getSingleton().register("beforeContextMenuShow"),Ce.R.getSingleton().register("afterContextMenuShow"),Ce.R.getSingleton().register("afterContextMenuHide"),Ce.R.getSingleton().register("afterContextMenuExecute");var ua=new WeakSet;class ha extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=ua),t.add(e),ia(this,"commandExecutor",new cs(this.hot)),ia(this,"itemsFactory",null),ia(this,"menu",null)}static get PLUGIN_KEY(){return aa}static get PLUGIN_PRIORITY(){return 70}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[bs,Ss,Ri,ps,fs,Ri,_s,vs,Ri,Es,ys,Ri,gs,Ri,ds]}isEnabled(){return!!this.hot.getSettings()[aa]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[aa];"function"==typeof t.callback&&this.commandExecutor.setCommonCallback(t.callback),this.menu=new oa(this.hot,{className:"htContextMenu",keepInViewport:!0,container:t.uiContainer||this.hot.rootDocument.body}),this.menu.addLocalHook("beforeOpen",(()=>sa(ua,this,da).call(this))),this.menu.addLocalHook("afterOpen",(()=>sa(ua,this,ma).call(this))),this.menu.addLocalHook("afterClose",(()=>sa(ua,this,pa).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=>sa(ua,this,ca).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=Oi(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:la})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(la)}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;(0,s.v4)(n,((e,t)=>{const n=["below","right"].includes(t)?e+1:e-1;this.menu.setOffset(t,r?e:n)})),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 Ns(this.hot,ha.DEFAULT_ITEMS);const e=this.hot.getSettings()[aa],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),(0,h.z0)(n,(e=>this.commandExecutor.registerCommand(e.key,e)))}destroy(){this.close(),this.menu&&this.menu.destroy(),super.destroy()}}function ca(e){const t=this.hot.getSettings(),n=t.rowHeaders,r=t.colHeaders,i=e.target;if(this.close(),(0,o.nB)(i,"handsontableInput"))return;if(e.preventDefault(),e.stopPropagation(),!n&&!r&&!(function(e){return"TD"===e.nodeName||"TD"===e.parentNode.nodeName}(i)||(0,o.nB)(i,"current")&&(0,o.nB)(i,"wtBorder")))return;const s=Oi(this.menu.container,this.hot.rootDocument);this.open({top:e.clientY+s.top,left:e.clientX+s.left})}function da(){this.hot.runHooks("beforeContextMenuShow",this)}function ma(){this.hot.runHooks("afterContextMenuShow",this)}function pa(){this.hot.listen(),this.hot.runHooks("afterContextMenuHide",this)}ha.SEPARATOR={name:Ri};var fa=n(13431);class ga{constructor(){this.data={}}setData(e,t){this.data[e]=t}getData(e){return this.data[e]||void 0}}class ya{constructor(){this.clipboardData=new ga}preventDefault(){}composedPath(){return[]}}function wa(e,t,n){va(e,t),t.set(e,n)}function va(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _a(e,t){return e.get(Sa(e,t))}function ba(e,t,n){return e.set(Sa(e,t),n),n}function Sa(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 Ca=new WeakMap,Ea=new WeakMap,Ma=new WeakMap,Ta=new WeakMap,Ra=new WeakMap,Aa=new WeakMap,Na=new WeakSet;class La{constructor(e){let{countRows:t,countColumns:n,rowsLimit:r,columnsLimit:o,countColumnHeaders:i}=e;var s;va(this,s=Na),s.add(this),wa(this,Ca,void 0),wa(this,Ea,void 0),wa(this,Ma,void 0),wa(this,Ta,void 0),wa(this,Ra,void 0),wa(this,Aa,void 0),ba(Ea,this,t),ba(Ma,this,n),ba(Ta,this,r),ba(Ra,this,o),ba(Aa,this,i)}setSelectedRange(e){ba(Ca,this,e)}getCellsRange(){if(0===_a(Ea,this).call(this)||0===_a(Ma,this).call(this))return null;const{row:e,col:t}=_a(Ca,this).getTopStartCorner(),{row:n,col:r}=_a(Ca,this).getBottomEndCorner(),o=Sa(Na,this,Oa).call(this,e,n),i=Sa(Na,this,xa).call(this,t,r);return{isRangeTrimmed:n!==o||r!==i,startRow:e,startCol:t,endRow:o,endCol:i}}getMostBottomColumnHeadersRange(){if(0===_a(Ma,this).call(this)||0===_a(Aa,this).call(this))return null;const{col:e}=_a(Ca,this).getTopStartCorner(),{col:t}=_a(Ca,this).getBottomEndCorner(),n=Sa(Na,this,xa).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-1,startCol:e,endRow:-1,endCol:n}}getAllColumnHeadersRange(){if(0===_a(Ma,this).call(this)||0===_a(Aa,this).call(this))return null;const{col:e}=_a(Ca,this).getTopStartCorner(),{col:t}=_a(Ca,this).getBottomEndCorner(),n=Sa(Na,this,xa).call(this,e,t);return{isRangeTrimmed:t!==n,startRow:-_a(Aa,this).call(this),startCol:e,endRow:-1,endCol:n}}}function xa(e,t){return Math.min(t,Math.max(e+_a(Ra,this).call(this)-1,e))}function Oa(e,t){return Math.min(t,Math.max(e+_a(Ta,this).call(this)-1,e))}function Ia(e){const t=[],n=[];return(0,h.z0)(e,(e=>{const r=Math.min(e.startRow,e.endRow),o=Math.max(e.startRow,e.endRow);(0,Mt.Ti)(r,o,(e=>{-1===t.indexOf(e)&&t.push(e)}));const i=Math.min(e.startCol,e.endCol),s=Math.max(e.startCol,e.endCol);(0,Mt.Ti)(i,s,(e=>{-1===n.indexOf(e)&&n.push(e)}))})),{rows:t,columns:n}}var ka=n(22257);function Da(e,t,n){Pa(e,t),t.set(e,n)}function Pa(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ha(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fa(e,t){return e.get(Va(e,t))}function Ya(e,t,n){return e.set(Va(e,t),n),n}function Va(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")}Ce.R.getSingleton().register("afterCopyLimit"),Ce.R.getSingleton().register("modifyCopyableRange"),Ce.R.getSingleton().register("beforeCut"),Ce.R.getSingleton().register("afterCut"),Ce.R.getSingleton().register("beforePaste"),Ce.R.getSingleton().register("afterPaste"),Ce.R.getSingleton().register("beforeCopy"),Ce.R.getSingleton().register("afterCopy");const Ua="copyPaste",Ba=["fragmentSelection"],Wa=['<meta name="generator" content="Handsontable"/>','<style type="text/css">td{white-space:normal}br{mso-data-placement:same-cell}</style>'].join("");var ja=new WeakMap,za=new WeakMap,Ga=new WeakMap,$a=new WeakMap,Ka=new WeakMap,Xa=new WeakMap,qa=new WeakMap,Qa=new WeakMap,Ja=new WeakSet;class Za extends hn{constructor(){var e;super(...arguments),Pa(this,e=Ja),e.add(this),Ha(this,"columnsLimit",1/0),Ha(this,"rowsLimit",1/0),Ha(this,"pasteMode","overwrite"),Ha(this,"uiContainer",this.hot.rootDocument.body),Da(this,ja,!1),Da(this,za,!1),Da(this,Ga,!1),Da(this,$a,"cells-only"),Da(this,Ka,!1),Da(this,Xa,!1),Da(this,qa,new La({countRows:()=>this.hot.countRows(),countColumns:()=>this.hot.countCols(),rowsLimit:()=>this.rowsLimit,columnsLimit:()=>this.columnsLimit,countColumnHeaders:()=>this.hot.view.getColumnHeadersCount()})),Da(this,Qa,!1),Ha(this,"copyableRanges",[])}static get PLUGIN_KEY(){return Ua}static get SETTING_KEYS(){return[Ua,...Ba]}static get PLUGIN_PRIORITY(){return 80}static get DEFAULT_SETTINGS(){return{pasteMode:"overwrite",rowsLimit:1/0,columnsLimit:1/0,copyColumnHeaders:!1,copyColumnGroupHeaders:!1,copyColumnHeadersOnly:!1}}isEnabled(){return!!this.hot.getSettings()[Ua]}enablePlugin(){var e,t,n=this;this.enabled||(this.pasteMode=null!==(e=this.getSetting("pasteMode"))&&void 0!==e?e:this.pasteMode,this.rowsLimit=isNaN(this.getSetting("rowsLimit"))?this.rowsLimit:this.getSetting("rowsLimit"),this.columnsLimit=isNaN(this.getSetting("columnsLimit"))?this.columnsLimit:this.getSetting("columnsLimit"),Ya(ja,this,this.getSetting("copyColumnHeaders")),Ya(za,this,this.getSetting("copyColumnGroupHeaders")),Ya(Ga,this,this.getSetting("copyColumnHeadersOnly")),this.uiContainer=null!==(t=this.getSetting("uiContainer"))&&void 0!==t?t:this.uiContainer,this.addHook("afterContextMenuDefaultOptions",(e=>Va(Ja,this,ol).call(this,e))),this.addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Va(Ja,n,il).call(n,...t)})),this.addHook("afterSelectionEnd",(()=>Va(Ja,this,sl).call(this))),this.eventManager.addEventListener(this.hot.rootDocument,"copy",(function(){return n.onCopy(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"cut",(function(){return n.onCut(...arguments)})),this.eventManager.addEventListener(this.hot.rootDocument,"paste",(function(){return n.onPaste(...arguments)})),(0,te.nr)()&&(this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseenter",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Va(Ja,n,al).call(n,...t)})),this.eventManager.addEventListener(this.hot.rootDocument.body,"mouseleave",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return Va(Ja,n,ll).call(n,...t)})),this.addHook("afterSelection",(()=>Va(Ja,this,ul).call(this)))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin()}copy(){Ya($a,this,arguments.length>0&&void 0!==arguments[0]?arguments[0]:"cells-only"),Ya(Ka,this,!0),Va(Ja,this,el).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(){Ya(Xa,this,!0),Va(Ja,this,el).call(this,"cut")}getRangedCopyableData(e){return(0,fa.A)(this.getRangedData(e))}getRangedData(e){const t=[],{rows:n,columns:r}=Ia(e);return(0,h.z0)(n,(e=>{const n=[];(0,h.z0)(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 ya;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=[]);Fa(qa,this).setSelectedRange(e);const t=new Map([["headers",null],["cells",null]]);"column-headers-only"===Fa($a,this)?t.set("headers",Fa(qa,this).getMostBottomColumnHeadersRange()):("with-column-headers"===Fa($a,this)?t.set("headers",Fa(qa,this).getMostBottomColumnHeadersRange()):"with-column-group-headers"===Fa($a,this)&&t.set("headers",Fa(qa,this).getAllColumnHeadersRange()),t.set("cells",Fa(qa,this).getCellsRange())),this.copyableRanges=Array.from(t.values()).filter((e=>null!==e)).map((e=>{let{startRow:t,startCol:n,endRow:r,endCol:o}=e;return{startRow:t,startCol:n,endRow:r,endCol:o}})),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:o}=n;this.hot.runHooks("afterCopyLimit",r-e+1,o-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,o=[],{row:i,col:s}=t.getTopStartCorner(),{row:a,col:l}=t.getBottomEndCorner();let u=i,h=s,c=i,d=s;for(;o.length<n||u<=a;){const{skipRowOnPaste:t,visualRow:a}=this.hot.getCellMeta(u,s);if(u=a+1,!0===t)continue;c=a,h=s;const m=[],p=o.length%n;for(;m.length<r||h<=l;){const{skipColumnOnPaste:t,visualCol:n}=this.hot.getCellMeta(i,h);if(h=n+1,!0===t)continue;d=n;const o=m.length%r;m.push(e[p][o])}o.push(m)}return Ya(Qa,this,!0),this.hot.populateFromArray(i,s,o,void 0,void 0,"CopyPaste.paste",this.pasteMode),[i,s,c,d]}onCopy(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),r=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Fa(Ka,this)||this.isEditorOpened()||(0,o.sb)(t)&&(r&&t!==n||!r&&t!==this.hot.rootDocument.body&&!(0,o.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),Ya(Ka,this,!1);const i=this.getRangedData(this.copyableRanges),s=Va(Ja,this,tl).call(this,this.copyableRanges);if(this.hot.runHooks("beforeCopy",i,this.copyableRanges,s)){const t=(0,fa.A)(i);if(e&&e.clipboardData){const n=(0,ka.ub)(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Wa,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.runHooks("afterCopy",i,this.copyableRanges,s)}Ya($a,this,"cells-only")}onCut(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),r=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()&&!Fa(Xa,this)||this.isEditorOpened()||(0,o.sb)(t)&&(r&&t!==n||!r&&t!==this.hot.rootDocument.body&&!(0,o.yq)(t,this.hot.rootElement)))return;e.preventDefault(),this.setCopyableText(),Ya(Xa,this,!1);const i=this.getRangedData(this.copyableRanges);if(this.hot.runHooks("beforeCut",i,this.copyableRanges)){const t=(0,fa.A)(i);if(e&&e.clipboardData){const n=(0,ka.ub)(i,this.hot.rootDocument);e.clipboardData.setData("text/plain",t),e.clipboardData.setData("text/html",[Wa,n].join(""))}else"undefined"==typeof ClipboardEvent&&this.hot.rootWindow.clipboardData.setData("Text",t);this.hot.emptySelectedCells("CopyPaste.cut"),this.hot.runHooks("afterCut",i,this.copyableRanges)}}onPaste(e){const t=e.composedPath()[0],n=this.hot.getFocusManager().getRefocusElement(),r=null==t?void 0:t.hasAttribute("data-hot-input");if(!this.hot.isListening()||this.isEditorOpened()||!this.hot.getSelected()||(0,o.sb)(t)&&(r&&t!==n||!r&&t!==this.hot.rootDocument.body&&!(0,o.yq)(t,this.hot.rootElement)))return;let i;if(e.preventDefault(),e&&void 0!==e.clipboardData){const t=(0,d.aj)(e.clipboardData.getData("text/html"),{ADD_TAGS:["meta"],ADD_ATTR:["content"],FORCE_BODY:!0});i=t&&/(<table)|(<TABLE)/g.test(t)?(0,ka.oh)(t,this.hot.rootDocument).data:e.clipboardData.getData("text/plain")}else"undefined"==typeof ClipboardEvent&&void 0!==this.hot.rootWindow.clipboardData&&(i=this.hot.rootWindow.clipboardData.getData("Text"));if("string"==typeof i&&(i=(0,fa.q)(i)),void 0===i||i&&0===i.length)return;if(!1===this.hot.runHooks("beforePaste",i,this.copyableRanges))return;const[s,a,l,u]=this.populateValues(i);this.hot.selectCell(s,a,Math.min(this.hot.countRows()-1,l),Math.min(this.hot.countCols()-1,u)),this.hot.runHooks("afterPaste",i,this.copyableRanges)}destroy(){super.destroy()}}function el(e){if((0,te.nr)()){const t=this.hot.getSelectedRangeLast();if(t){const{row:n,col:r}=t.highlight,i=this.hot.getCell(n,r,!0);i&&(0,o.C0)(i,(()=>{this.hot.rootDocument.execCommand(e)}))}}else this.hot.rootDocument.execCommand(e)}function tl(e){const{rows:t}=Ia(e);let n=0;for(let e=0;e<t.length&&!(t[e]>=0);e++)n+=1;return{columnHeadersCount:n}}function nl(){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&&(0,o.aM)(r)}}}function rl(){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&&r.hasAttribute("contenteditable")&&(0,o.gj)(r)}}}function ol(e){var t;e.items.push({name:"---------"},(t=this,{key:"copy",name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_COPY)},callback(){t.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})),Fa(ja,this)&&e.items.push(function(e){return{key:"copy_with_column_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,Mt.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ee.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}}(this)),Fa(za,this)&&e.items.push(function(e){return{key:"copy_with_column_group_headers",name(){const e=this.getSelectedRangeLast(),t=e?(0,Mt.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ee.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}}(this)),Fa(Ga,this)&&e.items.push(function(e){return{key:"copy_column_headers_only",name(){const e=this.getSelectedRangeLast(),t=e?(0,Mt.qE)(e.getWidth()-1,0,1):0;return this.getTranslatedPhrase(Ee.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}}(this)),e.items.push(function(e){return{key:"cut",name(){return this.getTranslatedPhrase(Ee.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}}(this))}function il(e,t,n,r,o){Fa(Qa,this)&&(o.value=!0),Ya(Qa,this,!1)}function sl(){this.isEditorOpened()||this.hot.getSettings().fragmentSelection||this.setCopyableText()}function al(){Va(Ja,this,rl).call(this)}function ll(){Va(Ja,this,nl).call(this)}function ul(){Va(Ja,this,rl).call(this)}function hl(e,t){return`border_row${e}col${t}`}function cl(e){var t,n;return((0,c.O9)(e.start)||(0,c.O9)(e.left))&&(e.start=null!==(t=e.start)&&void 0!==t?t:e.left),((0,c.O9)(e.end)||(0,c.O9)(e.right))&&(e.end=null!==(n=e.end)&&void 0!==n?n:e.right),delete e.left,delete e.right,e}function dl(e){return(0,c.O9)(e.start)&&(e.left=e.start),(0,c.O9)(e.end)&&(e.right=e.end),e}function ml(e,t){return{id:hl(e,t),border:{width:1,color:"#000",cornerVisible:!1},row:e,col:t,top:{hide:!0},bottom:{hide:!0},start:{hide:!0},end:{hide:!0}}}function pl(e,t){let n=!1;return(0,h.z0)(e.getSelectedRange(),(r=>{r.forAll(((r,o)=>{if(r<0||o<0)return;const i=e.getCellMeta(r,o).borders;if(i){if(!t)return n=!0,!1;if(!(0,s.mQ)(i[t],"hide")||!1===i[t].hide)return n=!0,!1}}))})),n}function fl(e){return`<span class="selected">${String.fromCharCode(10003)}</span>${e}`}const gl=new Map([["left","start"],["right","end"]]);function yl(e){const t=e.hot.isRtl()?"start":"end";return{key:"borders:right",name(){let e=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_BORDERS_RIGHT);return pl(this,t)&&(e=fl(e)),e},callback(n,r){const o=pl(this,t);e.prepareBorder(r,t,o)}}}function wl(e){return{key:"borders:bottom",name(){let e=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_BORDERS_BOTTOM);return pl(this,"bottom")&&(e=fl(e)),e},callback(t,n){const r=pl(this,"bottom");e.prepareBorder(n,"bottom",r)}}}function vl(e){const t=e.hot.isRtl()?"end":"start";return{key:"borders:left",name(){let e=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_BORDERS_LEFT);return pl(this,t)&&(e=fl(e)),e},callback(n,r){const o=pl(this,t);e.prepareBorder(r,t,o)}}}function _l(e){return{key:"borders:no_borders",name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_REMOVE_BORDERS)},callback(t,n){e.prepareBorder(n,"noBorders")},disabled(){return!pl(this)}}}function bl(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 Sl="customBorders";var Cl=new WeakSet;class El extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Cl),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"savedBorders",[])}static get PLUGIN_KEY(){return Sl}static get PLUGIN_PRIORITY(){return 90}isEnabled(){return!!this.hot.getSettings()[Sl]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>bl(Cl,this,Ml).call(this,e))),this.addHook("init",(()=>bl(Cl,this,Tl).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=cl(t));const o=(0,ws.ML)(e),i=(0,ws._e)(o,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)});(0,h.z0)(e,(e=>{i(e).forAll(((e,t)=>{(0,h.z0)(n,(n=>{var o,i;this.prepareBorderFromCustomAdded(e,t,r,(o=n,null!==(i=gl.get(o))&&void 0!==i?i:o))}))}))})),this.hot.view.render()}getBorders(e){if(!Array.isArray(e))return this.savedBorders;const t=(0,ws.ML)(e),n=(0,ws._e)(t,{createCellCoords:this.hot._createCellCoords.bind(this.hot),createCellRange:this.hot._createCellRange.bind(this.hot)}),r=[];return(0,h.z0)(e,(e=>{n(e).forAll(((e,t)=>{(0,h.z0)(this.savedBorders,(n=>{n.row===e&&n.col===t&&r.push(dl(n))}))}))})),r}clearBorders(e){e?this.setBorders(e):((0,h.z0)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange(),this.hot.removeCellMeta(e.row,e.col,"borders")})),this.savedBorders.length=0)}insertBorderIntoSettings(e,t){this.checkSavedBorders(e)||this.savedBorders.push(e);const n=this.hot._createCellRange(this.hot._createCellCoords(e.row,e.col));this.checkCustomSelections(e,n,t)||this.hot.selection.highlight.addCustomSelection({border:e,visualCellRange:n})}prepareBorderFromCustomAdded(e,t,n,r){const o=this.hot.countRows(),i=this.hot.countCols();if(e>=o||t>=i)return;let a=ml(e,t);var l,u;n&&(l=a,u=n,(0,s.mQ)(u,"border")&&u.border&&(l.border=u.border),(0,s.mQ)(u,"top")&&(0,c.O9)(u.top)&&(u.top?((0,s.Gv)(u.top)||(u.top={width:1,color:"#000"}),l.top=u.top):(u.top={hide:!0},l.top=u.top)),(0,s.mQ)(u,"bottom")&&(0,c.O9)(u.bottom)&&(u.bottom?((0,s.Gv)(u.bottom)||(u.bottom={width:1,color:"#000"}),l.bottom=u.bottom):(u.bottom={hide:!0},l.bottom=u.bottom)),(0,s.mQ)(u,"start")&&(0,c.O9)(u.start)&&(u.start?((0,s.Gv)(u.start)||(u.start={width:1,color:"#000"}),l.start=u.start):(u.start={hide:!0},l.start=u.start)),(0,s.mQ)(u,"end")&&(0,c.O9)(u.end)&&(u.end?((0,s.Gv)(u.end)||(u.end={width:1,color:"#000"}),l.end=u.end):(u.end={hide:!0},l.end=u.end)),a=l,(0,h.z0)(this.hot.selection.highlight.customSelections,(e=>{if(a.id===e.settings.id)return Object.assign(e.settings,n),a.id=e.settings.id,a.top=e.settings.top,a.bottom=e.settings.bottom,a.start=e.settings.start,a.end=e.settings.end,!1}))),this.hot.setCellMeta(e,t,"borders",dl(a)),this.insertBorderIntoSettings(a,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);(0,Mt.Ti)(e.from.row,n,(n=>{(0,Mt.Ti)(e.from.col,r,(r=>{const o=ml(n,r);let i=0;n===e.from.row&&(0,s.mQ)(t,"top")&&(i+=1,o.top=t.top),n===e.to.row&&(0,s.mQ)(t,"bottom")&&(i+=1,o.bottom=t.bottom),r===e.from.col&&(0,s.mQ)(t,"start")&&(i+=1,o.start=t.start),r===e.to.col&&(0,s.mQ)(t,"end")&&(i+=1,o.end=t.end),i>0&&(this.hot.setCellMeta(n,r,"borders",dl(o)),this.insertBorderIntoSettings(o))}))}))}removeAllBorders(e,t){const n=hl(e,t);this.spliceBorder(n),this.clearBordersFromSelectionSettings(n),this.clearNullCellRange(),this.hot.removeCellMeta(e,t,"borders")}setBorder(e,t,n,r){let o=this.hot.getCellMeta(e,t).borders;o=o&&void 0!==o.border?cl(o):ml(e,t),r?(o[n]={hide:!0},4===this.countHide(o)?this.removeAllBorders(e,t):(this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",dl(o)))):(o[n]={width:1,color:"#000"},this.checkCustomSelectionsFromContextMenu(o,n,r)||this.insertBorderIntoSettings(o),this.hot.setCellMeta(e,t,"borders",dl(o)))}prepareBorder(e,t,n){(0,h.z0)(e,(e=>{let{start:r,end:o}=e;if(r.row===o.row&&r.col===o.col)"noBorders"===t?this.removeAllBorders(r.row,r.col):this.setBorder(r.row,r.col,t,n);else switch(t){case"noBorders":(0,Mt.Ti)(r.col,o.col,(e=>{(0,Mt.Ti)(r.row,o.row,(t=>{this.removeAllBorders(t,e)}))}));break;case"top":(0,Mt.Ti)(r.col,o.col,(e=>{this.setBorder(r.row,e,t,n)}));break;case"bottom":(0,Mt.Ti)(r.col,o.col,(e=>{this.setBorder(o.row,e,t,n)}));break;case"start":(0,Mt.Ti)(r.row,o.row,(e=>{this.setBorder(e,r.col,t,n)}));break;case"end":(0,Mt.Ti)(r.row,o.row,(e=>{this.setBorder(e,o.col,t,n)}))}}))}createCustomBorders(e){(0,h.z0)(e,(e=>{const t=cl(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:o}=e,i=[t,n,r,o];return(0,h.mu)(i,((e,t)=>{let n=e;return t&&t.hide&&(n+=1),n}),0)}clearBordersFromSelectionSettings(e){const t=(0,h.YD)(this.hot.selection.highlight.customSelections,(e=>e.settings.id)).indexOf(e);t>-1&&this.hot.selection.highlight.customSelections[t].clear()}clearNullCellRange(){(0,h.z0)(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(){(0,h.z0)(this.savedBorders,(e=>{this.clearBordersFromSelectionSettings(e.id),this.clearNullCellRange()}))}spliceBorder(e){const t=(0,h.YD)(this.savedBorders,(e=>e.id)).indexOf(e);t>-1&&this.savedBorders.splice(t,1)}checkSavedBorders(e){let t=!1;return 4===this.countHide(e)?(this.spliceBorder(e.id),t=!0):(0,h.z0)(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(0,h.z0)(this.hot.selection.highlight.customSelections,(o=>{if(e.id===o.settings.id){const e=this.hot.view._wt.selectionManager.getBorderInstances(o);return(0,h.z0)(e,(e=>{e.toggleHiddenClass(t,n)})),r=!0,!1}})),r}checkCustomSelections(e,t,n){const r=this.countHide(e);let o=!1;return 4===r?(this.removeAllBorders(e.row,e.col),o=!0):(0,h.z0)(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);(0,h.z0)(t,(t=>{t.changeBorderStyle(n,e)}))}return o=!0,!1}})),o}changeBorderSettings(){const e=this.hot.getSettings()[Sl];if(Array.isArray(e)){const t=(0,s.Go)(e);this.checkSettingsCohesion(t),t.length||(this.savedBorders=t),this.createCustomBorders(t)}else void 0!==e&&this.createCustomBorders(this.savedBorders)}checkSettingsCohesion(e){const t=e.some((e=>(0,c.O9)(e.left)||(0,c.O9)(e.right))),n=e.some((e=>(0,c.O9)(e.start)||(0,c.O9)(e.end)));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 Ml(e){var t;this.hot.getSettings()[Sl]&&e.items.push({name:"---------"},{key:"borders",name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_BORDERS)},disabled(){const e=this.getSelectedRangeLast();return!e||!!e.isSingleHeader()||this.selection.isSelectedByCorner()},submenu:{items:[(t=this,{key:"borders:top",name(){let e=this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_BORDERS_TOP);return pl(this,"top")&&(e=fl(e)),e},callback(e,n){const r=pl(this,"top");t.prepareBorder(n,"top",r)}}),yl(this),wl(this),vl(this),_l(this)]}})}function Tl(){this.changeBorderSettings()}function Rl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}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")}const Nl="dragToScroll";var Ll=new WeakSet;class xl extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=Ll),t.add(e),Rl(this,"boundaries",null),Rl(this,"callback",null),Rl(this,"listening",!1)}static get PLUGIN_KEY(){return Nl}static get PLUGIN_PRIORITY(){return 100}isEnabled(){return!!this.hot.getSettings()[Nl]}enablePlugin(){this.enabled||(this.addHook("afterOnCellMouseDown",(e=>Al(Ll,this,Ol).call(this,e))),this.addHook("afterOnCellCornerMouseDown",(e=>Al(Ll,this,Ol).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;for(;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=(0,o.Ly)(t)}unregisterEvents(){this.eventManager.clear()}onMouseMove(e){this.isListening()&&this.check(e.clientX,e.clientY)}destroy(){super.destroy()}}function Ol(e){if((0,i.nO)(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,o;const i=null!==(r=t.scrollLeft)&&void 0!==r?r:t.scrollX,s=null!==(o=t.scrollTop)&&void 0!==o?o:t.scrollY;t.scroll(i+50*Math.sign(e),s+20*Math.sign(n))})),this.listen()}function Il(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Dl(e,t,n){return e.set(Pl(e,t),n),n}function Pl(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")}Ce.R.getSingleton().register("afterDropdownMenuDefaultOptions"),Ce.R.getSingleton().register("beforeDropdownMenuShow"),Ce.R.getSingleton().register("afterDropdownMenuShow"),Ce.R.getSingleton().register("afterDropdownMenuHide"),Ce.R.getSingleton().register("afterDropdownMenuExecute");const Hl="dropdownMenu",Fl="changeType",Yl=Hl;var Vl=new WeakMap,Ul=new WeakSet;class Bl extends hn{static get PLUGIN_KEY(){return Hl}static get PLUGIN_PRIORITY(){return 230}static get PLUGIN_DEPS(){return["plugin:AutoColumnSize"]}static get DEFAULT_ITEMS(){return[ps,fs,Ri,vs,Ri,ms,Ri,gs,Ri,ds]}constructor(e){var t;super(e),Il(this,t=Ul),t.add(this),kl(this,"commandExecutor",new cs(this.hot)),kl(this,"itemsFactory",null),kl(this,"menu",null),function(e,t){Il(e,t),t.set(e,!1)}(this,Vl),this.hot.addHook("afterGetColHeader",((e,t)=>Pl(Ul,this,zl).call(this,e,t)))}isEnabled(){return this.hot.getSettings()[Hl]}enablePlugin(){var e=this;if(this.enabled)return;this.itemsFactory=new Ns(this.hot,Bl.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 Pl(Ul,e,Ql).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 Pl(Ul,e,ql).call(e,...n)}));const t=this.hot.getSettings()[Hl],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 oa(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",(()=>Pl(Ul,this,Gl).call(this))),this.menu.addLocalHook("afterOpen",(()=>Pl(Ul,this,$l).call(this))),this.menu.addLocalHook("afterSubmenuOpen",(e=>Pl(Ul,this,Kl).call(this,e))),this.menu.addLocalHook("afterClose",(()=>Pl(Ul,this,Xl).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)})),(0,h.z0)(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=()=>{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=Oi(this.menu.container,this.hot.rootDocument),r=this.hot.getCell(-1,t.col,!0).querySelector(`.${Fl}`),o=r.getBoundingClientRect();this.open({left:o.left+n.left,top:o.top+r.offsetHeight+n.top},{left:o.width,right:0,above:0,below:3}),this.menu.getNavigator().toFirstItem()}};this.hot.getShortcutManager().getContext("grid").addShortcuts([{keys:[["Shift","Alt","ArrowDown"],["Control/Meta","Enter"]],callback:e,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:Yl},{keys:[["Shift","Alt","ArrowDown"]],callback:e,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:Yl}])}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Yl)}registerEvents(){this.eventManager.addEventListener(this.hot.rootElement,"click",(e=>Pl(Ul,this,jl).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(),(0,s.v4)(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 Wl(e){e.getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Control/Meta","A"]],callback:()=>!1}])}function jl(e){if((0,o.nB)(e.target,Fl)){const t=Oi(this.menu.container,this.hot.rootDocument),n=e.target.getBoundingClientRect();e.stopPropagation(),Dl(Vl,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 zl(e,t){const n=t.parentNode;if(!n)return;const r=n.parentNode.childNodes,i=Array.prototype.indexOf.call(r,n);if(e<0||i!==r.length-1)return;const s=t.querySelector(`.${Fl}`);if(this.enabled&&s)return;if(!this.enabled)return void(s&&s.parentNode.removeChild(s));const a=this.hot.rootDocument.createElement("button");a.className=Fl,a.type="button",a.tabIndex=-1,this.hot.getSettings().ariaTags&&((0,o.Bq)(a,[(0,f.MG)(),(0,f.SM)(" ")]),(0,o.Bq)(t,[(0,f.wP)("menu")])),a.onclick=function(){return!1},t.firstChild.insertBefore(a,t.firstChild.firstChild)}function Gl(){this.hot.runHooks("beforeDropdownMenuShow",this)}function $l(){this.hot.runHooks("afterDropdownMenuShow",this),Pl(Ul,this,Wl).call(this,this.menu)}function Kl(e){Pl(Ul,this,Wl).call(this,e)}function Xl(){this.hot.listen(),this.hot.runHooks("afterDropdownMenuHide",this)}function ql(e){return(t=Vl).get(Pl(t,this))?null:e;var t}function Ql(e){(0,o.nB)(e.target,Fl)&&Dl(Vl,this,!0)}function Jl(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}Bl.SEPARATOR={name:Ri};const Zl=class{constructor(e){Jl(this,"hot",void 0),Jl(this,"options",{}),this.hot=e}setOptions(e){this.options=e}getData(){const{startRow:e,startCol:t,endRow:n,endCol:r}=this._getDataRange(),o=this.options,i=[];return(0,Mt.Ti)(e,n,(e=>{const n=[];!o.exportHiddenRows&&this._isHiddenRow(e)||((0,Mt.Ti)(t,r,(t=>{!o.exportHiddenColumns&&this._isHiddenColumn(t)||n.push(this.hot.getDataAtCell(e,t))})),i.push(n))})),i}getRowHeaders(){const e=[];if(this.options.rowHeaders){const{startRow:t,endRow:n}=this._getDataRange(),r=this.hot.getRowHeader();(0,Mt.Ti)(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();(0,Mt.Ti)(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,o=t,i=e]=this.options.range;return n=Math.max(n,0),r=Math.max(r,0),o=Math.min(o,t),i=Math.min(i,e),{startRow:n,startCol:r,endRow:o,endCol:i}}_isHiddenRow(e){return this.hot.rowIndexMapper.isHidden(this.hot.toPhysicalRow(e))}_isHiddenColumn(e){return this.hot.columnIndexMapper.isHidden(this.hot.toPhysicalColumn(e))}};function eu(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class tu{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){eu(this,"dataProvider",void 0),eu(this,"options",void 0),this.dataProvider=e,this.options=this._mergeOptions(t),this.dataProvider.setOptions(this.options)}_mergeOptions(e){let t=(0,s.o8)(this.constructor.DEFAULT_OPTIONS);const n=new Date;return t=(0,s.X$)((0,s.o8)(tu.DEFAULT_OPTIONS),t),t=(0,s.X$)(t,e),t.filename=(0,d.V2)(t.filename,{YYYY:n.getFullYear(),MM:`${n.getMonth()+1}`.padStart(2,"0"),DD:`${n.getDate()}`.padStart(2,"0")}),t}}const nu=tu;function ru(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 ou=String.fromCharCode(13),iu=String.fromCharCode(34),su=String.fromCharCode(10),au=String.fromCharCode(61),lu=String.fromCharCode(43),uu=String.fromCharCode(45),hu=String.fromCharCode(64),cu=String.fromCharCode(9);var du=new WeakSet;function mu(e){return e.startsWith(au)||e.startsWith(lu)||e.startsWith(uu)||e.startsWith(hu)||e.startsWith(cu)||e.startsWith(ou)?`'${e}`:e}function pu(e,t){return t.test(e)?`'${e}`:e}const fu="csv",gu={[fu]:class extends nu{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=du),t.add(e)}static get DEFAULT_OPTIONS(){return{mimeType:"text/csv",fileExtension:"csv",bom:!0,columnDelimiter:",",rowDelimiter:"\r\n",sanitizeValues:!1}}export(){const e=this.options,t=this.dataProvider.getData();let n=this.dataProvider.getColumnHeaders();const r=n.length>0,o=this.dataProvider.getRowHeaders(),i=o.length>0;let s=e.bom?String.fromCharCode(65279):"";return r&&(n=(0,h.YD)(n,(t=>this._escapeCell(t,{force:!0,sanitizeValue:e.sanitizeValues}))),i&&(s+=e.columnDelimiter),s+=n.join(e.columnDelimiter),s+=e.rowDelimiter),(0,h.z0)(t,((t,n)=>{n>0&&(s+=e.rowDelimiter),i&&(s+=this._escapeCell(o[n],{sanitizeValue:e.sanitizeValues}),s+=e.columnDelimiter);const r=t.map((t=>this._escapeCell(t,{sanitizeValue:e.sanitizeValues}))).join(e.columnDelimiter);s+=r})),s}_escapeCell(e){let{force:t=!1,sanitizeValue:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=(0,c.As)(e);return""===r||(n&&(t=!0),n instanceof RegExp?r=ru(du,this,pu).call(this,r,n):"function"==typeof n?r=n(r):n&&(r=ru(du,this,mu).call(this,r)),(t||r.indexOf(ou)>=0||r.indexOf(iu)>=0||r.indexOf(su)>=0||r.indexOf(this.options.columnDelimiter)>=0)&&(r=r.replace(new RegExp('"',"g"),'""'),r=`"${r}"`)),r}}};class yu extends hn{static get PLUGIN_KEY(){return"exportFile"}static get PLUGIN_PRIORITY(){return 240}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,o=this._createTypeFormatter(e,t),i=this._createBlob(o),s=r.URL||r.webkitURL,a=n.createElement("a"),l=`${o.options.filename}.${o.options.fileExtension}`;if(void 0!==a.download){const e=s.createObjectURL(i);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((()=>{s.revokeObjectURL(e)}),100)}else navigator.msSaveOrOpenBlob&&navigator.msSaveOrOpenBlob(i,l)}_createTypeFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!gu[e])throw new Error(`Export format type "${e}" is not supported.`);return function(e,t,n){return"function"==typeof gu[e]?new gu[e](t,n):null}(e,new Zl(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}}function wu(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(93514);class vu{constructor(e,t){let{id:n,stateless:r=!0}=t;wu(this,"hot",void 0),wu(this,"id",void 0),wu(this,"elements",[]),wu(this,"hidden",!1),wu(this,"stateId",""),wu(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 eo.z)}getElements(){return this.elements}reset(){(0,h.z0)(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(),(0,h.z0)(this.elements,(e=>e.destroy())),this.state=null,this.elements=null,this.hot=null}}(0,s.co)(vu,Zo.A);const _u={};function bu(e,t){if(!_u[e])throw Error(`Filter condition "${e}" does not exist.`);const{condition:n,descriptor:r}=_u[e];let o=t;return r.inputValuesDecorator&&(o=r.inputValuesDecorator(o)),function(e){return n.apply(e.meta.instance,[].concat([e],[o]))}}function Su(e){if(!_u[e])throw Error(`Filter condition "${e}" does not exist.`);return _u[e].descriptor}function Cu(e,t,n){n.key=e,_u[e]={condition:t,descriptor:n}}const Eu="none";Cu(Eu,(function(){return!0}),{name:Ee.FILTERS_CONDITIONS_NONE,inputsCount:0,showOperators:!1});const Mu="empty";Cu(Mu,(function(e){return(0,c.Im)(e.value)}),{name:Ee.FILTERS_CONDITIONS_EMPTY,inputsCount:0,showOperators:!0});const Tu="not_empty";Cu(Tu,(function(e,t){return!bu(Mu,t)(e)}),{name:Ee.FILTERS_CONDITIONS_NOT_EMPTY,inputsCount:0,showOperators:!0});const Ru="eq";Cu(Ru,(function(e,t){let[n]=t;return(0,c.As)(e.value).toLocaleLowerCase(e.meta.locale)===(0,c.As)(n)}),{name:Ee.FILTERS_CONDITIONS_EQUAL,inputsCount:1,showOperators:!0});const Au="neq";Cu(Au,(function(e,t){return!bu(Ru,t)(e)}),{name:Ee.FILTERS_CONDITIONS_NOT_EQUAL,inputsCount:1,showOperators:!0}),Cu("gt",(function(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>r}),{name:Ee.FILTERS_CONDITIONS_GREATER_THAN,inputsCount:1,showOperators:!0}),Cu("gte",(function(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value>=r}),{name:Ee.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL,inputsCount:1,showOperators:!0}),Cu("lt",(function(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<r}),{name:Ee.FILTERS_CONDITIONS_LESS_THAN,inputsCount:1,showOperators:!0}),Cu("lte",(function(e,t){let[n]=t,r=n;return"numeric"===e.meta.type&&(r=parseFloat(r,10)),e.value<=r}),{name:Ee.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL,inputsCount:1,showOperators:!0});const Nu="date_after";Cu(Nu,(function(e,t){let[n]=t;const r=N(e.value,e.meta.dateFormat),o=N(n,e.meta.dateFormat);return!(!r.isValid()||!o.isValid())&&r.diff(o)>=0}),{name:Ee.FILTERS_CONDITIONS_AFTER,inputsCount:1,showOperators:!0});const Lu="date_before";Cu(Lu,(function(e,t){let[n]=t;const r=N(e.value,e.meta.dateFormat),o=N(n,e.meta.dateFormat);return!(!r.isValid()||!o.isValid())&&r.diff(o)<=0}),{name:Ee.FILTERS_CONDITIONS_BEFORE,inputsCount:1,showOperators:!0});const xu="between";Cu(xu,(function(e,t){let[n,r]=t,o=n,i=r;if("numeric"===e.meta.type){const e=parseFloat(o,10),t=parseFloat(i,10);o=Math.min(e,t),i=Math.max(e,t)}else if("date"===e.meta.type){const t=bu(Lu,[i]),n=bu(Nu,[o]);return t(e)&&n(e)}return e.value>=o&&e.value<=i}),{name:Ee.FILTERS_CONDITIONS_BETWEEN,inputsCount:2,showOperators:!0});const Ou="not_between";Cu(Ou,(function(e,t){return!bu(xu,t)(e)}),{name:Ee.FILTERS_CONDITIONS_NOT_BETWEEN,inputsCount:2,showOperators:!0});const Iu="begins_with";Cu(Iu,(function(e,t){let[n]=t;return(0,c.As)(e.value).toLocaleLowerCase(e.meta.locale).startsWith((0,c.As)(n))}),{name:Ee.FILTERS_CONDITIONS_BEGINS_WITH,inputsCount:1,showOperators:!0});const ku="ends_with";Cu(ku,(function(e,t){let[n]=t;return(0,c.As)(e.value).toLocaleLowerCase(e.meta.locale).endsWith((0,c.As)(n))}),{name:Ee.FILTERS_CONDITIONS_ENDS_WITH,inputsCount:1,showOperators:!0});const Du="contains";Cu(Du,(function(e,t){let[n]=t;return(0,c.As)(e.value).toLocaleLowerCase(e.meta.locale).indexOf((0,c.As)(n))>=0}),{name:Ee.FILTERS_CONDITIONS_CONTAINS,inputsCount:1,showOperators:!0});const Pu="not_contains";Cu(Pu,(function(e,t){return!bu(Du,t)(e)}),{name:Ee.FILTERS_CONDITIONS_NOT_CONTAIN,inputsCount:1,showOperators:!0});const Hu="date_tomorrow";Cu(Hu,(function(e){const t=N(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(N().subtract(-1,"days").startOf("day"),"d")}),{name:Ee.FILTERS_CONDITIONS_TOMORROW,inputsCount:0});const Fu="date_today";Cu(Fu,(function(e){const t=N(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(N().startOf("day"),"d")}),{name:Ee.FILTERS_CONDITIONS_TODAY,inputsCount:0});const Yu="date_yesterday";Cu(Yu,(function(e){const t=N(e.value,e.meta.dateFormat);return!!t.isValid()&&t.isSame(N().subtract(1,"days").startOf("day"),"d")}),{name:Ee.FILTERS_CONDITIONS_YESTERDAY,inputsCount:0});const Vu="numeric",Uu="text",Bu="date",Wu={[Vu]:[Eu,Ri,Mu,Tu,Ri,Ru,Au,Ri,"gt","gte","lt","lte",xu,Ou],[Uu]:[Eu,Ri,Mu,Tu,Ri,Ru,Au,Ri,Iu,ku,Ri,Du,Pu],[Bu]:[Eu,Ri,Mu,Tu,Ri,Ru,Au,Ri,Lu,Nu,xu,Ri,Hu,Fu,Yu]};function ju(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const zu="built",Gu="building",$u=["click","input","keydown","keypress","keyup","focus","blur","change"];class Ku{static get DEFAULTS(){return(0,s.o8)({className:"",value:"",tagName:"div",children:[],wrapIt:!0})}constructor(e,t){ju(this,"hot",void 0),ju(this,"eventManager",new _e.A(this)),ju(this,"options",void 0),ju(this,"_element",void 0),ju(this,"buildState",void 0),this.hot=e,this.options=(0,s.X$)(Ku.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===Gu?this._element:this.buildState===zu?(this.update(),this._element):(this.buildState=Gu,this.build(),this.buildState=zu,this._element)}isBuilt(){return this.buildState===zu}translateIfPossible(e){return"string"==typeof e&&e.startsWith(Ee.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=Gu),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&&(0,o.iQ)(this._element,this.options.className),this.options.children.length)(0,h.z0)(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),(0,s.v4)(this.options,((e,n)=>{void 0!==t[n]&&"className"!==n&&"tagName"!==n&&"children"!==n&&(t[n]=this.translateIfPossible(e))})),this._element.appendChild(t),(0,h.z0)($u,(n=>e(t,n)))}else(0,h.z0)($u,(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 Xu(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qu(e,t){return e.get(Qu(e,t))}function Qu(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")}(0,s.co)(Ku,Zo.A);var Ju=new WeakMap,Zu=new WeakSet;class eh extends Ku{static get DEFAULTS(){return(0,s.o8)({placeholder:"",type:"text",tagName:"input",tabIndex:-1})}constructor(e,t){var n;super(e,(0,s.X$)(eh.DEFAULTS,t)),Xu(this,n=Zu),n.add(this),function(e,t){Xu(e,t),t.set(e,void 0)}(this,Ju),this.registerHooks()}registerHooks(){this.addLocalHook("keyup",(e=>Qu(Zu,this,th).call(this,e)))}build(){super.build();const e=this.hot.rootDocument.createElement("div");var t,n;t=Ju,n=this._element.firstChild,t.set(Qu(t,this),n),(0,o.iQ)(this._element,"htUIInput"),(0,o.iQ)(e,"htUIInputIcon"),this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(qu(Ju,this).type=this.options.type,qu(Ju,this).placeholder=this.translateIfPossible(this.options.placeholder),qu(Ju,this).value=this.translateIfPossible(this.options.value))}focus(){this.isBuilt()&&qu(Ju,this).focus()}}function th(e){this.options.value=e.target.value}function nh(e,t,n){rh(e,t),t.set(e,n)}function rh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function oh(e,t,n){return e.set(sh(e,t),n),n}function ih(e,t){return e.get(sh(e,t))}function sh(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 ah=new WeakMap,lh=new WeakMap,uh=new WeakMap,hh=new WeakMap,ch=new WeakMap,dh=new WeakSet;class mh extends Ku{static get DEFAULTS(){return(0,s.o8)({className:"htUISelect",wrapIt:!1,tabIndex:-1})}constructor(e,t){var n;super(e,(0,s.X$)(mh.DEFAULTS,t)),rh(this,n=dh),n.add(this),nh(this,ah,null),nh(this,lh,[]),nh(this,uh,void 0),nh(this,hh,void 0),nh(this,ch,void 0),this.registerHooks()}getMenu(){return ih(ah,this)}registerHooks(){this.addLocalHook("click",(()=>sh(dh,this,gh).call(this)))}setItems(e){oh(lh,this,this.translateNames(e)),ih(ah,this)&&ih(ah,this).setMenuItems(ih(lh,this))}translateNames(e){return(0,h.z0)(e,(e=>{e.name=this.translateIfPossible(e.name)})),e}build(){super.build(),oh(ah,this,new oa(this.hot,{className:"htSelectUI htFiltersConditionsMenu",keepInViewport:!1,standalone:!0,container:this.options.menuContainer})),ih(ah,this).setMenuItems(ih(lh,this));const e=new Ku(this.hot,{className:"htUISelectCaption"}),t=new Ku(this.hot,{className:"htUISelectDropdown"});oh(uh,this,e),oh(hh,this,e.element),oh(ch,this,t),this.hot.getSettings().ariaTags&&((0,o.Bq)(t.element,[(0,f.MG)()]),(0,o.Bq)(this._element,[(0,f.$o)()])),(0,h.z0)([e,t],(e=>this._element.appendChild(e.element))),ih(ah,this).addLocalHook("select",(e=>sh(dh,this,ph).call(this,e))),ih(ah,this).addLocalHook("afterClose",(()=>sh(dh,this,fh).call(this))),this.update()}update(){if(!this.isBuilt())return;let e;e=this.options.value?this.options.value.name:ih(ah,this).hot.getTranslatedPhrase(Ee.FILTERS_CONDITIONS_NONE),ih(hh,this).textContent=e,super.update()}openOptions(){const e=this.element.getBoundingClientRect();ih(ah,this)&&(ih(ah,this).open(),ih(ah,this).setPosition({left:this.hot.isLtr()?e.left-5:e.left-31,top:e.top-1,width:e.width,height:e.height}),ih(ah,this).getNavigator().toFirstItem(),ih(ah,this).getKeyboardShortcutsCtrl().addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{this.closeOptions(),this.runLocalHooks("tabKeydown",e)}},{keys:[["Control/Meta","A"]],callback:()=>!1}]))}closeOptions(){ih(ah,this)&&ih(ah,this).close()}focus(){this.isBuilt()&&this.element.focus()}destroy(){ih(ah,this)&&(ih(ah,this).destroy(),oh(ah,this,null)),ih(uh,this)&&ih(uh,this).destroy(),ih(ch,this)&&ih(ch,this).destroy(),super.destroy()}}function ph(e){e.name!==Ri&&(this.options.value=e,this.update(),this.runLocalHooks("select",this.options.value))}function fh(){this.runLocalHooks("afterClose")}function gh(){this.openOptions()}function yh(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wh(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 vh=new WeakSet;class _h extends vu{constructor(e,t){var n,r;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=vh),r.add(n),yh(this,"name",""),yh(this,"addSeparator",!1),this.name=t.name,this.addSeparator=t.addSeparator,this.elements.push(new mh(this.hot,{menuContainer:t.menuContainer})),this.elements.push(new eh(this.hot,{placeholder:Ee.FILTERS_BUTTONS_PLACEHOLDER_VALUE})),this.elements.push(new eh(this.hot,{placeholder:Ee.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE})),this.registerHooks()}registerHooks(){this.getSelectElement().addLocalHook("select",(e=>wh(vh,this,bh).call(this,e))).addLocalHook("afterClose",(()=>this.runLocalHooks("afterClose"))).addLocalHook("tabKeydown",(e=>this.runLocalHooks("selectTabKeydown",e))),(0,h.z0)(this.getInputElements(),(e=>{e.addLocalHook("keydown",(e=>wh(vh,this,Sh).call(this,e)))}))}setState(e){if(this.reset(),!e)return;const t=(0,s.o8)(e.command);t.name.startsWith(Ee.FILTERS_CONDITIONS_NAMESPACE)&&(t.name=this.hot.getTranslatedPhrase(t.name)),this.getSelectElement().setValue(t),(0,h.z0)(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()||Su(Eu),t=[];return(0,h.z0)(this.getInputElements(),((n,r)=>{e.inputsCount>r&&t.push(n.getValue())})),{command:e,args:t}}updateState(e,t){const n=Su(e?e.name:Eu);this.state.setValueAtIndex(t,{command:n,args:e?e.args:[]}),e||(0,h.z0)(this.getInputElements(),(e=>e.setValue(null)))}getSelectElement(){return this.elements.filter((e=>e instanceof mh))[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 eh))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,i,s)=>{(0,o.iQ)(t.parentNode,"htFiltersMenuCondition"),this.addSeparator&&(0,o.iQ)(t.parentNode,"border");const a=this.hot.rootDocument.createElement("div");return(0,o.iQ)(a,"htFiltersMenuLabel"),a.textContent=s,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,h.z0)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getPlugin("filters").getSelectedColumn();let t=[Su(Eu)];if(null!==e){const{visualIndex:n}=e;t=function(e){const t=[];let n=e;return Wu[n]||(n=Uu),(0,h.z0)(Wu[n],(e=>{let n;n=e===Ri?{name:Ri}:(0,s.o8)(Su(e)),t.push(n)})),t}(this.hot.getDataType(0,n,this.hot.countRows(),n))}(0,h.z0)(this.getInputElements(),(e=>e.hide())),this.getSelectElement().setItems(t),super.reset(),this.getSelectElement().setValue(t[0])}}function bh(e){(0,h.z0)(this.getInputElements(),((t,n)=>{t[e.inputsCount>n?"show":"hide"](),0===n&&this.hot._registerTimeout((()=>t.focus()),10)})),this.runLocalHooks("change",e)}function Sh(e){(0,m.m0)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.CA)(e))}const Ch={};function Eh(e,t,n){Ch[e]={name:t,func:n}}const Mh="conjunction",Th=Ee.FILTERS_LABELS_CONJUNCTION;Eh(Mh,Th,(function(e,t){return e.every((e=>e.func(t)))}));const Rh="disjunction",Ah=Ee.FILTERS_LABELS_DISJUNCTION;Eh(Rh,Ah,(function(e,t){return e.some((e=>e.func(t)))}));const Nh="disjunctionWithExtraCondition",Lh=Ee.FILTERS_LABELS_DISJUNCTION;function xh(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Oh(e,t){return e.get(kh(e,t))}function Ih(e,t,n){return e.set(kh(e,t),n),n}function kh(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")}Eh(Nh,Lh,(function(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)}));var Dh=new WeakMap,Ph=new WeakMap;class Hh extends Ku{static get DEFAULTS(){return(0,s.o8)({type:"radio",tagName:"input",className:"htUIRadio",label:{}})}constructor(e,t){super(e,(0,s.X$)(Hh.DEFAULTS,t)),xh(this,Dh,void 0),xh(this,Ph,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),Ih(Ph,this,e),Ih(Dh,this,this._element.firstChild),Oh(Dh,this).checked=this.options.checked,this._element.appendChild(e),this.update()}update(){this.isBuilt()&&(Oh(Ph,this).textContent=this.translateIfPossible(this.options.label.textContent))}isChecked(){return!!this.isBuilt()&&Oh(Dh,this).checked}setChecked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.isBuilt()&&(Oh(Dh,this).checked=e)}focus(){this.isBuilt()&&Oh(Dh,this).focus()}}var Fh=new WeakSet;class Yh extends vu{constructor(e,t){var n,r;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Fh),r.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(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)=>((0,o.iQ)(t.parentNode,"htFiltersMenuOperators"),(0,h.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}buildOperatorsElement(){const e=[Mh,Rh];(0,h.z0)(e,(t=>{const n=new Hh(this.hot,{name:"operator",label:{htmlFor:t,textContent:(r=t,Ch[r].name)},value:t,checked:t===e[0],id:t});var r;n.addLocalHook("change",(e=>function(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")}(Fh,this,Vh).call(this,e))),this.elements.push(n)}))}setChecked(e){if(this.elements.length<e)throw Error(yo.O`Radio button with index ${e} doesn't exist.`);(0,h.z0)(this.elements,((t,n)=>{t.setChecked(n===e)}))}getActiveOperationId(){const e=this.elements.find((e=>e instanceof Hh&&e.isChecked()));return e?e.getValue():Mh}getState(){return this.getActiveOperationId()}setState(e){this.reset(),e&&this.getActiveOperationId()!==e&&(0,h.z0)(this.elements,(t=>{t.setChecked(t.getValue()===e)}))}updateState(){let e=arguments.length>1?arguments[1]:void 0,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mh;t===Nh&&(t=Rh),this.state.setValueAtIndex(e,t)}reset(){this.setChecked(0)}}function Vh(e){this.setState(e.target.value)}function Uh(e,t){let n=e;return""===n&&(n=`(${t})`),n}function Bh(e){const t=new Set(e);return function(e){return t.has(e)}}function Wh(e){return null==e?"":e}function jh(e){return Array.from(new Set(e)).map((e=>Wh(e))).sort(((e,t)=>"number"==typeof e&&"number"==typeof t?e-t:e===t?0:e>t?1:-1))}function zh(e,t,n,r){const o=[],i=e===t;let s;return i||(s=Bh(t)),e.forEach((e=>{let t=!1;(i||s(e))&&(t=!0);const a={checked:t,value:e,visualValue:Uh(e,n)};r&&r(a),o.push(a)})),o}(0,dn.II)();var Gh=n(85874);function $h(e,t){return e.get(Kh(e,t))}function Kh(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 Xh=new WeakMap;class qh extends Ku{static get DEFAULTS(){return(0,s.o8)({href:"#",tagName:"a",tabIndex:-1,role:"button"})}constructor(e,t){var n,r,o;super(e,(0,s.X$)(qh.DEFAULTS,t)),o=void 0,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Xh),r.set(n,o)}build(){var e,t;super.build(),e=Xh,t=this._element.firstChild,e.set(Kh(e,this),t)}update(){this.isBuilt()&&($h(Xh,this).textContent=this.translateIfPossible(this.options.textContent))}focus(){this.isBuilt()&&$h(Xh,this).focus()}activate(){$h(Xh,this).click()}}function Qh(e,t,n){Jh(e,t),t.set(e,n)}function Jh(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Zh(e,t){return e.get(tc(e,t))}function ec(e,t,n){return e.set(tc(e,t),n),n}function tc(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 nc="multipleSelect.itemBox";var rc=new WeakMap,oc=new WeakMap,ic=new WeakMap,sc=new WeakMap,ac=new WeakMap,lc=new WeakMap,uc=new WeakSet;class hc extends Ku{static get DEFAULTS(){return(0,s.o8)({className:"htUIMultipleSelect",value:[]})}constructor(e,t){var n;super(e,(0,s.X$)(hc.DEFAULTS,t)),Jh(this,n=uc),n.add(this),Qh(this,rc,[]),Qh(this,oc,void 0),Qh(this,ic,void 0),Qh(this,sc,void 0),Qh(this,ac,void 0),Qh(this,lc,void 0),ec(sc,this,new eh(this.hot,{placeholder:Ee.FILTERS_BUTTONS_PLACEHOLDER_SEARCH,className:"htUIMultipleSelectSearch"})),ec(ac,this,new qh(this.hot,{textContent:Ee.FILTERS_BUTTONS_SELECT_ALL,className:"htUISelectAll"})),ec(lc,this,new qh(this.hot,{textContent:Ee.FILTERS_BUTTONS_CLEAR,className:"htUIClearAll"})),this.registerHooks()}getItemsBox(){return Zh(oc,this)}registerHooks(){Zh(sc,this).addLocalHook("keydown",(e=>tc(uc,this,dc).call(this,e))),Zh(sc,this).addLocalHook("input",(e=>tc(uc,this,cc).call(this,e))),Zh(ac,this).addLocalHook("click",(e=>tc(uc,this,mc).call(this,e))),Zh(lc,this).addLocalHook("click",(e=>tc(uc,this,pc).call(this,e)))}setItems(e){var t;ec(rc,this,e),null===(t=Zh(oc,this))||void 0===t||t.loadData(Zh(rc,this))}setLocale(e){ec(ic,this,e)}getLocale(){return Zh(ic,this)}getItems(){return[...Zh(rc,this)]}getValue(){return function(e){const t=[];return e.forEach((e=>{e.checked&&t.push(e.value)})),t}(Zh(rc,this))}getSearchInputElement(){return Zh(sc,this)}getSelectAllElement(){return Zh(ac,this)}getClearAllElement(){return Zh(lc,this)}isSelectedAllValues(){return Zh(rc,this).length===this.getValue().length}build(){super.build();const{rootDocument:e}=this.hot,t=e.createElement("div"),n=new Ku(this.hot,{className:"htUISelectionControls",children:[Zh(ac,this),Zh(lc,this)]});this._element.appendChild(Zh(sc,this).element),this._element.appendChild(n.element),this._element.appendChild(t);const r=t=>{var n;if(!this._element)return;null===(n=Zh(oc,this))||void 0===n||n.destroy(),(0,o.iQ)(t,"htUIMultipleSelectHot"),ec(oc,this,new this.hot.constructor(t,{data:Zh(rc,this),columns:[{data:"checked",type:"checkbox",label:{property:"visualValue",position:"after"}}],beforeRenderer:(e,t,n,r,o,i)=>{e.title=i.instance.getDataAtRowProp(t,i.label.property)},afterListen:()=>{this.runLocalHooks("focus",this)},beforeOnCellMouseUp:()=>{Zh(oc,this).listen()},modifyColWidth:t=>{const n=Zh(oc,this).container.scrollWidth-(0,o.XJ)(e);return void 0!==t&&t<n?n:t},maxCols:1,autoWrapCol:!0,height:110,copyPaste:!1,disableVisualSelection:"area",fillHandle:!1,fragmentSelection:"cell",tabMoves:{row:1,col:0},themeName:this.hot.getCurrentThemeName(),layoutDirection:this.hot.isRtl()?"rtl":"ltr"})),Zh(oc,this).init(),this.hot.addHook("afterSetTheme",((e,t)=>{t||Zh(oc,this).useTheme(e)}));const r=Zh(oc,this).getShortcutManager().getContext("grid");r.removeShortcutsByKeys(["Tab"]),r.removeShortcutsByKeys(["Shift","Tab"]),r.addShortcut({keys:[["Escape"]],callback:e=>{this.runLocalHooks("keydown",e,this)},group:nc}),r.addShortcut({keys:[["Tab"],["Shift","Tab"]],callback:e=>{Zh(oc,this).deselectCell(),this.runLocalHooks("keydown",e,this),this.runLocalHooks("listTabKeydown",e,this)},group:nc})};r(t),this.hot._registerTimeout((()=>r(t)),100)}focus(){this.isBuilt()&&Zh(oc,this).listen()}reset(){Zh(sc,this).reset(),Zh(ac,this).reset(),Zh(lc,this).reset()}update(){this.isBuilt()&&(Zh(oc,this).loadData(function(e,t){const n=Bh(t);return e.map((e=>(e.checked=n(e.value),e)))}(Zh(rc,this),this.options.value)),super.update())}destroy(){var e;null===(e=Zh(oc,this))||void 0===e||e.destroy(),Zh(sc,this).destroy(),Zh(lc,this).destroy(),Zh(ac,this).destroy(),ec(sc,this,null),ec(lc,this,null),ec(ac,this,null),ec(oc,this,null),ec(rc,this,null),super.destroy()}}function cc(e){const t=e.target.value.toLocaleLowerCase(this.getLocale());let n;n=""===t?[...Zh(rc,this)]:Zh(rc,this).filter((e=>`${e.value}`.toLocaleLowerCase(this.getLocale()).indexOf(t)>=0)),Zh(oc,this).loadData(n)}function dc(e){this.runLocalHooks("keydown",e,this),(0,g.OH)(m.m0,e.keyCode)("ARROW_DOWN")&&(e.preventDefault(),(0,i.CA)(e),Zh(oc,this).listen(),Zh(oc,this).selectCell(0,0))}function mc(e){const t=[];e.preventDefault(),Zh(oc,this).getSourceData().forEach(((e,n)=>{e.checked=!0,t.push((0,Gh.Wm)(e,n)[0])})),Zh(oc,this).setSourceDataAtCell(t)}function pc(e){const t=[];e.preventDefault(),Zh(oc,this).getSourceData().forEach(((e,n)=>{e.checked=!1,t.push((0,Gh.Wm)(e,n)[0])})),Zh(oc,this).setSourceDataAtCell(t)}const fc="by_value";function gc(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")}Cu(fc,(function(e,t){let[n]=t;return n(e.value)}),{name:"By value",inputsCount:0,inputValuesDecorator(e){let[t]=e;return[Bh(t)]},showOperators:!1});var yc,wc=new WeakSet;class vc extends vu{constructor(e,t){var n,r;super(e,{id:t.id,stateless:!1}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=wc),r.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"name",""),this.name=t.name,this.elements.push(new hc(this.hot)),this.registerHooks()}registerHooks(){this.getMultipleSelectElement().addLocalHook("keydown",(e=>gc(wc,this,_c).call(this,e))).addLocalHook("listTabKeydown",(e=>this.runLocalHooks("listTabKeydown",e))),this.hot.addHook("modifyFiltersMultiSelectValue",((e,t)=>gc(wc,this,Sc).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===fc){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?Eu:fc},args:[e.getValue()],itemsSnapshot:t}}updateState(e){const t=(t,n,r,o,i)=>{const[s]=(0,h.y0)(n,(e=>e.name===fc)),a={},l=this.hot.getTranslatedPhrase(Ee.FILTERS_VALUES_BLANK_CELLS);if(s){const n=o(t,i),u=(0,h.YD)(n,(e=>e.value)),c=new Map(n.map((e=>[e.value,this.hot.getCellMeta(e.meta.visualRow,e.meta.visualCol)]))),d=jh(u);r&&(s.args[0]=r);const m=[],p=zh(d,s.args[0],l,(e=>{e.checked&&m.push(e.value),gc(wc,this,bc).call(this,e,c)})),f=e.editedConditionStack.column;a.locale=this.hot.getCellMeta(0,f).locale,a.args=[m],a.command=Su(fc),a.itemsSnapshot=p}else a.args=[],a.command=Su(Eu);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 hc))[0]}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t,n,r,i,s)=>{(0,o.iQ)(t.parentNode,"htFiltersMenuValue");const a=this.hot.rootDocument.createElement("div");return(0,o.iQ)(a,"htFiltersMenuLabel"),a.textContent=s,t.appendChild(a),t.parentElement.hasAttribute("ghost-table")||(0,h.z0)(this.elements,(e=>t.appendChild(e.element))),t}}}reset(){const e=this.hot.getTranslatedPhrase(Ee.FILTERS_VALUES_BLANK_CELLS),t=this._getColumnVisibleValues(),n=t.map((e=>e.value)),r=new Map(t.map((e=>[e.value,e.meta]))),o=jh(n),i=zh(o,o,e,(e=>{gc(wc,this,bc).call(this,e,r)}));this.getMultipleSelectElement().setItems(i),super.reset(),this.getMultipleSelectElement().setValue(o);const s=this.hot.getPlugin("filters").getSelectedColumn();null!==s&&this.getMultipleSelectElement().setLocale(this.hot.getCellMeta(0,s.visualIndex).locale)}_getColumnVisibleValues(){const e=this.hot.getPlugin("filters").getSelectedColumn();return null===e?[]:(0,h.YD)(this.hot.getDataAtCol(e.visualIndex),((t,n)=>({value:Wh(t),meta:this.hot.getCellMeta(n,e.visualIndex)})))}}function _c(e){(0,m.m0)(e.keyCode,"ESCAPE")&&(this.runLocalHooks("cancel"),(0,i.CA)(e))}function bc(e,t){this.hot.hasHook("modifyFiltersMultiSelectValue")&&(e.visualValue=this.hot.runHooks("modifyFiltersMultiSelectValue",e.visualValue,t.get(e.value)))}function Sc(e,t){return"numeric"===t.type?Tt(e,t):e}var Cc=new WeakSet;class Ec extends vu{static get BUTTON_OK(){return"ok"}static get BUTTON_CANCEL(){return"cancel"}constructor(e,t){var n,r;super(e,{id:t.id,stateless:!0}),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(n=this,r=Cc),r.add(n),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"name",""),this.name=t.name,this.elements.push(new eh(this.hot,{type:"button",value:Ee.FILTERS_BUTTONS_OK,className:"htUIButton htUIButtonOK",identifier:Ec.BUTTON_OK})),this.elements.push(new eh(this.hot,{type:"button",value:Ee.FILTERS_BUTTONS_CANCEL,className:"htUIButton htUIButtonCancel",identifier:Ec.BUTTON_CANCEL})),this.registerHooks()}registerHooks(){(0,h.z0)(this.elements,(e=>{e.addLocalHook("click",((e,t)=>function(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")}(Cc,this,Mc).call(this,e,t)))}))}getMenuItemDescriptor(){return{key:this.id,name:this.name,isCommand:!1,disableSelection:!0,hidden:()=>this.isHidden(),renderer:(e,t)=>((0,o.iQ)(t.parentNode,"htFiltersMenuActionBar"),(0,h.z0)(this.elements,(e=>t.appendChild(e.element))),t)}}accept(){this.runLocalHooks("accept")}cancel(){this.runLocalHooks("cancel")}}function Mc(e,t){t.options.identifier===yc.BUTTON_OK?this.accept():this.cancel()}function Tc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}yc=Ec;const Rc="ConditionCollection.filteringStates";class Ac{constructor(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];Tc(this,"hot",void 0),Tc(this,"isMapRegistrable",void 0),Tc(this,"filteringStates",new eo.z),this.hot=e,this.isMapRegistrable=t,!0===this.isMapRegistrable?this.hot.columnIndexMapper.registerMap(Rc,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),o=null!==(n=null==r?void 0:r.conditions)&&void 0!==n?n:[],i=null==r?void 0:r.operation;return this.isMatchInConditions(o,e,i)}isMatchInConditions(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mh;return!e.length||function(e){if(!Ch[e])throw Error(`Operation with id "${e}" does not exist.`);const t=Ch[e].func;return function(e,n){return t(e,n)}}(n)(e,t)}addCondition(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Mh,r=arguments.length>3?arguments[3]:void 0;const o=this.hot.getCellMeta(0,e).locale,i=t.args.map((e=>"string"==typeof e?e.toLocaleLowerCase(o):e)),s=t.name||t.command.key;this.runLocalHooks("beforeAdd",e);const a=this.getOperation(e);if(a){if(a!==n)throw Error(yo.O`The column of index ${e} has been already applied with a \`${a}\`\x20
  29. filter operation. Use \`removeConditions\` to clear the current conditions and then add new ones.\x20
  30. Mind that you cannot mix different types of operations (for instance, if you use \`conjunction\`,\x20
  31. use it consequently for a particular column).`)}else if((0,c.b0)(Ch[n]))throw new Error(yo.O`Unexpected operation named \`${n}\`. Possible ones are\x20
  32. \`disjunction\` and \`conjunction\`.`);const l=this.getConditions(e);0===l.length?this.filteringStates.setValueAtIndex(e,{operation:n,conditions:[{name:s,args:i,func:bu(s,i)}]},r):l.push({name:s,args:i,func:bu(s,i)}),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 this.filteringStates.getEntries().reduce(((e,t)=>{let[n,{operation:r,conditions:o}]=t;return e.push({column:n,operation:r,conditions:o.map((e=>{let{name:t,args:n}=e;return{name:t,args:[...n]}}))}),e}),[])}importAllConditions(e){this.clean(),e.forEach((e=>{e.conditions.forEach((t=>this.addCondition(e.column,t)))}))}removeConditions(e){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}destroy(){this.isMapRegistrable&&this.hot.columnIndexMapper.unregisterMap(Rc),this.filteringStates=null,this.clearLocalHooks()}}(0,s.co)(Ac,Zo.A);const Nc=Ac;function Lc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xc=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>[];Lc(this,"conditionCollection",void 0),Lc(this,"columnDataFactory",void 0),this.conditionCollection=e,this.columnDataFactory=t}filter(){let e=[];return(0,h.z0)(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(0,h.z0)(t,(t=>{void 0!==t&&this.conditionCollection.isMatch(t,e)&&n.push(t)})),n}_getIntersectData(e,t){const n=[];return(0,h.z0)(t,(t=>{const r=t.meta.visualRow;void 0!==e[r]&&(n[r]=e[r])})),n}};function Oc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ic(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 kc=new WeakSet;class Dc{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>[];var r,o;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(r=this,o=kc),o.add(r),Oc(this,"hot",void 0),Oc(this,"conditionCollection",void 0),Oc(this,"columnDataFactory",void 0),Oc(this,"changes",[]),Oc(this,"grouping",!1),Oc(this,"latestEditedColumnPosition",-1),Oc(this,"latestOrderStack",[]),this.hot=e,this.conditionCollection=t,this.columnDataFactory=n,this.conditionCollection.addLocalHook("beforeRemove",(e=>Ic(kc,this,Pc).call(this,e))),this.conditionCollection.addLocalHook("afterRemove",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("afterAdd",(e=>this.updateStatesAtColumn(e))),this.conditionCollection.addLocalHook("beforeClean",(()=>Ic(kc,this,Hc).call(this))),this.conditionCollection.addLocalHook("afterClean",(()=>Ic(kc,this,Fc).call(this)))}groupChanges(){this.grouping=!0}flush(){this.grouping=!1,(0,h.z0)(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 o=this.conditionCollection.getColumnStackPosition(e);-1===o&&(o=this.latestEditedColumnPosition);const i=r.slice(0,o),s=r.slice(o);s.length&&s[0].column===e&&s.shift();const a=(0,g.cF)((function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];const o=new Nc(n.hot,!1),i=[].concat(e,r);o.importAllConditions(i);const s=n.columnDataFactory(t);let a;a=o.isEmpty()?s:new xc(o,(e=>n.columnDataFactory(e))).filter(),a=(0,h.YD)(a,(e=>e.meta.visualRow));const l=Bh(a);return o.destroy(),(0,h.y0)(s,(e=>l(e.meta.visualRow)))}))(i),l=[].concat(this.conditionCollection.getConditions(e));this.runLocalHooks("update",{editedConditionStack:{column:e,conditions:l},dependentConditionStacks:s,filteredRowsFactory:a,conditionArgsChange:t})}destroy(){this.clearLocalHooks(),(0,s.v4)(this,((e,t)=>{this[t]=null}))}}function Pc(e){this.latestEditedColumnPosition=this.conditionCollection.getColumnStackPosition(e)}function Hc(){this.latestOrderStack=this.conditionCollection.getFilteredColumns()}function Fc(){(0,h.z0)(this.latestOrderStack,(e=>{this.updateStatesAtColumn(e)}))}(0,s.co)(Dc,Zo.A);const Yc=Dc,Vc="filters";var Uc=n(41496);function Bc(e,t,n){Wc(e,t),t.set(e,n)}function Wc(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function jc(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function zc(e,t,n){return e.set($c(e,t),n),n}function Gc(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 Kc="filters",Xc=Kc;var qc=new WeakMap,Qc=new WeakMap,Jc=new WeakMap,Zc=new WeakSet;class ed extends hn{static get PLUGIN_KEY(){return Kc}static get PLUGIN_PRIORITY(){return 250}static get PLUGIN_DEPS(){return["plugin:DropdownMenu","plugin:HiddenRows","cell-type:checkbox"]}constructor(e){var t,n;super(e),t=this,Wc(this,n=Zc),n.add(this),jc(this,"dropdownMenuPlugin",null),jc(this,"conditionCollection",null),jc(this,"conditionUpdateObserver",null),jc(this,"components",new Map([["filter_by_condition",null],["filter_operators",null],["filter_by_condition2",null],["filter_by_value",null],["filter_action_bar",null]])),jc(this,"filtersRowsMap",null),Bc(this,qc,void 0),Bc(this,Qc,new WeakSet),Bc(this,Jc,[]),this.hot.addHook("afterGetColHeader",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return $c(Zc,t,ud).call(t,...n)}))}isEnabled(){return!!this.hot.getSettings()[Kc]}enablePlugin(){var e=this;if(this.enabled)return;this.filtersRowsMap=this.hot.rowIndexMapper.registerMap(this.pluginName,new Uc.q),this.dropdownMenuPlugin=this.hot.getPlugin("dropdownMenu");const t=this.hot.getSettings().dropdownMenu,n=t&&t.uiContainer||this.hot.rootDocument.body,r=e=>(e.addLocalHook("accept",(()=>$c(Zc,this,sd).call(this,"accept"))),e.addLocalHook("cancel",(()=>$c(Zc,this,sd).call(this,"cancel"))),e.addLocalHook("change",(t=>$c(Zc,this,ad).call(this,e,t))),e),i=()=>`${this.hot.getTranslatedPhrase(Ee.FILTERS_DIVS_FILTER_BY_CONDITION)}:`;if(!this.components.get("filter_by_condition")){const e=new _h(this.hot,{id:"filter_by_condition",name:i,addSeparator:!1,menuContainer:n});e.addLocalHook("afterClose",(()=>$c(Zc,this,ld).call(this))),this.components.set("filter_by_condition",r(e))}if(this.components.get("filter_operators")||this.components.set("filter_operators",new Yh(this.hot,{id:"filter_operators",name:"Operators"})),!this.components.get("filter_by_condition2")){const e=new _h(this.hot,{id:"filter_by_condition2",name:"",addSeparator:!0,menuContainer:n});e.addLocalHook("afterClose",(()=>$c(Zc,this,ld).call(this))),this.components.set("filter_by_condition2",r(e))}if(this.components.get("filter_by_value")||this.components.set("filter_by_value",r(new vc(this.hot,{id:"filter_by_value",name:()=>`${this.hot.getTranslatedPhrase(Ee.FILTERS_DIVS_FILTER_BY_VALUE)}:`}))),this.components.get("filter_action_bar")||this.components.set("filter_action_bar",r(new Ec(this.hot,{id:"filter_action_bar",name:"Action bar"}))),this.conditionCollection||(this.conditionCollection=new Nc(this.hot)),this.conditionUpdateObserver||(this.conditionUpdateObserver=new Yc(this.hot,this.conditionCollection,(e=>this.getDataMapAtColumn(e))),this.conditionUpdateObserver.addLocalHook("update",(e=>$c(Zc,this,hd).call(this,e)))),this.components.forEach((e=>e.show())),this.addHook("afterDropdownMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return $c(Zc,e,id).call(e,...n)})),this.addHook("beforeDropdownMenuShow",(()=>$c(Zc,this,od).call(this))),this.addHook("afterDropdownMenuShow",(()=>$c(Zc,this,nd).call(this))),this.addHook("afterDropdownMenuHide",(()=>$c(Zc,this,rd).call(this))),this.addHook("afterChange",(e=>$c(Zc,this,td).call(this,e))),this.hot.getSettings().dropdownMenu&&this.dropdownMenuPlugin&&(this.dropdownMenuPlugin.disablePlugin(),this.dropdownMenuPlugin.enablePlugin()),!Gc(qc,this)&&this.dropdownMenuPlugin.enabled){const e=[{focus:()=>{const e=Gc(qc,this).getMenu(),t=e.getNavigator(),n=Gc(qc,this).getLastMenuPage();e.focus(),n>0?t.setCurrentPage(n):t.toFirstItem()}},...Array.from(this.components).map((e=>{let[,t]=e;return t.getElements()})).flat()];zc(qc,this,function(e,t){let n,r=-1;const i=(s=t,Bs({initialPage:0,size:()=>s.length,onItemSelect:(e,t)=>{const n=s[e];return n instanceof hc?t:!(n.element&&!(0,o.zN)(n.element))&&void n.focus()}}));var s;const a=e=>()=>{n.isOpened()&&n.getKeyboardShortcutsCtrl().listen(Vc),i.setCurrentPage(t.indexOf(e))};function l(e){const o=n.getKeyboardShortcutsCtrl(),s=e.getKeyboardShortcutsCtrl();i.clear(),s.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],forwardToContext:o.getContext(Vc),callback:()=>{e.isSubMenu()&&e.close(),o.listen(Vc)}}]),e.isSubMenu()||o.addCustomShortcuts([{keys:[["Tab"],["Shift","Tab"]],callback:e=>{const t=n.getNavigator();t.getCurrentPage()>-1&&(r=t.getCurrentPage()),t.clear(),e.shiftKey?i.toPreviousItem():i.toNextItem()}},{keys:[["Escape"]],callback:()=>{n.close()}},{keys:[["Enter"],["Space"]],preventDefault:!1,callback:e=>{const n=t[i.getCurrentPage()];n instanceof mh&&(n.openOptions(),e.preventDefault()),n instanceof qh&&(n.activate(),e.preventDefault()),n instanceof Ku||e.preventDefault()}}],Vc)}function u(e){e.addLocalHook("afterSelectionChange",(e=>{e.key.startsWith("filter_")||i.clear()})),e.addLocalHook("afterSubmenuOpen",l),e.addLocalHook("afterOpen",l),n=e}return t.forEach((e=>{e instanceof Ku&&(e.addLocalHook("click",a(e)),e.addLocalHook("focus",a(e)),e.addLocalHook("afterClose",a(e)))})),u(e),{...i,listen:function(){n.focus(),n.getKeyboardShortcutsCtrl().listen(Vc)},setMenu:u,getMenu:function(){return n},getLastMenuPage:function(){return r}}}(this.dropdownMenuPlugin.menu,e));const t=e=>{Gc(qc,this).listen(),e.preventDefault(),(0,m.m0)(e.keyCode,"TAB")&&(e.shiftKey?Gc(qc,this).toPreviousItem():Gc(qc,this).toNextItem())};this.components.get("filter_by_value").addLocalHook("listTabKeydown",t),this.components.get("filter_by_condition").addLocalHook("selectTabKeydown",t)}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:Xc})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Xc)}addCondition(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Mh;const o=this.hot.toPhysicalColumn(e);this.conditionCollection.addCondition(o,{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)}}importConditions(e){this.conditionCollection.importAllConditions(e)}exportConditions(){return this.conditionCollection.exportAllConditions()}filter(){const{navigableHeaders:e}=this.hot.getSettings(),t=this._createDataFilter(),n=!this.conditionCollection.isEmpty();let r=[];const o=this.exportConditions(),i=this.hot.runHooks("beforeFilter",o,Gc(Jc,this));if(!1!==i&&n){const n=[];this.hot.batchExecution((()=>{this.filtersRowsMap.clear(),r=(0,h.YD)(t.filter(),(e=>e.meta.visualRow));const e=Bh(r);(0,Mt.Ti)(this.hot.countSourceRows()-1,(t=>{e(t)||n.push(t)})),(0,h.z0)(n,(e=>{this.filtersRowsMap.setValueAtIndex(e,!0)}))}),!0),e||r.length||this.hot.deselectCell(),zc(Jc,this,this.exportConditions())}else!1===i||n?this.importConditions(Gc(Jc,this)):(zc(Jc,this,this.exportConditions()),this.filtersRowsMap.clear());this.hot.selection.isSelected()&&this.hot.selectCell(e?-1:0,this.hot.getSelectedRangeLast().highlight.col),!1!==i&&(this.hot.runHooks("afterFilter",o),this.hot.view.adjustElementsSize(),this.hot.render())}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(0,h.z0)(this.hot.getSourceDataAtCol(t),((e,r)=>{var o;const{row:i,col:s,visualCol:a,visualRow:l,type:u,instance:h,dateFormat:c,locale:d}=this.hot.getCellMeta(r,t),m=null!==(o=this.hot.getDataAtCell(this.hot.toVisualRow(r),t))&&void 0!==o?o:e;n.push({meta:{row:i,col:s,visualCol:a,visualRow:l,type:u,instance:h,dateFormat:c,locale:d},value:Wh(m)})})),n}updateValueComponentCondition(e){const t=jh(this.hot.getDataAtCol(e));this.conditionUpdateObserver.updateStatesAtColumn(e,t)}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 o=e;return o===Rh&&t.command.key!==Eu&&n.command.key!==Eu&&r.command.key!==Eu?o=Nh:r.command.key!==Eu&&(t.command.key!==Eu&&n.command.key!==Eu||(o=Mh)),o}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 xc(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),o=0;o<n;o++)r[o]=arguments[o];return(0,h.z0)(r,(n=>{(0,h.z0)(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.hotMenu,n=t.getPlugin("hiddenRows");for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i<r;i++)o[i-1]=arguments[i];const s=this.getIndexesOfComponents(...o);e?n.showRows(s):n.hideRows(s),t.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 td(e){e&&(0,h.z0)(e,(e=>{const[,t]=e,n=this.hot.propToCol(t);this.conditionCollection.hasConditions(n)&&this.updateValueComponentCondition(n)}))}function nd(){const e=this.dropdownMenuPlugin.menu;this.restoreComponents(Array.from(this.components.values())),e.updateMenuDimensions()}function rd(){this.components.get("filter_by_condition").getSelectElement().closeOptions(),this.components.get("filter_by_condition2").getSelectElement().closeOptions()}function od(){const e=this.dropdownMenuPlugin.menu;Gc(Qc,this).has(e)||Gc(qc,this).setMenu(e),Gc(Qc,this).add(e)}function id(e){e.items.push({name:Ri}),this.components.forEach((t=>{e.items.push(t.getMenuItemDescriptor())}))}function sd(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(),o=this.components.get("filter_by_condition2").getState(),i=this.components.get("filter_by_value").getState(),s=this.getOperationBasedOnArguments(this.components.get("filter_operators").getActiveOperationId(),r,o,i);this.conditionUpdateObserver.groupChanges();let a=this.conditionCollection.getColumnStackPosition(t);-1===a&&(a=void 0),this.conditionCollection.removeConditions(t),r.command.key!==Eu&&(this.conditionCollection.addCondition(t,r,s,a),o.command.key!==Eu&&this.conditionCollection.addCondition(t,o,s,a)),i.command.key!==Eu&&this.conditionCollection.addCondition(t,i,s,a),this.conditionUpdateObserver.flush(),this.components.forEach((e=>e.saveState(t))),this.filter()}null===(t=this.dropdownMenuPlugin)||void 0===t||t.close()}function ad(e,t){const n=this.dropdownMenuPlugin.menu;this.updateDependentComponentsVisibility(),e.constructor!==_h||t.inputsCount||this.setListeningDropdownMenu(),n.updateMenuDimensions()}function ld(){this.setListeningDropdownMenu()}function ud(e,t,n){const r=this.hot.toPhysicalColumn(e);this.enabled&&this.conditionCollection.hasConditions(r)&&n===this.hot.view.getColumnHeadersCount()-1?(0,o.iQ)(t,"htFiltersActive"):(0,o.vy)(t,"htFiltersActive")}function hd(e){var t;if(null===(t=this.dropdownMenuPlugin)||void 0===t||!t.enabled)return;const{editedConditionStack:{conditions:n,column:r},conditionArgsChange:o}=e;Array.isArray(o)&&zc(Jc,this,Gc(Jc,this).map((e=>(e.column===r&&n.length>0&&e.conditions.forEach((e=>{"by_value"===e.name&&(e.args=[[...o]])})),e))));const i=n.filter((e=>e.name===fc)),s=n.filter((e=>e.name!==fc));if(i.length>=2||s.length>=3)(0,Dr.R8)(yo.O`The filter conditions have been applied properly, but couldn’t be displayed visually.\x20
  33. The overall amount of conditions exceed the capability of the dropdown menu.\x20
  34. 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(33110);const cd="internal-use-in-handsontable",dd={licenseKey:cd,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 md(e){var t;return{maxColumns:e.maxColumns,maxRows:e.maxRows,language:null===(t=e[tm])||void 0===t||null===(t=t.language)||void 0===t?void 0:t.langCode}}function pd(e){return Object.keys(e).reduce(((t,n)=>("hyperformula"!==n&&(t[n]=e[n]),t)),{})}function fd(){const e="engine_relationship",t=(0,so.A)(tm);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function gd(){const e="shared_engine_usage",t=(0,so.A)(tm);return t.hasItem(e)||t.register(e,new Map),t.getItem(e)}function yd(e){var t;const n=fd(),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 wd(e,t){if(e){const n=fd(),r=n.get(e),o=gd(),i=o.get(e);r&&r.includes(t)&&(r.splice(r.indexOf(t),1),0===r.length&&n.delete(e)),i&&i.includes(t.guid)&&(i.splice(i.indexOf(t.guid),1),0===i.length&&(o.delete(e),e.destroy()))}}const vd="DD/MM/YYYY";function _d(e,t){return"string"==typeof e&&"date"===t}function bd(e,t){return N(e,t,!0).isValid()}function Sd(e,t){return N(e,t,!0).format(vd)}function Cd(e,t){const n=new Date(Date.UTC(0,0,e+-1));return N(n).format(t)}function Ed(e,t,n){const r=function(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;e.from>r.from&&n&&t&&(r.from+=1)})),r.from>=t&&(t+=1),n.push(r)})),n}(e,function(e,t,n){const r=Array.from(Array(n).keys()).filter((t=>!1===e.includes(t)));var o;return 0===t?null!==(o=r[t])&&void 0!==o?o:0:r[t-1]+1}(e,t,n));return function(e){return e.forEach(((t,n)=>{e.slice(n+1).forEach((e=>{const n=e.from<e.to;e.from>t.from&&n&&(e.from-=1)}))})),e}(r)}function Md(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Td(e,t){return e.get(Ad(e,t))}function Rd(e,t,n){return e.set(Ad(e,t),n),n}function Ad(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 Nd=new WeakMap,Ld=new WeakMap,xd=new WeakMap,Od=new WeakMap,Id=new WeakMap,kd=new WeakMap,Dd=new WeakMap;const Pd=class{constructor(e,t,n){Md(this,Nd,void 0),Md(this,Ld,void 0),Md(this,xd,void 0),Md(this,Od,[]),Md(this,Id,[]),Md(this,kd,void 0),Md(this,Dd,[]),Rd(Nd,this,e),Rd(Ld,this,t),Rd(xd,this,n)}setRemovedHfIndexes(e){return Rd(Dd,this,e.map((e=>{const t=Td(Ld,this).getVisualFromPhysicalIndex(e);return this.getHfIndexFromVisualIndex(t)}))),Td(Dd,this)}getRemovedHfIndexes(){return Td(Dd,this)}getHfIndexFromVisualIndex(e){const t=Td(Ld,this).getIndexesSequence(),n=Td(Ld,this).getNotTrimmedIndexes();return t.indexOf(n[e],e)}syncMoves(e){const t=`move${(0,d.Ob)(Td(Nd,this))}s`;Td(xd,this).getEngine().batch((()=>{e.forEach((e=>{const n=e.from!==e.to,r=e.from+1!==e.to;n&&r&&Td(xd,this).getEngine()[t](Td(xd,this).getSheetId(),e.from,1,e.to)}))}))}storeMovesInformation(e,t,n){!1!==n&&(Rd(Id,this,e.map((e=>this.getHfIndexFromVisualIndex(e)))),Rd(kd,this,this.getHfIndexFromVisualIndex(t)))}calculateAndSyncMoves(e,t){if(Td(xd,this).isPerformingUndoRedo())return;if(!1===e||!1===t)return;const n=Ed(Td(Id,this),Td(kd,this),Td(Ld,this).getNumberOfIndexes());null===Td(xd,this).getSheetId()?Td(xd,this).getPostponeAction((()=>this.syncMoves(n))):this.syncMoves(n)}getIndexesChangeSyncMethod(){const e=`set${(0,d.Ob)(Td(Nd,this))}Order`;return t=>{if(Td(xd,this).isPerformingUndoRedo())return;const n=Td(Ld,this).getIndexesSequence();if("update"===t&&n.length>0){const t=Td(Od,this).map((e=>n.indexOf(e))),r=Td(xd,this).getEngine().getSheetDimensions(Td(xd,this).getSheetId());let o;o="row"===Td(Nd,this)?r.height:r.width;for(let e=t.length;e<o;e+=1)t.push(e);Td(xd,this).getEngine()[e](Td(xd,this).getSheetId(),t)}Rd(Od,this,n)}}init(){Rd(Od,this,Td(Ld,this).getIndexesSequence())}};function Hd(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Fd(e,t){return e.get(Vd(e,t))}function Yd(e,t,n){return e.set(Vd(e,t),n),n}function Vd(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 Ud=new WeakMap,Bd=new WeakMap,Wd=new WeakMap,jd=new WeakMap,zd=new WeakMap,Gd=new WeakMap,$d=new WeakMap;const Kd=class{constructor(e,t,n){Hd(this,Ud,void 0),Hd(this,Bd,void 0),Hd(this,Wd,void 0),Hd(this,jd,!1),Hd(this,zd,!1),Hd(this,Gd,null),Hd(this,$d,null),Yd(Ud,this,new Pd("row",e,this)),Yd(Bd,this,new Pd("column",t,this)),Yd(Wd,this,n)}getForAxis(e){return Fd("row"===e?Ud:Bd,this)}setPerformUndo(e){Yd(jd,this,e)}setPerformRedo(e){Yd(zd,this,e)}isPerformingUndoRedo(){return Fd(jd,this)||Fd(zd,this)}getSheetId(){return Fd($d,this)}getEngine(){return Fd(Gd,this)}getPostponeAction(){return Fd(Wd,this)}setupSyncEndpoint(e,t){Yd(Gd,this,e),Yd($d,this,t),Fd(Ud,this).init(),Fd(Bd,this).init()}};function Xd(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qd(e,t,n){Qd(e,t),t.set(e,n)}function Qd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Jd(e,t,n){return e.set(em(e,t),n),n}function Zd(e,t){return e.get(em(e,t))}function em(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 tm="formulas",nm=["maxRows","maxColumns","language"];Ce.R.getSingleton().register("afterNamedExpressionAdded"),Ce.R.getSingleton().register("afterNamedExpressionRemoved"),Ce.R.getSingleton().register("afterSheetAdded"),Ce.R.getSingleton().register("afterSheetRemoved"),Ce.R.getSingleton().register("afterSheetRenamed"),Ce.R.getSingleton().register("afterFormulasValuesUpdate");const rm=e=>"UndoRedo.undo"===e||"UndoRedo.redo"===e||"auto"===e;var om=new WeakMap,im=new WeakMap,sm=new WeakMap,am=new WeakSet;class lm extends hn{constructor(){var e,t;super(...arguments),e=this,Qd(this,t=am),t.add(this),qd(this,om,!1),qd(this,im,!1),qd(this,sm,[["valuesUpdated",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,Am).call(e,...n)}],["namedExpressionAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,Nm).call(e,...n)}],["namedExpressionRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,Lm).call(e,...n)}],["sheetAdded",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,xm).call(e,...n)}],["sheetRenamed",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,Om).call(e,...n)}],["sheetRemoved",function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return em(am,e,Im).call(e,...n)}]]),Xd(this,"staticRegister",(0,so.A)("formulas")),Xd(this,"engine",null),Xd(this,"sheetId",null),Xd(this,"sheetName",null),Xd(this,"indexSyncer",null),Xd(this,"rowAxisSyncer",null),Xd(this,"columnAxisSyncer",null)}static get PLUGIN_KEY(){return tm}static get PLUGIN_PRIORITY(){return 260}static get SETTING_KEYS(){return[tm,...nm]}isEnabled(){return!!this.hot.getSettings()[tm]}enablePlugin(){var e,t=this;if(!this.enabled)if(this.engine=null!==(e=function(e){const t=e.getSettings(),n=t[tm],r=null==n?void 0:n.engine;if(!0===n)return null;if((0,c.b0)(r))return null;var o;if("function"==typeof r.hyperformula||"function"==typeof r)return function(e,t,n){const r=t[tm],o=function(e){var t;const n=e[tm],r=pd(null!=n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),o=md(e);return{...dd,...r,...o}}(t),i=fd(),s=gd();(function(e,t){t&&t.forEach((t=>{const{name:n,plugin:r,translations:o}=t;try{e.registerFunction(n,r,o)}catch(e){(0,Dr.R8)(e.message)}}))})(e,r.functions),function(e,t){if(t){const{langCode:n}=t;try{e.registerLanguage(n,t)}catch(e){(0,Dr.R8)(e.message)}}}(e,r.language);const a=e.buildEmpty(o);return i.set(a,[n]),s.set(a,[n.guid]),function(e,t){t&&(e.suspendEvaluation(),t.forEach((t=>{const{name:n,expression:r,scope:o,options:i}=t;try{e.addNamedExpression(n,r,o,i)}catch(e){(0,Dr.R8)(e.message)}})),e.resumeEvaluation())}(a,r.namedExpressions),a.on("sheetAdded",(()=>{a.rebuildAndRecalculate()})),a.on("sheetRemoved",(()=>{a.rebuildAndRecalculate()})),a}(null!==(o=r.hyperformula)&&void 0!==o?o:r,t,e);if("object"==typeof r&&(0,c.b0)(r.hyperformula)){const t=fd(),n=gd().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:cd}),r.getConfig().leapYear1900===dd.leapYear1900&&!1!==(0,s.wU)(r.getConfig().nullDate,dd.nullDate)||(0,Dr.R8)(yo.O`If you use HyperFormula with Handsontable, keep the default \`leapYear1900\` and \`nullDate\`
  35. settings. Otherwise, HyperFormula's dates may not sync correctly with Handsontable's dates.`),r}return null}(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&&em(am,this,um).call(this,e)}this.addHook("beforeLoadData",(function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return em(am,t,dm).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 em(am,t,pm).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 em(am,t,dm).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 em(am,t,pm).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 em(am,t,fm).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 em(am,t,gm).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 em(am,t,hm).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 em(am,t,wm).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 em(am,t,ym).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 em(am,t,ym).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 em(am,t,vm).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 em(am,t,_m).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 em(am,t,Cm).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 em(am,t,Em).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 em(am,t,bm).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 em(am,t,Sm).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 em(am,t,Mm).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 em(am,t,Tm).call(t,...n)})),this.indexSyncer=new Kd(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,o)=>{this.rowAxisSyncer.calculateAndSyncMoves(r,o)})),this.hot.addHook("afterColumnMove",((e,t,n,r,o)=>{this.columnAxisSyncer.calculateAndSyncMoves(r,o)})),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 em(am,t,mm).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 em(am,t,Rm).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 em(am,t,cm).call(t,...n)})),Zd(sm,this).forEach((e=>{let[t,n]=e;return this.engine.on(t,n)})),super.enablePlugin()}else(0,Dr.R8)("Missing the required `engine` key in the Formulas settings. Please fill it with either an engine class or an engine instance.")}disablePlugin(){Zd(sm,this).forEach((e=>{let[t,n]=e;return this.engine.off(t,n)})),wd(this.engine,this.hot),this.engine=null,super.disablePlugin()}updatePlugin(e){const t=function(e){var t;const n=e[tm];return{...pd(null!=n&&null!==(t=n.engine)&&void 0!==t&&t.hyperformula?n.engine:{}),...md(e)}}(this.hot.getSettings());(function(e,t){return Object.keys(t).some((n=>void 0!==t[n]&&t[n]!==e[n]))})(this.engine.getConfig(),t)&&this.engine.updateConfig(t);const n=this.hot.getSettings()[tm];if((0,c.O9)(n)&&(0,c.O9)(n.sheetName)&&n.sheetName!==this.sheetName&&this.switchSheet(n.sheetName),!e.data&&null===this.sheetName){const e=this.hot.getSettings()[tm].sheetName;if(e&&this.engine.doesSheetExist(e))this.switchSheet(this.sheetName);else{const t=this.addSheet(null!=e?e:void 0,this.hot.getSourceDataArray());em(am,this,um).call(this,t)}}super.updatePlugin(e)}destroy(){Zd(sm,this).forEach((e=>{var t;let[n,r]=e;return null===(t=this.engine)||void 0===t?void 0:t.off(n,r)})),Jd(sm,this,null),wd(this.engine,this.hot),this.engine=null,super.destroy()}addSheet(e,t){if((0,c.O9)(t)&&!(0,Gh.ZI)(t))return(0,Dr.R8)("The provided data should be an array of arrays."),!1;if(null!=e&&this.engine.doesSheetExist(e))return(0,Dr.R8)("Sheet with the provided name already exists."),!1;try{const n=this.engine.addSheet(null!=e?e:void 0);return t&&this.engine.setSheetContent(this.engine.getSheetId(n),t),n}catch(e){return(0,Dr.R8)(e.message),!1}}switchSheet(e){if(!this.engine.doesSheetExist(e))return void(0,Dr.z3)(`The sheet named \`${e}\` does not exist, switch aborted.`);em(am,this,um).call(this,e);const t=this.engine.getSheetSerialized(this.sheetId);t.length>0&&this.hot.loadData(t,`${(0,d.Ob)(tm)}.switchSheet`)}getCellType(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.sheetId;const r=this.hot.toPhysicalRow(e),o=this.hot.toPhysicalColumn(t);return null!==r&&null!==o?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||null===(t=e.address)||void 0===t?void 0:t.sheet;void 0!==r&&(n.has(r)||n.add(r))})),yd(this.engine).forEach(((e,r)=>{var o;(t||r!==this.sheetId)&&n.has(r)&&(e.render(),null===(o=e.view)||void 0===o||o.adjustElementsSize())}))}validateDependentCells(e){const t=e=>{var t;const{row:n,col:r,sheet:o}=null!==(t=null==e?void 0:e.address)&&void 0!==t?t:{};return(0,c.O9)(o)?`${o}:${n}x${r}`:""},n=new Set((arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]).map((e=>t(e))));e.forEach((e=>{var r,o;const{row:i,col:s}=null!==(r=e.address)&&void 0!==r?r:{};if(!1===(0,c.O9)(i)||!1===(0,c.O9)(s)||i>=this.hot.countRows()||s>=this.hot.countCols())return;const a=null==e||null===(o=e.address)||void 0===o?void 0:o.sheet,l=t(e);if(void 0!==a&&!n.has(l)){const e=yd(this.engine).get(a);if(!e)return;e.validateCell(e.getDataAtCell(i,s),e.getCellMeta(i,s),(()=>{}))}}))}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(0,Dr.R8)(`Not possible to set cell data at ${JSON.stringify(r)}`);const o=this.hot.getCellMeta(e,t);var i;return _d(n,o.type)&&(bd(n,o.dateFormat)?n=Sd(n,o.dateFormat):!1===("string"==typeof(i=n)&&i.startsWith("="))&&(n=`'${n}`)),this.engine.setCellContents(r,n)}}function um(e){this.sheetName=e,this.sheetId=this.engine.getSheetId(this.sheetName)}function hm(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 o=this.engine.getCellValue(e);return"date"===n.type&&(0,Mt.kf)(o)&&(o=Cd(o,n.dateFormat)),"object"==typeof o&&null!==o?o.value:o}return e}function cm(e,t,n){const{row:r,col:o}=t.getTopStartCorner(),{row:i,col:s}=t.getBottomEndCorner(),{row:a,col:l}=n.getTopStartCorner(),{row:u,col:h}=n.getBottomEndCorner(),c={start:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(r),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(o),sheet:this.sheetId},end:{row:this.rowAxisSyncer.getHfIndexFromVisualIndex(i),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),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(h),sheet:this.sheetId}};if(!1===this.engine.isItPossibleToSetCellContents(d))return!1;const m=this.engine.getFillRangeData(c,d),{row:p,col:f}=c.start,{row:g,col:y}=c.end,w=g-p+1,v=y-f+1;for(let e=0;e<m.length;e+=1)for(let t=0;t<m[e].length;t+=1){const n=m[e][t],r=p+e%w,o=f+t%v,i=this.hot.getCellMeta(r,o);_d(n,i.type)&&(n.startsWith("'")?m[e][t]=n.slice(1):!1===this.isFormulaCellType(r,o,this.sheetId)&&(m[e][t]=(_=n,b=i.dateFormat,N(_,vd,!0).format(b))))}var _,b;return m}function dm(e,t){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:"").includes((0,d.Ob)(tm))||Jd(im,this,(0,c.b0)(this.hot.getSettings().data))}function mm(){if(Zd(im,this))return void this.switchSheet(this.sheetName);const e=this.hot.getSourceDataArray();e.forEach(((t,n)=>{t.forEach(((t,r)=>{const o=this.hot.getCellMeta(n,r,{skipMetaExtension:!0}),i=o.dateFormat;_d(t,o.type)&&(bd(t,i)?e[n][r]=Sd(t,i):t.startsWith("=")||(e[n][r]=`'${t}`))}))})),Jd(om,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jd(om,this,!1)}function pm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(n.includes((0,d.Ob)(tm)))return;const r=function(e,t){return!(0,c.b0)(t)&&e.doesSheetExist(t)||(t=e.addSheet(t)),t}(this.engine,this.hot.getSettings()[tm].sheetName);if(em(am,this,um).call(this,r),"updateSettings"!==n)if(Zd(im,this))this.switchSheet(this.sheetName);else{const e=this.hot.getSourceDataArray();if(this.engine.isItPossibleToReplaceSheetContent(this.sheetId,e)){Jd(om,this,!0);const t=this.engine.setSheetContent(this.sheetId,e);this.indexSyncer.setupSyncEndpoint(this.engine,this.sheetId),this.renderDependentSheets(t),Jd(om,this,!1)}}}function fm(e,t,n,r){if("get"!==r||Zd(om,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const o=this.hot.toVisualRow(e);if(null===o||null===t)return;const i=this.getCellType(o,t);if("VALUE"===i||"EMPTY"===i)return void(n.value=(s=n.value,function(e){return"string"==typeof e&&"'"===e.charAt(0)&&"="===e.charAt(1)}(s)?s.substr(1):s));var s;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(o),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(t),sheet:this.sheetId};let l=this.engine.getCellValue(a);const u=this.hot.getCellMeta(o,t,{skipMetaExtension:!0});"date"===u.type&&(0,Mt.kf)(l)&&(l=Cd(l,u.dateFormat)),n.value="object"==typeof l&&null!==l?l.value:l}function gm(e,t,n,r){if("get"!==r||Zd(om,this)||null===this.sheetName||!this.engine.doesSheetExist(this.sheetName))return;const o=this.hot.toVisualRow(e),i=this.hot.propToCol(t);if(null===o||null===i)return;const s=this.getCellType(o,i);if("VALUE"===s||"EMPTY"===s)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(o),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(i),sheet:this.sheetId};n.value=this.engine.getCellSerialized(l)}function ym(e,t){if(rm(t))return;const n=[],r=[],o=this.engine.batch((()=>{e.forEach((e=>{let[t,o,,i]=e;const s=this.hot.propToCol(o),a=this.hot.toPhysicalRow(t),l=this.hot.toPhysicalColumn(s),u={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};null!==a&&null!==l?this.syncChangeWithEngine(t,s,i):n.push([t,s,i]),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(o),this.validateDependentCells(o,r)}function wm(e,t){if(rm(t))return;const n=[],r=[];e.forEach((e=>{let[t,o,,i]=e;const s=this.hot.propToCol(o);if(!(0,Mt.kf)(s))return;const a={row:this.rowAxisSyncer.getHfIndexFromVisualIndex(t),col:this.columnAxisSyncer.getHfIndexFromVisualIndex(s),sheet:this.sheetId};this.engine.isItPossibleToSetCellContents(a)?(r.push({address:a}),n.push(...this.engine.setCellContents(a,i))):(0,Dr.R8)(`Not possible to set source cell data at ${JSON.stringify(a)}`)})),this.renderDependentSheets(n),this.validateDependentCells(n,r)}function vm(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 _m(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 bm(e,t,n){return!1!==this.rowAxisSyncer.setRemovedHfIndexes(n).every((e=>this.engine.isItPossibleToRemoveRows(this.sheetId,[e,1])))&&void 0}function Sm(e,t,n){return!1!==this.columnAxisSyncer.setRemovedHfIndexes(n).every((e=>this.engine.isItPossibleToRemoveColumns(this.sheetId,[e,1])))&&void 0}function Cm(e,t,n){if(rm(n))return;const r=this.engine.addRows(this.sheetId,[this.rowAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function Em(e,t,n){if(rm(n))return;const r=this.engine.addColumns(this.sheetId,[this.columnAxisSyncer.getHfIndexFromVisualIndex(e),t]);this.renderDependentSheets(r)}function Mm(e,t,n,r){if(rm(r))return;const o=this.rowAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{o.forEach((e=>{this.engine.removeRows(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function Tm(e,t,n,r){if(rm(r))return;const o=this.columnAxisSyncer.getRemovedHfIndexes().sort(((e,t)=>t-e)),i=this.engine.batch((()=>{o.forEach((e=>{this.engine.removeColumns(this.sheetId,[e,1])}))}));this.renderDependentSheets(i)}function Rm(e,t,n){var r;Jd(om,this,!0);const o=this.hot.getSourceDataArray(n,0,n+((null===(r=t.__children)||void 0===r?void 0:r.length)||0),this.hot.countSourceCols());Jd(om,this,!1),o.forEach(((e,t)=>{e.forEach(((e,r)=>{this.engine.setCellContents({col:r,row:n+t,sheet:this.sheetId},[[e]])}))}))}function Am(e){this.hot.runHooks("afterFormulasValuesUpdate",e)}function Nm(e,t){this.hot.runHooks("afterNamedExpressionAdded",e,t)}function Lm(e,t){this.hot.runHooks("afterNamedExpressionRemoved",e,t)}function xm(e){this.hot.runHooks("afterSheetAdded",e)}function Om(e,t){em(am,this,um).call(this,t),this.hot.runHooks("afterSheetRenamed",e,t)}function Im(e,t){this.hot.runHooks("afterSheetRemoved",e,t)}var km=n(52246);function Dm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Pm(e,t){return e.get(Fm(e,t))}function Hm(e,t,n){return e.set(Fm(e,t),n),n}function Fm(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")}Ce.R.getSingleton().register("beforeHideColumns"),Ce.R.getSingleton().register("afterHideColumns"),Ce.R.getSingleton().register("beforeUnhideColumns"),Ce.R.getSingleton().register("afterUnhideColumns");const Ym="hiddenColumns";var Vm=new WeakMap,Um=new WeakSet;class Bm extends hn{constructor(){var e;super(...arguments),Dm(this,e=Um),e.add(this),function(e,t){Dm(e,t),t.set(e,null)}(this,Vm)}static get PLUGIN_KEY(){return Ym}static get PLUGIN_PRIORITY(){return 310}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,columns:[]}}isEnabled(){return!!this.hot.getSettings()[Ym]}enablePlugin(){var e=this;this.enabled||(Hm(Vm,this,new km.o),Pm(Vm,this).addLocalHook("init",(()=>Fm(Um,this,Km).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,Pm(Vm,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Fm(Um,e,$m).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>Fm(Um,this,jm).call(this,e,t,n))),this.addHook("modifyColWidth",((e,t)=>Fm(Um,this,Wm).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 Fm(Um,e,Gm).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>Fm(Um,this,zm).call(this,e))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.columnIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showColumns(e){const t=this.getHiddenColumns(),n=this.isValidConfig(e);let r=t;const o=Pm(Vm,this).getValues().slice(),i=e.length>0;if(n&&i){const t=e.map((e=>this.hot.toPhysicalColumn(e)));(0,h.z0)(t,(e=>{o[e]=!1})),r=(0,h.mu)(o,((e,t,n)=>(t&&e.push(this.hot.toVisualColumn(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideColumns",t,r,n&&i)&&(n&&i&&Pm(Vm,this).setValues(o),this.hot.view.adjustElementsSize(),this.hot.runHooks("afterUnhideColumns",t,r,n&&i,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)))),!1!==this.hot.runHooks("beforeHideColumns",t,r,n)&&(n&&this.hot.batchExecution((()=>{(0,h.z0)(e,(e=>{Pm(Vm,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(0,h.YD)(Pm(Vm,this).getHiddenIndexes(),(e=>this.hot.toVisualColumn(e)))}isHidden(e){return Pm(Vm,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(){(0,h.z0)(this.hot.getCellsMeta(),(e=>{e.skipColumnOnPaste=!1}))}destroy(){Hm(Vm,this,null),super.destroy()}}function Wm(e,t){return this.isHidden(t)?0:this.getSetting("indicators")&&(this.isHidden(t+1)||this.isHidden(t-1))&&"number"==typeof e&&this.hot.hasColHeaders()?e+15:void 0}function jm(e,t,n){if(!1===this.getSetting("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 zm(e){if(this.getSetting("copyPasteEnabled"))return e;const t=[],n=(e,n,r,o)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:o})};return(0,h.z0)(e,(e=>{let t=!0,r=0;(0,Mt.Ti)(e.startCol,e.endCol,(o=>{this.isHidden(o)?(t||n(e.startRow,e.endRow,r,o-1),t=!0):(t&&(r=o),o===e.endCol&&n(e.startRow,e.endRow,r,o),t=!1)}))})),t}function Gm(e,t){if(!this.getSetting("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"),(0,o.iQ)(t,n)}function $m(e){var t;e.items.push({name:Ri},(t=this,{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(Ee.CONTEXTMENU_ITEMS_HIDE_COLUMN,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(e.col,n.col),0),o=Math.max(e.col,n.col),i=[];for(let e=r;e<=o;e+=1)i.push(e);t.hideColumns(i);const s=i[i.length-1],a=this.columnIndexMapper.getNearestNotHiddenIndex(s,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(e){const t=[];return{key:"hidden_columns_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_SHOW_COLUMN,e)},callback(){var n,r;if(0===t.length)return;let o=t[0],i=t[t.length-1];o=null!==(n=this.columnIndexMapper.getNearestNotHiddenIndex(o-1,-1))&&void 0!==n?n:0,i=null!==(r=this.columnIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==r?r:this.countCols()-1,e.showColumns(t),this.render(),this.view.adjustElementsSize(),i-o+1===this.countCols()||this.selectColumns(o,i)},disabled:!1,hidden(){const n=(0,h.YD)(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(),o=r.getTopStartCorner().col,i=r.getBottomEndCorner().col,s=this.columnIndexMapper,a=s.getRenderableFromVisualIndex(o),l=s.getRenderableFromVisualIndex(i),u=s.getNotTrimmedIndexes(),c=[];if(o!==i){if(i-o+1>l-a+1){const e=u.slice(o,i+1);c.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<o)c.push(...u.slice(0,o));else if(null===a)c.push(...u.slice(0,this.countCols()));else{const e=this.countCols()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...u.slice(i+1))}return(0,h.z0)(c,(e=>{t.push(this.toVisualColumn(e))})),0===t.length}}}(this))}function Km(){const e=this.getSetting("columns");Array.isArray(e)&&this.hideColumns(e)}function Xm(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function qm(e,t){return e.get(Jm(e,t))}function Qm(e,t,n){return e.set(Jm(e,t),n),n}function Jm(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")}Ce.R.getSingleton().register("beforeHideRows"),Ce.R.getSingleton().register("afterHideRows"),Ce.R.getSingleton().register("beforeUnhideRows"),Ce.R.getSingleton().register("afterUnhideRows");const Zm="hiddenRows";var ep=new WeakMap,tp=new WeakSet;class np extends hn{constructor(){var e;super(...arguments),Xm(this,e=tp),e.add(this),function(e,t){Xm(e,t),t.set(e,null)}(this,ep)}static get PLUGIN_KEY(){return Zm}static get PLUGIN_PRIORITY(){return 320}static get DEFAULT_SETTINGS(){return{copyPasteEnabled:!0,indicators:!1,rows:[]}}isEnabled(){return!!this.hot.getSettings()[Zm]}enablePlugin(){var e=this;this.enabled||(Qm(ep,this,new km.o),qm(ep,this).addLocalHook("init",(()=>Jm(tp,this,lp).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,qm(ep,this)),this.addHook("afterContextMenuDefaultOptions",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Jm(tp,e,ap).call(e,...n)})),this.addHook("afterGetCellMeta",((e,t,n)=>Jm(tp,this,op).call(this,e,t,n))),this.addHook("modifyRowHeight",((e,t)=>Jm(tp,this,rp).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 Jm(tp,e,sp).call(e,...n)})),this.addHook("modifyCopyableRange",(e=>Jm(tp,this,ip).call(this,e))),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){super.disablePlugin(),this.hot.rowIndexMapper.unregisterMap(this.pluginName),this.resetCellsMeta()}showRows(e){const t=this.getHiddenRows(),n=this.isValidConfig(e);let r=t;const o=qm(ep,this).getValues().slice(),i=e.length>0;if(n&&i){const t=e.map((e=>this.hot.toPhysicalRow(e)));(0,h.z0)(t,(e=>{o[e]=!1})),r=(0,h.mu)(o,((e,t,n)=>(t&&e.push(this.hot.toVisualRow(n)),e)),[])}!1!==this.hot.runHooks("beforeUnhideRows",t,r,n&&i)&&(n&&i&&qm(ep,this).setValues(o),this.hot.runHooks("afterUnhideRows",t,r,n&&i,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)))),!1!==this.hot.runHooks("beforeHideRows",t,r,n)&&(n&&this.hot.batchExecution((()=>{(0,h.z0)(e,(e=>{qm(ep,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(0,h.YD)(qm(ep,this).getHiddenIndexes(),(e=>this.hot.toVisualRow(e)))}isHidden(e){return qm(ep,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(){(0,h.z0)(this.hot.getCellsMeta(),(e=>{e.skipRowOnPaste=!1}))}destroy(){Qm(ep,this,null),super.destroy()}}function rp(e,t){return this.isHidden(t)?0:e}function op(e,t,n){if(!1===this.getSetting("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 ip(e){if(this.getSetting("copyPasteEnabled"))return e;const t=[],n=(e,n,r,o)=>{t.push({startRow:e,endRow:n,startCol:r,endCol:o})};return(0,h.z0)(e,(e=>{let t=!0,r=0;(0,Mt.Ti)(e.startRow,e.endRow,(o=>{this.isHidden(o)?(t||n(r,o-1,e.startCol,e.endCol),t=!0):(t&&(r=o),o===e.endRow&&n(r,o,e.startCol,e.endCol),t=!1)}))})),t}function sp(e,t){if(!this.getSetting("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"),(0,o.iQ)(t,n)}function ap(e){var t;e.items.push({name:Ri},(t=this,{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(Ee.CONTEXTMENU_ITEMS_HIDE_ROW,t)},callback(){const{from:e,to:n}=this.getSelectedRangeLast(),r=Math.max(Math.min(e.row,n.row),0),o=Math.max(e.row,n.row),i=[];for(let e=r;e<=o;e+=1)i.push(e);t.hideRows(i);const s=i[i.length-1],a=this.rowIndexMapper.getNearestNotHiddenIndex(s,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(e){const t=[];return{key:"hidden_rows_show",name(){const e=t.length>1?1:0;return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_SHOW_ROW,e)},callback(){var n,r;if(0===t.length)return;let o=t[0],i=t[t.length-1];o=null!==(n=this.rowIndexMapper.getNearestNotHiddenIndex(o-1,-1))&&void 0!==n?n:0,i=null!==(r=this.rowIndexMapper.getNearestNotHiddenIndex(i+1,1))&&void 0!==r?r:this.countRows()-1,e.showRows(t),this.render(),this.view.adjustElementsSize(),i-o+1===this.countRows()||this.selectRows(o,i)},disabled:!1,hidden(){const n=(0,h.YD)(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(),o=r.getTopStartCorner().row,i=r.getBottomEndCorner().row,s=this.rowIndexMapper,a=s.getRenderableFromVisualIndex(o),l=s.getRenderableFromVisualIndex(i),u=s.getNotTrimmedIndexes(),c=[];if(o!==i){if(i-o+1>l-a+1){const e=u.slice(o,i+1);c.push(...e.filter((e=>n.includes(e))))}}else if(0===a&&a<o)c.push(...u.slice(0,o));else if(null===a)c.push(...u.slice(0,this.countRows()));else{const e=this.countRows()-1;l===s.getRenderableFromVisualIndex(s.getNearestNotHiddenIndex(e,-1))&&e>i&&c.push(...u.slice(i+1))}return(0,h.z0)(c,(e=>{t.push(this.toVisualRow(e))})),0===t.length}}}(this))}function lp(){const e=this.getSetting("rows");Array.isArray(e)&&this.hideRows(e)}function up(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hp(e,t){return e.get(dp(e,t))}function cp(e,t,n){return e.set(dp(e,t),n),n}function dp(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")}Ce.R.getSingleton().register("beforeColumnFreeze"),Ce.R.getSingleton().register("afterColumnFreeze"),Ce.R.getSingleton().register("beforeColumnUnfreeze"),Ce.R.getSingleton().register("afterColumnUnfreeze");const mp="manualColumnFreeze";var pp=new WeakMap,fp=new WeakSet;class gp extends hn{constructor(){var e;super(...arguments),up(this,e=fp),e.add(this),function(e,t){up(e,t),t.set(e,!1)}(this,pp)}static get PLUGIN_KEY(){return mp}static get PLUGIN_PRIORITY(){return 110}isEnabled(){return!!this.hot.getSettings()[mp]}enablePlugin(){this.enabled||(this.addHook("afterContextMenuDefaultOptions",(e=>dp(fp,this,yp).call(this,e))),this.addHook("beforeColumnMove",((e,t)=>dp(fp,this,wp).call(this,e,t))),super.enablePlugin())}disablePlugin(){cp(pp,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;hp(pp,this)||cp(pp,this,!0),!1!==this.hot.runHooks("beforeColumnFreeze",e,n)&&(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;hp(pp,this)||cp(pp,this,!0),!1!==this.hot.runHooks("beforeColumnUnfreeze",e,n)&&(n&&(t._fixedColumnsStart-=1,this.hot.columnIndexMapper.moveIndexes(e,t.fixedColumnsStart)),this.hot.runHooks("afterColumnUnfreeze",e,n))}}function yp(e){var t;e.items.push({name:"---------"},(t=this,{key:"freeze_column",name(){return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_FREEZE_COLUMN)},callback(e,n){const[{start:{col:r}}]=n;t.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(e){return{key:"unfreeze_column",name(){return this.getTranslatedPhrase(Ee.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}}}(this))}function wp(e,t){if(hp(pp,this)){const n=this.hot.getSettings().fixedColumnsStart;if(t<n)return!1;if(e.some((e=>e<n)))return!1}}function vp(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const _p="px",bp=class{constructor(e){vp(this,"hot",void 0),vp(this,"_element",null),vp(this,"state",0),vp(this,"inlineProperty",void 0),this.hot=e,this.inlineProperty=e.isRtl()?"right":"left"}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){(0,Mt.kf)(e)&&(this._element.style.top=e+_p),(0,Mt.kf)(t)&&(this._element.style[this.inlineProperty]=t+_p)}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){(0,Mt.kf)(e)&&(this._element.style.width=e+_p),(0,Mt.kf)(t)&&(this._element.style.height=t+_p)}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){(0,Mt.kf)(e)&&(this._element.style.marginTop=e+_p),(0,Mt.kf)(t)&&(this._element.style[`margin${(0,d.Ob)(this.inlineProperty)}`]=t+_p)}getOffset(){const e=this._element.style,t=`margin${(0,d.Ob)(this.inlineProperty)}`;return{top:e.marginTop?parseInt(e.marginTop,10):0,start:e[t]?parseInt(e[t],10):0}}},Sp=class extends bp{build(){super.build(),(0,o.iQ)(this._element,"ht__manualColumnMove--backlight")}},Cp=class extends bp{build(){super.build(),(0,o.iQ)(this._element,"ht__manualColumnMove--guideline")}};function Ep(e,t,n){Mp(e,t),t.set(e,n)}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 e.set(Ap(e,t),n),n}function Rp(e,t){return e.get(Ap(e,t))}function Ap(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")}Ce.R.getSingleton().register("beforeColumnMove"),Ce.R.getSingleton().register("afterColumnMove");const Np="manualColumnMove",Lp="ht__manualColumnMove",xp="show-ui",Op="on-moving--columns",Ip="after-selection--columns";var kp=new WeakMap,Dp=new WeakMap,Pp=new WeakMap,Hp=new WeakMap,Fp=new WeakMap,Yp=new WeakMap,Vp=new WeakMap,Up=new WeakMap,Bp=new WeakMap,Wp=new WeakMap,jp=new WeakMap,zp=new WeakSet;class Gp extends hn{constructor(){var e;super(...arguments),Mp(this,e=zp),e.add(this),Ep(this,kp,new Sp(this.hot)),Ep(this,Dp,new Cp(this.hot)),Ep(this,Pp,[]),Ep(this,Hp,0),Ep(this,Fp,!1),Ep(this,Yp,{}),Ep(this,Vp,void 0),Ep(this,Up,void 0),Ep(this,Bp,void 0),Ep(this,Wp,void 0),Ep(this,jp,void 0)}static get PLUGIN_KEY(){return Np}static get PLUGIN_PRIORITY(){return 120}isEnabled(){return!!this.hot.getSettings()[Np]}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 Ap(zp,e,$p).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 Ap(zp,e,Xp).call(e,...n)})),this.addHook("afterScrollVertically",(()=>Ap(zp,this,Qp).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 Ap(zp,e,Jp).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,o.iQ)(this.hot.rootElement,Lp),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,o.vy)(this.hot.rootElement,Lp),this.unregisterEvents(),Rp(kp,this).destroy(),Rp(Dp,this).destroy(),super.disablePlugin()}moveColumn(e,t){return this.moveColumns([e],t)}moveColumns(e,t){const n=Rp(Vp,this),r=this.isMovePossible(e,t),o=this.hot.runHooks("beforeColumnMove",e,t,n,r);if(Tp(Vp,this,void 0),!1===o)return;r&&this.hot.columnIndexMapper.moveIndexes(e,t);const i=r&&this.isColumnOrderChanged(e,t);return this.hot.runHooks("afterColumnMove",e,t,n,r,i),i}dragColumn(e,t){return this.dragColumns([e],t)}dragColumns(e,t){const n=this.countFinalIndex(e,t);return Tp(Vp,this,t),this.moveColumns(e,n)}isMovePossible(e,t){const n=this.hot.columnIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,o=t<0,i=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(r||o||i||s)}isColumnOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}countFinalIndex(e,t){const n=(0,h.mu)(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 o=e;o<=t;o+=1){const e=n.getRenderableFromVisualIndex(o);o<0?r+=this.hot.view._wt.wtViewport.getRowHeaderWidth()||0:null!==e&&(r+=this.hot.view._wt.wtTable.getColumnWidth(e)||0)}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[Np];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(0,Mt.Ti)(e,t,(e=>{n.push(e)})),n}refreshPositions(){const e=this.hot.view.getFirstFullyVisibleColumn();this.isFixedColumnsStart(Rp(Up,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 i=this.hot.view.THEAD.offsetLeft+this.getColumnsWidth(0,Rp(Up,this)-1);const s=t.hider.offsetWidth,a=t.TBODY.offsetLeft,l=Rp(kp,this).getOffset().start,u=Rp(kp,this).getSize().width;let h=0,c=0;if(this.hot.isRtl()){const e=this.hot.rootWindow,t=(0,o.Gq)(this.hot.rootElement),i=e.innerWidth-Rp(Bp,this)-t;c=e.innerWidth-Rp(Yp,this).eventPageX-i-(void 0===n.scrollX?r:0)}else c=Rp(Yp,this).eventPageX-(Rp(Bp,this)-(void 0===n.scrollX?r:0));if(Rp(Wp,this)&&(h=this.hot.view._wt.wtOverlays.inlineStartOverlay.clone.wtTable.getColumnHeader(-1).offsetWidth),this.isFixedColumnsStart(Rp(Up,this))&&(i+=r),i+=h,Rp(Up,this)<0)Rp(jp,this)>0?Rp(Yp,this).col=0:Rp(Yp,this).col=e>0?e-1:e;else if(Rp(Yp,this).TD.offsetWidth/2+i<=c){const e=Rp(Up,this)>=Rp(Hp,this)?Rp(Hp,this)-1:Rp(Up,this);Rp(Yp,this).col=e+1,i+=Rp(Yp,this).TD.offsetWidth}else Rp(Yp,this).col=Rp(Up,this);let d=c,m=i;c+u+l>=s?d=s-u-l:c+l<a+h&&(d=a+h+Math.abs(l)),i>=s-1?m=s-1:0===m?m=1:void 0!==n.scrollX&&Rp(Up,this)<Rp(jp,this)&&(m-=Rp(Bp,this)<=n.scrollX?Rp(Bp,this):0),Rp(kp,this).setPosition(null,d),Rp(Dp,this).setPosition(null,m)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>Ap(zp,this,Kp).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Ap(zp,this,qp).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Rp(kp,this).build(),Rp(Dp,this).build()}destroy(){Rp(kp,this).destroy(),Rp(Dp,this).destroy(),super.destroy()}}function $p(e,t,n,r){const s=this.hot.view._wt.wtTable,a=this.hot.selection.isSelectedByColumnHeader(),l=this.hot.getSelectedRangeLast(),u=(0,o.nB)(e.target,"sortAction");if(!l||!a||Rp(Fp,this)||0!==e.button||u)return Tp(Fp,this,!1),Rp(Pp,this).length=0,void(0,o.vy)(this.hot.rootElement,[Op,xp]);const h=Rp(Dp,this).isBuilt()&&!Rp(Dp,this).isAppended(),c=Rp(kp,this).isBuilt()&&!Rp(kp,this).isAppended();h&&c&&(Rp(Dp,this).appendTo(s.hider),Rp(kp,this).appendTo(s.hider));const{from:d,to:m}=l,p=Math.min(d.col,m.col),f=Math.max(d.col,m.col);if(t.row<0&&t.col>=p&&t.col<=f){r.column=!0,Tp(Fp,this,!0);const a=n.firstChild?(0,i.zg)(e,n.firstChild).x:e.offsetX;Rp(Yp,this).eventPageX=e.pageX,Tp(Up,this,t.col),Rp(Yp,this).TD=n,Rp(Yp,this).col=t.col,Tp(Pp,this,this.prepareColumnsToMoving(p,f)),Tp(Wp,this,!!this.hot.getSettings().rowHeaders),Tp(Hp,this,this.hot.countCols()),Tp(jp,this,this.hot.getSettings().fixedColumnsStart),Tp(Bp,this,(0,o.cY)(this.hot.rootElement).left);const l=Rp(Wp,this)?-1:0,u=s.holder.scrollTop+s.getColumnHeaderHeight(0)+1,h=t.col<Rp(jp,this),c=this.hot.view._wt.wtOverlays.inlineStartOverlay.getOverlayOffset(),d=Math.abs(a-(this.hot.isRtl()?n.offsetWidth:0)),m=this.getColumnsWidth(p,t.col-1)+d,g=this.getColumnsWidth(l,p-1)+(h?c:0)+m;Rp(kp,this).setPosition(u,g),Rp(kp,this).setSize(this.getColumnsWidth(p,f),s.hider.offsetHeight-u),Rp(kp,this).setOffset(null,-m),(0,o.iQ)(this.hot.rootElement,Op)}else(0,o.vy)(this.hot.rootElement,Ip),Tp(Fp,this,!1),Rp(Pp,this).length=0}function Kp(e){Rp(Fp,this)&&(Rp(Yp,this).eventPageX=e.pageX,this.refreshPositions())}function Xp(e,t,n,r){this.hot.getSelectedRangeLast()&&Rp(Fp,this)&&(Rp(Pp,this).indexOf(t.col)>-1?(0,o.vy)(this.hot.rootElement,xp):(0,o.iQ)(this.hot.rootElement,xp),r.row=!0,r.column=!0,r.cell=!0,Tp(Up,this,t.col),Rp(Yp,this).TD=n)}function qp(){const e=Rp(Yp,this).col,t=Rp(Pp,this).length;if(Tp(Up,this,void 0),Tp(Fp,this,!1),(0,o.vy)(this.hot.rootElement,[Op,xp,Ip]),this.hot.selection.isSelectedByColumnHeader()&&(0,o.iQ)(this.hot.rootElement,Ip),t<1||void 0===e)return;const n=Rp(Pp,this)[0],r=this.hot.toPhysicalColumn(n),i=this.dragColumns(Rp(Pp,this),e);if(Rp(Pp,this).length=0,!0===i){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 Qp(){const e=this.hot.view._wt.wtTable,t=e.getColumnHeaderHeight(0)+1+e.holder.scrollTop;Rp(kp,this).setPosition(t),Rp(kp,this).setSize(null,e.hider.offsetHeight-t)}function Jp(){this.moveBySettingsOrLoad()}function Zp(e,t,n){ef(e,t),t.set(e,n)}function ef(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function tf(e,t,n){return e.set(rf(e,t),n),n}function nf(e,t){return e.get(rf(e,t))}function rf(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 of="manualColumnResize",sf="manualColumnWidths";var af=new WeakMap,lf=new WeakMap,uf=new WeakMap,hf=new WeakMap,cf=new WeakMap,df=new WeakMap,mf=new WeakMap,pf=new WeakMap,ff=new WeakMap,gf=new WeakMap,yf=new WeakMap,wf=new WeakMap,vf=new WeakMap,_f=new WeakMap,bf=new WeakMap,Sf=new WeakMap,Cf=new WeakSet;class Ef extends hn{static get PLUGIN_KEY(){return of}static get PLUGIN_PRIORITY(){return 130}constructor(e){var t;super(e),ef(this,t=Cf),t.add(this),Zp(this,af,null),Zp(this,lf,null),Zp(this,uf,[]),Zp(this,hf,null),Zp(this,cf,null),Zp(this,df,null),Zp(this,mf,null),Zp(this,pf,null),Zp(this,ff,this.hot.rootDocument.createElement("DIV")),Zp(this,gf,this.hot.rootDocument.createElement("DIV")),Zp(this,yf,null),Zp(this,wf,!1),Zp(this,vf,0),Zp(this,_f,null),Zp(this,bf,void 0),Zp(this,Sf,void 0),(0,o.iQ)(nf(ff,this),"manualColumnResizer"),(0,o.iQ)(nf(gf,this),"manualColumnResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[of]}enablePlugin(){var e=this;this.enabled||(tf(bf,this,new vn._),nf(bf,this).addLocalHook("init",(()=>rf(Cf,this,Mf).call(this))),this.hot.columnIndexMapper.registerMap(this.pluginName,nf(bf,this)),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rf(Cf,e,xf).call(e,...n)}),1),this.addHook("beforeStretchingColumnWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rf(Cf,e,Of).call(e,...n)}),1),this.addHook("beforeColumnResize",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return rf(Cf,e,If).call(e,...n)})),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){tf(Sf,this,nf(bf,this).getValues()),this.hot.columnIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualColumnWidths(){this.hot.runHooks("persistentStateSave",sf,nf(bf,this).getValues())}loadManualColumnWidths(){const e={};return this.hot.runHooks("persistentStateLoad",sf,e),e.value}setManualSize(e,t){const n=Math.max(t,20),r=this.hot.toPhysicalColumn(e);return nf(bf,this).setValueAtIndex(r,n),n}clearManualSize(e){const t=this.hot.toPhysicalColumn(e);nf(bf,this).setValueAtIndex(t,null)}setupHandlePosition(e){if(!e.parentNode)return;tf(af,this,e);const{_wt:t}=this.hot.view,n=t.wtTable.getCoords(nf(af,this)),r=n.col;if(r<0)return;const i=(0,o.DK)(nf(af,this)),s=nf(af,this).getBoundingClientRect();let a;r<t.getSetting("fixedColumnsStart")&&(a=t.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(nf(af,this),n.row,n.col)),a||(a=t.wtOverlays.topOverlay.getRelativeCellPosition(nf(af,this),n.row,n.col)),tf(lf,this,this.hot.columnIndexMapper.getVisualFromRenderableIndex(r)),tf(uf,this,[]);const l=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByColumnHeader();if(this.hot.selection.isSelected()&&l){const e=this.hot.getSelectedRange();(0,h.z0)(e,(e=>{const t=e.getTopStartCorner().col,n=e.getBottomEndCorner().col;(0,Mt.Ti)(t,n,(e=>{nf(uf,this).includes(e)||nf(uf,this).push(e)}))}))}nf(uf,this).includes(nf(lf,this))||tf(uf,this,[nf(lf,this)]),tf(pf,this,a.start-6),tf(mf,this,parseInt(s.width,10)),nf(ff,this).style.top=`${a.top}px`,nf(ff,this).style[this.inlineDir]=`${nf(pf,this)+nf(mf,this)}px`,nf(ff,this).style.height=`${i}px`,this.hot.rootElement.appendChild(nf(ff,this))}refreshHandlePosition(){nf(ff,this).style[this.inlineDir]=`${nf(pf,this)+nf(hf,this)}px`}setupGuidePosition(){const e=parseInt((0,o.DK)(nf(ff,this)),10),t=parseInt(nf(ff,this).style.top,10)+e,n=this.hot.view.getTableHeight();(0,o.iQ)(nf(ff,this),"active"),(0,o.iQ)(nf(gf,this),"active"),nf(gf,this).style.top=`${t}px`,this.refreshGuidePosition(),nf(gf,this).style.height=n-e+"px",this.hot.rootElement.appendChild(nf(gf,this))}refreshGuidePosition(){nf(gf,this).style[this.inlineDir]=nf(ff,this).style[this.inlineDir]}hideHandleAndGuide(){(0,o.vy)(nf(ff,this),"active"),(0,o.vy)(nf(gf,this),"active")}checkIfColumnHeader(e){const t=(0,o.kp)(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.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeColumnResize",nf(cf,this),t,!0);void 0!==r&&tf(cf,this,r),this.setManualSize(t,nf(cf,this)),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",nf(cf,this),t,!0),n&&e()};nf(vf,this)>=2&&(nf(uf,this).length>1?((0,h.z0)(nf(uf,this),(e=>{t(e)})),e()):(0,h.z0)(nf(uf,this),(e=>{t(e,!0)}))),tf(vf,this,0),tf(_f,this,null)}bindEvents(){const{rootWindow:e,rootElement:t}=this.hot;this.eventManager.addEventListener(t,"mouseover",(e=>rf(Cf,this,Tf).call(this,e))),this.eventManager.addEventListener(t,"mousedown",(e=>rf(Cf,this,Rf).call(this,e))),this.eventManager.addEventListener(e,"mousemove",(e=>rf(Cf,this,Af).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>rf(Cf,this,Nf).call(this))),this.eventManager.addEventListener(nf(ff,this),"contextmenu",(()=>rf(Cf,this,Lf).call(this)))}destroy(){super.destroy()}}function Mf(){const e=this.hot.getSettings()[of],t=this.loadManualColumnWidths();void 0!==t?this.hot.batchExecution((()=>{t.forEach(((e,t)=>{nf(bf,this).setValueAtIndex(t,e)}))}),!0):Array.isArray(e)?(this.hot.batchExecution((()=>{e.forEach(((e,t)=>{nf(bf,this).setValueAtIndex(t,e)}))}),!0),tf(Sf,this,e)):!0===e&&Array.isArray(nf(Sf,this))&&this.hot.batchExecution((()=>{nf(Sf,this).forEach(((e,t)=>{nf(bf,this).setValueAtIndex(t,e)}))}),!0)}function Tf(e){if(!(0,o.$w)(e.target)&&!0!==nf(wf,this)&&this.checkIfColumnHeader(e.target)){const t=this.getClosestTHParent(e.target);if(!t)return;const n=t.getAttribute("colspan");!t||null!==n&&"1"!==n||nf(yf,this)||this.setupHandlePosition(t)}}function Rf(e){e.target.parentNode===this.hot.rootElement&&(0,o.nB)(e.target,"manualColumnResizer")&&(this.setupHandlePosition(nf(af,this)),this.setupGuidePosition(),tf(yf,this,!0),null===nf(_f,this)&&(tf(_f,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(nf(_f,this))),tf(vf,this,nf(vf,this)+1),this.startX=e.pageX,tf(cf,this,nf(mf,this)))}function Af(e){if(nf(yf,this)){const t=(e.pageX-this.startX)*this.hot.getDirectionFactor();tf(hf,this,nf(mf,this)+t),(0,h.z0)(nf(uf,this),(e=>{tf(cf,this,this.setManualSize(e,nf(hf,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition()}}function Nf(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{this.hot.runHooks("beforeColumnResize",nf(cf,this),t,!1),n&&e(),this.saveManualColumnWidths(),this.hot.runHooks("afterColumnResize",nf(cf,this),t,!1)};nf(yf,this)&&(this.hideHandleAndGuide(),tf(yf,this,!1),nf(cf,this)!==nf(mf,this)&&(nf(uf,this).length>1?((0,h.z0)(nf(uf,this),(e=>{t(e)})),e()):(0,h.z0)(nf(uf,this),(e=>{t(e,!0)}))),this.setupHandlePosition(nf(af,this)))}function Lf(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(nf(ff,this)),this.hot.rootElement.removeChild(nf(gf,this)),tf(yf,this,!1),tf(wf,this,!0),this.hot._registerImmediate((()=>{tf(wf,this,!1)}))}function xf(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalColumn(t),r=nf(bf,this).getValueAtIndex(e);this.hot.getSettings()[of]&&r&&(n=r)}return n}function Of(e,t){const n=nf(bf,this).getValueAtIndex(this.hot.toPhysicalColumn(t));return"number"==typeof n?n:e}function If(){this.hot.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked()}function kf(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Df="px",Pf=class{constructor(e){kf(this,"hot",void 0),kf(this,"_element",null),kf(this,"state",0),this.hot=e}appendTo(e){e.appendChild(this._element),this.state=2}build(){0===this.state&&(this._element=this.hot.rootDocument.createElement("div"),this.state=1)}destroy(){this.isAppended()&&this._element.parentElement.removeChild(this._element),this._element=null,this.state=0}isAppended(){return 2===this.state}isBuilt(){return this.state>=1}setPosition(e,t){void 0!==e&&(this._element.style.top=e+Df),void 0!==t&&(this._element.style.left=t+Df)}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+Df),t&&(this._element.style.height=t+Df)}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+Df),t&&(this._element.style.marginLeft=t+Df)}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}}},Hf=class extends Pf{build(){super.build(),(0,o.iQ)(this._element,"ht__manualRowMove--backlight")}},Ff=class extends Pf{build(){super.build(),(0,o.iQ)(this._element,"ht__manualRowMove--guideline")}};function Yf(e,t,n){Vf(e,t),t.set(e,n)}function Vf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Uf(e,t,n){return e.set(Wf(e,t),n),n}function Bf(e,t){return e.get(Wf(e,t))}function Wf(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")}Ce.R.getSingleton().register("beforeRowMove"),Ce.R.getSingleton().register("afterRowMove");const jf="manualRowMove",zf="ht__manualRowMove",Gf="show-ui",$f="on-moving--rows",Kf="after-selection--rows";var Xf=new WeakMap,qf=new WeakMap,Qf=new WeakMap,Jf=new WeakMap,Zf=new WeakMap,eg=new WeakMap,tg=new WeakSet;class ng extends hn{constructor(){var e;super(...arguments),Vf(this,e=tg),e.add(this),Yf(this,Xf,new Hf(this.hot)),Yf(this,qf,new Ff(this.hot)),Yf(this,Qf,[]),Yf(this,Jf,void 0),Yf(this,Zf,{}),Yf(this,eg,void 0)}static get PLUGIN_KEY(){return jf}static get PLUGIN_PRIORITY(){return 140}isEnabled(){return!!this.hot.getSettings()[jf]}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 Wf(tg,e,rg).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 Wf(tg,e,ig).call(e,...n)})),this.addHook("afterScrollHorizontally",(()=>Wf(tg,this,ag).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 Wf(tg,e,lg).call(e,...n)})),this.buildPluginUI(),this.registerEvents(),(0,o.iQ)(this.hot.rootElement,zf),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),this.moveBySettingsOrLoad(),super.updatePlugin()}disablePlugin(){(0,o.vy)(this.hot.rootElement,zf),this.unregisterEvents(),Bf(Xf,this).destroy(),Bf(qf,this).destroy(),super.disablePlugin()}moveRow(e,t){return this.moveRows([e],t)}moveRows(e,t){const n=Bf(eg,this),r=this.isMovePossible(e,t),o=this.hot.runHooks("beforeRowMove",e,t,n,r);if(Uf(eg,this,void 0),!1===o)return;r&&this.hot.rowIndexMapper.moveIndexes(e,t);const i=r&&this.isRowOrderChanged(e,t);return this.hot.runHooks("afterRowMove",e,t,n,r,i),i}dragRow(e,t){return this.dragRows([e],t)}dragRows(e,t){const n=this.countFinalIndex(e,t);return Uf(eg,this,t),this.moveRows(e,n)}isMovePossible(e,t){const n=this.hot.rowIndexMapper.getNotTrimmedIndexesLength(),r=e.length+t>n,o=t<0,i=e.some((e=>e<0)),s=e.some((e=>e>=n));return!(r||o||i||s)}isRowOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}countFinalIndex(e,t){const n=(0,h.mu)(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 o=e;o<=t;o++){const e=n.getRenderableFromVisualIndex(o);null!==e&&(r+=this.hot.view._wt.wtTable.getRowHeight(e)||this.hot.view.getDefaultRowHeight())}return r}moveBySettingsOrLoad(){const e=this.hot.getSettings()[jf];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,o=Math.min(n.row,r.row),i=Math.max(n.row,r.row);return(0,Mt.Ti)(o,i,(e=>{t.push(e)})),t}refreshPositions(){const e=Bf(Zf,this).coords,t=this.hot.getFirstFullyVisibleRow(),n=this.hot.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 i=this.hot.view._wt.wtTable,s=Bf(Zf,this).TD,a=this.hot.rootElement,l=(0,o.cY)(a),u=(0,o.fX)(a),h=i.holder.scrollTop,c=this.hot.rootWindow!==u?u.scrollTop:0,d=l.top-c,m=Bf(Zf,this).eventPageY-d+h,p=i.hider.offsetHeight,f=i.TBODY.offsetTop,g=Bf(Xf,this).getOffset().top,y=Bf(Xf,this).getSize().height,w=s.offsetHeight/2,v=s.offsetHeight;let _=this.hot.view.THEAD.offsetHeight+this.getRowsHeight(0,e.row-1);const b=m>=_+w;this.isFixedRowTop(e.row)&&(_+=this.hot.view._wt.wtOverlays.topOverlay.getOverlayOffset()),e.row<0?Bf(Zf,this).row=t>0?t-1:t:b?(Bf(Zf,this).row=e.row+1,_+=0===e.row?v-1:v):Bf(Zf,this).row=e.row;let S=m,C=_;m+y+g>=p?S=p-y-g:m+g<f&&(S=f+Math.abs(g)),_>=p-1&&(C=p-1),Bf(Xf,this).setPosition(S),Bf(qf,this).setPosition(C)}registerEvents(){const{documentElement:e}=this.hot.rootDocument;this.eventManager.addEventListener(e,"mousemove",(e=>Wf(tg,this,og).call(this,e))),this.eventManager.addEventListener(e,"mouseup",(()=>Wf(tg,this,sg).call(this)))}unregisterEvents(){this.eventManager.clear()}buildPluginUI(){Bf(Xf,this).build(),Bf(qf,this).build()}destroy(){Bf(Xf,this).destroy(),Bf(qf,this).destroy(),super.destroy()}}function rg(e,t,n,r){const{wtTable:i,wtViewport:s}=this.hot.view._wt,a=this.hot.selection.isSelectedByRowHeader(),l=this.hot.getSelectedRangeLast();if(!l||!a||Bf(Jf,this)||0!==e.button)return Uf(Jf,this,!1),Bf(Qf,this).length=0,void(0,o.vy)(this.hot.rootElement,[$f,Gf]);const u=Bf(qf,this).isBuilt()&&!Bf(qf,this).isAppended(),h=Bf(Xf,this).isBuilt()&&!Bf(Xf,this).isAppended();u&&h&&(Bf(qf,this).appendTo(i.hider),Bf(Xf,this).appendTo(i.hider));const{from:c,to:d}=l,m=Math.min(c.row,d.row),p=Math.max(c.row,d.row);if(t.col<0&&t.row>=m&&t.row<=p){r.row=!0,Uf(Jf,this,!0),Bf(Zf,this).eventPageY=e.pageY,Bf(Zf,this).coords=t,Bf(Zf,this).TD=n,Uf(Qf,this,this.prepareRowsToMoving());const a=i.holder.scrollLeft+s.getRowHeaderWidth(),l=this.getRowsHeight(m,t.row-1)+(e.clientY-n.getBoundingClientRect().top);Bf(Xf,this).setPosition(null,a),Bf(Xf,this).setSize(i.hider.offsetWidth-a,this.getRowsHeight(m,p)),Bf(Xf,this).setOffset(-l,null),(0,o.iQ)(this.hot.rootElement,$f),this.refreshPositions()}else(0,o.vy)(this.hot.rootElement,Kf),Uf(Jf,this,!1),Bf(Qf,this).length=0}function og(e){Bf(Jf,this)&&(Bf(Zf,this).eventPageY=e.pageY,this.refreshPositions())}function ig(e,t,n,r){this.hot.getSelectedRangeLast()&&Bf(Jf,this)&&(Bf(Qf,this).indexOf(t.row)>-1?(0,o.vy)(this.hot.rootElement,Gf):(0,o.iQ)(this.hot.rootElement,Gf),r.row=!0,r.column=!0,r.cell=!0,Bf(Zf,this).coords=t,Bf(Zf,this).TD=n)}function sg(){const e=Bf(Zf,this).row,t=Bf(Qf,this).length;if(Uf(Jf,this,!1),(0,o.vy)(this.hot.rootElement,[$f,Gf,Kf]),this.hot.selection.isSelectedByRowHeader()&&(0,o.iQ)(this.hot.rootElement,Kf),t<1||void 0===e)return;const n=Bf(Qf,this)[0],r=this.hot.toPhysicalRow(n),i=this.dragRows(Bf(Qf,this),e);if(Bf(Qf,this).length=0,!0===i){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 ag(){const e=this.hot.view._wt.wtTable,t=this.hot.view._wt.wtViewport.getRowHeaderWidth()+e.holder.scrollLeft;Bf(Xf,this).setPosition(null,t),Bf(Xf,this).setSize(e.hider.offsetWidth-t)}function lg(){this.moveBySettingsOrLoad()}function ug(e,t,n){hg(e,t),t.set(e,n)}function hg(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function cg(e,t,n){return e.set(mg(e,t),n),n}function dg(e,t){return e.get(mg(e,t))}function mg(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="manualRowResize",fg="manualRowHeights";var gg=new WeakMap,yg=new WeakMap,wg=new WeakMap,vg=new WeakMap,_g=new WeakMap,bg=new WeakMap,Sg=new WeakMap,Cg=new WeakMap,Eg=new WeakMap,Mg=new WeakMap,Tg=new WeakMap,Rg=new WeakMap,Ag=new WeakMap,Ng=new WeakMap,Lg=new WeakMap,xg=new WeakMap,Og=new WeakSet;class Ig extends hn{static get PLUGIN_KEY(){return pg}static get PLUGIN_PRIORITY(){return 30}constructor(e){var t;super(e),hg(this,t=Og),t.add(this),ug(this,gg,null),ug(this,yg,null),ug(this,wg,[]),ug(this,vg,null),ug(this,_g,null),ug(this,bg,null),ug(this,Sg,null),ug(this,Cg,null),ug(this,Eg,this.hot.rootDocument.createElement("DIV")),ug(this,Mg,this.hot.rootDocument.createElement("DIV")),ug(this,Tg,!1),ug(this,Rg,!1),ug(this,Ag,0),ug(this,Ng,null),ug(this,Lg,void 0),ug(this,xg,void 0),(0,o.iQ)(dg(Eg,this),"manualRowResizer"),(0,o.iQ)(dg(Mg,this),"manualRowResizerGuide")}get inlineDir(){return this.hot.isRtl()?"right":"left"}isEnabled(){return this.hot.getSettings()[pg]}enablePlugin(){this.enabled||(cg(Lg,this,new vn._),dg(Lg,this).addLocalHook("init",(()=>mg(Og,this,Vg).call(this))),this.hot.rowIndexMapper.registerMap(this.pluginName,dg(Lg,this)),this.addHook("modifyRowHeight",((e,t)=>mg(Og,this,Yg).call(this,e,t))),this.bindEvents(),super.enablePlugin())}updatePlugin(){this.disablePlugin(),this.enablePlugin(),super.updatePlugin()}disablePlugin(){cg(xg,this,dg(Lg,this).getValues()),this.hot.rowIndexMapper.unregisterMap(this.pluginName),super.disablePlugin()}saveManualRowHeights(){this.hot.runHooks("persistentStateSave",fg,dg(Lg,this).getValues())}loadManualRowHeights(){const e={};return this.hot.runHooks("persistentStateLoad",fg,e),e.value}setManualSize(e,t){const n=this.hot.toPhysicalRow(e),r=Math.max(t,this.hot.view.getDefaultRowHeight());return dg(Lg,this).setValueAtIndex(n,r),r}getLastDesiredRowHeight(){return dg(vg,this)}setupHandlePosition(e){cg(gg,this,e);const{view:t}=this.hot,{_wt:n}=t,r=n.wtTable.getCoords(dg(gg,this)),i=r.row;if(i<0)return;const s=(0,o.Gq)(dg(gg,this)),a=dg(gg,this).getBoundingClientRect(),l=i<n.getSetting("fixedRowsTop"),u=i>=t.countNotHiddenRowIndexes(0,1)-n.getSetting("fixedRowsBottom");let c;l?c=n.wtOverlays.topInlineStartCornerOverlay.getRelativeCellPosition(dg(gg,this),r.row,r.col):u&&(c=n.wtOverlays.bottomInlineStartCornerOverlay.getRelativeCellPosition(dg(gg,this),r.row,r.col)),c||(c=n.wtOverlays.inlineStartOverlay.getRelativeCellPosition(dg(gg,this),r.row,r.col)),cg(yg,this,this.hot.rowIndexMapper.getVisualFromRenderableIndex(i)),cg(wg,this,[]);const d=this.hot.selection.isSelectedByCorner()||this.hot.selection.isSelectedByRowHeader();if(this.hot.selection.isSelected()&&d){const e=this.hot.getSelectedRange();(0,h.z0)(e,(e=>{const t=e.getTopStartCorner().row,n=e.getBottomStartCorner().row;(0,Mt.Ti)(t,n,(e=>{dg(wg,this).includes(e)||dg(wg,this).push(e)}))}))}dg(wg,this).includes(dg(yg,this))||cg(wg,this,[dg(yg,this)]),cg(Cg,this,c.top-6),cg(Sg,this,parseInt(a.height,10)),dg(Eg,this).style.top=`${dg(Cg,this)+dg(Sg,this)}px`,dg(Eg,this).style[this.inlineDir]=`${c.start}px`,dg(Eg,this).style.width=`${s}px`,this.hot.rootElement.appendChild(dg(Eg,this))}refreshHandlePosition(){dg(Eg,this).style.top=`${dg(Cg,this)+dg(vg,this)}px`}setupGuidePosition(){const e=parseInt((0,o.Gq)(dg(Eg,this)),10),t=parseInt(dg(Eg,this).style[this.inlineDir],10)+e,n=this.hot.view.getTableWidth();(0,o.iQ)(dg(Eg,this),"active"),(0,o.iQ)(dg(Mg,this),"active"),dg(Mg,this).style.top=dg(Eg,this).style.top,dg(Mg,this).style[this.inlineDir]=`${t}px`,dg(Mg,this).style.width=n-e+"px",this.hot.rootElement.appendChild(dg(Mg,this))}refreshGuidePosition(){dg(Mg,this).style.top=dg(Eg,this).style.top}hideHandleAndGuide(){(0,o.vy)(dg(Eg,this),"active"),(0,o.vy)(dg(Mg,this),"active")}checkIfRowHeader(e){const t=(0,o.kp)(e,["TBODY"],this.hot.rootElement),{inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:i}=this.hot.view._wt.wtOverlays;return[n.clone.wtTable.TBODY,r.clone.wtTable.TBODY,i.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&&dg(_g,this)<t?t:dg(_g,this)}afterMouseDownTimeout(){const e=()=>{this.hot.render(),this.hot.view.adjustElementsSize()},t=(t,n)=>{const r=this.hot.runHooks("beforeRowResize",this.getActualRowHeight(t),t,!0);void 0!==r&&cg(_g,this,r),this.setManualSize(t,dg(_g,this)),this.hot.runHooks("afterRowResize",this.getActualRowHeight(t),t,!0),n&&e()};dg(Ag,this)>=2&&(dg(wg,this).length>1?((0,h.z0)(dg(wg,this),(e=>{t(e)})),e()):(0,h.z0)(dg(wg,this),(e=>{t(e,!0)}))),cg(Ag,this,0),cg(Ng,this,null)}bindEvents(){const{rootElement:e,rootWindow:t}=this.hot;this.eventManager.addEventListener(e,"mouseover",(e=>mg(Og,this,kg).call(this,e))),this.eventManager.addEventListener(e,"mousedown",(e=>mg(Og,this,Dg).call(this,e))),this.eventManager.addEventListener(t,"mousemove",(e=>mg(Og,this,Pg).call(this,e))),this.eventManager.addEventListener(t,"mouseup",(()=>mg(Og,this,Hg).call(this))),this.eventManager.addEventListener(dg(Eg,this),"contextmenu",(()=>mg(Og,this,Fg).call(this)))}destroy(){super.destroy()}}function kg(e){if(!(0,o.$w)(e.target)&&!0!==dg(Rg,this)&&this.checkIfRowHeader(e.target)){const t=this.getClosestTHParent(e.target);t&&(dg(Tg,this)||this.setupHandlePosition(t))}}function Dg(e){(0,o.nB)(e.target,"manualRowResizer")&&(this.setupHandlePosition(dg(gg,this)),this.setupGuidePosition(),cg(Tg,this,!0),null===dg(Ng,this)&&(cg(Ng,this,setTimeout((()=>this.afterMouseDownTimeout()),500)),this.hot._registerTimeout(dg(Ng,this))),cg(Ag,this,dg(Ag,this)+1),cg(bg,this,e.pageY),cg(_g,this,dg(Sg,this)))}function Pg(e){dg(Tg,this)&&(cg(vg,this,dg(Sg,this)+(e.pageY-dg(bg,this))),(0,h.z0)(dg(wg,this),(e=>{cg(_g,this,this.setManualSize(e,dg(vg,this)))})),this.refreshHandlePosition(),this.refreshGuidePosition())}function Hg(){const e=()=>{this.hot.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)};dg(Tg,this)&&(this.hideHandleAndGuide(),cg(Tg,this,!1),dg(_g,this)!==dg(Sg,this)&&(dg(wg,this).length>1?((0,h.z0)(dg(wg,this),(e=>{t(e)})),e()):(0,h.z0)(dg(wg,this),(e=>{t(e,!0)}))),this.setupHandlePosition(dg(gg,this)))}function Fg(){this.hideHandleAndGuide(),this.hot.rootElement.removeChild(dg(Eg,this)),this.hot.rootElement.removeChild(dg(Mg,this)),cg(Tg,this,!1),cg(Rg,this,!0),this.hot._registerImmediate((()=>{cg(Rg,this,!1)}))}function Yg(e,t){let n=e;if(this.enabled){const e=this.hot.toPhysicalRow(t),r=dg(Lg,this).getValueAtIndex(e);this.hot.getSettings()[pg]&&r&&(n=r)}return n}function Vg(){const e=this.hot.getSettings()[pg],t=this.loadManualRowHeights();this.hot.batchExecution((()=>{void 0!==t?t.forEach(((e,t)=>{dg(Lg,this).setValueAtIndex(t,e)})):Array.isArray(e)?(e.forEach(((e,t)=>{dg(Lg,this).setValueAtIndex(t,e)})),cg(xg,this,e)):!0===e&&Array.isArray(dg(xg,this))&&dg(xg,this).forEach(((e,t)=>{dg(Lg,this).setValueAtIndex(t,e)}))}),!0)}function Ug(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bg(e,t){return e.get(jg(e,t))}function Wg(e,t,n){return e.set(jg(e,t),n),n}function jg(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")}n(30237),n(30670);var zg=new WeakMap;const Gg=class{constructor(e,t,n,r,o,i){var s,a,l;Ug(this,"row",void 0),Ug(this,"col",void 0),Ug(this,"rowspan",void 0),Ug(this,"colspan",void 0),Ug(this,"removed",!1),Ug(this,"cellCoordsFactory",void 0),Ug(this,"cellRangeFactory",void 0),l=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(s=this,a=zg),a.set(s,l),this.row=e,this.col=t,this.rowspan=n,this.colspan=r,this.cellCoordsFactory=o,this.cellRangeFactory=i}static NEGATIVE_VALUES_WARNING(e){let{row:t,col:n,rowspan:r,colspan:o}=e;return yo.O`The merged cell declared with {row: ${t}, col: ${n},\x20
  36. rowspan: ${r}, colspan: ${o}} contains negative values, which is\x20
  37. not supported. It will not be added to the collection.`}static IS_OUT_OF_BOUNDS_WARNING(e){let{row:t,col:n}=e;return yo.O`The merged cell declared at [${t}, ${n}] is positioned\x20
  38. (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 yo.O`The merged cell declared at [${t}, ${n}] has both "rowspan"\x20
  39. 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 yo.O`The merged cell declared at [${t}, ${n}] has "rowspan"\x20
  40. 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:o}=e;return t<0||n<0||r<0||o<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),Wg(zg,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,o=e[0]?"colspan":"rowspan",i=e[0]?"col":"row",s=Math.min(t,r),a=Math.max(t,r),l=this[i],u=this[i]+this[o]-1;if(l>=t&&(this[i]+=n),n>0)t<=u&&t>l&&(this[o]+=n);else if(n<0){if(s<=l&&a>=u)return this.removed=!0,Wg(zg,this,null),!1;if(l>=s&&l<=a){const e=a-l+1,t=Math.abs(n)-e;this[i]-=t+n,this[o]-=e}else if(l<=s&&u>=a)this[o]+=n;else if(l<=s&&u>=s&&u<a){const e=u-s+1;this[o]-=e}}return Wg(zg,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 Bg(zg,this)||Wg(zg,this,this.cellRangeFactory(this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.row,this.col),this.cellCoordsFactory(this.getLastRow(),this.getLastColumn()))),Bg(zg,this)}};function $g(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kg(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 Xg=new WeakSet;class qg{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=Xg),n.add(t),$g(this,"plugin",void 0),$g(this,"mergedCells",[]),$g(this,"mergedCellsMatrix",new Map),$g(this,"hot",void 0),this.plugin=e,this.hot=e.hot}static IS_OVERLAPPING_WARNING(e){let{row:t,col:n}=e;return yo.O`The merged cell declared at [${t}, ${n}], overlaps\x20
  41. with the other declared merged cell. The overlapping merged cell was not added to the table, please\x20
  42. 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){const{row:t,col:n}=e.getTopStartCorner(),{row:r,col:o}=e.getBottomEndCorner(),i=this.mergedCells.length;let s=!1;for(let e=0;e<i;e++){const i=this.mergedCells[e],{row:a,col:l,rowspan:u,colspan:h}=i;if(a>=t&&a+u-1<=r&&l>=n&&l+h-1<=o){s=i;break}}return s}filterOverlappingMergeCells(e){const t=new Set;return this.mergedCells.forEach((e=>{const{row:n,col:r,colspan:o,rowspan:i}=e;for(let e=n;e<n+i;e++)for(let n=r;n<r+o;n++)t.add(`r${e},c${n}`)})),e.filter((e=>{const{row:n,col:r,colspan:o,rowspan:i}=e,s=new Set;let a=!1;for(let l=n;l<n+i;l++){for(let n=r;n<r+o;n++){const r=`r${l},c${n}`;if(t.has(r)){(0,Dr.R8)(qg.IS_OVERLAPPING_WARNING(e)),a=!0;break}s.add(r)}if(a)break}return a||t.add(...s),!a}))}getWithinRange(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{row:n,col:r}=e.getTopStartCorner(),{row:o,col:i}=e.getBottomEndCorner(),s=[];for(let e=n;e<=o;e++)for(let n=r;n<=i;n++){const r=this.get(e,n);r&&(t||!t&&r.row===e&&r.col===n)&&s.push(r)}return s}add(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=e.row,r=e.col,o=e.rowspan,i=e.colspan,s=new Gg(n,r,o,i,this.hot._createCellCoords,this.hot._createCellRange),a=this.get(n,r),l=!t&&this.isOverlapping(s);return a||l?(l&&(0,Dr.R8)(qg.IS_OVERLAPPING_WARNING(s)),!1):(this.hot&&s.normalize(this.hot),this.mergedCells.push(s),Kg(Xg,this,Jg).call(this,s),s)}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),Kg(Xg,this,Zg).call(this,n),n)}clear(){(0,h.z0)(this.mergedCells,(e=>{let{row:t,col:n,rowspan:r,colspan:o}=e;(0,Mt.Ti)(t,t+r,(e=>{(0,Mt.Ti)(n,n+o,(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 e=0;e<this.mergedCells.length;e++)if(this.mergedCells[e].getRange().overlaps(t))return!0;return!1}isFirstRenderableMergedCell(e,t){const n=this.get(e,t);if(!n)return!1;const{row:r,col:o,rowspan:i,colspan:s}=n,a=this.hot.view.getActiveOverlayName(),l=["top","top_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleRow(),u=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(a)?0:this.hot.getFirstRenderedVisibleColumn(),h=(0,Mt.qE)(l,r,r+i-1),c=(0,Mt.qE)(u,o,o+s-1);return this.hot.rowIndexMapper.getNearestNotHiddenIndex(h,1)===e&&this.hot.columnIndexMapper.getNearestNotHiddenIndex(c,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),o=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n.col,1);return this.hot._createCellCoords(r,o)}getStartMostColumnIndex(e,t){const n=Kg(Xg,this,Qg).call(this,e,"col",-1);let r=t;for(let e=0;e<n.length;e++)if(n[e]<=t){r=n[e];break}return r}getEndMostColumnIndex(e,t){const n=Kg(Xg,this,Qg).call(this,e,"col",1);let r=t;for(let e=0;e<n.length;e++)if(n[e]>=t){r=n[e];break}return r}getTopMostRowIndex(e,t){const n=Kg(Xg,this,Qg).call(this,e,"row",-1);let r=t;for(let e=0;e<n.length;e++)if(n[e]<=t){r=n[e];break}return r}getBottomMostRowIndex(e,t){const n=Kg(Xg,this,Qg).call(this,e,"row",1);let r=t;for(let e=0;e<n.length;e++)if(n[e]>=t){r=n[e];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}const o=[];this.mergedCells.forEach((e=>{e.shift(r,t),e.removed&&o.push(e)})),o.forEach((e=>{this.mergedCells.splice(this.mergedCells.indexOf(e),1)})),this.mergedCellsMatrix.clear(),this.mergedCells.forEach((e=>{Kg(Xg,this,Jg).call(this,e)}))}}function Qg(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=new Map,o=1===n?e.getTopStartCorner():e.getBottomEndCorner(),i=1===n?e.getBottomEndCorner():e.getTopStartCorner();for(let e=o.row;1===n?e<=i.row:e>=i.row;e+=n)for(let s=o.col;1===n?s<=i.col:s>=i.col;s+=n){const o="row"===t?e:s,i=this.get(e,s);let a=o;i&&(a=1===n?i[t]+i[`${t}span`]-1:i[t]),r.has(o)||r.set(o,new Set),r.get(o).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 Jg(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 Zg(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)}const ey=qg;function ty(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ny=class{constructor(e){ty(this,"plugin",void 0),ty(this,"mergedCellsCollection",void 0),ty(this,"currentFillData",null),this.plugin=e,this.mergedCellsCollection=this.plugin.mergedCellsCollection}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 o=t.slice(0),i=this.getAutofillSize(e,t,n),[s,a,l,u]=e,h=["up","down"].indexOf(n)>-1?l-s+1:u-a+1,c=i-Math.floor(i/h)*h,d=this.getFarthestCollection(e,t,n,r);if(d)if("down"===n){const e=d.row+d.rowspan-s-c;o[2]+e>=this.plugin.hot.countRows()?o[2]-=c:o[2]+=c?e:0}else if("right"===n){const e=d.col+d.colspan-a-c;o[3]+e>=this.plugin.hot.countCols()?o[3]-=c:o[3]+=c?e:0}else if("up"===n){const e=l-c-d.row+1;o[0]+e<0?o[0]+=c:o[0]-=c?e:0}else if("left"===n){const e=u-c-d.col+1;o[1]+e<0?o[1]+=c:o[1]-=c?e:0}return this.updateCurrentFillCache({baseArea:e,dragDirection:n,foundMergedCells:r,fillSize:i,dragArea:o,cycleLength:h}),o}updateCurrentFillCache(e){this.currentFillData||(this.currentFillData={}),(0,s.X$)(this.currentFillData,e)}getAutofillSize(e,t,n){const[r,o,i,s]=e,[a,l,u,h]=t;switch(n){case"up":return r-a;case"down":return u-i;case"left":return o-l;case"right":return h-s;default:return null}}getDragArea(e,t,n){const[r,o,i,s]=e,[a,l,u,h]=t;switch(n){case"up":return[a,l,r-1,s];case"down":{const e=this.mergedCellsCollection.get(u,s);return[i+1,o,u+(e?e.rowspan-1:0),s]}case"left":return[a,l,i,o-1];case"right":{const e=this.mergedCellsCollection.get(u,s);return[r,s+(e?e.colspan-1:0),u,h]}default:return null}}getFarthestCollection(e,t,n,r){const[o,i,s,a]=e,l=["up","down"].indexOf(n)>-1,u=l?s:a,c=l?o:i,d=this.getAutofillSize(e,t,n),m=l?s-o+1:a-i+1,p=d-Math.floor(d/m)*m;let f=null,g=null,y=null;switch(n){case"up":f="includesVertically",y=u-p+1;break;case"left":f="includesHorizontally",y=u-p+1;break;case"down":f="includesVertically",y=c+p-1;break;case"right":f="includesHorizontally",y=c+p-1}return(0,h.z0)(r,(e=>{e[f](y)&&e.isFarther(g,n)&&(g=e)})),g}recreateAfterDataPopulation(e){if(!this.currentFillData)return;const t=this.getRangeFromChanges(e),n=this.currentFillData.foundMergedCells,r=this.currentFillData.dragDirection,o=(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 i=0,s=null,a=1;do{for(let e=0;e<n.length;e+=1){if(s=n[e],i=a*this.currentFillData.cycleLength,o(s,i))switch(r){case"up":this.plugin.mergedCellsCollection.add({row:s.row-i,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"down":this.plugin.mergedCellsCollection.add({row:s.row+i,rowspan:s.rowspan,col:s.col,colspan:s.colspan},!0);break;case"left":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col-i,colspan:s.colspan},!0);break;case"right":this.plugin.mergedCellsCollection.add({row:s.row,rowspan:s.rowspan,col:s.col+i,colspan:s.colspan},!0)}e===n.length-1&&(a+=1)}}while(o(s,i));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(0,h.z0)(e,(e=>{const r=e[0],o=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||o<n.min)&&(n.min=o),(null===n.max||o>n.max)&&(n.max=o)})),{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),[o,i,s,a]=r,l=this.plugin.hot._createCellCoords(o,i),u=this.plugin.hot._createCellCoords(s,a),h=this.plugin.hot._createCellRange(l,l,u);if(0===this.mergedCellsCollection.getWithinRange(h,!0).length)return!1;const c=this.mergedCellsCollection.getWithinRange(h,!1);return 0===c.length||("up"===n||"down"===n?!c.every((e=>{let{colspan:t}=e;return t===h.getWidth()})):!c.every((e=>{let{rowspan:t}=e;return t===h.getHeight()})))}};function ry(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const oy=class{constructor(e){ry(this,"plugin",void 0),ry(this,"hot",void 0),ry(this,"fullySelectedMergedCellClassName","fullySelectedMergedCell"),this.plugin=e,this.hot=e.hot}getSelectedMergedCellClassName(e,t,n,r){const o=Math.min(n[0],n[2]),i=Math.min(n[1],n[3]),s=Math.max(n[0],n[2]),a=Math.max(n[1],n[3]);if(void 0===r)return;if(!this.plugin.mergedCellsCollection.isFirstRenderableMergedCell(e,t))return;const l=this.plugin.mergedCellsCollection.get(e,t);if(!l)return;const u=l.getLastRow(),h=l.getLastColumn();return o<=l.row&&i<=l.col&&s>=u&&a>=h?`${this.fullySelectedMergedCellClassName}-${r}`:this.isMergeCellFullySelected(l,this.plugin.hot.getSelectedRange())?`${this.fullySelectedMergedCellClassName}-multiple`:void 0}isMergeCellFullySelected(e,t){const n=[];if(!t||!e)return!1;for(let t=0;t<e.rowspan;t+=1)for(let r=0;r<e.colspan;r+=1)n.push(this.hot._createCellCoords(e.row+t,e.col+r));for(let e=0;e<n.length;e+=1){const r=[];for(let o=0;o<t.length;o+=1)r[o]=t[o].includes(n[e]);if(!r.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}};function iy(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class sy{constructor(e){iy(this,"data",void 0),iy(this,"next",null),iy(this,"prev",null),this.data=e}}const ay=class{constructor(){iy(this,"first",null),iy(this,"last",null)}push(e){const t=new sy(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 sy(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;for(;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;for(;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;for(;;){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(){if(!this.first)return;!function e(t,n){n&&(e(n,n.next),n.next=t)}(this.first,this.first.next),this.first.next=null;const e=this.first;this.first=this.last,this.last=e}reverse(){if(!this.first||!this.first.next)return;let e,t=this.first.next,n=this.first;for(;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}};function ly(e,t,n){uy(e,t),t.set(e,n)}function uy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function hy(e,t){return e.get(dy(e,t))}function cy(e,t,n){return e.set(dy(e,t),n),n}function dy(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,py=new WeakMap,fy=new WeakMap,gy=new WeakMap,yy=new WeakMap,wy=new WeakMap,vy=new WeakMap,_y=new WeakSet;class by{constructor(e){let{mergedCellsGetter:t,rowIndexMapper:n,columnIndexMapper:r}=e;var o;uy(this,o=_y),o.add(this),ly(this,my,new ay),ly(this,py,new ay),ly(this,fy,null),ly(this,gy,null),ly(this,yy,null),ly(this,wy,null),ly(this,vy,null),cy(yy,this,t),cy(wy,this,n),cy(vy,this,r)}getCurrentVerticalNode(){return hy(gy,this).data}getFirstVerticalNode(){return hy(py,this).first.data}getNextVerticalNode(){return hy(gy,this).next.data}getPrevVerticalNode(){return hy(gy,this).prev.data}getCurrentHorizontalNode(){return hy(fy,this).data}getFirstHorizontalNode(){return hy(my,this).first.data}getNextHorizontalNode(){return hy(fy,this).next.data}getPrevHorizontalNode(){return hy(fy,this).prev.data}setPrevNodeAsActive(){cy(gy,this,hy(gy,this).prev),cy(fy,this,hy(fy,this).prev)}setNextNodeAsActive(){cy(gy,this,hy(gy,this).next),cy(fy,this,hy(fy,this).next)}buildFocusOrder(e){const t=e.getTopStartCorner(),n=e.getBottomEndCorner(),r=new WeakSet;cy(my,this,new ay);for(let o=t.row;o<=n.row;o++)if(!hy(wy,this).isHidden(o))for(let i=t.col;i<=n.col;i++){if(hy(vy,this).isHidden(i))continue;const t=dy(_y,this,Sy).call(this,e,hy(my,this),r,o,i);t&&cy(fy,this,t)}hy(my,this).first&&(hy(my,this).first.prev=hy(my,this).last,hy(my,this).last.next=hy(my,this).first);const o=new WeakSet;cy(py,this,new ay);for(let r=t.col;r<=n.col;r++)if(!hy(vy,this).isHidden(r))for(let i=t.row;i<=n.row;i++){if(hy(wy,this).isHidden(i))continue;const t=dy(_y,this,Sy).call(this,e,hy(py,this),o,i,r);t&&cy(gy,this,t)}hy(py,this).first&&(hy(py,this).first.prev=hy(py,this).last,hy(py,this).last.next=hy(py,this).first)}setActiveNode(e,t){return hy(my,this).inorder((n=>{const{rowStart:r,rowEnd:o,colStart:i,colEnd:s}=n.data;if(e>=r&&e<=o&&t>=i&&t<=s)return cy(fy,this,n),!1})),hy(py,this).inorder((n=>{const{rowStart:r,rowEnd:o,colStart:i,colEnd:s}=n.data;if(e>=r&&e<=o&&t>=i&&t<=s)return cy(gy,this,n),!1})),this}}function Sy(e,t,n,r,o){const i=e.getTopStartCorner(),s=e.getBottomEndCorner(),a=e.highlight.clone().normalize(),l=hy(yy,this).call(this,r,o);if(l&&n.has(l))return null;const u={colStart:o,colEnd:o,rowStart:r,rowEnd:r};if(l){if(n.add(l),l.row<i.row||l.row+l.rowspan-1>s.row||l.col<i.col||l.col+l.colspan-1>s.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 h=t.push(u);return r===a.row&&o===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?h:null}function Cy(e,t,n){const{view:r,rowIndexMapper:o}=e,i=r.getStylesHandler(),s=r.getDefaultRowHeight();let a=0;for(let r=t;r<t+n;r++){var l;o.isHidden(r)||(a+=null!==(l=e.getRowHeight(r))&&void 0!==l?l:s,0!==r||i.isClassicTheme()||(a+=1))}return a}function Ey(e,t,n){My(e,t),t.set(e,n)}function My(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ty(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ry(e,t,n){return e.set(Ny(e,t),n),n}function Ay(e,t){return e.get(Ny(e,t))}function Ny(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")}Ce.R.getSingleton().register("beforeMergeCells"),Ce.R.getSingleton().register("afterMergeCells"),Ce.R.getSingleton().register("beforeUnmergeCells"),Ce.R.getSingleton().register("afterUnmergeCells");const Ly="mergeCells",xy=Ly;var Oy=new WeakMap,Iy=new WeakMap,ky=new WeakMap,Dy=new WeakMap,Py=new WeakSet;class Hy extends hn{constructor(){var e;super(...arguments),My(this,e=Py),e.add(this),Ty(this,"mergedCellsCollection",null),Ty(this,"autofillCalculations",null),Ty(this,"selectionCalculations",null),Ey(this,Oy,null),Ey(this,Iy,{row:0,col:0}),Ey(this,ky,new by({mergedCellsGetter:(e,t)=>this.mergedCellsCollection.get(e,t),rowIndexMapper:this.hot.rowIndexMapper,columnIndexMapper:this.hot.columnIndexMapper})),Ey(this,Dy,function(e){const{hot:t}=e,{rowIndexMapper:n,columnIndexMapper:r}=t,o=new Map;return{before:function(){},after:function(i,a,l){const u=e.mergedCellsCollection.get(a,l);if(!(0,s.Gv)(u))return i.removeAttribute("rowspan"),i.removeAttribute("colspan"),(0,te.nr)()&&o.has(a)&&!t.getSettings().rowHeaders&&(i.style.height=`${o.get(a)}px`,o.delete(a)),void(i.style.display="");const{row:h,col:c,colspan:d,rowspan:m}=u,[p,f]=e.translateMergedCellToRenderable(h,m,c,d),g=e.getSetting("virtualized");if((0,te.nr)()&&0===c&&!t.getSettings().rowHeaders){const e=Cy(t,h,m);o.set(a,e/m)}const y=p-n.getRenderableFromVisualIndex(a)+1,w=f-r.getRenderableFromVisualIndex(l)+1;let v=n.getNearestNotHiddenIndex(h,1),_=r.getNearestNotHiddenIndex(c,1);if(g){const e=t.view.getActiveOverlayName();["top","top_inline_start_corner"].includes(e)||(v=Math.max(v,t.getFirstRenderedVisibleRow())),["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(e)||(_=Math.max(_,t.getFirstRenderedVisibleColumn()))}const b=Math.min(m,y),S=Math.min(d,w);v===a&&_===l?(i.setAttribute("rowspan",b),i.setAttribute("colspan",S)):(i.removeAttribute("rowspan"),i.removeAttribute("colspan"),i.style.display="none")}}}(this))}static get PLUGIN_KEY(){return Ly}static get PLUGIN_PRIORITY(){return 150}static get DEFAULT_SETTINGS(){return{[on]:"cells",virtualized:!1,cells:[]}}isEnabled(){return!!this.hot.getSettings()[Ly]}enablePlugin(){var e=this;this.enabled||(this.mergedCellsCollection=new ey(this),this.autofillCalculations=new ny(this),this.selectionCalculations=new oy(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ny(Py,e,Fy).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 Ny(Py,e,Vy).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 Ny(Py,e,Uy).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 Ny(Py,e,By).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 Ny(Py,e,Wy).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 Ny(Py,e,Gy).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 Ny(Py,e,Gy).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 Ny(Py,e,$y).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 Ny(Py,e,Ky).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 Ny(Py,e,Xy).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 Ny(Py,e,jy).call(e,...n)})),this.addHook("modifyGetCoordsElement",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Ny(Py,e,jy).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 Ny(Py,e,Yy).call(e,...n)})),this.addHook("afterRenderer",(function(){return Ay(Dy,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 Ny(Py,e,zy).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 Ny(Py,e,qy).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 Ny(Py,e,Qy).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 Ny(Py,e,Jy).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 Ny(Py,e,Zy).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 Ny(Py,e,ew).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 Ny(Py,e,tw).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 Ny(Py,e,nw).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 Ny(Py,e,rw).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 Ny(Py,e,ow).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 Ny(Py,e,iw).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 Ny(Py,e,sw).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 Ny(Py,e,aw).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 Ny(Py,e,lw).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 Ny(Py,e,uw).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(){this.disablePlugin(),this.enablePlugin(),this.generateFromSettings(),super.updatePlugin()}ifChromeForceRepaint(){if(!(0,te.H8)())return;const e=[];let t=[];this.mergedCellsCollection.mergedCells.forEach((e=>{const{row:n,rowspan:r}=e;for(let e=n+1;e<n+r;e++)t.push(e)})),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.name)?e:e.clone.wtTable)).forEach((t=>{const r=t.getRow(n);r&&(r.style.background=(0,o.gd)(r,"backgroundColor").replace(")",", 0.99)"),e.push(r))}))})),this.hot._registerTimeout((()=>{e.forEach((e=>{var t;e.style.background=null===(t=(0,o.gd)(e,"backgroundColor"))||void 0===t?void 0:t.replace(", 0.99)",")")}))}),1)}validateSetting(e){return!(!e||(Gg.containsNegativeValues(e)?((0,Dr.R8)(Gg.NEGATIVE_VALUES_WARNING(e)),1):Gg.isOutOfBounds(e,this.hot.countRows(),this.hot.countCols())?((0,Dr.R8)(Gg.IS_OUT_OF_BOUNDS_WARNING(e)),1):Gg.isSingleCell(e)?((0,Dr.R8)(Gg.IS_SINGLE_CELL(e)),1):Gg.containsZeroSpan(e)&&((0,Dr.R8)(Gg.ZERO_SPAN_WARNING(e)),1)))}generateFromSettings(){const e=this.getSetting("cells").filter((e=>this.validateSetting(e))),t=this.mergedCellsCollection.filterOverlappingMergeCells(e),n=[];t.forEach((e=>{const{row:t,col:r,rowspan:o,colspan:i}=e,s=this.hot._createCellCoords(t,r),a=this.hot._createCellCoords(t+o-1,r+i-1),l=this.hot._createCellRange(s,s,a);this.mergeRange(l,!0,!0);for(let e=t;e<t+o;e++)for(let o=r;o<r+i;o++)e===t&&o===r||n.push([e,o,null])})),0!==n.length&&this.hot.setDataAtCell(n,void 0,void 0,this.pluginName)}clearCollections(){this.mergedCellsCollection.clear()}canMergeRange(e){return!!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])||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(),o=e.getBottomEndCorner(),i={row:r.row,col:r.col,rowspan:o.row-r.row+1,colspan:o.col-r.col+1},s=[];let a=null;return!!this.canMergeRange(i,t)&&(this.hot.runHooks("beforeMergeCells",e,t),(0,Mt.Ti)(0,i.rowspan-1,(e=>{(0,Mt.Ti)(0,i.colspan-1,(t=>{let n=null;s[e]||(s[e]=[]),0===e&&0===t?n=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i.row),this.hot.toPhysicalColumn(i.col)):this.hot.setCellMeta(i.row+e,i.col+t,"hidden",!0),s[e][t]=n}))})),this.hot.setCellMeta(i.row,i.col,"spanned",!0),!this.mergedCellsCollection.add(i,t)||(n?a=[i.row,i.col,s]:this.hot.populateFromArray(i.row,i.col,s,void 0,void 0,this.pluginName),t||this.ifChromeForceRepaint(),this.hot.runHooks("afterMergeCells",e,i,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),(0,h.z0)(n,(e=>{this.mergedCellsCollection.remove(e.row,e.col),(0,Mt.Ti)(0,e.rowspan-1,(t=>{(0,Mt.Ti)(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{from:t,to:n}=e.clone().normalize(),r=this.mergedCellsCollection.get(t.row,t.col);r.row===t.row&&r.col===t.col&&r.row+r.rowspan-1===n.row&&r.col+r.colspan-1===n.col?this.unmergeRange(e):this.mergeSelection(e)}merge(e,t,n,r){const o=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(n,r);this.mergeRange(this.hot._createCellRange(o,o,i))}unmerge(e,t,n,r){const o=this.hot._createCellCoords(e,t),i=this.hot._createCellCoords(n,r);this.unmergeRange(this.hot._createCellRange(o,o,i))}registerShortcuts(){this.hot.getShortcutManager().getContext("grid").addShortcut({keys:[["Control","m"]],callback:()=>{const e=this.hot.getSelectedRangeLast();e&&!e.isSingleHeader()&&(this.toggleMerge(e),this.hot.render())},runOnlyIf:e=>!e.altKey,group:xy})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(xy)}modifyViewportRowStart(e,t){const n=this.hot.rowIndexMapper,r=n.getVisualFromRenderableIndex(e.startRow);for(let o=0;o<t;o+=1){const i=this.mergedCellsCollection.get(r,o);if((0,s.Gv)(i)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i.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 o=0;o<t;o+=1){const i=this.mergedCellsCollection.get(r,o);if((0,s.Gv)(i)){const r=i.row+i.rowspan-1,o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(o>e.endRow)return e.endRow=o,void this.modifyViewportRowEnd(e,t)}}}modifyViewportColumnStart(e,t){const n=this.hot.columnIndexMapper,r=n.getVisualFromRenderableIndex(e.startColumn);for(let o=0;o<t;o+=1){const i=this.mergedCellsCollection.get(o,r);if((0,s.Gv)(i)){const r=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(i.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 o=0;o<t;o+=1){const i=this.mergedCellsCollection.get(o,r);if((0,s.Gv)(i)){const r=i.col+i.colspan-1,o=n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(r,-1));if(o>e.endColumn)return e.endColumn=o,void this.modifyViewportColumnEnd(e,t)}}}translateMergedCellToRenderable(e,t,n,r){const{rowIndexMapper:o,columnIndexMapper:i}=this.hot;let s,a;return s=0===t?o.getNearestNotHiddenIndex(e,1):o.getNearestNotHiddenIndex(e+t-1,-1),a=0===r?i.getNearestNotHiddenIndex(n,1):i.getNearestNotHiddenIndex(n+r-1,-1),[e>=0?o.getRenderableFromVisualIndex(s):e,n>=0?i.getRenderableFromVisualIndex(a):n]}}function Fy(){this.generateFromSettings(),this.hot.render()}function Yy(e){if(e){const e=this.mergedCellsCollection.mergedCells,t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner(),r=t.getBottomEndCorner();for(let t=0;t<e.length;t+=1)if(n.row===e[t].row&&n.col===e[t].col&&r.row===e[t].row+e[t].rowspan-1&&r.col===e[t].col+e[t].colspan-1)return!1}return e}function Vy(e){Ay(Iy,this).row=e.row,Ay(Iy,this).col=e.col}function Uy(e){const t=this.hot.getSelectedRangeLast(),{highlight:n}=t,{columnIndexMapper:r,rowIndexMapper:o}=this.hot;Ay(Oy,this)&&(null!==o.getRenderableFromVisualIndex(Ay(Oy,this).row)&&(n.row=Ay(Oy,this).row),null!==r.getRenderableFromVisualIndex(Ay(Oy,this).col)&&(n.col=Ay(Oy,this).col),Ry(Oy,this,null));const i=this.mergedCellsCollection.get(n.row,n.col);if(!i)return;const s=i.col,a=i.col+i.colspan-1;if(e.col<0){const t=n.col>=s&&n.col<=a?s-1:a,o=r.getNearestNotHiddenIndex(t,-1);e.col=null===o?-this.hot.view.countRenderableColumnsInRange(0,n.col):-Math.max(this.hot.view.countRenderableColumnsInRange(o,n.col)-1,1)}else if(e.col>0){const t=n.col>=s&&n.col<=a?a+1:s,o=r.getNearestNotHiddenIndex(t,1);e.col=null===o?this.hot.view.countRenderableColumnsInRange(n.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(n.col,o)-1,1)}const l=i.row,u=i.row+i.rowspan-1;if(e.row<0){const t=n.row>=l&&n.row<=u?l-1:u,r=o.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=o.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 By(e){const t=this.hot.getSelectedRangeLast(),n=t.clone(),{to:r}=t,{columnIndexMapper:o,rowIndexMapper:i}=this.hot,s=(e,t)=>{n.expand(this.hot._createCellCoords(e,t));for(let e=0;e<this.mergedCellsCollection.mergedCells.length;e+=1)n.expandByRange(this.mergedCellsCollection.mergedCells[e].getRange())};if(e.col<0){let i=this.mergedCellsCollection.getStartMostColumnIndex(t,r.col)+e.col;s(r.row,i),"E-W"===t.getHorizontalDirection()&&"E-W"===n.getHorizontalDirection()&&(i=n.getTopStartCorner().col);const a=o.getNearestNotHiddenIndex(i,1);null!==a&&(e.col=-Math.max(this.hot.view.countRenderableColumnsInRange(a,r.col)-1,1))}else if(e.col>0){let i=this.mergedCellsCollection.getEndMostColumnIndex(t,r.col)+e.col;s(r.row,i),"W-E"===t.getHorizontalDirection()&&"W-E"===n.getHorizontalDirection()&&(i=n.getBottomEndCorner().col);const a=o.getNearestNotHiddenIndex(i,-1);null!==a&&(e.col=Math.max(this.hot.view.countRenderableColumnsInRange(r.col,a)-1,1))}if(e.row<0){let o=this.mergedCellsCollection.getTopMostRowIndex(t,r.row)+e.row;s(o,r.col),"S-N"===t.getVerticalDirection()&&"S-N"===n.getVerticalDirection()&&(o=n.getTopStartCorner().row);const a=i.getNearestNotHiddenIndex(o,1);null!==a&&(e.row=-Math.max(this.hot.view.countRenderableRowsInRange(a,r.row)-1,1))}else if(e.row>0){let o=this.mergedCellsCollection.getBottomMostRowIndex(t,r.row)+e.row;s(o,r.col),"N-S"===t.getVerticalDirection()&&"N-S"===n.getVerticalDirection()&&(o=n.getBottomStartCorner().row);const a=i.getNearestNotHiddenIndex(o,-1);null!==a&&(e.row=Math.max(this.hot.view.countRenderableRowsInRange(r.row,a)-1,1))}}function Wy(){const e=this.hot.getSelectedRangeLast(),{highlight:t}=e;if(this.hot.selection.isSelectedByColumnHeader()||this.hot.selection.isSelectedByRowHeader())return void Ry(Oy,this,t.clone());for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);for(let t=0;t<this.mergedCellsCollection.mergedCells.length;t+=1)e.expandByRange(this.mergedCellsCollection.mergedCells[t].getRange(),!1);const n=this.mergedCellsCollection.get(t.row,t.col);Ry(Oy,this,t.clone()),n&&t.assign(n)}function jy(e,t,n,r){if(e<0||t<0)return;const o=this.mergedCellsCollection.get(e,t);if(!o)return;const{row:i,col:s,colspan:a,rowspan:l}=o,u=i,h=s,c=i+l-1,d=s+a-1;if("render"===r&&this.getSetting("virtualized")){const e=this.hot.view.getActiveOverlayName(),t=["top","top_inline_start_corner"].includes(e)?0:this.hot.getFirstRenderedVisibleRow(),n=["inline_start","top_inline_start_corner","bottom_inline_start_corner"].includes(e)?0:this.hot.getFirstRenderedVisibleColumn();return[(0,Mt.qE)(t,u,c),(0,Mt.qE)(n,h,d),(0,Mt.qE)(this.hot.getLastRenderedVisibleRow(),u,c),(0,Mt.qE)(this.hot.getLastRenderedVisibleColumn(),h,d)]}return[u,h,c,d]}function zy(e){var t;e.items.push({name:"---------"},(t=this,{key:"mergeCells",name(){const e=this.getSelectedLast();if(e){const n=t.mergedCellsCollection.get(e[0],e[1]);if(n.row===e[0]&&n.col===e[1]&&n.row+n.rowspan-1===e[2]&&n.col+n.colspan-1===e[3])return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_UNMERGE_CELLS)}return this.getTranslatedPhrase(Ee.CONTEXTMENU_ITEMS_MERGE_CELLS)},callback(){const e=this.getSelectedRangeLast();if(!e)return;e.setDirection(this.isRtl()?"NE-SW":"NW-SE");const{from:n,to:r}=e;t.toggleMerge(e),this.selectCell(n.row,n.col,r.row,r.col,!1)},disabled(){const e=this.getSelectedLast();return!e||Gg.isSingleCell({row:e[0],col:e[1],rowspan:e[2]-e[0]+1,colspan:e[3]-e[1]+1})||this.selection.isSelectedByCorner()},hidden:!1}))}function Gy(){Ry(Oy,this,null)}function $y(){if(Ay(Oy,this).isCell())return;const e=this.hot.getSelectedRangeLast(),t=e.getVerticalDirection(),n=e.getHorizontalDirection(),r=Ay(Oy,this).clone().normalize();Ay(ky,this).setActiveNode(r.row,r.col),Ay(Iy,this).row>0||Ay(Iy,this).col>0?Ay(ky,this).setPrevNodeAsActive():("E-W"===n&&Ay(Iy,this).col<0||"S-N"===t&&Ay(Iy,this).row<0)&&Ay(ky,this).setNextNodeAsActive()}function Ky(e,t){const n=this.hot.getSelectedRangeLast(),{columnIndexMapper:r,rowIndexMapper:o}=this.hot;let i=null,s=null;if(Ay(Iy,this).col<0){const{rowEnd:e,colEnd:t}=Ay(ky,this).getPrevHorizontalNode();s=r.getNearestNotHiddenIndex(t,-1),i=o.getNearestNotHiddenIndex(e,-1)}else if(Ay(Iy,this).col>0){const{rowStart:e,colStart:t}=Ay(ky,this).getNextHorizontalNode();s=r.getNearestNotHiddenIndex(t,1),i=o.getNearestNotHiddenIndex(e,1)}else if(Ay(Iy,this).row<0){const{rowEnd:e,colEnd:t}=Ay(ky,this).getPrevVerticalNode();s=r.getNearestNotHiddenIndex(t,-1),i=o.getNearestNotHiddenIndex(e,-1)}else if(Ay(Iy,this).row>0){const{rowStart:e,colStart:t}=Ay(ky,this).getNextVerticalNode();s=r.getNearestNotHiddenIndex(t,1),i=o.getNearestNotHiddenIndex(e,1)}if(null!==i||null!==s){const r=this.hot._createCellCoords(i,s),o=this.mergedCellsCollection.get(r.row,r.col),a=this.hot.selection.highlight.getFocus();e=r.row,t=r.col,o?n.highlight.assign({row:this.hot.rowIndexMapper.getNearestNotHiddenIndex(o.row,1),col:this.hot.columnIndexMapper.getNearestNotHiddenIndex(o.col,1)}):n.highlight.assign(r),a.clear(),a.add(r).commit()}Ay(ky,this).setActiveNode(e,t),Ry(Iy,this,{row:0,col:0})}function Xy(){this.hot.getSelectedRangeLast().isHeader()||Ay(ky,this).buildFocusOrder(this.hot.getSelectedRangeLast())}function qy(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 Qy(e){if(this.getSetting("virtualized"))return;const t=this.hot.countCols();this.modifyViewportRowStart(e,t),this.modifyViewportRowEnd(e,t)}function Jy(e){if(this.getSetting("virtualized"))return;const t=this.hot.countRows();this.modifyViewportColumnStart(e,t),this.modifyViewportColumnEnd(e,t)}function Zy(e,t){const n=this.autofillCalculations.getDirection(t,e);if(this.autofillCalculations.dragAreaOverlapsCollections(t,e,n))return t;const r=this.hot._createCellCoords(t[0],t[1]),o=this.hot._createCellCoords(t[2],t[3]),i=this.hot._createCellRange(r,r,o),s=this.mergedCellsCollection.getWithinRange(i);return 0===s.length?e:this.autofillCalculations.snapDragArea(t,e,n,s)}function ew(e,t){this.mergedCellsCollection.shiftCollections("right",e,t)}function tw(e,t){this.mergedCellsCollection.shiftCollections("left",e,t)}function nw(e,t,n){"auto"!==n&&this.mergedCellsCollection.shiftCollections("down",e,t)}function rw(e,t){this.mergedCellsCollection.shiftCollections("up",e,t)}function ow(e,t){"Autofill.fill"===t&&this.autofillCalculations.recreateAfterDataPopulation(e)}function iw(e,t){if(t&&"area"===t){const t=this.hot.getSelectedRangeLast(),n=this.mergedCellsCollection.getWithinRange(t);(0,h.z0)(n,(n=>{t.getBottomEndCorner().row===n.getLastRow()&&t.getBottomEndCorner().col===n.getLastColumn()&&(e[2]=n.row,e[3]=n.col)}))}}function sw(e,t,n,r){if(n)return this.selectionCalculations.getSelectedMergedCellClassName(e,t,n,r)}function aw(){return this.selectionCalculations.getSelectedMergedCellClassNameToRemove()}function lw(e,t,n,r){if(!(r instanceof MouseEvent))return;const o=this.hot.getSelectedRangeLast(),i=this.mergedCellsCollection.getByRange(o);if(!i)return;const s=this.hot._createCellCoords(i.row,i.col),a=this.hot._createCellCoords(i.row+i.rowspan-1,i.col+i.colspan-1);return 0===this.hot.selection.getLayerLevel()&&o.isEqual(this.hot._createCellRange(s,s,a))}function uw(e,t,n){if(this.hot.getSettings().rowHeaders||"bottom"===n||"bottom_inline_start_corner"===n)return e;let r,o;if("master"===n)r=this.hot.getFirstRenderedVisibleColumn(),o=this.hot.getLastRenderedVisibleColumn();else{const e=this.hot.view.getOverlayByName(n);r=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getFirstRenderedColumn()),o=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e.clone.wtTable.getLastRenderedColumn())}if(!this.mergedCellsCollection.get(t,r))return e;const i=this.hot._createCellCoords(t,r),s=this.hot._createCellCoords(t,o),a=this.hot._createCellRange(i,i,s),l=this.mergedCellsCollection.getWithinRange(a,!0),u=l.reduce(((e,t)=>{let{rowspan:n}=t;return Math.max(e,n)}),1);let h=0;return l.length>1&&l[0].rowspan<u&&(h=u-l[0].rowspan),l.forEach((r=>{let{rowspan:o}=r,i=0;i="top"===n||"top_inline_start_corner"===n?Math.min(u,this.hot.view.countNotHiddenFixedRowsTop()-t):o-h,e=Math.max(null!=e?e:0,Cy(this.hot,t,i))})),e}const hw="sort";const cw="multiColumnSorting",dw=cw;ho(cw,(function(e,t){return function(n,r){const[,...o]=n,[,...i]=r;return function n(r){const s=e[r],a=t[r],l=o[r],u=i[r],h=a.multiColumnSorting,c=(h.compareFunctionFactory?h.compareFunctionFactory:mo(a.type))(s,a,h)(l,u);if(c===po){const e=r+1;if(void 0!==t[e])return n(e)}return c}(0)}}));class mw extends Ho{constructor(){var e,t,n;super(...arguments),e=this,n=cw,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="pluginKey"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get PLUGIN_KEY(){return cw}static get PLUGIN_PRIORITY(){return 170}isEnabled(){return!!this.hot.getSettings()[this.pluginKey]}enablePlugin(){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,Io)),!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.b,position:"before",group:dw})}unregisterShortcuts(){super.unregisterShortcuts(),this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(dw)}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),(0,o.vy)(e,function(e){const t=e.className.split(" "),n=new RegExp(`^${hw}-[0-9]{1,2}$`);return t.filter((e=>n.test(e)))}(e)),!1!==this.enabled&&(0,o.iQ)(e,function(e,t,n){const r=[];return!1===n||e.isColumnSorted(t)&&e.getNumberOfSortedColumns()>1&&r.push(`${hw}-${e.getIndexOfColumnInSortQueue(t)+1}`),r}(...n))}onAfterOnCellMouseDown(e,t){!1!==Eo(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,Io))):this.sort(this.getColumnNextConfig(t.col)))}}function pw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class fw extends hn{constructor(){super(...arguments),pw(this,"dragged",[]),pw(this,"lastSetCell",null)}static get PLUGIN_KEY(){return"multipleSelectionHandles"}static get PLUGIN_PRIORITY(){return 160}isEnabled(){return(0,te.rr)()}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(0,o.nB)(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):(0,o.nB)(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=>(0,o.nB)(t.target,"topSelectionHandle-HitArea")?(n.call(e,"top"),e.touchStartRange=void 0,t.preventDefault(),!1):(0,o.nB)(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,o,i,s,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),o=e.hot.getSelectedRangeLast(),i=o.getWidth(),s=o.getHeight(),a=o.getDirection(),1===i&&1===s&&e.hot.selection.setRangeEnd(r),l=e.getCurrentRangeCoords(o,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,o){const i=e.getTopStartCorner(),s=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"===o?{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,i.col)};break;case"SE-NW":"bottom"===o&&(u={start:this.hot._createCellCoords(s.row,t.col),end:this.hot._createCellCoords(t.row,i.col)})}break;case"NW-SE":switch(r){case"NE-SW":"top"===o?u={start:t,end:a}:u.end=t;break;case"NW-SE":"top"===o?u={start:t,end:s}:u.end=t;break;case"SE-NW":"top"===o?u={start:t,end:i}:u.end=t;break;case"SW-NE":"top"===o?u={start:t,end:l}:u.end=t}break;case"SW-NE":switch(r){case"NW-SE":u="bottom"===o?{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(a.row,t.col)}:{start:this.hot._createCellCoords(i.row,t.col),end:this.hot._createCellCoords(t.row,s.col)};break;case"SW-NE":u="top"===o?{start:this.hot._createCellCoords(e.highlight.row,t.col),end:this.hot._createCellCoords(t.row,s.col)}:{start:this.hot._createCellCoords(t.row,i.col),end:this.hot._createCellCoords(i.row,t.col)};break;case"SE-NW":"bottom"===o?u={start:this.hot._createCellCoords(t.row,l.col),end:this.hot._createCellCoords(i.row,t.col)}:"top"===o&&(u={start:a,end:t})}break;case"SE-NW":switch(r){case"NW-SE":case"NE-SW":case"SW-NE":"top"===o&&(u.end=t);break;case"SE-NW":"top"===o?u.end=t:u={start:t,end:i}}}return u}isDragged(){return this.dragged.length>0}}var gw=n(50192);function yw(){let{label:e="",colspan:t=1,origColspan:n=1,collapsible:r=!1,crossHiddenColumns:o=[],isCollapsed:i=!1,isHidden:s=!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:i,crossHiddenColumns:o,isHidden:s,isRoot:a,isPlaceholder:l,headerClassNames:u}}function ww(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function vw(e,t){return e.get(bw(e,t))}function _w(e,t,n){return e.set(bw(e,t),n),n}function bw(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 Sw=["label","collapsible"];var Cw=new WeakMap,Ew=new WeakMap,Mw=new WeakMap;class Tw{constructor(){ww(this,Cw,[]),ww(this,Ew,0),ww(this,Mw,1/0)}setColumnsLimit(e){_w(Mw,this,e)}setData(){_w(Cw,this,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;const n=[];if(0===t)return n;(0,h.z0)(e,(e=>{const r=[];let o=0;n.push(r),(0,h.z0)(e,(e=>{const n=yw();if((0,s.Gv)(e)){const{label:t,colspan:r,headerClassName:o}=e;n.label=(0,c.As)(t),"number"==typeof r&&r>1&&(n.colspan=r,n.origColspan=r),"string"==typeof o&&(n.headerClassNames=[...o.split(" ")])}else n.label=(0,c.As)(e);o+=n.origColspan;let i=!1;if(o>=t&&(n.colspan=n.origColspan-(o-t),n.origColspan=n.colspan,i=!0),r.push(n),n.colspan>1)for(let e=0;e<n.colspan-1;e++)r.push({label:"",isPlaceholder:!0});return!i}))}));const r=Math.max(...(0,h.YD)(n,(e=>e.length)));return(0,h.z0)(n,(e=>{if(e.length<r){const t=(0,h.YD)(new Array(r-e.length),(()=>yw()));e.splice(e.length,0,...t)}})),n}(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],vw(Mw,this))),_w(Ew,this,vw(Cw,this).length)}getData(){return vw(Cw,this)}mergeWith(e){(0,h.z0)(e,(e=>{let{row:t,col:n,...r}=e;const o=this.getHeaderSettings(t,n);null!==o&&(0,s.X$)(o,r,Sw)}))}map(e){(0,h.z0)(vw(Cw,this),(t=>{(0,h.z0)(t,(t=>{const n=e({...t});(0,s.Gv)(n)&&(0,s.X$)(t,n,Sw)}))}))}getHeaderSettings(e,t){var n;if(e>=vw(Ew,this)||e<0)return null;const r=vw(Cw,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>=vw(Ew,this)||e<0)return r;const o=vw(Cw,this)[e];let i=0;for(let e=t;e<o.length;e++){const t=o[e];if(t.isPlaceholder)throw new Error("The first column settings cannot overlap the other header layers");if(i+=t.colspan,r.push(t),t.colspan>1&&(e+=t.colspan-1),i===n)break;if(i>n)throw new Error("The last column settings cannot overlap the other header layers")}return r}getLayersCount(){return vw(Ew,this)}getColumnsCount(){return vw(Ew,this)>0?vw(Cw,this)[0].length:0}clear(){_w(Cw,this,[]),_w(Ew,this,0)}}function Rw(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Aw="DF-pre-order",Nw=new Map([[Aw,function e(t,n){let r=t.call(n,this);for(let o=0;o<this.childs.length;o++){if(!1===r)return!1;r=e.call(this.childs[o],t,n)}return r}],["DF-post-order",function e(t,n){for(let r=0;r<this.childs.length;r++)if(!1===e.call(this.childs[r],t,n))return!1;return t.call(n,this)}],["BF",function(e,t){const n=[this];!function r(){if(0===n.length)return;const o=n.shift();n.push(...o.childs),!1!==e.call(t,o)&&r()}()}]]);class Lw{constructor(e){Rw(this,"data",{}),Rw(this,"parent",null),Rw(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 Lw({...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]:"BF";if(!Nw.has(t))throw new Error(`Traversal strategy "${t}" does not exist`);Nw.get(t).call(this,e,this)}walkUp(e){const t=this,n=r=>{!1!==e.call(t,r)&&null!==r.parent&&n(r.parent)};n(this)}}function xw(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Ow(e,t){return e.get(Iw(e,t))}function Iw(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 kw=new WeakMap,Dw=new WeakMap,Pw=new WeakMap;class Hw{constructor(e){var t,n;xw(this,kw,new Map),xw(this,Dw,new Map),xw(this,Pw,null),n=e,(t=Pw).set(Iw(t,this),n)}getRoots(){return Array.from(Ow(kw,this).values())}getRootByColumn(e){let t;return Ow(Dw,this).has(e)&&(t=Ow(kw,this).get(Ow(Dw,this).get(e))),t}getNode(e,t){const n=this.getRootByColumn(t);if(!n)return;const r=t-Ow(Dw,this).get(t);let o,i=0;return n.walkDown((n=>{const{data:{origColspan:s,headerLevel:a}}=n;if(e===a){if(r>=i&&r<=i+s-1)return o=n,o.data.isRoot=t===o.data.columnIndex,!1;i+=s}})),o}rebuildTreeIndex(){let e=0;Ow(Dw,this).clear(),(0,h.z0)(Ow(kw,this),(t=>{let[,{data:{colspan:n}}]=t;for(let t=e;t<e+n;t++)Ow(Dw,this).set(t,e);e+=n}))}buildTree(){this.clear();const e=Ow(Pw,this).getColumnsCount();let t=0;for(;t<e;){const e=Ow(Pw,this).getHeaderSettings(0,t),n=new Lw;Ow(kw,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 o=Ow(Pw,this).getHeadersSettings(n,t,r);n+=1,(0,h.z0)(o,(r=>{const o={...r,headerLevel:n-1,columnIndex:t};let i;1===n?(e.data=o,i=e):(i=new Lw(o),e.addChild(i)),n<Ow(Pw,this).getLayersCount()&&this.buildLeaves(i,t,n,r.origColspan),t+=r.origColspan}))}clear(){Ow(kw,this).clear(),Ow(Dw,this).clear()}}function Fw(e,t){e.walkDown((e=>{let{data:n,childs:r}=e;if(!n.isHidden&&(t(n.columnIndex),0===r.length))for(let e=1;e<n.colspan;e++)t(n.columnIndex+e)}))}function Yw(e,t){let{childs:n}=e;if(0!==n.length)return n[0].data[t]}function Vw(e){return Yw(e,"origColspan")===e.data.origColspan}function Uw(e){const{data:t,childs:n}=e;if(!t.isCollapsed||t.isHidden||t.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Vw(e))return Uw(n[0]);t.isCollapsed=!1;const r=n.slice(1),o=new Set;let i=0;if(r.length>0)(0,h.z0)(r,(e=>{e.replaceTreeWith(e.data.clonedTree),e.data.clonedTree=null;const t=e.data;i+=t.colspan,Fw(e,(e=>{o.add(e)}))}));else{const{colspan:e,origColspan:n,columnIndex:r}=t;i=n-e;for(let e=1;e<n;e++)o.add(r+e)}return e.walkUp((e=>{const{data:t}=e;t.colspan+=i,t.colspan>=t.origColspan?(t.colspan=t.origColspan,t.isCollapsed=!1):Vw(e)&&(t.isCollapsed=Yw(e,"isCollapsed"))})),{rollbackModification:()=>Bw(e),affectedColumns:Array.from(o),colspanCompensation:i}}function Bw(e){var t;const{data:n,childs:r}=e;if(n.isCollapsed||n.isHidden||n.origColspan<=1)return{rollbackModification:()=>{},affectedColumns:[],colspanCompensation:0};if(Vw(e))return Bw(r[0]);n.isCollapsed=!0;const o=r.slice(1),i=new Set;if(o.length>0)(0,h.z0)(o,(e=>{Fw(e,(e=>{i.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;i.add(e)}}const s=n.colspan-(null!==(t=Yw(e,"colspan"))&&void 0!==t?t:1);return e.walkUp((e=>{const{data:t}=e;t.colspan-=s,t.colspan<=1?(t.colspan=1,t.isCollapsed=!0):Vw(e)&&(t.isCollapsed=Yw(e,"isCollapsed"))})),{rollbackModification:()=>Uw(e),affectedColumns:Array.from(i),colspanCompensation:s}}const Ww=new Map([["collapse",Bw],["expand",Uw],["hide-column",function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(yo.O`The passed node is not the last node on the tree. Only for\x20
  43. 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}))}],["show-column",function(e,t){if(!Number.isInteger(t))throw new Error("The passed gridColumnIndex argument has invalid type.");if(e.childs.length>0)throw new Error(yo.O`The passed node is not the last node on the tree. Only for\x20
  44. 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}))}]]);function jw(e){const t=[];return(0,h.z0)(e,(e=>{e.walkDown((e=>{const n=e.data,{origColspan:r,columnIndex:o,headerLevel:i,crossHiddenColumns:s}=n,a=function(e,t){let n;return Array.isArray(e[t])?n=e[t]:(n=[],e[t]=n),n}(t,i);let l=!1;for(let e=o;e<o+r;e++)if(s.includes(e)||l)a.push({label:"",isPlaceholder:!0});else{const e=zw(n);e.isRoot=!0,a.push(e),l=!0}}))})),t}function zw(e){const{crossHiddenColumns:t,...n}=yw(e);return n}function Gw(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function $w(e,t,n){return e.set(Xw(e,t),n),n}function Kw(e,t){return e.get(Xw(e,t))}function Xw(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 qw=new WeakMap,Qw=new WeakMap,Jw=new WeakMap;class Zw{constructor(){Gw(this,qw,new Tw),Gw(this,Qw,new Hw(Kw(qw,this))),Gw(this,Jw,[[]])}setState(e){Kw(qw,this).setData(e);let t=!1;try{Kw(Qw,this).buildTree()}catch(e){Kw(Qw,this).clear(),Kw(qw,this).clear(),t=!0}return $w(Jw,this,jw(Kw(Qw,this).getRoots())),t}setColumnsLimit(e){Kw(qw,this).setColumnsLimit(e)}mergeStateWith(e){const t=(0,h.YD)(e,(e=>{let{row:t,...n}=e;return{row:t<0?this.rowCoordsToLevel(t):t,...n}}));Kw(qw,this).mergeWith(t),Kw(Qw,this).buildTree(),$w(Jw,this,jw(Kw(Qw,this).getRoots()))}mapState(e){Kw(qw,this).map(e),Kw(Qw,this).buildTree(),$w(Jw,this,jw(Kw(Qw,this).getRoots()))}mapNodes(e){return(0,h.mu)(Kw(Qw,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=Kw(Qw,this).getNode(t,n);let o;return r&&(o=function(e,t,n){if(!Ww.has(e))throw new Error(`The node modifier action ("${e}") does not exist.`);return Ww.get(e)(t,n)}(e,r,n),$w(Jw,this,jw(Kw(Qw,this).getRoots()))),o}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=Kw(Jw,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;return Kw(Qw,this).getNode(e,t)||null}findTopMostEntireHeaderLevel(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e;const n=t-e+1;let r=!1,o=null;for(let i=e;i<=t;i++){const s=Kw(Qw,this).getRootByColumn(i);if(!s)break;r=!0,s.walkDown((r=>{const{columnIndex:i,headerLevel:s,origColspan:a,isHidden:l}=r.data;l||a<=n&&i>=e&&i+a-1<=t&&(null===o||s<o)&&(o=s)}),Aw)}return r&&null===o?-1:this.levelToRowCoords(null!=o?o: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 o=t-1;for(;o>=0;){var i;const{isRoot:t}=null!==(i=this.getHeaderSettings(e,o))&&void 0!==i?i:{isRoot:!0};if(t)break;o-=1}return o}findRightMostColumnIndex(e,t){var n;const{isRoot:r,origColspan:o}=null!==(n=this.getHeaderSettings(e,t))&&void 0!==n?n:{isRoot:!0,origColspan:1};if(r)return t+o-1;let i=t+1;for(;i<this.getColumnsCount();){var s;const{isRoot:t}=null!==(s=this.getHeaderSettings(e,i))&&void 0!==s?s:{isRoot:!0};if(t)break;i+=1}return i-1}getLayersCount(){return Kw(qw,this).getLayersCount()}getColumnsCount(){return Kw(qw,this).getColumnsCount()}clear(){$w(Jw,this,[]),Kw(qw,this).clear(),Kw(Qw,this).clear()}}function ev(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const tv=class{constructor(e,t){ev(this,"hot",void 0),ev(this,"nestedHeaderSettingsGetter",void 0),ev(this,"layersCount",0),ev(this,"container",void 0),ev(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(){const e=this.hot.getCurrentThemeName();this.container=this.hot.rootDocument.createElement("div"),this.container.classList.add("handsontable","htGhostTable","htAutoSize"),e&&this.container.classList.add(e),this._buildGhostTable(this.container),this.hot.rootDocument.body.appendChild(this.container);const t=this.container.querySelectorAll("tr:last-of-type th"),n=t.length;this.widthsMap.clear();for(let e=0;e<n;e++){const n=this.hot.columnIndexMapper.getVisualFromRenderableIndex(e),r=this.hot.toPhysicalColumn(n);this.widthsMap.setValueAtIndex(r,t[e].offsetWidth)}this.container.parentNode.removeChild(this.container),this.container=null}_buildGhostTable(e){const{rootDocument:t,columnIndexMapper:n}=this.hot,r=t.createDocumentFragment(),i=t.createElement("table"),s=!!this.hot.getSettings().dropdownMenu,a=n.getRenderableIndexesLength();for(let e=0;e<this.layersCount;e++){const r=t.createElement("tr");for(let i=0;i<a;i++){let a=n.getVisualFromRenderableIndex(i);null===a&&(a=i);const l=t.createElement("th"),u=this.nestedHeaderSettingsGetter(e,a);if(u&&(!u.isPlaceholder||u.isHidden)){let e=u.label;s&&(e+='<button class="changeType"></button>'),(0,o.Mv)(l,e),l.colSpan=u.colspan,r.appendChild(l)}}i.appendChild(r)}r.appendChild(i),e.appendChild(r)}clear(){this.widthsMap.clear(),this.container=null}};function nv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rv(e,t,n){ov(e,t),t.set(e,n)}function ov(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function iv(e,t,n){return e.set(av(e,t),n),n}function sv(e,t){return e.get(av(e,t))}function av(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 lv="nestedHeaders";var uv=new WeakMap,hv=new WeakMap,cv=new WeakMap,dv=new WeakMap,mv=new WeakMap,pv=new WeakSet;class fv extends hn{constructor(){var e;super(...arguments),ov(this,e=pv),e.add(this),rv(this,uv,new Zw),rv(this,hv,null),rv(this,cv,null),rv(this,dv,!1),rv(this,mv,null),nv(this,"ghostTable",new tv(this.hot,((e,t)=>this.getHeaderSettings(e,t)))),nv(this,"detectedOverlappedHeaders",!1)}static get PLUGIN_KEY(){return lv}static get PLUGIN_PRIORITY(){return 280}isEnabled(){return!!this.hot.getSettings()[lv]}enablePlugin(){var e=this;if(this.enabled)return;const{nestedHeaders:t}=this.hot.getSettings();Array.isArray(t)&&Array.isArray(t[0])||(0,Dr.R8)(yo.O`Your Nested Headers plugin configuration is invalid. The settings has to be\x20
  45. passed as an array of arrays e.q. [['A1', { label: 'A2', colspan: 2 }]]`),this.addHook("init",(()=>av(pv,this,Ov).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 av(pv,e,Iv).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 av(pv,e,_v).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 av(pv,e,bv).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 av(pv,e,Sv).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 av(pv,e,Cv).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 av(pv,e,Ev).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 av(pv,e,Mv).call(e,...n)})),this.addHook("afterSelection",(()=>av(pv,this,gv).call(this))),this.addHook("afterSelectionFocusSet",(()=>av(pv,this,gv).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 av(pv,e,yv).call(e,...n)})),this.addHook("afterGetColumnHeaderRenderers",(e=>av(pv,this,Rv).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 av(pv,e,Nv).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 av(pv,e,Lv).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 av(pv,e,wv).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 av(pv,e,vv).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 av(pv,e,Tv).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 av(pv,e,Av).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 av(pv,e,xv).call(e,...n)})),this.hot.columnIndexMapper.addLocalHook("cacheUpdated",(()=>av(pv,this,gv).call(this))),this.hot.rowIndexMapper.addLocalHook("cacheUpdated",(()=>av(pv,this,gv).call(this))),super.enablePlugin(),this.updatePlugin()}updatePlugin(){if(!this.hot.view)return;const{nestedHeaders:e}=this.hot.getSettings();sv(uv,this).setColumnsLimit(this.hot.countCols()),Array.isArray(e)&&(this.detectedOverlappedHeaders=sv(uv,this).setState(e)),this.detectedOverlappedHeaders&&(0,Dr.R8)(yo.O`Your Nested Headers plugin setup contains overlapping headers. This kind of configuration\x20
  46. is currently not supported.`),this.enabled&&this.hot.columnIndexMapper.hidingMapsCollection.getMergedValues().forEach(((e,t)=>{const n=!0===e?"hide-column":"show-column";sv(uv,this).triggerColumnModification(n,t)})),!sv(hv,this)&&this.enabled&&iv(hv,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";sv(uv,this).triggerColumnModification(e,n)}})),this.ghostTable.buildWidthsMap()}))),this.ghostTable.setLayersCount(this.getLayersCount()).buildWidthsMap(),super.updatePlugin()}disablePlugin(){this.clearColspans(),sv(uv,this).clear(),sv(hv,this).unsubscribe(),iv(hv,this,null),this.ghostTable.clear(),super.disablePlugin()}getStateManager(){return sv(uv,this)}getLayersCount(){return sv(uv,this).getLayersCount()}getHeaderSettings(e,t){return sv(uv,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,i=e.wtOverlays.topInlineStartCornerOverlay?e.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.THEAD:null;for(let e=0;e<t;e++){const t=n.childNodes[e];if(!t)break;const s=r.childNodes[e],a=i?i.childNodes[e]:null;for(let e=0,n=t.childNodes.length;e<n;e++)t.childNodes[e].removeAttribute("colspan"),(0,o.vy)(t.childNodes[e],"hiddenHeader"),s&&s.childNodes[e]&&(s.childNodes[e].removeAttribute("colspan"),(0,o.vy)(s.childNodes[e],"hiddenHeader")),i&&a&&a.childNodes[e]&&(a.childNodes[e].removeAttribute("colspan"),(0,o.vy)(a.childNodes[e],"hiddenHeader"))}}headerRendererFactory(e){var t=this;const n=this.hot.view._wt.getSetting("fixedColumnsStart");return(r,i)=>{var s;const{columnIndexMapper:a,view:l}=this.hot;let u=a.getVisualFromRenderableIndex(r);null===u&&(u=r),i.removeAttribute("colspan"),(0,o.vy)(i,"hiddenHeader"),(0,o.vy)(i,"hiddenHeaderText");const{colspan:h,isHidden:c,isPlaceholder:d,headerClassNames:m}=null!==(s=sv(uv,this).getHeaderSettings(e,u))&&void 0!==s?s:{label:""};if(d||c)(0,o.iQ)(i,"hiddenHeader");else if(h>1){var p,f,g;const{wtOverlays:e}=l._wt,t=null===(p=e.topInlineStartCornerOverlay)||void 0===p?void 0:p.clone.wtTable.THEAD.contains(i),s=null===(f=e.inlineStartOverlay)||void 0===f?void 0:f.clone.wtTable.THEAD.contains(i);(null===(g=e.topOverlay)||void 0===g?void 0:g.clone.wtTable.THEAD.contains(i))&&u<n&&(0,o.iQ)(i,"hiddenHeaderText");const a=t||s?Math.min(h,n-r):h;a>1&&i.setAttribute("colspan",a)}if(this.hot.view.appendColHeader(u,i,(function(){return t.getColumnHeaderValue(...arguments)}),e),!d&&!c){const e=i.querySelector("div.relative");e&&m&&m.length>0&&((0,o.vy)(e,this.hot.getColumnMeta(u).headerClassName),(0,o.iQ)(e,m))}}}getColumnHeaderValue(e,t){var n;const{isHidden:r,isPlaceholder:o}=null!==(n=sv(uv,this).getHeaderSettings(t,e))&&void 0!==n?n:{};return o||r?"":this.hot.getColHeader(e,t)}destroy(){iv(uv,this,null),null!==sv(hv,this)&&(sv(hv,this).unsubscribe(),iv(hv,this,null)),super.destroy()}_getHeaderTreeNodeDataByCoords(e){if(!(e.row>=0||e.col<0))return sv(uv,this).getHeaderTreeNodeData(e.row,e.col)}}function gv(){var e;const t=null===(e=this.hot)||void 0===e?void 0:e.getSelectedRangeLast();if(!t)return;const{highlight:n}=t;if(n.isHeader()&&n.col>=0){const e=sv(uv,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 yv(e,t){var n;const r=this.hot.getSelectedRangeLast();if(!r)return e;const{highlight:o}=r,{navigableHeaders:i}=this.hot.getSettings(),s=this.hot.selection.isSelectedByColumnHeader(),a=i?o.row:null===(n=sv(mv,this))||void 0===n?void 0:n.row,l=s?e:o.col,u=a<0&&l>=0;if(iv(mv,this,null),!u)return e;const h=this.hot.getFirstFullyVisibleColumn(),c=this.hot.getLastFullyVisibleColumn(),d=c-h+1,m=sv(uv,this).findLeftMostColumnIndex(a,l),p=sv(uv,this).findRightMostColumnIndex(a,l),f=p-m+1;if(m<h&&p>c)return m;if(s){let e=null;return m>=h&&p>c?f>d?(t.value="start",e=m):(t.value="end",e=p):m<h&&p<=c&&(f>d?(t.value="end",e=p):(t.value="start",e=m)),e}return m<=h?m:p}function wv(e,t,n){const r=sv(uv,this).getHeaderTreeNodeData(t,e);if(!r)return e;const{columnCursor:o,selectionType:i,selectionWidth:s}=n,{isRoot:a,colspan:l}=sv(uv,this).getHeaderSettings(t,e);if(i===gw.PP){if(!a)return r.columnIndex}else if(i===gw.E6&&(l>s-o||!a))return null;return e}function vv(e,t,n){let{columnHeadersCount:r}=n;if(0!==r)for(let n=0;n<t.length;n++){const{startRow:r,startCol:i,endRow:s,endCol:a}=t[n],l=s-r+1;if(r>=0||1==i-a+1)break;for(let t=i;t<=a;t++)for(let n=r;n<=s;n++){var o;const r=l+n,s=t-i;0!==s&&(!1===(null===(o=sv(uv,this).getHeaderTreeNodeData(n,t))||void 0===o?void 0:o.isRoot)&&(e[r][s]=""))}}}function _v(e,t,n,r){this._getHeaderTreeNodeDataByCoords(t)&&(r.column=!0)}function bv(e,t){const n=this._getHeaderTreeNodeDataByCoords(t);if(!n)return;iv(cv,this,t.clone()),iv(dv,this,!0);const{selection:r}=this.hot,o=r.isSelected()?r.getSelectedRange().current():null,s=[],{columnIndex:a,origColspan:l}=n,u=!r.inInSelection(t);e.shiftKey&&o?t.col<o.from.col?s.push(o.getTopEndCorner().col,a,t.row):t.col>o.from.col?s.push(o.getTopStartCorner().col,a+l-1,t.row):s.push(a,a+l-1,t.row):((0,i.Ml)(e)||(0,i.nO)(e)&&u||(0,i.kH)(e))&&s.push(a,a+l-1,t.row),r.selectColumns(...s)}function Sv(e,t,n,r){if(!this.hot.view.isMouseDown()||r.column)return;const o=this._getHeaderTreeNodeDataByCoords(t);if(!o)return;const{columnIndex:i,origColspan:s}=o,a=this.hot.getSelectedRangeLast(),l=a.getTopStartCorner(),u=a.getBottomEndCorner(),{from:h}=a;r.column=!0,r.cell=!0;const c=[],d=(0,Mt.qE)(t.row,-1/0,-1);t.col<h.col?c.push(u.col,i,d):t.col>h.col?c.push(l.col,i+s-1,d):c.push(i,i+s-1,d),this.hot.selection.selectColumns(...c)}function Cv(){iv(dv,this,!1)}function Ev(){const{navigableHeaders:e}=this.hot.getSettings();if(!this.hot.view.isMouseDown()||!sv(dv,this)||!e)return;const t=this.hot.getSelectedRangeLast(),n=t.getTopStartCorner().col,r=t.getBottomEndCorner().col,{columnIndex:o,origColspan:i}=sv(uv,this).getHeaderTreeNodeData(sv(cv,this).row,sv(cv,this).col);if(t.setHighlight(sv(cv,this)),i>t.getWidth()||o<n||o+i-1>r){const e=sv(uv,this).findTopMostEntireHeaderLevel((0,Mt.qE)(n,o,o+i-1),(0,Mt.qE)(r,o,o+i-1));t.highlight.row=e,t.highlight.col=t.from.col}}function Mv(e){const{highlight:t}=this.hot.getSelectedRangeLast(),n=this.hot._createCellCoords(t.row+e.row,t.col+e.col);if(!(n.isHeader()&&n.col>=0))return;const r=sv(uv,this).findLeftMostColumnIndex(n.row,n.col),o=sv(uv,this).findRightMostColumnIndex(n.row,n.col);if(e.col<0){const n=t.col>=r&&t.col<=o?r-1:o,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,-1);e.col=null===i?-this.hot.view.countRenderableColumnsInRange(0,t.col):-Math.max(this.hot.view.countRenderableColumnsInRange(i,t.col)-1,1)}else if(e.col>0){const n=t.col>=r&&t.col<=o?o+1:r,i=this.hot.columnIndexMapper.getNearestNotHiddenIndex(n,1);e.col=null===i?this.hot.view.countRenderableColumnsInRange(t.col,this.hot.countCols()):Math.max(this.hot.view.countRenderableColumnsInRange(t.col,i)-1,1)}}function Tv(e,t,n){const r=e.row,o=this._getHeaderTreeNodeDataByCoords({row:r,col:e.col}),i=this._getHeaderTreeNodeDataByCoords({row:r,col:t.col});iv(mv,this,n.clone()),t.col<e.col?(o&&(e.col=o.columnIndex+o.origColspan-1),i&&(t.col=i.columnIndex)):t.col>=e.col&&(o&&(e.col=o.columnIndex),i&&(t.col=i.columnIndex+i.origColspan-1))}function Rv(e){if(sv(uv,this).getLayersCount()>0){e.length=0;for(let t=0;t<sv(uv,this).getLayersCount();t++)e.push(this.headerRendererFactory(t))}}function Av(e){const t=sv(uv,this).getLayersCount();let n=e.startColumn,r=!!t;for(let o=0;o<t;o++){const t=sv(uv,this).findLeftMostColumnIndex(o,e.startColumn),i=this.hot.columnIndexMapper.getRenderableFromVisualIndex(t);if(t>=0&&(r=!1),(0,Mt.kf)(i)&&i<e.startColumn){n=i;break}}e.startColumn=r?sv(uv,this).getHeaderTreeNodeData(0,n).columnIndex:n}function Nv(e,t){const n=this.ghostTable.getWidth(t);return e>n?e:n}function Lv(e,t,n){var r;const{label:o}=null!==(r=sv(uv,this).getHeaderTreeNodeData(n,t))&&void 0!==r?r:{label:""};return o}function xv(e,t){if(e<0)return this.hot.getCell(e,sv(uv,this).findLeftMostColumnIndex(e,t),!0)}function Ov(){this.updatePlugin()}function Iv(e,t){t||this.updatePlugin()}function kv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Dv=class{constructor(e,t){kv(this,"hot",void 0),kv(this,"data",null),kv(this,"plugin",void 0),kv(this,"parentReference",new WeakMap),kv(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},(0,Mt.Ti)(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)&&(0,h.z0)(e.__children,(n=>{this.cacheNode(n,t+1,e)}))}getDataObject(e){return null==e?null:this.cache.rows[e]}readTreeNodes(e,t,n,r){let o=!1,i=t;if(isNaN(i)&&i.end)return i;let s=e;return s||(s={__children:this.data},o=!0,i-=1),null!=n&&i===n?{result:s,end:!0}:null!=r&&s===r?{result:i,end:!0}:(i+=1,s.__children&&(0,h.z0)(s.__children,(e=>{if(this.parentReference.set(e,o?null:s),i=this.readTreeNodes(e,i,n,r),isNaN(i)&&i.end)return!1})),i)}mockParent(){const e=this.mockNode();return e.__children=this.data,e}mockNode(){const e={};return(0,s.v4)(this.data[0],((t,n)=>{e[n]=null})),e}getRowIndex(e){return null==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?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?((0,h.z0)(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?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 o=e;e||(o=this.mockParent()),o.__children||(o.__children=[]),n||(n=this.mockNode()),o.__children.push(n),this.rewriteCache();const i=this.getRowIndex(n);this.hot.rowIndexMapper.insertIndexes(i,1),this.hot.runHooks("afterCreateRow",i,1),this.hot.runHooks("afterAddChild",e,n)}addChildAtIndex(e,t,n){let r,o=n;if(o||(o=this.mockNode()),this.hot.runHooks("beforeAddChild",e,o,t),e){const n=this.getRowIndex(e)+t+1;this.hot.runHooks("beforeCreateRow",n,1),e.__children.splice(t,null,o),this.rewriteCache(),this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(e),"__children",e.__children,"NestedRows.addChildAtIndex"),this.hot.rowIndexMapper.insertIndexes(n,1),this.plugin.enableCoreAPIModifiers(),this.hot.runHooks("afterCreateRow",n,1),r=n}else this.plugin.disableCoreAPIModifiers(),this.hot.alter("insert_row_above",t,1,"NestedRows.addChildAtIndex"),this.plugin.enableCoreAPIModifiers(),r=this.getRowIndex(this.data[t]);o=this.getDataObject(r),this.hot.runHooks("afterAddChild",e,o,t)}addSibling(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"below";const n=this.translateTrimmedRow(e),r=this.getRowParent(n),o=this.getRowIndexWithinParent(n);switch(t){case"below":this.addChildAtIndex(r,o+1,null);break;case"above":this.addChildAtIndex(r,o,null)}}detachFromParent(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=null;const r=[];Array.isArray(e)?((0,Mt.Ti)(e[0],e[2],(e=>{const t=this.translateTrimmedRow(e);r.push(this.getDataObject(t))})),(0,Mt.Ti)(0,r.length-2,(e=>{this.detachFromParent(r[e],!1)})),n=r[r.length-1]):n=e;const o=this.getRowIndex(n),i=this.countChildren(n),s=this.getRowIndexWithinParent(n),a=this.getRowParent(n),l=this.getRowParent(a),u=this.getRowIndex(l);let h=null;if(this.hot.runHooks("beforeDetachChild",a,n),null!=s){const e=Array.from(new Array(o+i+1).keys()).splice(-1*(i+1));if(this.hot.runHooks("beforeRemoveRow",o,i+1,e,this.plugin.pluginName),a.__children.splice(s,1),this.rewriteCache(),this.hot.runHooks("afterRemoveRow",o,i+1,e,this.plugin.pluginName),l){h=u+this.countChildren(l);const e=this.getChild(l,this.countChildren(l)-1),t=this.getRowIndex(e);this.hot.runHooks("beforeCreateRow",t+1,i+1,this.plugin.pluginName),l.__children.push(n)}else h=this.hot.countRows()+1,this.hot.runHooks("beforeCreateRow",h-2,i+1,this.plugin.pluginName),this.data.push(n)}this.rewriteCache(),this.hot.runHooks("afterCreateRow",h-2,i+1,this.plugin.pluginName),this.hot.runHooks("afterDetachChild",a,n,this.getRowIndex(n)),t&&this.hot.render()}filterData(e,t,n){const r=[];(0,h.z0)(n,(e=>{r.push(this.getDataObject(e))})),(0,h.z0)(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 o=null,i=e;r&&r.__children&&0===r.__children.length?(o=r,i=0):e<this.countAllRows()&&(o=this.getRowParent(e),i=this.getRowIndexWithinParent(e)),o?n?o.__children.splice(i,t,...n):o.__children.splice(i,t):n?this.data.splice(i,t,...n):this.data.splice(i,t),this.rewriteCache()}syncRowWithRawSource(e){let t=e,n=t;do{n=this.getRowParent(n),null!==n&&(t=n)}while(null!==n);this.plugin.disableCoreAPIModifiers(),this.hot.setSourceDataAtCell(this.getRowIndexWithinParent(t),"__children",t.__children,"NestedRows.syncRowWithRawSource"),this.plugin.enableCoreAPIModifiers()}moveRow(e,t,n,r){const o=t===this.hot.countRows(),i=this.getRowParent(e),s=this.getRowIndexWithinParent(e),a=i.__children.slice(s,s+1),l=e>t;let u=o?this.getRowParent(t-1):this.getRowParent(t);null==u&&(u=this.getRowParent(t-1)),null==u&&(u=this.getDataObject(t-1)),u?u.__children||(u.__children=[]):(u=this.getDataObject(t),u.__children=[]);const h=o||n||r?u.__children.length:this.getRowIndexWithinParent(t),c=i===u;u.__children.splice(h,0,a[0]),i.__children.splice(s+(l&&c?1:0),1),this.syncRowWithRawSource(i),c||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}};function Pv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hv=class{constructor(e,t){Pv(this,"hot",void 0),Pv(this,"plugin",void 0),this.hot=t,this.plugin=e}};class Fv extends Hv{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),i=this.dataManager.getDataObject(n),s=t.getElementsByTagName("DIV")[0],a=s.querySelector("span.rowHeader"),l=s.querySelectorAll('[class^="ht_nesting"]'),u=this.hot.getSettings().ariaTags;if((0,h.z0)(l,(e=>{e&&s.removeChild(e)})),(0,o.iQ)(t,Fv.CSS_CLASSES.indicatorContainer),r){const{rootDocument:e}=this.hot,t=a.cloneNode(!0);s.innerHTML="",(0,Mt.Ti)(0,r-1,(()=>{const t=e.createElement("SPAN");(0,o.iQ)(t,Fv.CSS_CLASSES.emptyIndicator),s.appendChild(t)})),s.appendChild(t)}if(this.dataManager.hasChildren(i)){const e=this.hot.rootDocument.createElement("DIV");u&&(0,o.Bq)(e,[(0,f.MG)()]),(0,o.iQ)(t,Fv.CSS_CLASSES.parent),this.collapsingUI.areChildrenCollapsed(n)?((0,o.iQ)(e,`${Fv.CSS_CLASSES.button} ${Fv.CSS_CLASSES.expandButton}`),u&&(0,o.Bq)(t,[(0,f.dV)(!1)])):((0,o.iQ)(e,`${Fv.CSS_CLASSES.button} ${Fv.CSS_CLASSES.collapseButton}`),u&&(0,o.Bq)(t,[(0,f.dV)(!0)])),s.appendChild(e)}}updateRowHeaderWidth(e){let t=e;t||(t=this.dataManager.cache.levelCount);const n=this.hot.view.getStylesHandler();let r=11;n.isClassicTheme()||(r=2*n.getCSSVariableValue("cell-horizontal-padding")),this.rowHeaderWidthCache=Math.max(50,r+10*t+25),this.hot.render()}}const Yv=Fv,Vv=class extends Hv{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&&(t=1/0),(0,h.z0)(n.lastCollapsedRows,((o,i)=>{o>=e&&o<t&&(n.lastCollapsedRows[i]=o+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)=>{(0,Mt.Ti)(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 o=null,i=null,s=null;return isNaN(e)?(o=e,i=this.dataManager.getRowIndex(o)):(o=this.dataManager.getDataObject(e),i=e),this.dataManager.hasChildren(o)&&(0,h.z0)(o.__children,(e=>{r.push(this.dataManager.getRowIndex(e))})),s=this.collapseRows(r,!0,!1),n&&this.trimRows(s),t&&this.renderAndAdjust(),-1===this.collapsedRows.indexOf(i)&&this.collapsedRows.push(i),s}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=[];(0,h.z0)(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(0,h.z0)(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);(0,h.z0)(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(0,h.z0)(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);(0,h.z0)(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 o=null,i=null,s=null;return isNaN(e)?(o=e,i=this.dataManager.getRowIndex(e)):(o=this.dataManager.getDataObject(e),i=e),this.collapsedRows.splice(this.collapsedRows.indexOf(i),1),this.dataManager.hasChildren(o)&&(0,h.z0)(o.__children,(e=>{const t=this.dataManager.getRowIndex(e);r.push(t)})),s=this.expandRows(r,!0,!1),n&&this.untrimRows(s),t&&this.renderAndAdjust(),s}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=[];(0,h.z0)(e,(e=>{r.push(...this.expandChildren(e,!1,!1))})),n&&this.untrimRows(r),t&&this.renderAndAdjust()}collapseAll(){const e=this.dataManager.getData(),t=[];(0,h.z0)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.collapseMultipleChildren(t),this.renderAndAdjust()}expandAll(){const e=this.dataManager.getData(),t=[];(0,h.z0)(e,(e=>{this.dataManager.hasChildren(e)&&t.push(e)})),this.expandMultipleChildren(t),this.renderAndAdjust()}trimRows(e){this.hot.batchExecution((()=>{(0,h.z0)(e,(e=>{this.plugin.collapsedRowsMap.setValueAtIndex(e,!0)}))}),!0)}untrimRows(e){this.hot.batchExecution((()=>{(0,h.z0)(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)&&(0,h.z0)(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;for(;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);(0,o.nB)(e.target,Yv.CSS_CLASSES.button)&&(this.areChildrenCollapsed(n)?this.expandChildren(n):this.collapseChildren(n),(0,i.CA)(e))}translateTrimmedRow(e){return this.hot.toPhysicalRow(e)}untranslateTrimmedRow(e){return this.hot.toVisualRow(e)}renderAndAdjust(){this.hot.render(),this.hot.view.adjustElementsSize()}};var Uv=new WeakMap;const Bv=class extends Hv{constructor(){var e,t,n;super(...arguments),e=this,t="dataManager",n=this.plugin.dataManager,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,Uv,{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(Ee.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(Ee.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]);return!this.dataManager.getRowParent(t)||!e||e[0]<0||this.hot.selection.isSelectedByColumnHeader()||this.hot.countRows()>=this.hot.getSettings().maxRows}},{name:"---------"}];return(0,Mt.Ti)(0,e.items.length-1,(n=>{if(0===n)return(0,h.z0)(t,((t,r)=>{e.items.splice(n+r,0,t)})),!1})),this.modifyRowInsertingOptions(e)}modifyRowInsertingOptions(e){return(0,Mt.Ti)(0,e.items.length-1,(t=>{const n=(r=Uv,o=this,r.get(function(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")}(r,o)))[e.items[t].key];var r,o;null!=n&&(e.items[t].callback=n)})),e}};function Wv(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class jv{constructor(e){Wv(this,"plugin",void 0),Wv(this,"hot",void 0),Wv(this,"dataManager",void 0),Wv(this,"collapsingUI",void 0),this.plugin=e,this.hot=e.hot,this.dataManager=e.dataManager,this.collapsingUI=e.collapsingUI}onBeforeRowMove(e,t,n,r){if(this.displayAPICompatibilityWarning({rows:e,finalIndex:t,dropIndex:n,movePossible:r}))return!1;this.movedToCollapsed=!1;const o=n===this.hot.countRows(),i=o?this.hot.countSourceRows():this.dataManager.translateTrimmedRow(n);let s=!0;const a=e.map((e=>{if(!s)return!1;const t=this.dataManager.translateTrimmedRow(e);return s=this.shouldAllowMoving(t,i),t})),l=-1===a.indexOf(i);if(!s||!l)return!1;const u=this.getBaseParent(a),h=this.getTargetParent(o,i),c=u===h;return this.movedToCollapsed=this.collapsingUI.areChildrenCollapsed(h),this.collapsingUI.collapsedRowsStash.stash(),this.shiftCollapsibleParentsLocations(a,i,c),this.moveRows(a,i,h),this.dataManager.rewriteCache(),this.moveCellsMeta(a,i),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:o}=e;let i=!1;return(0,c.b0)(r)&&((0,Dr.R8)(yo.O`Since version 8.0.0 of the Handsontable the 'moveRows' method isn't used for moving rows\x20
  47. when the NestedRows plugin is enabled. Please use the 'dragRows' method instead.`),this.hot.runHooks("afterRowMove",t,n,r,o,!1),i=!0),i}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&&(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,o=0;if(this.movedToCollapsed){let i=null;i=e[n-1]<t?this.dataManager.translateTrimmedRow(t-n):this.dataManager.translateTrimmedRow(t);const s=this.dataManager.getRowParent(null===i?this.hot.countSourceRows()-1:i-1),a=this.dataManager.getRowIndex(s);r=this.dataManager.untranslateTrimmedRow(a),o=r}else e[n-1]<t?(o=t-1,r=o-n+1):(r=t,o=r+n-1);this.hot.selectCells([[r,0,o,this.hot.countCols()-1]],!1)}isRowOrderChanged(e,t){return e.some(((e,n)=>e-n!==t))}}function zv(e,t,n){Gv(e,t),t.set(e,n)}function Gv(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=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Kv(e,t){return e.get(qv(e,t))}function Xv(e,t,n){return e.set(qv(e,t),n),n}function qv(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 Qv="nestedRows",Jv=Qv;var Zv=new WeakMap,e_=new WeakMap,t_=new WeakSet;class n_ extends hn{constructor(){var e;super(...arguments),Gv(this,e=t_),e.add(this),$v(this,"dataManager",null),$v(this,"headersUI",null),$v(this,"collapsedRowsMap",null),zv(this,Zv,!1),zv(this,e_,!1)}static get PLUGIN_KEY(){return Qv}static get PLUGIN_PRIORITY(){return 300}isEnabled(){return!!this.hot.getSettings()[Qv]}enablePlugin(){var e=this;this.enabled||(this.collapsedRowsMap=this.hot.rowIndexMapper.registerMap("nestedRows",new Uc.q),this.dataManager=new Dv(this,this.hot),this.collapsingUI=new Vv(this,this.hot),this.headersUI=new Yv(this,this.hot),this.contextMenuUI=new Bv(this,this.hot),this.rowMoveController=new jv(this),this.addHook("afterInit",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return qv(t_,e,g_).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 qv(t_,e,y_).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 qv(t_,e,i_).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 qv(t_,e,s_).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 qv(t_,e,a_).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 qv(t_,e,o_).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 qv(t_,e,h_).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 qv(t_,e,u_).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 qv(t_,e,c_).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 qv(t_,e,d_).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 qv(t_,e,m_).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 qv(t_,e,p_).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 qv(t_,e,l_).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 qv(t_,e,f_).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 qv(t_,e,r_).call(e,...n)})),this.addHook("beforeLoadData",(e=>qv(t_,this,w_).call(this,e))),this.addHook("beforeUpdateData",(e=>qv(t_,this,w_).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:Jv,relativeToGroup:a.b,position:"before"})}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(Jv)}disableCoreAPIModifiers(){Xv(e_,this,!0)}enableCoreAPIModifiers(){Xv(e_,this,!1)}onModifyRowData(e){if(!Kv(e_,this))return this.dataManager.getDataObject(e)}onModifySourceLength(){if(!Kv(e_,this))return this.dataManager.countAllRows()}onBeforeDataSplice(e,t,n){return!(!Kv(e_,this)&&!this.dataManager.isRowHighestLevel(e)&&(this.dataManager.spliceData(e,t,n),1))}destroy(){super.destroy()}}function r_(e,t,n,r){return this.rowMoveController.onBeforeRowMove(e,t,n,r)}function o_(e,t,n){this.collapsingUI.toggleState(e,t,n)}function i_(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),Xv(Zv,this,!0),this.dataManager.getData().slice()}function s_(e){return this.contextMenuUI.appendOptions(e)}function a_(e,t){this.headersUI.appendLevelIndicators(e,t)}function l_(e){return Math.max(this.headersUI.rowHeaderWidthCache,e)}function u_(e,t,n,r){r!==this.pluginName&&this.hot._registerTimeout((()=>{Xv(Zv,this,!1),this.headersUI.updateRowHeaderWidth(),this.collapsingUI.collapsedRowsStash.applyStash()}))}function h_(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 c_(){this.collapsingUI.collapsedRowsStash.stash()}function d_(e,t){this.collapsingUI.collapsedRowsStash.shiftStash(this.dataManager.getRowIndex(t)),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function m_(){this.collapsingUI.collapsedRowsStash.stash()}function p_(e,t,n){this.collapsingUI.collapsedRowsStash.shiftStash(n,null,-1),this.collapsingUI.collapsedRowsStash.applyStash(),this.headersUI.updateRowHeaderWidth()}function f_(){this.dataManager.rewriteCache()}function g_(){this.headersUI.updateRowHeaderWidth()}function y_(e,t){Kv(Zv,this)&&(t.skipRender=!0)}function w_(e){if(!(0,Gh.DJ)(e))return(0,Dr.z3)("The Nested Rows plugin requires an Array of Objects as a dataset to be provided. The plugin has been disabled."),this.hot.getSettings()[Qv]=!1,void this.disablePlugin();this.dataManager.setData(e),this.dataManager.rewriteCache()}function v_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const __=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window;v_(this,"rootWindow",void 0),v_(this,"prefix",void 0),v_(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=void 0===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(){(0,h.z0)(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()}};Ce.R.getSingleton().register("persistentStateSave"),Ce.R.getSingleton().register("persistentStateLoad"),Ce.R.getSingleton().register("persistentStateReset");const b_="persistentState";class S_ extends hn{constructor(){var e,t,n;super(...arguments),e=this,n=void 0,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t="storage"))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static get PLUGIN_KEY(){return b_}static get PLUGIN_PRIORITY(){return 0}isEnabled(){return!!this.hot.getSettings()[b_]}enablePlugin(){this.enabled||(this.storage||(this.storage=new __(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){void 0===e?this.storage.resetAll():this.storage.reset(e)}destroy(){super.destroy()}}function C_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E_(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_="search",T_=function(e,t,n,r,o){e.getCellMeta(t,n).isSearchResult=o},R_=function(e,t,n){return!((0,c.b0)(e)||null===e||!e.toLocaleLowerCase||0===e.length||(0,c.b0)(t)||null===t||-1===t.toString().toLocaleLowerCase(n.locale).indexOf(e.toLocaleLowerCase(n.locale)))};var A_=new WeakSet;class N_ extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=A_),t.add(e),C_(this,"callback",T_),C_(this,"queryMethod",R_),C_(this,"searchResultClass","htSearchResult")}static get PLUGIN_KEY(){return M_}static get PLUGIN_PRIORITY(){return 190}isEnabled(){return this.hot.getSettings()[M_]}enablePlugin(){var e=this;if(this.enabled)return;const t=this.hot.getSettings()[M_];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 E_(A_,e,L_).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 E_(A_,e,L_).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(),o=this.hot.countCols(),i=[],s=this.hot;return(0,Mt.Ti)(0,r-1,(r=>{(0,Mt.Ti)(0,o-1,(o=>{const a=this.hot.getDataAtCell(r,o),l=this.hot.getCellMeta(r,o),u=l.search.callback||t,h=(l.search.queryMethod||n)(e,a,l);if(h){const e={row:r,col:o,data:a};i.push(e)}u&&u(s,r,o,a,h)}))})),i}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){(0,s.Gv)(e)&&(e.searchResultClass&&this.setSearchResultClass(e.searchResultClass),e.queryMethod&&this.setQueryMethod(e.queryMethod),e.callback&&this.setCallback(e.callback))}destroy(){super.destroy()}}function L_(e,t,n,r,o,i){const s=i.className||[];let a=[];"string"==typeof s?a=s.split(" "):a.push(...s),this.isEnabled()&&i.isSearchResult?a.includes(this.searchResultClass)||a.push(`${this.searchResultClass}`):a.includes(this.searchResultClass)&&a.splice(a.indexOf(this.searchResultClass),1),i.className=a.join(" ")}function x_(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class O_{constructor(e){x_(this,"viewportWidth",void 0),x_(this,"overwriteColumnWidthFn",void 0),x_(this,"baseWidths",new Map),x_(this,"stretchedWidths",new Map),this.overwriteColumnWidthFn=e}prepare(e){let{viewportWidth:t}=e;this.viewportWidth=t,this.baseWidths.clear(),this.stretchedWidths.clear()}setColumnBaseWidth(e,t){this.baseWidths.set(e,t)}calculate(){}getWidths(){return Array.from(this.stretchedWidths)}}class I_ extends O_{calculate(){const e=Array.from(this.baseWidths).reduce(((e,t)=>{let[,n]=t;return e+n}),0);if(this.viewportWidth-e<0)return void this.stretchedWidths.clear();const t=this.viewportWidth/e,n=[],r=[];let o=this.viewportWidth,i=0;if(this.baseWidths.forEach(((e,s)=>{const a=Math.round(e*t),l=this.overwriteColumnWidthFn(a,s);a===l&&a>=wn.j?(n.push([s,l]),i+=l):a!==l&&(n.push([s,l]),r.push(s),o-=l)})),o<=wn.j)return void this.stretchedWidths.clear();const s=o/i;let a=-1,l=0;n.forEach(((e,t)=>{let[o,i]=e,u=i;r.includes(o)||(u=Math.round(i*s)),this.stretchedWidths.set(o,u),a=o,t<n.length-1&&(l+=u)})),this.stretchedWidths.size>1&&this.stretchedWidths.set(a,Math.round(this.viewportWidth-l))}}function k_(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function D_(e,t){return e.get(H_(e,t))}function P_(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 F_=new WeakMap,Y_=new WeakMap;class V_ extends O_{constructor(){super(...arguments),k_(this,F_,0),k_(this,Y_,-1)}prepare(e){super.prepare(e),P_(F_,this,0),P_(Y_,this,-1)}setColumnBaseWidth(e,t){super.setColumnBaseWidth(e,t),P_(Y_,this,e),P_(F_,this,t)}calculate(){if(-1===D_(Y_,this))return;const e=Array.from(this.baseWidths).reduce(((e,t)=>{let[,n]=t;return e+n}),0),t=Math.max(this.viewportWidth-e+D_(F_,this),0);this.stretchedWidths.set(D_(Y_,this),t)}}function U_(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 W_(e,t){return e.get(z_(e,t))}function j_(e,t,n){return e.set(z_(e,t),n),n}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")}var G_=new WeakMap,$_=new WeakMap,K_=new WeakMap,X_=new WeakMap,q_=new WeakSet;class Q_{constructor(e){var t;B_(this,t=q_),t.add(this),U_(this,G_,void 0),U_(this,$_,void 0),U_(this,K_,new Map([["all",new I_(z_(q_,this,eb).bind(this))],["last",new V_(z_(q_,this,eb).bind(this))]])),U_(this,X_,"none"),j_(G_,this,e),j_($_,this,W_(G_,this).columnIndexMapper.createAndRegisterIndexMap("stretchColumns","physicalIndexToValue"))}useStrategy(e){j_(X_,this,W_(K_,this).has(e)?e:"none")}refreshStretching(){"none"!==W_(X_,this)?W_(G_,this).batchExecution((()=>{W_($_,this).clear();const e=W_(K_,this).get(W_(X_,this));let t=W_(G_,this).view.getViewportWidth();z_(q_,this,J_).call(this)&&(t-=(0,o.XJ)(W_(G_,this).rootDocument)),e.prepare({viewportWidth:t});for(let t=0;t<W_(G_,this).countCols();t++)W_(G_,this).columnIndexMapper.isHidden(W_(G_,this).toPhysicalColumn(t))||e.setColumnBaseWidth(t,z_(q_,this,Z_).call(this,t));e.calculate(),e.getWidths().forEach((e=>{let[t,n]=e;W_($_,this).setValueAtIndex(W_(G_,this).toPhysicalColumn(t),n)}))}),!0):W_($_,this).clear()}getStretchedWidth(e){return W_($_,this).getValueAtIndex(W_(G_,this).toPhysicalColumn(e))}}function J_(){const{view:e}=W_(G_,this);if(e.isVerticallyScrollableByWindow())return!1;const t=e.getViewportHeight(),n=W_(G_,this).countRows(),r=e.getStylesHandler().getDefaultRowHeight();let o=0,i=!1;for(let e=0;e<n;e++){var s;if(o+=(null!==(s=W_(G_,this).getRowHeight(e))&&void 0!==s?s:r)+(0===e?1:0),o>t){i=!0;break}}return i}function Z_(e){var t;return null!==(t=W_(G_,this).getColWidth(e,"StretchColumns"))&&void 0!==t?t:wn.j}function eb(e,t){return W_(G_,this).runHooks("beforeStretchingColumnWidth",e,t)}function tb(e,t,n){nb(e,t),t.set(e,n)}function nb(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rb(e,t,n){return e.set(ib(e,t),n),n}function ob(e,t){return e.get(ib(e,t))}function ib(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 sb=new WeakMap,ab=new WeakMap,lb=new WeakMap,ub=new WeakSet;class hb extends hn{constructor(){var e;super(...arguments),nb(this,e=ub),e.add(this),tb(this,sb,new Q_(this.hot)),tb(this,ab,null),tb(this,lb,new ResizeObserver((e=>{requestAnimationFrame((()=>{var t;null!==(t=this.hot)&&void 0!==t&&t.view.isHorizontallyScrollableByWindow()&&e.forEach((e=>{let{contentRect:t}=e;null!==ob(ab,this)&&ob(ab,this)!==t.width&&(this.hot.refreshDimensions(),this.hot.view.adjustElementsSize()),rb(ab,this,t.width)}))}))})))}static get PLUGIN_KEY(){return"stretchColumns"}static get PLUGIN_PRIORITY(){return 155}static get SETTING_KEYS(){return!0}isEnabled(){return["all","last"].includes(this.hot.getSettings().stretchH)}enablePlugin(){var e=this;this.enabled||(ob(sb,this).useStrategy(this.hot.getSettings().stretchH),ob(lb,this).observe(this.hot.rootElement),this.addHook("beforeRender",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ib(ub,e,db).call(e,...n)})),this.addHook("modifyColWidth",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return ib(ub,e,cb).call(e,...n)}),10),super.enablePlugin())}updatePlugin(){ob(sb,this).useStrategy(this.hot.getSettings().stretchH),super.updatePlugin()}disablePlugin(){super.disablePlugin(),ob(lb,this).unobserve(this.hot.rootElement)}getColumnWidth(e){return ob(sb,this).getStretchedWidth(e)}destroy(){ob(lb,this).disconnect(),rb(lb,this,null),rb(sb,this,null),super.destroy()}}function cb(e,t,n){if(n===this.pluginName)return;const r=this.getColumnWidth(t);return"number"==typeof r?r:e}function db(e){e&&ob(sb,this).refreshStretching()}function mb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pb(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 fb=new WeakSet;class gb extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=fb),t.add(e),mb(this,"scrollbars",[]),mb(this,"clones",[]),mb(this,"lockedCollection",!1),mb(this,"freezeOverlays",!1)}static get PLUGIN_KEY(){return"touchScroll"}static get PLUGIN_PRIORITY(){return 200}static get SETTING_KEYS(){return!0}isEnabled(){return(0,dn.yd)()}enablePlugin(){this.enabled||(this.addHook("afterViewRender",(()=>pb(fb,this,yb).call(this))),this.registerEvents(),super.enablePlugin())}updatePlugin(){this.lockedCollection=!1,super.updatePlugin()}disablePlugin(){super.disablePlugin()}registerEvents(){this.addHook("beforeTouchScroll",(()=>pb(fb,this,wb).call(this))),this.addHook("afterMomentumScroll",(()=>pb(fb,this,vb).call(this)))}}function yb(){if(this.lockedCollection)return;const{topOverlay:e,bottomOverlay:t,inlineStartOverlay:n,topInlineStartCornerOverlay:r,bottomInlineStartCornerOverlay:o}=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),o&&o.clone&&this.scrollbars.push(o),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),o&&o.clone&&this.clones.push(o.clone.wtTable.holder.parentNode)}function wb(){this.freezeOverlays=!0,(0,h.z0)(this.clones,(e=>{(0,o.iQ)(e,"hide-tween")}))}function vb(){this.freezeOverlays=!1,(0,h.z0)(this.clones,(e=>{(0,o.vy)(e,"hide-tween"),(0,o.iQ)(e,"show-tween")})),this.hot._registerTimeout((()=>{(0,h.z0)(this.clones,(e=>{(0,o.vy)(e,"show-tween")}))}),400),(0,h.z0)(this.scrollbars,(e=>{e.refresh(),e.resetFixedPosition()})),this.hot.view._wt.wtOverlays.syncScrollWithMaster()}const _b="trimRows";var bb=new WeakSet;class Sb extends hn{constructor(){var e,t;super(...arguments),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=bb),t.add(e),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"trimmedRowsMap",null)}static get PLUGIN_KEY(){return _b}static get PLUGIN_PRIORITY(){return 330}isEnabled(){return!!this.hot.getSettings()[_b]}enablePlugin(){this.enabled||(this.trimmedRowsMap=this.hot.rowIndexMapper.registerMap("trimRows",new Uc.q),this.trimmedRowsMap.addLocalHook("init",(()=>function(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")}(bb,this,Cb).call(this))),super.enablePlugin())}updatePlugin(){const e=this.hot.getSettings()[_b];Array.isArray(e)&&this.hot.batchExecution((()=>{this.trimmedRowsMap.clear(),(0,h.z0)(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)))),!1!==this.hot.runHooks("beforeTrimRow",t,r,n)&&(n&&this.hot.batchExecution((()=>{(0,h.z0)(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 o=this.trimmedRowsMap.getValues().slice(),i=e.length>0;n&&i&&((0,h.z0)(e,(e=>{o[e]=!1})),r=(0,h.mu)(o,((e,t,n)=>(t&&e.push(n),e)),[])),!1!==this.hot.runHooks("beforeUntrimRow",t,r,n&&i)&&(n&&i&&this.trimmedRowsMap.setValues(o),this.hot.runHooks("afterUntrimRow",t,r,n&&i,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 Cb(){const e=this.hot.getSettings()[_b];Array.isArray(e)&&this.hot.batchExecution((()=>{(0,h.z0)(e,(e=>{this.trimmedRowsMap.setValueAtIndex(e,!0)}))}),!0)}class Eb{constructor(e){var t,n,r;t=this,r="",(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="actionType"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.actionType=e}undo(){throw new Error("Not implemented")}redo(){throw new Error("Not implemented")}}function Mb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Tb extends Eb{constructor(e){let{stateBefore:t,range:n,type:r,alignment:o}=e;super("cell_alignment"),Mb(this,"stateBefore",void 0),Mb(this,"range",void 0),Mb(this,"type",void 0),Mb(this,"alignment",void 0),this.stateBefore=t,this.range=n,this.type=r,this.alignment=o}static startRegisteringEvents(e,t){e.addHook("beforeCellAlignment",((e,n,r,o)=>{t.done((()=>new Tb({stateBefore:e,range:n,type:r,alignment:o})))}))}undo(e,t){(0,h.z0)(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()}redo(e,t){Ni(this.range,this.type,this.alignment,((t,n)=>e.getCellMeta(t,n)),((t,n,r,o)=>e.setCellMeta(t,n,r,o))),e.addHookOnce("afterViewRender",t),e.render()}}function Rb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ab extends Eb{constructor(e){let{columns:t,finalIndex:n}=e;super("col_move"),Rb(this,"columns",void 0),Rb(this,"finalColumnIndex",void 0),this.columns=t.slice(),this.finalColumnIndex=n}static startRegisteringEvents(e,t){e.addHook("beforeColumnMove",((e,n)=>{!1!==e&&t.done((()=>new Ab({columns:e,finalIndex:n})))}))}undo(e,t){const n=e.getPlugin("manualColumnMove");e.addHookOnce("afterViewRender",t),Ed(this.columns,this.finalColumnIndex,e.columnIndexMapper.getNumberOfIndexes()).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)}redo(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)}}function Nb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Lb extends Eb{constructor(e){let{currentSortState:t,newSortState:n}=e;super("col_sort"),Nb(this,"previousSortState",void 0),Nb(this,"nextSortState",void 0),this.previousSortState=t,this.nextSortState=n}static startRegisteringEvents(e,t){e.addHook("beforeColumnSort",((e,n,r)=>{r&&t.done((()=>new Lb({currentSortState:e,newSortState:n})))}))}undo(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting"),o=r.isEnabled()?r:n;this.previousSortState.length?o.sort(this.previousSortState):o.clearSort(),t()}redo(e,t){const n=e.getPlugin("columnSorting"),r=e.getPlugin("multiColumnSorting");(r.isEnabled()?r:n).sort(this.nextSortState),t()}}function xb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ob extends Eb{constructor(e){let{index:t,amount:n}=e;super("insert_col"),xb(this,"index",void 0),xb(this,"amount",void 0),this.index=t,this.amount=n}static startRegisteringEvents(e,t){e.addHook("afterCreateCol",((e,n,r)=>{t.done((()=>new Ob({index:e,amount:n})),r)}))}undo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterCreateCol",t),e.alter("insert_col_start",this.index,this.amount,"UndoRedo.redo")}}function Ib(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class kb extends Eb{constructor(e){let{index:t,amount:n}=e;super("insert_row"),Ib(this,"index",void 0),Ib(this,"amount",void 0),this.index=t,this.amount=n}static startRegisteringEvents(e,t){e.addHook("afterCreateRow",((e,n,r)=>{t.done((()=>new kb({index:e,amount:n})),r)}))}undo(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")}redo(e,t){e.addHookOnce("afterCreateRow",t),e.alter("insert_row_above",this.index,this.amount,"UndoRedo.redo")}}function Db(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Pb extends Eb{constructor(e){let{changes:t,selected:n,countCols:r,countRows:o}=e;super("change"),Db(this,"changes",void 0),Db(this,"selected",void 0),Db(this,"countCols",void 0),Db(this,"countRows",void 0),this.changes=t,this.selected=n,this.countCols=r,this.countRows=o}static startRegisteringEvents(e,t){e.addHook("beforeChange",(function(n,r){const o=n&&n.length;o&&n.find((e=>{const[,,t,n]=e;return t!==n}))&&t.done((()=>{const t=n.reduce(((e,t)=>(e.push([...t]),e)),[]);t.forEach((t=>{t[1]=e.propToCol(t[1])}));const r=o>1?this.getSelected():[[t[0][0],t[0][1]]];return new Pb({changes:t,selected:r,countCols:e.countCols(),countRows:e.countRows()})}),r)}))}undo(e,t){const n=(0,s.Go)(this.changes);for(let e=0,t=n.length;e<t;e++)n[e].splice(3,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.undo");const r=e.countRows()-this.countRows;r>0&&e.alter("remove_row",null,r,"UndoRedo.undo");const o=e.countCols()-this.countCols;o>0&&e.isColumnModificationAllowed()&&e.alter("remove_col",null,o,"UndoRedo.undo"),e.scrollToFocusedCell(),e.selectCells(this.selected,!1,!1)}redo(e,t){const n=(0,s.Go)(this.changes);for(let e=0,t=n.length;e<t;e++)n[e].splice(2,1);e.addHookOnce("afterChange",t),e.setDataAtCell(n,null,null,"UndoRedo.redo"),this.selected&&e.selectCells(this.selected,!1,!1)}}function Hb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Fb extends Eb{constructor(e){let{conditionsStack:t,previousConditionsStack:n}=e;super("filter"),Hb(this,"conditionsStack",void 0),Hb(this,"previousConditionsStack",void 0),this.conditionsStack=t,this.previousConditionsStack=n}static startRegisteringEvents(e,t){e.addHook("beforeFilter",((e,n)=>{t.done((()=>new Fb({conditionsStack:e,previousConditionsStack:n})))}))}undo(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.importConditions(this.previousConditionsStack),n.filter()}redo(e,t){const n=e.getPlugin("filters");e.addHookOnce("afterViewRender",t),n.importConditions(this.conditionsStack),n.filter()}}class Yb extends Eb{constructor(e){let{data:t,cellRange:n}=e;var r,o,i;super("merge_cells"),r=this,i=void 0,(o=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(o="cellRange"))in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,this.cellRange=n,this.data=t}static startRegisteringEvents(e,t){e.addHook("beforeMergeCells",((n,r)=>{if(r)return;const o=n.getTopStartCorner(),i=n.getBottomEndCorner(),s=e.getData(o.row,o.col,i.row,i.col);t.done((()=>new Yb({data:s,cellRange:n})))}))}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.data,void 0,void 0,"MergeCells")}redo(e,t){const n=e.getPlugin("mergeCells");e.addHookOnce("afterViewRender",t),n.mergeRange(this.cellRange)}}function Vb(e,t,n,r,o){const i=["visualRow","visualCol","row","col","prop"],s=i.length,a=[];return(0,Mt.Ti)(r,o,(r=>{(0,Mt.Ti)(t,n,(t=>{const n=e.getCellMeta(t,r);if(Object.keys(n).length!==s){const e=Object.fromEntries(Object.entries(n).filter((e=>{let[t]=e;return!1===i.includes(t)})));a.push([n.visualRow,n.visualCol,e])}}))})),a}function Ub(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(53921);class Bb extends Eb{constructor(e){let{index:t,indexes:n,data:r,amount:o,headers:i,columnPositions:s,rowPositions:a,fixedColumnsStart:l,removedCellMetas:u}=e;super("remove_col"),Ub(this,"index",void 0),Ub(this,"indexes",void 0),Ub(this,"data",void 0),Ub(this,"amount",void 0),Ub(this,"headers",void 0),Ub(this,"columnPositions",void 0),Ub(this,"rowPositions",void 0),Ub(this,"fixedColumnsStart",void 0),Ub(this,"removedCellMetas",void 0),this.index=t,this.indexes=n,this.data=r,this.amount=o,this.headers=i,this.columnPositions=s.slice(0),this.rowPositions=a.slice(0),this.fixedColumnsStart=l,this.removedCellMetas=u}static startRegisteringEvents(e,t){e.addHook("beforeRemoveCol",((n,r,o,i)=>{t.done((()=>{const t=e.getSourceDataArray(),o=(e.countCols()+n)%e.countCols(),i=o+r-1,s=[],a=[],l=[];return(0,Mt.Ti)(t.length-1,(n=>{const r=[],a=t[n];(0,Mt.Ti)(o,i,(t=>{r.push(a[e.toPhysicalColumn(t)])})),s.push(r)})),(0,Mt.Ti)(r-1,(t=>{l.push(e.toPhysicalColumn(o+t))})),Array.isArray(e.getSettings().colHeaders)&&(0,Mt.Ti)(r-1,(t=>{a.push(e.getSettings().colHeaders[e.toPhysicalColumn(o+t)]||null)})),new Bb({index:o,indexes:l,data:s,amount:r,headers:a,columnPositions:e.columnIndexMapper.getIndexesSequence(),rowPositions:e.rowIndexMapper.getIndexesSequence(),fixedColumnsStart:e.getSettings().fixedColumnsStart,removedCellMetas:Vb(e,0,e.countRows(),o,i)})}),i)}))}undo(e,t){e.getSettings().fixedColumnsStart=this.fixedColumnsStart;const n=this.indexes.slice(0).sort(),r=(e,t,r)=>r[this.indexes.indexOf(n[t])],o=this.data.length,i=[];for(let e=0;e<o;e++)i.push((0,h.YD)(this.data[e],r));const s=(0,h.YD)(this.headers,r),a=[];e.columnIndexMapper.setIndexesSequence(this.columnPositions),e.alter("insert_col_start",e.toVisualColumn(this.indexes[0]),this.indexes.length,"UndoRedo.undo"),e.batchExecution((()=>{e.rowIndexMapper.setIndexesSequence(this.rowPositions),e.columnIndexMapper.setIndexesSequence(this.columnPositions)}),!0),(0,h.z0)(e.getSourceDataArray(),((e,t)=>{(0,h.z0)(n,((n,r)=>{e[n]=i[t][r],a.push([t,n,e[n]])}))})),void 0!==this.headers&&(0,h.z0)(s,((t,r)=>{e.getSettings().colHeaders[n[r]]=t})),this.removedCellMetas.forEach((t=>{let[n,r,o]=t;e.setCellMetaObject(n,r,o)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(a,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveCol",t),e.alter("remove_col",this.index,this.amount,"UndoRedo.redo")}}function Wb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class jb extends Eb{constructor(e){let{index:t,data:n,fixedRowsBottom:r,fixedRowsTop:o,rowIndexesSequence:i,removedCellMetas:s}=e;super("remove_row"),Wb(this,"index",void 0),Wb(this,"data",void 0),Wb(this,"fixedRowsBottom",void 0),Wb(this,"fixedRowsTop",void 0),Wb(this,"rowIndexesSequence",void 0),Wb(this,"removedCellMetas",void 0),this.index=t,this.data=n,this.fixedRowsBottom=r,this.fixedRowsTop=o,this.rowIndexesSequence=i,this.removedCellMetas=s}static startRegisteringEvents(e,t){e.addHook("beforeRemoveRow",((n,r,o,i)=>{t.done((()=>{const t=e.toPhysicalRow(n),o=t+r-1,i=(0,s.Go)(e.getSourceData(t,0,t+r-1,e.countSourceCols()-1));return new jb({index:t,data:i,fixedRowsBottom:e.getSettings().fixedRowsBottom,fixedRowsTop:e.getSettings().fixedRowsTop,rowIndexesSequence:e.rowIndexMapper.getIndexesSequence(),removedCellMetas:Vb(e,t,o,0,e.countCols()-1)})}),i)}))}undo(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 o=parseInt(n,10);r.push([this.index+t,isNaN(o)?n:o,e[n]])}))})),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),e.alter("insert_row_above",e.toVisualRow(this.index),this.data.length,"UndoRedo.undo"),e.rowIndexMapper.setIndexesSequence(this.rowIndexesSequence),this.removedCellMetas.forEach((t=>{let[n,r,o]=t;e.setCellMetaObject(n,r,o)})),e.addHookOnce("afterViewRender",t),e.setSourceDataAtCell(r,null,null,"UndoRedo.undo")}redo(e,t){e.addHookOnce("afterRemoveRow",t),e.alter("remove_row",e.toVisualRow(this.index),this.data.length,"UndoRedo.redo")}}function zb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Gb extends Eb{constructor(e){let{rows:t,finalIndex:n}=e;super("row_move"),zb(this,"rows",void 0),zb(this,"finalRowIndex",void 0),this.rows=t.slice(),this.finalRowIndex=n}static startRegisteringEvents(e,t){e.addHook("beforeRowMove",((e,n)=>{!1!==e&&t.done((()=>new Gb({rows:e,finalIndex:n})))}))}undo(e,t){const n=e.getPlugin("manualRowMove");e.addHookOnce("afterViewRender",t),Ed(this.rows,this.finalRowIndex,e.rowIndexMapper.getNumberOfIndexes()).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)}redo(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)}}class $b extends Eb{constructor(e){let{cellRange:t}=e;var n,r,o;super("unmerge_cells"),n=this,o=void 0,(r=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(r="cellRange"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,this.cellRange=t}static startRegisteringEvents(e,t){e.addHook("afterUnmergeCells",((e,n)=>{n||t.done((()=>new $b({cellRange:e})))}))}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 Kb(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xb(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 qb="undoRedo";Ce.R.getSingleton().register("beforeUndo"),Ce.R.getSingleton().register("afterUndo"),Ce.R.getSingleton().register("beforeRedo"),Ce.R.getSingleton().register("afterRedo");const Qb=new Set;var Jb=new WeakSet;class Zb extends hn{static get PLUGIN_KEY(){return"undoRedo"}static get PLUGIN_PRIORITY(){return 1e3}static get SETTING_KEYS(){return!0}constructor(e){var t,n,r,o;super(e),function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(r=this,o=Jb),o.add(r),Kb(this,"doneActions",[]),Kb(this,"undoneActions",[]),Kb(this,"ignoreNewActions",!1),t=e,n=this,[Tb,Ab,Lb,Ob,kb,Pb,Fb,Yb,Bb,jb,Gb,$b].forEach((e=>e.startRegisteringEvents(t,n)))}isEnabled(){return!!this.hot.getSettings().undo}enablePlugin(){var e=this;this.enabled||(this.addHook("afterChange",(function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return Xb(Jb,e,eS).call(e,...n)})),this.registerShortcuts(),Xb(Jb,this,tS).call(this),super.enablePlugin())}disablePlugin(){super.disablePlugin(),this.clear(),this.unregisterShortcuts(),Xb(Jb,this,nS).call(this)}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("grid"),t={runOnlyIf:e=>!e.altKey,group:qb};e.addShortcuts([{keys:[["Control/Meta","z"]],callback:()=>{this.undo()}},{keys:[["Control/Meta","y"],["Control/Meta","Shift","z"]],callback:()=>{this.redo()}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("grid").removeShortcutsByGroup(qb)}done(e,t){if(this.ignoreNewActions)return;if("UndoRedo.undo"===t||"UndoRedo.redo"===t||"auto"===t)return;const n=this.doneActions.slice();if(!1===this.hot.runHooks("beforeUndoStackChange",n,t))return;const r=e(),o=this.undoneActions.slice();this.doneActions.push(r),this.hot.runHooks("afterUndoStackChange",n,this.doneActions.slice()),this.hot.runHooks("beforeRedoStackChange",o),this.undoneActions.length=0,this.hot.runHooks("afterRedoStackChange",o,this.undoneActions.slice())}undo(){if(!this.isUndoAvailable())return;const e=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",e);const t=this.doneActions.pop();this.hot.runHooks("afterUndoStackChange",e,this.doneActions.slice());const n=(0,s.Go)(t);if(!1===this.hot.runHooks("beforeUndo",n))return;this.ignoreNewActions=!0;const r=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",r),t.undo(this.hot,(()=>{this.ignoreNewActions=!1,this.undoneActions.push(t)})),this.hot.runHooks("afterRedoStackChange",r,this.undoneActions.slice()),this.hot.runHooks("afterUndo",n)}redo(){if(!this.isRedoAvailable())return;const e=this.undoneActions.slice();this.hot.runHooks("beforeRedoStackChange",e);const t=this.undoneActions.pop();this.hot.runHooks("afterRedoStackChange",e,this.undoneActions.slice());const n=(0,s.Go)(t);if(!1===this.hot.runHooks("beforeRedo",n))return;this.ignoreNewActions=!0;const r=this.doneActions.slice();this.hot.runHooks("beforeUndoStackChange",r),t.redo(this.hot,(()=>{this.ignoreNewActions=!1,this.doneActions.push(t)})),this.hot.runHooks("afterUndoStackChange",r,this.doneActions.slice()),this.hot.runHooks("afterRedo",n)}isUndoAvailable(){return this.doneActions.length>0}isRedoAvailable(){return this.undoneActions.length>0}clear(){this.doneActions.length=0,this.undoneActions.length=0}destroy(){this.clear(),this.doneActions=null,this.undoneActions=null,super.destroy()}}function eS(e,t){"loadData"===t&&this.clear()}function tS(){const e=e=>{Qb.has(e)||((0,Dr.R8)(yo.O`The "${e}" method is deprecated and it will be removed\x20
  48. from the Core API in the future. Please use the method from the UndoRedo plugin\x20
  49. (e.g. \`hotInstance.getPlugin("undoRedo").${e}()\`).`),Qb.add(e))};this.hot.undo=()=>{e("undo"),this.undo()},this.hot.redo=()=>{e("redo"),this.redo()},this.hot.isUndoAvailable=()=>(e("isUndoAvailable"),this.isUndoAvailable()),this.hot.isRedoAvailable=()=>(e("isRedoAvailable"),this.isRedoAvailable()),this.hot.clearUndo=()=>{e("clear"),this.clear()},this.hot.undoRedo=this}function nS(){delete this.hot.undo,delete this.hot.redo,delete this.hot.isUndoAvailable,delete this.hot.isRedoAvailable,delete this.hot.clearUndo,delete this.hot.undoRedo}function rS(){(0,ye.VA)(R.b7),(0,ye.VA)(M),(0,ye.VA)(A),(0,ye.VA)(ae),(0,ye.VA)(ue),(0,ye.VA)(u),(0,ye.VA)(he),(0,ye.VA)(de),(0,ye.VA)(fe),(0,ye.VA)(r.t),(0,ye.VA)(ge),(0,xt.TS)(be),(0,xt.TS)(we.j),(0,xt.TS)(Oe),(0,xt.TS)(Se),(0,xt.TS)(ke),(0,xt.TS)(ve),(0,xt.TS)(Rt),(0,xt.TS)(At),(0,xt.TS)(Nt),(0,xt.TS)(p.F),(0,xt.TS)(Lt),(0,Yt.qV)(Ot),(0,Yt.qV)(Dt),(0,Yt.qV)(kt),(0,Yt.qV)(Pt),(0,Yt.qV)(Ft),(0,Qt.Gk)(Vt),(0,Qt.Gk)(Ut),(0,Qt.Gk)(Wt),(0,Qt.Gk)(jt),(0,Qt.Gk)(zt),(0,Qt.Gk)(Gt),(0,Qt.Gk)($t),(0,Qt.Gk)(Kt),(0,Qt.Gk)(Xt.Y),(0,Qt.Gk)(qt),(0,Jt.F3)(xn),(0,Jt.F3)($n),(0,Jt.F3)(ur),(0,Jt.F3)(Ir),(0,Jt.F3)(Kr),(0,Jt.F3)(Ho),(0,Jt.F3)(Ko),(0,Jt.F3)(Ji),(0,Jt.F3)(ha),(0,Jt.F3)(Za),(0,Jt.F3)(El),(0,Jt.F3)(xl),(0,Jt.F3)(Bl),(0,Jt.F3)(yu),(0,Jt.F3)(ed),(0,Jt.F3)(lm),(0,Jt.F3)(Bm),(0,Jt.F3)(np),(0,Jt.F3)(gp),(0,Jt.F3)(Gp),(0,Jt.F3)(Ef),(0,Jt.F3)(ng),(0,Jt.F3)(Ig),(0,Jt.F3)(Hy),(0,Jt.F3)(mw),(0,Jt.F3)(fw),(0,Jt.F3)(fv),(0,Jt.F3)(n_),(0,Jt.F3)(S_),(0,Jt.F3)(N_),(0,Jt.F3)(hb),(0,Jt.F3)(gb),(0,Jt.F3)(Sb),(0,Jt.F3)(Zb)}},37313:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(3576).A},37353:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>f});var r=n(98587),o=n(77387),i=n(96540),s=n(40961);var a=n(17241),l="unmounted",u="exited",h="entering",c="entered",d="exiting",m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n&&!n.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?i?(o=u,r.appearStatus=h):o=c:o=t.unmountOnExit||t.mountOnEnter?l:u,r.state={status:o},r.nextCallback=null,r}(0,o.A)(t,e),t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===l?{status:u}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==h&&n!==c&&(t=h):n!==h&&n!==c||(t=d)}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t)if(this.cancelNextCallback(),t===h){if(this.props.unmountOnExit||this.props.mountOnEnter){var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this);n&&function(e){e.scrollTop}(n)}this.performEnter(e)}else this.performExit();else this.props.unmountOnExit&&this.state.status===u&&this.setState({status:l})},n.performEnter=function(e){var t=this,n=this.props.enter,r=this.context?this.context.isMounting:e,o=this.props.nodeRef?[r]:[s.findDOMNode(this),r],i=o[0],a=o[1],l=this.getTimeouts(),u=r?l.appear:l.enter;e||n?(this.props.onEnter(i,a),this.safeSetState({status:h},(function(){t.props.onEntering(i,a),t.onTransitionEnd(u,(function(){t.safeSetState({status:c},(function(){t.props.onEntered(i,a)}))}))}))):this.safeSetState({status:c},(function(){t.props.onEntered(i)}))},n.performExit=function(){var e=this,t=this.props.exit,n=this.getTimeouts(),r=this.props.nodeRef?void 0:s.findDOMNode(this);t?(this.props.onExit(r),this.safeSetState({status:d},(function(){e.props.onExiting(r),e.onTransitionEnd(n.exit,(function(){e.safeSetState({status:u},(function(){e.props.onExited(r)}))}))}))):this.safeSetState({status:u},(function(){e.props.onExited(r)}))},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t){this.setNextCallback(t);var n=this.props.nodeRef?this.props.nodeRef.current:s.findDOMNode(this),r=null==e&&!this.props.addEndListener;if(n&&!r){if(this.props.addEndListener){var o=this.props.nodeRef?[this.nextCallback]:[n,this.nextCallback],i=o[0],a=o[1];this.props.addEndListener(i,a)}null!=e&&setTimeout(this.nextCallback,e)}else setTimeout(this.nextCallback,0)},n.render=function(){var e=this.state.status;if(e===l)return null;var t=this.props,n=t.children,o=(t.in,t.mountOnEnter,t.unmountOnExit,t.appear,t.enter,t.exit,t.timeout,t.addEndListener,t.onEnter,t.onEntering,t.onEntered,t.onExit,t.onExiting,t.onExited,t.nodeRef,(0,r.A)(t,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]));return i.createElement(a.A.Provider,{value:null},"function"==typeof n?n(e,o):i.cloneElement(i.Children.only(n),o))},t}(i.Component);function p(){}m.contextType=a.A,m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:p,onEntering:p,onEntered:p,onExit:p,onExiting:p,onExited:p},m.UNMOUNTED=l,m.EXITED=u,m.ENTERING=h,m.ENTERED=c,m.EXITING=d;const f=m},37550:(e,t,n)=>{"use strict";n(13579)},37892:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},38329:(e,t,n)=>{"use strict";n.d(t,{A:()=>V});var r=n(96540),o=n(34164),i=n(21362),s=n(49450),a=n(26739),l=n(20439),u=n(30301),h=n(54403),c=n(15870);class d{static create(){return new d}static use(){const e=(0,c.A)(d.create).current,[t,n]=r.useState(!1);return e.shouldMount=t,e.setShouldMount=n,r.useEffect(e.mountEffect,[t]),e}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&null!==this.ref.current&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then((()=>this.ref.current?.start(...e)))}stop(...e){this.mount().then((()=>this.ref.current?.stop(...e)))}pulsate(...e){this.mount().then((()=>this.ref.current?.pulsate(...e)))}}var m=n(98587),p=n(58168),f=n(9417),g=n(77387),y=n(17241);function w(e,t){var n=Object.create(null);return e&&r.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,r.isValidElement)(e)?t(e):e}(e)})),n}function v(e,t,n){return null!=n[t]?n[t]:e.props[t]}function _(e,t,n){var o=w(e.children),i=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(o[l])for(r=0;r<o[l].length;r++){var u=o[l][r];a[o[l][r]]=n(u)}a[l]=n(l)}for(r=0;r<i.length;r++)a[i[r]]=n(i[r]);return a}(t,o);return Object.keys(i).forEach((function(s){var a=i[s];if((0,r.isValidElement)(a)){var l=s in t,u=s in o,h=t[s],c=(0,r.isValidElement)(h)&&!h.props.in;!u||l&&!c?u||!l||c?u&&l&&(0,r.isValidElement)(h)&&(i[s]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:h.props.in,exit:v(a,"exit",e),enter:v(a,"enter",e)})):i[s]=(0,r.cloneElement)(a,{in:!1}):i[s]=(0,r.cloneElement)(a,{onExited:n.bind(null,a),in:!0,exit:v(a,"exit",e),enter:v(a,"enter",e)})}})),i}var b=Object.values||function(e){return Object.keys(e).map((function(t){return e[t]}))},S=function(e){function t(t,n){var r,o=(r=e.call(this,t,n)||this).handleExited.bind((0,f.A)(r));return r.state={contextValue:{isMounting:!0},handleExited:o,firstRender:!0},r}(0,g.A)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.setState({contextValue:{isMounting:!1}})},n.componentWillUnmount=function(){this.mounted=!1},t.getDerivedStateFromProps=function(e,t){var n,o,i=t.children,s=t.handleExited;return{children:t.firstRender?(n=e,o=s,w(n.children,(function(e){return(0,r.cloneElement)(e,{onExited:o.bind(null,e),in:!0,appear:v(e,"appear",n),enter:v(e,"enter",n),exit:v(e,"exit",n)})}))):_(e,i,s),firstRender:!1}},n.handleExited=function(e,t){var n=w(this.props.children);e.key in n||(e.props.onExited&&e.props.onExited(t),this.mounted&&this.setState((function(t){var n=(0,p.A)({},t.children);return delete n[e.key],{children:n}})))},n.render=function(){var e=this.props,t=e.component,n=e.childFactory,o=(0,m.A)(e,["component","childFactory"]),i=this.state.contextValue,s=b(this.state.children).map(n);return delete o.appear,delete o.enter,delete o.exit,null===t?r.createElement(y.A.Provider,{value:i},s):r.createElement(y.A.Provider,{value:i},r.createElement(t,o,s))},t}(r.Component);S.propTypes={},S.defaultProps={component:"div",childFactory:function(e){return e}};const C=S;var E=n(32350),M=n(17437),T=n(74848);var R=n(96148);const A=(0,R.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]),N=M.i7`
  50. 0% {
  51. transform: scale(0);
  52. opacity: 0.1;
  53. }
  54. 100% {
  55. transform: scale(1);
  56. opacity: 0.3;
  57. }
  58. `,L=M.i7`
  59. 0% {
  60. opacity: 1;
  61. }
  62. 100% {
  63. opacity: 0;
  64. }
  65. `,x=M.i7`
  66. 0% {
  67. transform: scale(1);
  68. }
  69. 50% {
  70. transform: scale(0.92);
  71. }
  72. 100% {
  73. transform: scale(1);
  74. }
  75. `,O=(0,a.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),I=(0,a.Ay)((function(e){const{className:t,classes:n,pulsate:i=!1,rippleX:s,rippleY:a,rippleSize:l,in:u,onExited:h,timeout:c}=e,[d,m]=r.useState(!1),p=(0,o.A)(t,n.ripple,n.rippleVisible,i&&n.ripplePulsate),f={width:l,height:l,top:-l/2+a,left:-l/2+s},g=(0,o.A)(n.child,d&&n.childLeaving,i&&n.childPulsate);return u||d||m(!0),r.useEffect((()=>{if(!u&&null!=h){const e=setTimeout(h,c);return()=>{clearTimeout(e)}}}),[h,u,c]),(0,T.jsx)("span",{className:p,style:f,children:(0,T.jsx)("span",{className:g})})}),{name:"MuiTouchRipple",slot:"Ripple"})`
  76. opacity: 0;
  77. position: absolute;
  78. &.${A.rippleVisible} {
  79. opacity: 0.3;
  80. transform: scale(1);
  81. animation-name: ${N};
  82. animation-duration: ${550}ms;
  83. animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
  84. }
  85. &.${A.ripplePulsate} {
  86. animation-duration: ${({theme:e})=>e.transitions.duration.shorter}ms;
  87. }
  88. & .${A.child} {
  89. opacity: 1;
  90. display: block;
  91. width: 100%;
  92. height: 100%;
  93. border-radius: 50%;
  94. background-color: currentColor;
  95. }
  96. & .${A.childLeaving} {
  97. opacity: 0;
  98. animation-name: ${L};
  99. animation-duration: ${550}ms;
  100. animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
  101. }
  102. & .${A.childPulsate} {
  103. position: absolute;
  104. /* @noflip */
  105. left: 0px;
  106. top: 0;
  107. animation-name: ${x};
  108. animation-duration: 2500ms;
  109. animation-timing-function: ${({theme:e})=>e.transitions.easing.easeInOut};
  110. animation-iteration-count: infinite;
  111. animation-delay: 200ms;
  112. }
  113. `,k=r.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiTouchRipple"}),{center:i=!1,classes:s={},className:a,...u}=n,[h,c]=r.useState([]),d=r.useRef(0),m=r.useRef(null);r.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[h]);const p=r.useRef(!1),f=(0,E.A)(),g=r.useRef(null),y=r.useRef(null),w=r.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e;c((e=>[...e,(0,T.jsx)(I,{classes:{ripple:(0,o.A)(s.ripple,A.ripple),rippleVisible:(0,o.A)(s.rippleVisible,A.rippleVisible),ripplePulsate:(0,o.A)(s.ripplePulsate,A.ripplePulsate),child:(0,o.A)(s.child,A.child),childLeaving:(0,o.A)(s.childLeaving,A.childLeaving),childPulsate:(0,o.A)(s.childPulsate,A.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:i},d.current)])),d.current+=1,m.current=a}),[s]),v=r.useCallback(((e={},t={},n=()=>{})=>{const{pulsate:r=!1,center:o=i||t.pulsate,fakeElement:s=!1}=t;if("mousedown"===e?.type&&p.current)return void(p.current=!1);"touchstart"===e?.type&&(p.current=!0);const a=s?null:y.current,l=a?a.getBoundingClientRect():{width:0,height:0,left:0,top:0};let u,h,c;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)u=Math.round(l.width/2),h=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;u=Math.round(t-l.left),h=Math.round(n-l.top)}if(o)c=Math.sqrt((2*l.width**2+l.height**2)/3),c%2==0&&(c+=1);else{const e=2*Math.max(Math.abs((a?a.clientWidth:0)-u),u)+2,t=2*Math.max(Math.abs((a?a.clientHeight:0)-h),h)+2;c=Math.sqrt(e**2+t**2)}e?.touches?null===g.current&&(g.current=()=>{w({pulsate:r,rippleX:u,rippleY:h,rippleSize:c,cb:n})},f.start(80,(()=>{g.current&&(g.current(),g.current=null)}))):w({pulsate:r,rippleX:u,rippleY:h,rippleSize:c,cb:n})}),[i,w,f]),_=r.useCallback((()=>{v({},{pulsate:!0})}),[v]),b=r.useCallback(((e,t)=>{if(f.clear(),"touchend"===e?.type&&g.current)return g.current(),g.current=null,void f.start(0,(()=>{b(e,t)}));g.current=null,c((e=>e.length>0?e.slice(1):e)),m.current=t}),[f]);return r.useImperativeHandle(t,(()=>({pulsate:_,start:v,stop:b})),[_,v,b]),(0,T.jsx)(O,{className:(0,o.A)(A.root,s.root,a),ref:y,...u,children:(0,T.jsx)(C,{component:null,exit:!0,children:h})})}));var D=n(1908);function P(e){return(0,D.Ay)("MuiButtonBase",e)}const H=(0,R.A)("MuiButtonBase",["root","disabled","focusVisible"]),F=(0,a.Ay)("button",{name:"MuiButtonBase",slot:"Root"})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},[`&.${H.disabled}`]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}});function Y(e,t,n,r=!1){return(0,h.A)((o=>(n&&n(o),r||e[t](o),!0)))}const V=r.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiButtonBase"}),{action:a,centerRipple:c=!1,children:m,className:p,component:f="button",disabled:g=!1,disableRipple:y=!1,disableTouchRipple:w=!1,focusRipple:v=!1,focusVisibleClassName:_,LinkComponent:b="a",onBlur:S,onClick:C,onContextMenu:E,onDragLeave:M,onFocus:R,onFocusVisible:A,onKeyDown:N,onKeyUp:L,onMouseDown:x,onMouseLeave:O,onMouseUp:I,onTouchEnd:D,onTouchMove:H,onTouchStart:V,tabIndex:U=0,TouchRippleProps:B,touchRippleRef:W,type:j,...z}=n,G=r.useRef(null),$=d.use(),K=(0,u.A)($.ref,W),[X,q]=r.useState(!1);g&&X&&q(!1),r.useImperativeHandle(a,(()=>({focusVisible:()=>{q(!0),G.current.focus()}})),[]);const Q=$.shouldMount&&!y&&!g;r.useEffect((()=>{X&&v&&!y&&$.pulsate()}),[y,v,X,$]);const J=Y($,"start",x,w),Z=Y($,"stop",E,w),ee=Y($,"stop",M,w),te=Y($,"stop",I,w),ne=Y($,"stop",(e=>{X&&e.preventDefault(),O&&O(e)}),w),re=Y($,"start",V,w),oe=Y($,"stop",D,w),ie=Y($,"stop",H,w),se=Y($,"stop",(e=>{(0,s.A)(e.target)||q(!1),S&&S(e)}),!1),ae=(0,h.A)((e=>{G.current||(G.current=e.currentTarget),(0,s.A)(e.target)&&(q(!0),A&&A(e)),R&&R(e)})),le=()=>{const e=G.current;return f&&"button"!==f&&!("A"===e.tagName&&e.href)},ue=(0,h.A)((e=>{v&&!e.repeat&&X&&" "===e.key&&$.stop(e,(()=>{$.start(e)})),e.target===e.currentTarget&&le()&&" "===e.key&&e.preventDefault(),N&&N(e),e.target===e.currentTarget&&le()&&"Enter"===e.key&&!g&&(e.preventDefault(),C&&C(e))})),he=(0,h.A)((e=>{v&&" "===e.key&&X&&!e.defaultPrevented&&$.stop(e,(()=>{$.pulsate(e)})),L&&L(e),C&&e.target===e.currentTarget&&le()&&" "===e.key&&!e.defaultPrevented&&C(e)}));let ce=f;"button"===ce&&(z.href||z.to)&&(ce=b);const de={};"button"===ce?(de.type=void 0===j?"button":j,de.disabled=g):(z.href||z.to||(de.role="button"),g&&(de["aria-disabled"]=g));const me=(0,u.A)(t,G),pe={...n,centerRipple:c,component:f,disabled:g,disableRipple:y,disableTouchRipple:w,focusRipple:v,tabIndex:U,focusVisible:X},fe=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,s={root:["root",t&&"disabled",n&&"focusVisible"]},a=(0,i.A)(s,P,o);return n&&r&&(a.root+=` ${r}`),a})(pe);return(0,T.jsxs)(F,{as:ce,className:(0,o.A)(fe.root,p),ownerState:pe,onBlur:se,onClick:C,onContextMenu:Z,onFocus:ae,onKeyDown:ue,onKeyUp:he,onMouseDown:J,onMouseLeave:ne,onMouseUp:te,onDragLeave:ee,onTouchEnd:oe,onTouchMove:ie,onTouchStart:re,ref:me,tabIndex:g?-1:U,type:j,...de,...z,children:[m,Q?(0,T.jsx)(k,{ref:K,center:c,...B}):null]})}))},38419:(e,t,n)=>{"use strict";n.d(t,{Lb:()=>i,SI:()=>u,Yf:()=>l,aE:()=>a,m0:()=>h}),n(44114);var r=n(77325),o=n(58002);const i={ALT:18,ARROW_DOWN:40,ARROW_LEFT:37,ARROW_RIGHT:39,ARROW_UP:38,AUDIO_DOWN:(0,o.gm)()?182:174,AUDIO_MUTE:(0,o.gm)()?181:173,AUDIO_UP:(0,o.gm)()?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},s=[i.ALT,i.ARROW_DOWN,i.ARROW_LEFT,i.ARROW_RIGHT,i.ARROW_UP,i.AUDIO_DOWN,i.AUDIO_MUTE,i.AUDIO_UP,i.BACKSPACE,i.CAPS_LOCK,i.DELETE,i.END,i.ENTER,i.ESCAPE,i.F1,i.F2,i.F3,i.F4,i.F5,i.F6,i.F7,i.F8,i.F9,i.F10,i.F11,i.F12,i.F13,i.F14,i.F15,i.F16,i.F17,i.F18,i.F19,i.HOME,i.INSERT,i.MEDIA_NEXT,i.MEDIA_PLAY_PAUSE,i.MEDIA_PREV,i.MEDIA_STOP,i.NULL,i.NUM_LOCK,i.PAGE_DOWN,i.PAGE_UP,i.PAUSE,i.SCROLL_LOCK,i.SHIFT,i.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 s.includes(e)}function u(e){return[i.CONTROL,i.COMMAND_LEFT,i.COMMAND_RIGHT,i.COMMAND_FIREFOX].includes(e)}function h(e,t){const n=t.split("|");let o=!1;return(0,r.z0)(n,(t=>{if(e===i[t])return o=!0,!1})),o}},38469:(e,t,n)=>{"use strict";var r=n(79504),o=n(40507),i=n(94402),s=i.Set,a=i.proto,l=r(a.forEach),u=r(a.keys),h=u(new s).next;e.exports=function(e,t,n){return n?o({iterator:u(e),next:h},t):l(e,t)}},38480:(e,t,n)=>{"use strict";var r=n(61828),o=n(88727).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,o)}},38572:(e,t,n)=>{"use strict";n.d(t,{A:()=>f});var r=n(96540),o=n(32350),i=n(17726),s=n(37353),a=n(53356),l=n(24337),u=n(30301),h=n(74848);function c(e){return`scale(${e}, ${e**2})`}const d={entering:{opacity:1,transform:c(1)},entered:{opacity:1,transform:"none"}},m="undefined"!=typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),p=r.forwardRef((function(e,t){const{addEndListener:n,appear:p=!0,children:f,easing:g,in:y,onEnter:w,onEntered:v,onEntering:_,onExit:b,onExited:S,onExiting:C,style:E,timeout:M="auto",TransitionComponent:T=s.Ay,...R}=e,A=(0,o.A)(),N=r.useRef(),L=(0,a.A)(),x=r.useRef(null),O=(0,u.A)(x,(0,i.A)(f),t),I=e=>t=>{if(e){const n=x.current;void 0===t?e(n):e(n,t)}},k=I(_),D=I(((e,t)=>{(0,l.q)(e);const{duration:n,delay:r,easing:o}=(0,l.c)({style:E,timeout:M,easing:g},{mode:"enter"});let i;"auto"===M?(i=L.transitions.getAutoHeightDuration(e.clientHeight),N.current=i):i=n,e.style.transition=[L.transitions.create("opacity",{duration:i,delay:r}),L.transitions.create("transform",{duration:m?i:.666*i,delay:r,easing:o})].join(","),w&&w(e,t)})),P=I(v),H=I(C),F=I((e=>{const{duration:t,delay:n,easing:r}=(0,l.c)({style:E,timeout:M,easing:g},{mode:"exit"});let o;"auto"===M?(o=L.transitions.getAutoHeightDuration(e.clientHeight),N.current=o):o=t,e.style.transition=[L.transitions.create("opacity",{duration:o,delay:n}),L.transitions.create("transform",{duration:m?o:.666*o,delay:m?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=c(.75),b&&b(e)})),Y=I(S);return(0,h.jsx)(T,{appear:p,in:y,nodeRef:x,onEnter:D,onEntered:P,onEntering:k,onExit:F,onExited:Y,onExiting:H,addEndListener:e=>{"auto"===M&&A.start(N.current||0,e),n&&n(x.current,e)},timeout:"auto"===M?null:M,...R,children:(e,{ownerState:t,...n})=>r.cloneElement(f,{style:{opacity:0,transform:c(.75),visibility:"exited"!==e||y?void 0:"hidden",...d[e],...E,...f.props.style},ref:O,...n})})}));p&&(p.muiSupportAuto=!0);const f=p},38574:(e,t,n)=>{"use strict";var r=n(84215);e.exports="NODE"===r},39241:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(18139);const o={theme:void 0},i=function(e){let t,n;return function(i){let s=t;return void 0!==s&&i.theme===n||(o.theme=i.theme,s=(0,r.A)(e(o)),t=s,n=i.theme),s}}},39297:(e,t,n)=>{"use strict";var r=n(79504),o=n(48981),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},39407:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(97102).A},39433:(e,t,n)=>{"use strict";var r=n(44576),o=Object.defineProperty;e.exports=function(e,t){try{o(r,e,{value:t,configurable:!0,writable:!0})}catch(n){r[e]=t}return t}},39519:(e,t,n)=>{"use strict";var r,o,i=n(44576),s=n(82839),a=i.process,l=i.Deno,u=a&&a.versions||l&&l.version,h=u&&u.v8;h&&(o=(r=h.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!o&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(o=+r[1]),e.exports=o},39612:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,BO:()=>s,Yn:()=>i});var r=n(97102),o=n(7196);function i(e,t,n=!0){if(!t||"string"!=typeof t)return null;if(e&&e.vars&&n){const n=`vars.${t}`.split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function s(e,t,n,r=n){let o;return o="function"==typeof e?e(n):Array.isArray(e)?e[n]||r:i(e,n)||r,t&&(o=t(o,r,e)),o}const a=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,u=e=>{if(null==e[t])return null;const u=e[t],h=i(e.theme,a)||{};return(0,o.NI)(e,u,(e=>{let o=s(h,l,e);return e===o&&"string"==typeof e&&(o=s(h,l,`${t}${"default"===e?"":(0,r.A)(e)}`,e)),!1===n?o:{[n]:o}}))};return u.propTypes={},u.filterProps=[t],u}},39835:e=>{"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(e){return!1}}},40507:(e,t,n)=>{"use strict";var r=n(69565);e.exports=function(e,t,n){for(var o,i,s=n?e:e.iterator,a=e.next;!(o=r(a,s)).done;)if(void 0!==(i=t(o.value)))return i}},40583:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(96540).createContext({})},40616:(e,t,n)=>{"use strict";var r=n(79039);e.exports=!r((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},40748:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},41011:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?":e":1===t||2===t?":a":":e")},week:{dow:1,doy:4}})}(n(95093))},41113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},41488:function(e,t,n){!function(e){"use strict";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,o,i,s){var a=t(r),l=n[e][t(r)];return 2===a&&(l=l[o?0:1]),l.replace(/%d/i,r)}},o=["جانفي","فيفري","مارس","أفريل","ماي","جوان","جويلية","أوت","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-dz",{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: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}})}(n(95093))},41496:(e,t,n)=>{"use strict";n.d(t,{q:()=>i}),n(44114);var r=n(48386),o=n(77325);class i extends r._{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getTrimmedIndexes(){return(0,o.mu)(this.getValues(),((e,t,n)=>(t&&e.push(n),e)),[])}}},41538:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(88612).A},41558:(e,t,n)=>{"use strict";n.d(t,{A:()=>O});var r=n(96540),o=n(34164),i=n(21362),s=n(75337),a=n(94034),l=n(26739),u=n(39241),h=n(20439),c=n(30016),d=n(10644),m=n(24902),p=n(78854);function f(...e){return e.reduce(((e,t)=>null==t?e:function(...n){e.apply(this,n),t.apply(this,n)}),(()=>{}))}var g=n(52658),y=n(88612),w=n(244);function v(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _(e){return parseInt((0,y.A)(e).getComputedStyle(e).paddingRight,10)||0}function b(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=!i.includes(e),n=!function(e){const t=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&v(e,o)}))}function S(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}const C=()=>{},E=new class{constructor(){this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&v(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);b(t,e.mount,e.modalRef,r,!0);const o=S(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=S(this.containers,(t=>t.modals.includes(e))),r=this.containers[n];r.restore||(r.restore=function(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,d.A)(e);return t.body===e?(0,y.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=(0,w.A)((0,y.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_(r)+e}px`;const t=(0,d.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight=`${_(t)+e}px`}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,d.A)(r).body;else{const t=r.parentElement,n=(0,y.A)(r);e="HTML"===t?.nodeName&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((({value:e,el:t,property:n})=>{e?t.style.setProperty(n,e):t.style.removeProperty(n)}))}}(r,t))}remove(e,t=!0){const n=this.modals.indexOf(e);if(-1===n)return n;const r=S(this.containers,(t=>t.modals.includes(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&v(e.modalRef,t),b(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&v(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};var M=n(96148),T=n(1908);function R(e){return(0,T.Ay)("MuiModal",e)}(0,M.A)("MuiModal",["root","hidden","backdrop"]);var A=n(85078),N=n(74848);const L=(0,l.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((0,u.A)((({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:e})=>!e.open&&e.exited,style:{visibility:"hidden"}}]})))),x=(0,l.Ay)(c.A,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),O=r.forwardRef((function(e,t){const n=(0,h.b)({name:"MuiModal",props:e}),{BackdropComponent:l=x,BackdropProps:u,classes:c,className:y,closeAfterTransition:w=!1,children:_,container:b,component:S,components:M={},componentsProps:T={},disableAutoFocus:O=!1,disableEnforceFocus:I=!1,disableEscapeKeyDown:k=!1,disablePortal:D=!1,disableRestoreFocus:P=!1,disableScrollLock:H=!1,hideBackdrop:F=!1,keepMounted:Y=!1,onClose:V,onTransitionEnter:U,onTransitionExited:B,open:W,slotProps:j={},slots:z={},theme:G,...$}=n,K={...n,closeAfterTransition:w,disableAutoFocus:O,disableEnforceFocus:I,disableEscapeKeyDown:k,disablePortal:D,disableRestoreFocus:P,disableScrollLock:H,hideBackdrop:F,keepMounted:Y},{getRootProps:X,getBackdropProps:q,getTransitionProps:Q,portalRef:J,isTopModal:Z,exited:ee,hasTransition:te}=function(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,closeAfterTransition:i=!1,onTransitionEnter:s,onTransitionExited:a,children:l,onClose:u,open:h,rootRef:c}=e,y=r.useRef({}),w=r.useRef(null),_=r.useRef(null),b=(0,m.A)(_,c),[S,M]=r.useState(!h),T=function(e){return!!e&&e.props.hasOwnProperty("in")}(l);let R=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(R=!1);const A=()=>(y.current.modalRef=_.current,y.current.mount=w.current,y.current),N=()=>{E.mount(A(),{disableScrollLock:o}),_.current&&(_.current.scrollTop=0)},L=(0,p.A)((()=>{const e=function(e){return"function"==typeof e?e():e}(t)||(0,d.A)(w.current).body;E.add(A(),e),_.current&&N()})),x=()=>E.isTopModal(A()),O=(0,p.A)((e=>{w.current=e,e&&(h&&x()?N():_.current&&v(_.current,R))})),I=r.useCallback((()=>{E.remove(A(),R)}),[R]);r.useEffect((()=>()=>{I()}),[I]),r.useEffect((()=>{h?L():T&&i||I()}),[h,I,T,i,L]);const k=e=>t=>{e.onKeyDown?.(t),"Escape"===t.key&&229!==t.which&&x()&&(n||(t.stopPropagation(),u&&u(t,"escapeKeyDown")))},D=e=>t=>{e.onClick?.(t),t.target===t.currentTarget&&u&&u(t,"backdropClick")};return{getRootProps:(t={})=>{const n=(0,g.A)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const r={...n,...t};return{role:"presentation",...r,onKeyDown:k(r),ref:b}},getBackdropProps:(e={})=>{const t=e;return{"aria-hidden":!0,...t,onClick:D(t),open:h}},getTransitionProps:()=>({onEnter:f((()=>{M(!1),s&&s()}),l?.props.onEnter??C),onExited:f((()=>{M(!0),a&&a(),i&&I()}),l?.props.onExited??C)}),rootRef:b,portalRef:O,isTopModal:x,exited:S,hasTransition:T}}({...K,rootRef:t}),ne={...K,exited:ee},re=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,i.A)(o,R,r)})(ne),oe={};if(void 0===_.props.tabIndex&&(oe.tabIndex="-1"),te){const{onEnter:e,onExited:t}=Q();oe.onEnter=e,oe.onExited=t}const ie={slots:{root:M.Root,backdrop:M.Backdrop,...z},slotProps:{...T,...j}},[se,ae]=(0,A.A)("root",{ref:t,elementType:L,externalForwardedProps:{...ie,...$,component:S},getSlotProps:X,ownerState:ne,className:(0,o.A)(y,re?.root,!ne.open&&ne.exited&&re?.hidden)}),[le,ue]=(0,A.A)("backdrop",{ref:u?.ref,elementType:l,externalForwardedProps:ie,shouldForwardComponentProp:!0,additionalProps:u,getSlotProps:e=>q({...e,onClick:t=>{e?.onClick&&e.onClick(t)}}),className:(0,o.A)(u?.className,re?.backdrop),ownerState:ne});return Y||W||te&&!ee?(0,N.jsx)(a.A,{ref:J,container:b,disablePortal:D,children:(0,N.jsxs)(se,{...ae,children:[!F&&l?(0,N.jsx)(le,{...ue}):null,(0,N.jsx)(s.A,{disableEnforceFocus:I,disableAutoFocus:O,disableRestoreFocus:P,isEnabled:Z,open:W,children:r.cloneElement(_,oe)})]})}):null}))},41734:function(e,t,n){!function(e){"use strict";e.defineLocale("ga",{months:["Eanáir","Feabhra","Márta","Aibreán","Bealtaine","Meitheamh","Iúil","Lúnasa","Meán Fómhair","Deireadh Fómhair","Samhain","Nollaig"],monthsShort:["Ean","Feabh","Márt","Aib","Beal","Meith","Iúil","Lún","M.F.","D.F.","Samh","Noll"],monthsParseExact:!0,weekdays:["Dé Domhnaigh","Dé Luain","Dé Máirt","Dé Céadaoin","Déardaoin","Dé hAoine","Dé Sathairn"],weekdaysShort:["Domh","Luan","Máirt","Céad","Déar","Aoine","Sath"],weekdaysMin:["Do","Lu","Má","Cé","Dé","A","Sa"],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){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(95093))},41794:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},41811:(e,t,n)=>{"use strict";n.d(t,{A:()=>i}),n(96540);var r=n(9792),o=n(74848);const i=(0,r.A)((0,o.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown")},41848:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},41895:(e,t,n)=>{"use strict";n.d(t,{n:()=>l}),n(16280),n(44114);var r=n(71409),o=n(32919),i=n(83986),s=n(77710);function a(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class l{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,(0,i.Tn)(this.initValueOrFn)?(0,r.Ti)(e-1,(e=>this.indexedValues.push(this.initValueOrFn(e)))):(0,r.Ti)(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}}(0,o.co)(l,s.A)},42353:function(e,t,n){!function(e){"use strict";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 عام"]},o=function(e){return function(t,o,i,s){var a=n(t),l=r[e][n(t)];return 2===a&&(l=l[o?0:1]),l.replace(/%d/i,t)}},i=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar-ly",{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:o("s"),ss:o("s"),m:o("m"),mm:o("m"),h:o("h"),hh:o("h"),d:o("d"),dd:o("d"),M:o("M"),MM:o("M"),y:o("y"),yy:o("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}})}(n(95093))},42620:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Alternation:()=>pt,CstParser:()=>Tr,EMPTY_ALT:()=>Cr,EOF:()=>tt,EarlyExitException:()=>Vn,EmbeddedActionsParser:()=>Rr,Flat:()=>lt,GAstVisitor:()=>_t,Lexer:()=>Ue,LexerDefinitionErrorType:()=>Fe,MismatchedTokenException:()=>Hn,NoViableAltException:()=>Fn,NonTerminal:()=>st,NotAllInputParsedException:()=>Yn,Option:()=>ut,Parser:()=>Mr,ParserDefinitionErrorType:()=>_r,Repetition:()=>dt,RepetitionMandatory:()=>ht,RepetitionMandatoryWithSeparator:()=>ct,RepetitionWithSeparator:()=>mt,Rule:()=>at,Terminal:()=>ft,VERSION:()=>r,assignOccurrenceIndices:()=>Ln,clearCache:()=>Fr,createSyntaxDiagramsCode:()=>Ar,createToken:()=>et,createTokenInstance:()=>nt,defaultGrammarResolverErrorProvider:()=>En,defaultGrammarValidatorErrorProvider:()=>Mn,defaultLexerErrorProvider:()=>Ye,defaultParserErrorProvider:()=>Cn,generateParserFactory:()=>Pr,generateParserModule:()=>Hr,isRecognitionException:()=>Pn,resolveGrammar:()=>An,serializeGrammar:()=>gt,serializeProduction:()=>yt,tokenLabel:()=>Be,tokenMatcher:()=>rt,tokenName:()=>We,validateGrammar:()=>Nn});var r="6.5.0";function o(e){return e&&0===e.length}function i(e){return 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 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 o(e)?void 0:e[0]}function h(e){var t=e&&e.length;return t?e[t-1]:void 0}function c(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else{if(!L(e))throw Error("non exhaustive match");var r=i(e);for(n=0;n<r.length;n++){var o=r[n],s=e[o];t.call(null,s,o)}}}function d(e){return"string"==typeof e}function m(e){return void 0===e}function p(e){return e instanceof Function}function f(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 o=e[r];t.call(null,o)&&n.push(o)}return n}function w(e,t){return y(e,(function(e){return!t(e)}))}function v(e,t){for(var n=Object.keys(e),r={},o=0;o<n.length;o++){var i=n[o],s=e[i];t(s)&&(r[i]=s)}return r}function _(e,t){return!!L(e)&&e.hasOwnProperty(t)}function b(e,t){return void 0!==E(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 C(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function E(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,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 T(e){return w(e,(function(e){return null==e}))}function R(e,t){void 0===t&&(t=function(e){return e});var n=[];return M(e,(function(e,r){var o=t(r);return b(n,o)?e:(n.push(o),e.concat(r))}),[])}function A(e){return Array.isArray(e)}function N(e){return e instanceof RegExp}function L(e){return e instanceof Object}function x(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}function O(e,t){return w(e,(function(e){return b(t,e)}))}function I(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}function k(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 o=t[r],s=i(o),a=0;a<s.length;a++){var l=s[a];e[l]=o[l]}return e}function D(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0;r<t.length;r++){var o=t[r];if(!m(o))for(var s=i(o),a=0;a<s.length;a++){var l=s[a];_(e,l)||(e[l]=o[l])}}return e}function P(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return D.apply(null,[{}].concat(e))}function H(e,t){var n={};return c(e,(function(e){var r=t(e),o=n[r];o?o.push(e):n[r]=[e]})),n}function F(e,t){for(var n=C(e),r=i(t),o=0;o<r.length;o++){var s=r[o],a=t[s];n[s]=a}return n}function Y(){}function V(e){return e}function U(e){console&&console.error&&console.error("Error: "+e)}function B(e){console&&console.warn&&console.warn("Warning: "+e)}function W(){return"function"==typeof Map}function j(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}function z(e){return e[e.length-1]}function G(e){var t=(new Date).getTime(),n=e();return{time:(new Date).getTime()-t,value:n}}var $=n(62475),K={},X=new $.RegExpParser;function q(e){var t=e.toString();if(K.hasOwnProperty(t))return K[t];var n=X.pattern(t);return K[t]=n,n}var Q,J=(Q=function(e,t){return Q=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])},Q(e,t)},function(e,t){function n(){this.constructor=e}Q(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Z="Complement Sets are not supported for first char optimization",ee='Unable to use "first char" lexer optimizations:\n';function te(e,t){void 0===t&&(t=!1);try{var n=q(e);return ne(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===Z)t&&B(ee+"\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 r="";t&&(r="\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."),U(ee+"\n\tFailed parsing: < "+e.toString()+" >\n\tUsing the regexp-to-ast library version: "+$.VERSION+"\n\tPlease open an issue at: https://github.com/bd82/regexp-to-ast/issues"+r)}}return[]}function ne(e,t,n){switch(e.type){case"Disjunction":for(var r=0;r<e.value.length;r++)ne(e.value[r],t,n);break;case"Alternative":var o=e.value;for(r=0;r<o.length;r++){var i=o[r];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var a=i;switch(a.type){case"Character":re(a.value,t,n);break;case"Set":if(!0===a.complement)throw Error(Z);c(a.value,(function(e){if("number"==typeof e)re(e,t,n);else{var r=e;if(!0===n)for(var o=r.from;o<=r.to;o++)re(o,t,n);else{for(o=r.from;o<=r.to&&o<Te;o++)re(o,t,n);if(r.to>=Te)for(var i=r.from>=Te?r.from:Te,s=r.to,a=Re(i),l=Re(s),u=a;u<=l;u++)t[u]=u}}}));break;case"Group":ne(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===ie(a)||"Group"!==a.type&&!1===l)break}break;default:throw Error("non exhaustive match!")}return s(t)}function re(e,t,n){var r=Re(e);t[r]=r,!0===n&&function(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n)t[o=Re(r.charCodeAt(0))]=o;else{var o,i=n.toLowerCase();i!==n&&(t[o=Re(i.charCodeAt(0))]=o)}}(e,t)}function oe(e,t){return E(e.value,(function(e){if("number"==typeof e)return b(t,e);var n=e;return void 0!==E(t,(function(e){return n.from<=e&&e<=n.to}))}))}function ie(e){return!(!e.quantifier||0!==e.quantifier.atLeast)||!!e.value&&(A(e.value)?x(e.value,ie):ie(e.value))}var se=function(e){function t(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return J(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){b(this.targetCharCodes,e.value)&&(this.found=!0)},t.prototype.visitSet=function(e){e.complement?void 0===oe(e,this.targetCharCodes)&&(this.found=!0):void 0!==oe(e,this.targetCharCodes)&&(this.found=!0)},t}($.BaseRegExpVisitor);function ae(e,t){if(t instanceof RegExp){var n=q(t),r=new se(e);return r.visit(n),r.found}return void 0!==E(t,(function(t){return b(e,t.charCodeAt(0))}))}var le=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)}}(),ue="PATTERN",he="defaultMode",ce="modes",de="boolean"==typeof new RegExp("(?:)").sticky;function me(e,t){var n,r=(t=P(t,{useSticky:de,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r","\n"],tracer:function(e,t){return t()}})).tracer;r("initCharCodeToOptimizedIndexMap",(function(){!function(){if(o(Ae)){Ae=new Array(65536);for(var e=0;e<65536;e++)Ae[e]=e>255?255+~~(e/255):e}}()})),r("Reject Lexer.NA",(function(){n=w(e,(function(e){return e[ue]===Ue.NA}))}));var i,s,l,u,h,f,g,y,v,S,C,E=!1;r("Transform Patterns",(function(){E=!1,i=a(n,(function(e){var n=e[ue];if(N(n)){var r=n.source;return 1===r.length&&"^"!==r&&"$"!==r&&"."!==r?r:2!==r.length||"\\"!==r[0]||b(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],r[1])?t.useSticky?we(n):ye(n):r[1]}if(p(n))return E=!0,{exec:n};if(_(n,"exec"))return E=!0,n;if("string"==typeof n){if(1===n.length)return n;var o=n.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),i=new RegExp(o);return t.useSticky?we(i):ye(i)}throw Error("non exhaustive match")}))})),r("misc mapping",(function(){s=a(n,(function(e){return e.tokenTypeIdx})),l=a(n,(function(e){var t=e.GROUP;if(t!==Ue.SKIPPED){if(d(t))return t;if(m(t))return!1;throw Error("non exhaustive match")}})),u=a(n,(function(e){var t=e.LONGER_ALT;if(t)return function(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}(n,t)})),h=a(n,(function(e){return e.PUSH_MODE})),f=a(n,(function(e){return _(e,"POP_MODE")}))})),r("Line Terminator Handling",(function(){var e=Ee(t.lineTerminatorCharacters);g=a(n,(function(e){return!1})),"onlyOffset"!==t.positionTracking&&(g=a(n,(function(t){return _(t,"LINE_BREAKS")?t.LINE_BREAKS:!1===Ce(t,e)?ae(e,t.PATTERN):void 0})))})),r("Misc Mapping #2",(function(){y=a(n,_e),v=a(i,be),S=M(n,(function(e,t){var n=t.GROUP;return d(n)&&n!==Ue.SKIPPED&&(e[n]=[]),e}),{}),C=a(i,(function(e,t){return{pattern:i[t],longerAlt:u[t],canLineTerminator:g[t],isCustom:y[t],short:v[t],group:l[t],push:h[t],pop:f[t],tokenTypeIdx:s[t],tokenType:n[t]}}))}));var T=!0,R=[];return t.safeMode||r("First Char Optimization",(function(){R=M(n,(function(e,n,r){if("string"==typeof n.PATTERN){var i=Re(n.PATTERN.charCodeAt(0));Me(e,i,C[r])}else if(A(n.START_CHARS_HINT)){var s;c(n.START_CHARS_HINT,(function(t){var n=Re("string"==typeof t?t.charCodeAt(0):t);s!==n&&(s=n,Me(e,n,C[r]))}))}else if(N(n.PATTERN))if(n.PATTERN.unicode)T=!1,t.ensureOptimizations&&U(ee+"\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 a=te(n.PATTERN,t.ensureOptimizations);o(a)&&(T=!1),c(a,(function(t){Me(e,t,C[r])}))}else t.ensureOptimizations&&U(ee+"\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"),T=!1;return e}),[])})),r("ArrayPacking",(function(){R=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(void 0!==r?r:void 0)}return t}(R)})),{emptyGroups:S,patternIdxToConfig:C,charCodeToPatternIdxToConfig:R,hasCustom:E,canBeOptimized:T}}function pe(e,t){var n=[],r=function(e){var t=y(e,(function(e){return!_(e,ue)}));return{errors:a(t,(function(e){return{message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:Fe.MISSING_PATTERN,tokenTypes:[e]}})),valid:O(e,t)}}(e);n=n.concat(r.errors);var o=function(e){var t=y(e,(function(e){var t=e[ue];return!(N(t)||p(t)||_(t,"exec")||d(t))}));return{errors:a(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:Fe.INVALID_PATTERN,tokenTypes:[e]}})),valid:O(e,t)}}(r.valid),i=o.valid;return n=(n=n.concat(o.errors)).concat(function(e){var t=[],n=y(e,(function(e){return N(e[ue])}));return t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return le(t,e),t.prototype.visitEndAnchor=function(e){this.found=!0},t}($.BaseRegExpVisitor);return a(y(e,(function(e){var n=e[ue];try{var r=q(n),o=new t;return o.visit(r),o.found}catch(e){return fe.test(n.source)}})),(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:Fe.EOI_ANCHOR_FOUND,tokenTypes:[e]}}))}(n)),t=t.concat(function(e){var t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.found=!1,t}return le(t,e),t.prototype.visitStartAnchor=function(e){this.found=!0},t}($.BaseRegExpVisitor);return a(y(e,(function(e){var n=e[ue];try{var r=q(n),o=new t;return o.visit(r),o.found}catch(e){return ge.test(n.source)}})),(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:Fe.SOI_ANCHOR_FOUND,tokenTypes:[e]}}))}(n)),t=t.concat(function(e){return a(y(e,(function(e){var t=e[ue];return t instanceof RegExp&&(t.multiline||t.global)})),(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Fe.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}}))}(n)),t=t.concat(function(e){var t=[],n=a(e,(function(n){return M(e,(function(e,r){return n.PATTERN.source!==r.PATTERN.source||b(t,r)||r.PATTERN===Ue.NA||(t.push(r),e.push(r)),e}),[])}));return a(y(n=T(n),(function(e){return e.length>1})),(function(e){var t=a(e,(function(e){return e.name}));return{message:"The same RegExp pattern ->"+u(e).PATTERN+"<-has been used in all of the following Token Types: "+t.join(", ")+" <-",type:Fe.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}}))}(n)),t=t.concat(function(e){return a(y(e,(function(e){return e[ue].test("")})),(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:Fe.EMPTY_MATCH_PATTERN,tokenTypes:[e]}}))}(n)),t}(i)),n=n.concat(function(e){return a(y(e,(function(e){if(!_(e,"GROUP"))return!1;var t=e.GROUP;return t!==Ue.SKIPPED&&t!==Ue.NA&&!d(t)})),(function(e){return{message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Fe.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}}))}(i)),n=n.concat(function(e,t){return a(y(e,(function(e){return void 0!==e.PUSH_MODE&&!b(t,e.PUSH_MODE)})),(function(e){return{message:"Token Type: ->"+e.name+"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->"+e.PUSH_MODE+"<-which does not exist",type:Fe.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}}))}(i,t)),n=n.concat(function(e){var t=[],n=M(e,(function(e,t,n){var r,o=t.PATTERN;return o===Ue.NA||(d(o)?e.push({str:o,idx:n,tokenType:t}):N(o)&&(r=o,void 0===E([".","\\","[","]","|","^","$","(",")","?","*","+","{"],(function(e){return-1!==r.source.indexOf(e)})))&&e.push({str:o.source,idx:n,tokenType:t})),e}),[]);return c(e,(function(e,r){c(n,(function(n){var o=n.str,i=n.idx,s=n.tokenType;if(r<i&&function(e,t){if(N(t)){var n=t.exec(e);return null!==n&&0===n.index}if(p(t))return t(e,0,[],{});if(_(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}(o,e.PATTERN)){var a="Token: ->"+s.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:Fe.UNREACHABLE_PATTERN,tokenTypes:[e,s]})}}))})),t}(i)),n}var fe=/[^\\][\$]/,ge=/[^\\[][\^]|^\^/;function ye(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:"+e.source+")",t)}function we(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function ve(e,t,n){var r=[],o=!1,s=w(T(l(function(e,t){for(var n=[],r=i(e),o=0;o<r.length;o++){var s=r[o];n.push(t.call(null,e[s],s))}return n}(e.modes,(function(e){return e})))),(function(e){return e[ue]===Ue.NA})),a=Ee(n);return t&&c(s,(function(e){var t=Ce(e,a);if(!1!==t){var n=function(e,t){if(t.issue===Fe.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===Fe.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")}(e,t),i={message:n,type:t.issue,tokenType:e};r.push(i)}else _(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(o=!0):ae(a,e.PATTERN)&&(o=!0)})),t&&!o&&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:Fe.NO_LINE_BREAKS_FLAGS}),r}function _e(e){var t=e.PATTERN;if(N(t))return!1;if(p(t))return!0;if(_(t,"exec"))return!0;if(d(t))return!1;throw Error("non exhaustive match")}function be(e){return!(!d(e)||1!==e.length)&&e.charCodeAt(0)}var Se={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 Ce(e,t){if(_(e,"LINE_BREAKS"))return!1;if(N(e.PATTERN)){try{ae(t,e.PATTERN)}catch(e){return{issue:Fe.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(d(e.PATTERN))return!1;if(_e(e))return{issue:Fe.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function Ee(e){return a(e,(function(e){return d(e)&&e.length>0?e.charCodeAt(0):e}))}function Me(e,t,n){void 0===e[t]?e[t]=[n]:e[t].push(n)}var Te=256;function Re(e){return e<Te?e:Ae[e]}var Ae=[];function Ne(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx||!0===t.isParent&&!0===t.categoryMatchesMap[n]}function Le(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var xe=1,Oe={};function Ie(e){var t=function(e){for(var t=S(e),n=e,r=!0;r;){var i=O(n=T(l(a(n,(function(e){return e.CATEGORIES})))),t);t=t.concat(i),o(i)?r=!1:n=i}return t}(e);!function(e){c(e,(function(e){De(e)||(Oe[xe]=e,e.tokenTypeIdx=xe++),Pe(e)&&!A(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Pe(e)||(e.CATEGORIES=[]),_(e,"categoryMatches")||(e.categoryMatches=[]),_(e,"categoryMatchesMap")||(e.categoryMatchesMap={})}))}(t),function(e){c(e,(function(e){ke([],e)}))}(t),function(e){c(e,(function(e){e.categoryMatches=[],c(e.categoryMatchesMap,(function(t,n){e.categoryMatches.push(Oe[n].tokenTypeIdx)}))}))}(t),c(t,(function(e){e.isParent=e.categoryMatches.length>0}))}function ke(e,t){c(e,(function(e){t.categoryMatchesMap[e.tokenTypeIdx]=!0})),c(t.CATEGORIES,(function(n){var r=e.concat(t);b(r,n)||ke(r,n)}))}function De(e){return _(e,"tokenTypeIdx")}function Pe(e){return _(e,"CATEGORIES")}function He(e){return _(e,"tokenTypeIdx")}var Fe,Ye={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,o){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"}(Fe||(Fe={}));var Ve={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:["\n","\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ye,traceInitPerf:!1,skipValidations:!1};Object.freeze(Ve);var Ue=function(){function e(e,t){var n=this;if(void 0===t&&(t=Ve),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=F(Ve,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===Ve.lineTerminatorsPattern)n.config.lineTerminatorsPattern=Se;else if(n.config.lineTerminatorCharacters===Ve.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),A(e)?((r={modes:{}}).modes[he]=S(e),r[he]=he):(s=!1,r=C(e))})),!1===n.config.skipValidations&&(n.TRACE_INIT("performRuntimeChecks",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(function(e){var t=[];return _(e,he)||t.push({message:"A MultiMode Lexer cannot be initialized without a <"+he+"> property in its definition\n",type:Fe.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),_(e,ce)||t.push({message:"A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",type:Fe.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),_(e,ce)&&_(e,he)&&!_(e.modes,e.defaultMode)&&t.push({message:"A MultiMode Lexer cannot be initialized with a "+he+": <"+e.defaultMode+">which does not exist\n",type:Fe.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),_(e,ce)&&c(e.modes,(function(e,n){c(e,(function(e,r){m(e)&&t.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:<"+n+"> at index: <"+r+">\n",type:Fe.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED})}))})),t}(r,n.trackStartLines,n.config.lineTerminatorCharacters))})),n.TRACE_INIT("performWarningRuntimeChecks",(function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat(ve(r,n.trackStartLines,n.config.lineTerminatorCharacters))}))),r.modes=r.modes?r.modes:{},c(r.modes,(function(e,t){r.modes[t]=w(e,(function(e){return m(e)}))}));var l=i(r.modes);if(c(r.modes,(function(e,r){n.TRACE_INIT("Mode: <"+r+"> processing",(function(){var i;n.modes.push(r),!1===n.config.skipValidations&&n.TRACE_INIT("validatePatterns",(function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat(pe(e,l))})),o(n.lexerDefinitionErrors)&&(Ie(e),n.TRACE_INIT("analyzeTokenTypes",(function(){i=me(e,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:n.TRACE_INIT.bind(n)})})),n.patternIdxToConfig[r]=i.patternIdxToConfig,n.charCodeToPatternIdxToConfig[r]=i.charCodeToPatternIdxToConfig,n.emptyGroups=F(n.emptyGroups,i.emptyGroups),n.hasCustom=i.hasCustom||n.hasCustom,n.canModeBeOptimized[r]=i.canBeOptimized)}))})),n.defaultMode=r.defaultMode,!o(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var u=a(n.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Errors detected in definition of Lexer:\n"+u)}c(n.lexerDefinitionWarning,(function(e){B(e.message)})),n.TRACE_INIT("Choosing sub-methods implementations",(function(){if(de?(n.chopInput=V,n.match=n.matchWithTest):(n.updateLastIndex=Y,n.match=n.matchWithExec),s&&(n.handleModes=Y),!1===n.trackStartLines&&(n.computeNewColumn=V),!1===n.trackEndLines&&(n.updateTokenEndLineColumnLocation=Y),/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=M(n.canModeBeOptimized,(function(e,t,n){return!1===t&&e.push(n),e}),[]);if(t.ensureOptimizations&&!o(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(){K={}})),n.TRACE_INIT("toFastProperties",(function(){j(n)}))}))}return e.prototype.tokenize=function(e,t){if(void 0===t&&(t=this.defaultMode),!o(this.lexerDefinitionErrors)){var n=a(this.lexerDefinitionErrors,(function(e){return e.message})).join("-----------------------\n");throw new Error("Unable to Tokenize because Errors detected in definition of Lexer:\n"+n)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,t){var n,r,o,s,a,l,u,d,m,p,f,g,y,w,v,_,b=this,S=e,C=S.length,E=0,M=0,T=this.hasCustom?0:Math.floor(e.length/10),R=new Array(T),N=[],L=this.trackStartLines?1:void 0,x=this.trackStartLines?1:void 0,O=(v=this.emptyGroups,_={},c(i(v),(function(e){if(!A(v[e]))throw Error("non exhaustive match");_[e]=[]})),_),I=this.trackStartLines,k=this.config.lineTerminatorsPattern,D=0,P=[],H=[],F=[],Y=[];Object.freeze(Y);var V=void 0;function U(){return P}function B(e){var t=Re(e),n=H[t];return void 0===n?Y:n}var W,j=function(e){if(1===F.length&&void 0===e.tokenType.PUSH_MODE){var t=b.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);N.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{F.pop();var n=h(F);P=b.patternIdxToConfig[n],H=b.charCodeToPatternIdxToConfig[n],D=P.length;var r=b.canModeBeOptimized[n]&&!1===b.config.safeMode;V=H&&r?B:U}};function z(e){F.push(e),H=this.charCodeToPatternIdxToConfig[e],P=this.patternIdxToConfig[e],D=P.length,D=P.length;var t=this.canModeBeOptimized[e]&&!1===this.config.safeMode;V=H&&t?B:U}for(z.call(this,t);E<C;){a=null;var G=S.charCodeAt(E),$=V(G),K=$.length;for(n=0;n<K;n++){var X=(W=$[n]).pattern;if(l=null,!1!==(ie=W.short)?G===ie&&(a=X):!0===W.isCustom?null!==(w=X.exec(S,E,R,O))?(a=w[0],void 0!==w.payload&&(l=w.payload)):a=null:(this.updateLastIndex(X,E),a=this.match(X,e,E)),null!==a){if(void 0!==(s=W.longerAlt)){var q=P[s],Q=q.pattern;u=null,!0===q.isCustom?null!==(w=Q.exec(S,E,R,O))?(o=w[0],void 0!==w.payload&&(u=w.payload)):o=null:(this.updateLastIndex(Q,E),o=this.match(Q,e,E)),o&&o.length>a.length&&(a=o,l=u,W=q)}break}}if(null!==a){if(d=a.length,void 0!==(m=W.group)&&(p=W.tokenTypeIdx,f=this.createTokenInstance(a,E,p,W.tokenType,L,x,d),this.handlePayload(f,l),!1===m?M=this.addToken(R,M,f):O[m].push(f)),e=this.chopInput(e,d),E+=d,x=this.computeNewColumn(x,d),!0===I&&!0===W.canLineTerminator){var J=0,Z=void 0,ee=void 0;k.lastIndex=0;do{!0===(Z=k.test(a))&&(ee=k.lastIndex-1,J++)}while(!0===Z);0!==J&&(L+=J,x=d-ee,this.updateTokenEndLineColumnLocation(f,m,ee,J,L,x,d))}this.handleModes(W,j,z,f)}else{for(var te=E,ne=L,re=x,oe=!1;!oe&&E<C;)for(S.charCodeAt(E),e=this.chopInput(e,1),E++,r=0;r<D;r++){var ie,se=P[r];if(X=se.pattern,!1!==(ie=se.short)?S.charCodeAt(E)===ie&&(oe=!0):!0===se.isCustom?oe=null!==X.exec(S,E,R,O):(this.updateLastIndex(X,E),oe=null!==X.exec(e)),!0===oe)break}g=E-te,y=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(S,te,g,ne,re),N.push({offset:te,line:ne,column:re,length:g,message:y})}}return this.hasCustom||(R.length=M),{tokens:R,groups:O,errors:N}},e.prototype.handleModes=function(e,t,n,r){if(!0===e.pop){var o=e.push;t(r),void 0!==o&&n.call(this,o)}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,o,i,s){var a,l;void 0!==t&&(l=(a=n===s-1)?-1:0,1===r&&!0===a||(e.endLine=o+l,e.endColumn=i-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,o,i){return{image:e,startOffset:t,startLine:o,startColumn:i,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,o,i,s){return{image:e,startOffset:t,endOffset:t+s-1,startLine:o,endLine:o,startColumn:i,endColumn:i+s-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},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){return!0===e.test(t)?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=G(t),o=r.time,i=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(n+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i}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 Be(e){return je(e)?e.LABEL:e.name}function We(e){return e.name}function je(e){return d(e.LABEL)&&""!==e.LABEL}var ze="parent",Ge="categories",$e="label",Ke="group",Xe="push_mode",qe="pop_mode",Qe="longer_alt",Je="line_breaks",Ze="start_chars_hint";function et(e){return function(e){var t=e.pattern,n={};if(n.name=e.name,m(t)||(n.PATTERN=t),_(e,ze))throw"The parent property is no longer supported.\nSee: https://github.com/SAP/chevrotain/issues/564#issuecomment-349062346 for details.";return _(e,Ge)&&(n.CATEGORIES=e[Ge]),Ie([n]),_(e,$e)&&(n.LABEL=e[$e]),_(e,Ke)&&(n.GROUP=e[Ke]),_(e,qe)&&(n.POP_MODE=e[qe]),_(e,Xe)&&(n.PUSH_MODE=e[Xe]),_(e,Qe)&&(n.LONGER_ALT=e[Qe]),_(e,Je)&&(n.LINE_BREAKS=e[Je]),_(e,Ze)&&(n.START_CHARS_HINT=e[Ze]),n}(e)}var tt=et({name:"EOF",pattern:Ue.NA});function nt(e,t,n,r,o,i,s,a){return{image:t,startOffset:n,endOffset:r,startLine:o,endLine:i,startColumn:s,endColumn:a,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function rt(e,t){return Ne(e,t)}Ie([tt]);var ot=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)}}(),it=function(){function e(e){this.definition=e}return e.prototype.accept=function(e){e.visit(this),c(this.definition,(function(t){t.accept(e)}))},e}(),st=function(e){function t(t){var n=e.call(this,[])||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(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}(it),at=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.orgText="",k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),lt=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.ignoreAmbiguities=!1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),ut=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),ht=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),ct=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),dt=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),mt=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),pt=function(e){function t(t){var n=e.call(this,t.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,k(n,v(t,(function(e){return void 0!==e}))),n}return ot(t,e),t}(it),ft=function(){function e(e){this.idx=1,k(this,v(e,(function(e){return void 0!==e})))}return e.prototype.accept=function(e){e.visit(this)},e}();function gt(e){return a(e,yt)}function yt(e){function t(e){return a(e,yt)}if(e instanceof st)return{type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};if(e instanceof lt)return{type:"Flat",definition:t(e.definition)};if(e instanceof ut)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof ht)return{type:"RepetitionMandatory",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof ct)return{type:"RepetitionMandatoryWithSeparator",name:e.name,idx:e.idx,separator:yt(new ft({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof mt)return{type:"RepetitionWithSeparator",name:e.name,idx:e.idx,separator:yt(new ft({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof dt)return{type:"Repetition",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof pt)return{type:"Alternation",name:e.name,idx:e.idx,definition:t(e.definition)};if(e instanceof ft){var n={type:"Terminal",name:e.terminalType.name,label:Be(e.terminalType),idx:e.idx},r=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=N(r)?r.source:r),n}if(e instanceof at)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var wt=function(){function e(){}return e.prototype.walk=function(e,t){var n=this;void 0===t&&(t=[]),c(e.definition,(function(r,o){var i=f(e.definition,o+1);if(r instanceof st)n.walkProdRef(r,i,t);else if(r instanceof ft)n.walkTerminal(r,i,t);else if(r instanceof lt)n.walkFlat(r,i,t);else if(r instanceof ut)n.walkOption(r,i,t);else if(r instanceof ht)n.walkAtLeastOne(r,i,t);else if(r instanceof ct)n.walkAtLeastOneSep(r,i,t);else if(r instanceof mt)n.walkManySep(r,i,t);else if(r instanceof dt)n.walkMany(r,i,t);else{if(!(r instanceof pt))throw Error("non exhaustive match");n.walkOr(r,i,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 ut({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkAtLeastOneSep=function(e,t,n){var r=vt(e,t,n);this.walk(e,r)},e.prototype.walkMany=function(e,t,n){var r=[new ut({definition:e.definition})].concat(t,n);this.walk(e,r)},e.prototype.walkManySep=function(e,t,n){var r=vt(e,t,n);this.walk(e,r)},e.prototype.walkOr=function(e,t,n){var r=this,o=t.concat(n);c(e.definition,(function(e){var t=new lt({definition:[e]});r.walk(t,o)}))},e}();function vt(e,t,n){return[new ut({definition:[new ft({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}var _t=function(){function e(){}return e.prototype.visit=function(e){var t=e;switch(t.constructor){case st:return this.visitNonTerminal(t);case lt:return this.visitFlat(t);case ut:return this.visitOption(t);case ht:return this.visitRepetitionMandatory(t);case ct:return this.visitRepetitionMandatoryWithSeparator(t);case mt:return this.visitRepetitionWithSeparator(t);case dt:return this.visitRepetition(t);case pt:return this.visitAlternation(t);case ft:return this.visitTerminal(t);case at: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}(),bt=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,t){return void 0===t&&(t=[]),!!(e instanceof ut||e instanceof dt||e instanceof mt)||(e instanceof pt?I(e.definition,(function(e){return St(e,t)})):!(e instanceof st&&b(t,e))&&e instanceof it&&(e instanceof st&&t.push(e),x(e.definition,(function(e){return St(e,t)}))))}function Ct(e){if(e instanceof st)return"SUBRULE";if(e instanceof ut)return"OPTION";if(e instanceof pt)return"OR";if(e instanceof ht)return"AT_LEAST_ONE";if(e instanceof ct)return"AT_LEAST_ONE_SEP";if(e instanceof mt)return"MANY_SEP";if(e instanceof dt)return"MANY";if(e instanceof ft)return"CONSUME";throw Error("non exhaustive match")}var Et=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 bt(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";_(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},t.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+"Terminal";_(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}(_t),Mt=new Et;function Tt(e){if(e instanceof st)return Tt(e.referencedRule);if(e instanceof ft)return[e.terminalType];if(function(e){return e instanceof lt||e instanceof ut||e instanceof dt||e instanceof ht||e instanceof ct||e instanceof mt||e instanceof ft||e instanceof at}(e))return function(e){for(var t,n=[],r=e.definition,o=0,i=r.length>o,s=!0;i&&s;)s=St(t=r[o]),n=n.concat(Tt(t)),o+=1,i=r.length>o;return R(n)}(e);if(function(e){return e instanceof pt}(e))return function(e){return R(l(a(e.definition,(function(e){return Tt(e)}))))}(e);throw Error("non exhaustive match")}var Rt="_~IN~_",At=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)}}(),Nt=function(e){function t(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return At(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,o,i=(r=e.referencedRule,o=e.idx,r.name+o+Rt+this.topProd.name),s=t.concat(n),a=Tt(new lt({definition:s}));this.follows[i]=a},t}(wt),Lt=256,xt=512,Ot=768,It=1024,kt=1280,Dt=1536;function Pt(e,t,n){return n|t|e}function Ht(e,t,n,r){var o=r+1<<24;return Pt(e,t,n)|o}var Ft=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 Yt(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset==1&&(e.endOffset=t.endOffset)}function Vt(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==1&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function Ut(e,t,n){void 0===e.children[t]?e.children[t]=[n]:e.children[t].push(n)}var Bt=function(e){function t(t){var n=e.call(this)||this;return n.result=[],n.ruleIdx=t,n}return Ft(t,e),t.prototype.collectNamedDSLMethod=function(e,t,n){if(!m(e.name)){var r=void 0;if(e instanceof ut||e instanceof dt||e instanceof ht||e instanceof pt)r=new t({definition:e.definition,idx:e.idx});else{if(!(e instanceof ct||e instanceof mt))throw Error("non exhaustive match");r=new t({definition:e.definition,idx:e.idx,separator:e.separator})}var o=[r],i=Pt(this.ruleIdx,n,e.idx);this.result.push({def:o,key:i,name:e.name,orgProd:e})}},t.prototype.visitOption=function(e){this.collectNamedDSLMethod(e,ut,xt)},t.prototype.visitRepetition=function(e){this.collectNamedDSLMethod(e,dt,Ot)},t.prototype.visitRepetitionMandatory=function(e){this.collectNamedDSLMethod(e,ht,It)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.collectNamedDSLMethod(e,ct,Dt)},t.prototype.visitRepetitionWithSeparator=function(e){this.collectNamedDSLMethod(e,mt,kt)},t.prototype.visitAlternation=function(e){var t=this;this.collectNamedDSLMethod(e,pt,Lt);var n=e.definition.length>1;c(e.definition,(function(r,o){if(!m(r.name)){var i=r.definition;i=n?[new ut({definition:r.definition})]:r.definition;var s=Ht(t.ruleIdx,Lt,e.idx,o);t.result.push({def:i,key:s,name:r.name,orgProd:r})}}))},t}(_t),Wt=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)}}(),jt=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 Wt(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),o=new lt({definition:r});this.possibleTokTypes=Tt(o),this.found=!0}},t}(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 Wt(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=S(this.path.ruleStack).reverse(),this.occurrenceStack=S(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(){o(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(wt)),zt=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 Wt(t,e),t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(wt),Gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wt(t,e),t.prototype.walkMany=function(t,n,r){if(t.idx===this.occurrence){var o=u(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof ft&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,r)},t}(zt),$t=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wt(t,e),t.prototype.walkManySep=function(t,n,r){if(t.idx===this.occurrence){var o=u(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof ft&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,r)},t}(zt),Kt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wt(t,e),t.prototype.walkAtLeastOne=function(t,n,r){if(t.idx===this.occurrence){var o=u(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof ft&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,r)},t}(zt),Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Wt(t,e),t.prototype.walkAtLeastOneSep=function(t,n,r){if(t.idx===this.occurrence){var o=u(n.concat(r));this.result.isEndOfRule=void 0===o,o instanceof ft&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,r)},t}(zt);function qt(e,t,n){void 0===n&&(n=[]),n=S(n);var r=[],o=0;function i(i){var s=qt(i.concat(f(e,o+1)),t,n);return r.concat(s)}for(;n.length<t&&o<e.length;){var s=e[o];if(s instanceof lt)return i(s.definition);if(s instanceof st)return i(s.definition);if(s instanceof ut)r=i(s.definition);else{if(s instanceof ht)return i(a=s.definition.concat([new dt({definition:s.definition})]));if(s instanceof ct)return i(a=[new lt({definition:s.definition}),new dt({definition:[new ft({terminalType:s.separator})].concat(s.definition)})]);if(s instanceof mt){var a=s.definition.concat([new dt({definition:[new ft({terminalType:s.separator})].concat(s.definition)})]);r=i(a)}else if(s instanceof dt)a=s.definition.concat([new dt({definition:s.definition})]),r=i(a);else{if(s instanceof pt)return c(s.definition,(function(e){r=i(e.definition)})),r;if(!(s instanceof ft))throw Error("non exhaustive match");n.push(s.terminalType)}}o++}return r.push({partialPath:n,suffixDef:f(e,o)}),r}function Qt(e,t,n,r){var i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE",l=!1,u=t.length,c=u-r-1,d=[],m=[];for(m.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!o(m);){var p=m.pop();if(p!==a){var y=p.def,w=p.idx,v=p.ruleStack,_=p.occurrenceStack;if(!o(y)){var b=y[0];if(b===i){var C={idx:w,def:f(y),ruleStack:g(v),occurrenceStack:g(_)};m.push(C)}else if(b instanceof ft)if(w<u-1){var E=w+1;n(t[E],b.terminalType)&&(C={idx:E,def:f(y),ruleStack:v,occurrenceStack:_},m.push(C))}else{if(w!==u-1)throw Error("non exhaustive match");d.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:v,occurrenceStack:_}),l=!0}else if(b instanceof st){var M=S(v);M.push(b.nonTerminalName);var T=S(_);T.push(b.idx),C={idx:w,def:b.definition.concat(s,f(y)),ruleStack:M,occurrenceStack:T},m.push(C)}else if(b instanceof ut){var R={idx:w,def:f(y),ruleStack:v,occurrenceStack:_};m.push(R),m.push(a);var A={idx:w,def:b.definition.concat(f(y)),ruleStack:v,occurrenceStack:_};m.push(A)}else if(b instanceof ht){var N=new dt({definition:b.definition,idx:b.idx});C={idx:w,def:b.definition.concat([N],f(y)),ruleStack:v,occurrenceStack:_},m.push(C)}else if(b instanceof ct){var L=new ft({terminalType:b.separator});N=new dt({definition:[L].concat(b.definition),idx:b.idx}),C={idx:w,def:b.definition.concat([N],f(y)),ruleStack:v,occurrenceStack:_},m.push(C)}else if(b instanceof mt){R={idx:w,def:f(y),ruleStack:v,occurrenceStack:_},m.push(R),m.push(a),L=new ft({terminalType:b.separator});var x=new dt({definition:[L].concat(b.definition),idx:b.idx});A={idx:w,def:b.definition.concat([x],f(y)),ruleStack:v,occurrenceStack:_},m.push(A)}else if(b instanceof dt)R={idx:w,def:f(y),ruleStack:v,occurrenceStack:_},m.push(R),m.push(a),x=new dt({definition:b.definition,idx:b.idx}),A={idx:w,def:b.definition.concat([x],f(y)),ruleStack:v,occurrenceStack:_},m.push(A);else if(b instanceof pt)for(var O=b.definition.length-1;O>=0;O--){var I={idx:w,def:b.definition[O].definition.concat(f(y)),ruleStack:v,occurrenceStack:_};m.push(I),m.push(a)}else if(b instanceof lt)m.push({idx:w,def:b.definition.concat(f(y)),ruleStack:v,occurrenceStack:_});else{if(!(b instanceof at))throw Error("non exhaustive match");m.push(Jt(b,w,v,_))}}}else l&&h(m).idx<=c&&m.pop()}return d}function Jt(e,t,n,r){var o=S(n);o.push(e.name);var i=S(r);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}var Zt,en=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(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"}(Zt||(Zt={}));var tn=function(e){function t(t,n,r){var o=e.call(this)||this;return o.topProd=t,o.targetOccurrence=n,o.targetProdType=r,o}return en(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,Zt.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,Zt.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,Zt.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,Zt.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},t.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,Zt.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},t}(wt),nn=function(e){function t(t,n,r){var o=e.call(this)||this;return o.targetOccurrence=t,o.targetProdType=n,o.targetRef=r,o.result=[],o}return en(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,Zt.OPTION)},t.prototype.visitRepetition=function(e){this.checkIsTarget(e,Zt.REPETITION)},t.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,Zt.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,Zt.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,Zt.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(e){this.checkIsTarget(e,Zt.ALTERNATION)},t}(_t);function rn(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=[];return t}function on(e){for(var t=[""],n=0;n<e.length;n++){for(var r=e[n],o=[],i=0;i<t.length;i++){var s=t[i];o.push(s+"_"+r.tokenTypeIdx);for(var a=0;a<r.categoryMatches.length;a++){var l="_"+r.categoryMatches[a];o.push(s+l)}}t=o}return t}function sn(e,t,n){for(var r=0;r<e.length;r++)if(r!==n)for(var o=e[r],i=0;i<t.length;i++)if(!0===o[t[i]])return!1;return!0}function an(e,t){for(var n=a(e,(function(e){return qt([e],1)})),r=rn(n.length),i=a(n,(function(e){var t={};return c(e,(function(e){c(on(e.partialPath),(function(e){t[e]=!0}))})),t})),s=n,l=1;l<=t;l++){var u=s;s=rn(u.length);for(var h=function(e){for(var n=u[e],a=0;a<n.length;a++){var h=n[a].partialPath,d=n[a].suffixDef,m=on(h);if(sn(i,m,e)||o(d)||h.length===t){var p=r[e];if(!1===hn(p,h)){p.push(h);for(var f=0;f<m.length;f++){var g=m[f];i[e][g]=!0}}}else{var y=qt(d,l+1,h);s[e]=s[e].concat(y),c(y,(function(t){c(on(t.partialPath),(function(t){i[e][t]=!0}))}))}}},d=0;d<u.length;d++)h(d)}return r}function ln(e,t,n,r){var o=new nn(e,Zt.ALTERNATION,r);return t.accept(o),an(o.result,n)}function un(e,t,n,r){var o=new nn(e,n);t.accept(o);var i=o.result,s=new tn(t,e,n).startWalking();return an([new lt({definition:i}),new lt({definition:s})],r)}function hn(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var o=0;o<r.length;o++){var i=t[o],s=r[o];if(!1==(i===s||void 0!==s.categoryMatchesMap[i.tokenTypeIdx]))continue e}return!0}}return!1}function cn(e){return x(e,(function(e){return x(e,(function(e){return x(e,(function(e){return o(e.categoryMatches)}))}))}))}var dn=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 mn(e,t,n,r,i,h){var d=a(e,(function(e){return function(e,t){var n=new gn;return e.accept(n),a(s(v(H(n.allProductions,pn),(function(e){return e.length>1}))),(function(n){var r=u(n),o=t.buildDuplicateFoundError(e,n),i=Ct(r),s={message:o,type:_r.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:i,occurrence:r.idx},a=fn(r);return a&&(s.parameter=a),s}))}(e,i)})),m=a(e,(function(e){return vn(e,e,i)})),p=[],f=[],y=[];x(m,o)&&(p=a(e,(function(e){return function(e,t){var n=new bn;return e.accept(n),M(n.alternations,(function(n,r){var i=a(g(r.definition),(function(n,i){return o(Qt([n],[],null,1))?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:r,emptyChoiceIdx:i}),type:_r.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:r.idx,alternative:i+1}:null}));return n.concat(T(i))}),[])}(e,i)})),f=a(e,(function(e){return function(e,t,n,r){var o=new bn;e.accept(o);var i=o.alternations,s=n[e.name];s&&(i=w(i,(function(e){return s[Ct(e)+(0===e.idx?"":e.idx)]})));var l=M(i=w(i,(function(e){return!0===e.ignoreAmbiguities})),(function(n,o){var i=o.idx,s=o.maxLookahead||t,l=ln(i,e,s,o),u=function(e,t,n,r){var o=[],i=M(e,(function(n,r,i){return!0===t.definition[i].ignoreAmbiguities||c(r,(function(r){var s=[i];c(e,(function(e,n){i!==n&&hn(e,r)&&!0!==t.definition[n].ignoreAmbiguities&&s.push(n)})),s.length>1&&!hn(o,r)&&(o.push(r),n.push({alts:s,path:r}))})),n}),[]);return a(i,(function(e){var o=a(e.alts,(function(e){return e+1}));return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:o,prefixPath:e.path}),type:_r.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:[e.alts]}}))}(l,o,e,r),h=function(e,t,n,r){var o=[],i=M(e,(function(e,t,n){var r=a(t,(function(e){return{idx:n,path:e}}));return e.concat(r)}),[]);return c(i,(function(e){if(!0!==t.definition[e.idx].ignoreAmbiguities){var s=e.idx,l=e.path,u=a(function(e,t){for(var n=[],r=0;r<e.length;r++){var o=e[r];t.call(null,o)&&n.push(o)}return n}(i,(function(e){return!0!==t.definition[e.idx].ignoreAmbiguities&&e.idx<s&&(n=e.path,r=l,n.length<r.length&&x(n,(function(e,t){var n=r[t];return e===n||n.categoryMatchesMap[e.tokenTypeIdx]})));var n,r})),(function(e){var o=[e.idx+1,s+1],i=0===t.idx?"":t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:o,prefixPath:e.path}),type:_r.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:i,alternatives:o}}));o=o.concat(u)}})),o}(l,o,e,r);return n.concat(u,h)}),[]);return l}(e,t,r,i)})),y=function(e,t,n){var r=[];return c(e,(function(e){var i=new Sn;e.accept(i),c(i.allProductions,(function(i){var s=function(e){if(e instanceof ut)return Zt.OPTION;if(e instanceof dt)return Zt.REPETITION;if(e instanceof ht)return Zt.REPETITION_MANDATORY;if(e instanceof ct)return Zt.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof mt)return Zt.REPETITION_WITH_SEPARATOR;if(e instanceof pt)return Zt.ALTERNATION;throw Error("non exhaustive match")}(i),a=i.maxLookahead||t;if(o(l(un(i.idx,e,s,a)[0]))){var u=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:u,type:_r.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}}))})),r}(e,t,i));var _=function(e,t,n){var r=[],o=a(t,(function(e){return e.name}));return c(e,(function(e){var t=e.name;if(b(o,t)){var i=n.buildNamespaceConflictError(e);r.push({message:i,type:_r.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}})),r}(e,n,i),S=a(n,(function(e){return function(e,t){var n=[];return e.name.match(yn)||n.push({message:t.buildTokenNameError({tokenType:e,expectedPattern:yn}),type:_r.INVALID_TOKEN_NAME}),n}(e,i)})),C=function(e,t){var n=[];return c(e,(function(e){var r=new Bt("");e.accept(r);var o=a(r.result,(function(e){return e.orgProd}));n.push(a(o,(function(n){return function(e,t,n){var r,o=[];return t.name.match(wn)||(r=n.buildInvalidNestedRuleNameError(e,t),o.push({message:r,type:_r.INVALID_NESTED_RULE_NAME,ruleName:e.name})),o}(e,n,t)})))})),l(n)}(e,i),E=function(e,t){var n=[];return c(e,(function(e){var r=new Bt("");e.accept(r),c(s(v(H(r.result,(function(e){return e.name})),(function(e){return e.length>1}))),(function(r){var o=a(r,(function(e){return e.orgProd})),i=t.buildDuplicateNestedRuleNameError(e,o);n.push({message:i,type:_r.DUPLICATE_NESTED_NAME,ruleName:e.name})}))})),n}(e,i),R=a(e,(function(e){return function(e,t){var n=new bn;return e.accept(n),M(n.alternations,(function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:_r.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n}),[])}(e,i)})),A=a(e,(function(e){return function(e,t){var n=[],r=e.name;return r.match(yn)||n.push({message:t.buildInvalidRuleNameError({topLevelRule:e,expectedPattern:yn}),type:_r.INVALID_RULE_NAME,ruleName:r}),n}(e,i)})),N=a(e,(function(t){return function(e,t,n,r){var o=[],i=M(t,(function(t,n){return n.name===e.name?t+1:t}),0);if(i>1){var s=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});o.push({message:s,type:_r.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}(t,e,h,i)}));return l(d.concat(S,C,E,y,m,p,f,_,R,A,N))}function pn(e){return Ct(e)+"_#_"+e.idx+"_#_"+fn(e)}function fn(e){return e instanceof ft?e.terminalType.name:e instanceof st?e.nonTerminalName:""}var gn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return dn(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}(_t),yn=/^[a-zA-Z_]\w*$/,wn=new RegExp(yn.source.replace("^","^\\$"));function vn(e,t,n,r){void 0===r&&(r=[]);var i=[],s=_n(t.definition);if(o(s))return[];var u=e.name;b(s,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:_r.LEFT_RECURSION,ruleName:u});var h=a(O(s,r.concat([e])),(function(t){var o=S(r);return o.push(t),vn(e,t,n,o)}));return i.concat(l(h))}function _n(e){var t=[];if(o(e))return t;var n=u(e);if(n instanceof st)t.push(n.referencedRule);else if(n instanceof lt||n instanceof ut||n instanceof ht||n instanceof ct||n instanceof mt||n instanceof dt)t=t.concat(_n(n.definition));else if(n instanceof pt)t=l(a(n.definition,(function(e){return _n(e.definition)})));else if(!(n instanceof ft))throw Error("non exhaustive match");var r=St(n),i=e.length>1;if(r&&i){var s=f(e);return t.concat(_n(s))}return t}var bn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.alternations=[],t}return dn(t,e),t.prototype.visitAlternation=function(e){this.alternations.push(e)},t}(_t),Sn=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allProductions=[],t}return dn(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}(_t),Cn={buildMismatchTokenMessage:function(e){var t=e.expected,n=e.actual;return e.previous,e.ruleName,"Expecting "+(je(t)?"--\x3e "+Be(t)+" <--":"token of type --\x3e "+t.name+" <--")+" but found --\x3e '"+n.image+"' <--"},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;return e.ruleName,"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,n=e.actual,r=(e.previous,e.customUserDescription),o=(e.ruleName,"Expecting: "),i="\nbut found: '"+u(n).image+"'";if(r)return o+r+i;var s=a(M(t,(function(e,t){return e.concat(t)}),[]),(function(e){return"["+a(e,(function(e){return Be(e)})).join(", ")+"]"}));return o+"one of these possible Token sequences:\n"+a(s,(function(e,t){return" "+(t+1)+". "+e})).join("\n")+i},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,n=e.actual,r=e.customUserDescription,o=(e.ruleName,"Expecting: "),i="\nbut found: '"+u(n).image+"'";return r?o+r+i:o+"expecting at least one iteration which starts with one of these possible Token sequences::\n <"+a(t,(function(e){return"["+a(e,(function(e){return Be(e)})).join(",")+"]"})).join(" ,")+">"+i}};Object.freeze(Cn);var En={buildRuleNotFoundError:function(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+"<-\ninside top level rule: ->"+e.name+"<-"}},Mn={buildDuplicateFoundError:function(e,t){var n,r=e.name,o=u(t),i=o.idx,s=Ct(o),a=(n=o)instanceof ft?n.terminalType.name:n instanceof st?n.nonTerminalName:"",l="->"+s+(i>0?i:"")+"<- "+(a?"with argument: ->"+a+"<-":"")+"\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(l=l.replace(/[ \t]+/g," ")).replace(/\s\s+/g,"\n")},buildInvalidNestedRuleNameError:function(e,t){return"Invalid nested rule name: ->"+t.name+"<- inside rule: ->"+e.name+"<-\nit must match the pattern: ->"+wn.toString()+"<-.\nNote that this means a nested rule name must start with the '$'(dollar) sign."},buildDuplicateNestedRuleNameError:function(e,t){return"Duplicate nested rule name: ->"+u(t).name+"<- inside rule: ->"+e.name+"<-\nA nested name must be unique in the scope of a top level grammar rule."},buildNamespaceConflictError:function(e){return"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."},buildAlternationPrefixAmbiguityError:function(e){var t=a(e.prefixPath,(function(e){return Be(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return"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."},buildAlternationAmbiguityError:function(e){var t=a(e.prefixPath,(function(e){return Be(e)})).join(", "),n=0===e.alternation.idx?"":e.alternation.idx;return"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"+"See: https://sap.github.io/chevrotain/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details."},buildEmptyRepetitionError:function(e){var t=Ct(e.repetition);return 0!==e.repetition.idx&&(t+=e.repetition.idx),"The repetition <"+t+"> within Rule <"+e.topLevelRule.name+"> can never consume any tokens.\nThis could lead to an infinite loop."},buildTokenNameError:function(e){return"Invalid Grammar Token name: ->"+e.tokenType.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildEmptyAlternationError:function(e){return"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."},buildTooManyAlternativesError:function(e){return"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."},buildLeftRecursionError:function(e){var t=e.topLevelRule.name;return"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 "+t+" --\x3e "+a(e.leftRecursionPath,(function(e){return e.name})).concat([t]).join(" --\x3e ")+"\n To fix this refactor your grammar to remove the left recursion.\nsee: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring."},buildInvalidRuleNameError:function(e){return"Invalid grammar rule name: ->"+e.topLevelRule.name+"<- it must match the pattern: ->"+e.expectedPattern.toString()+"<-"},buildDuplicateRuleNameError:function(e){return"Duplicate definition, rule: ->"+(e.topLevelRule instanceof at?e.topLevelRule.name:e.topLevelRule)+"<- is already defined in the grammar: ->"+e.grammarName+"<-"}},Tn=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)}}(),Rn=function(e){function t(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return Tn(t,e),t.prototype.resolveRefs=function(){var e=this;c(s(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:_r.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},t}(_t);function An(e){e=P(e,{errMsgProvider:En});var t,n,r,o={};return c(e.rules,(function(e){o[e.name]=e})),t=o,n=e.errMsgProvider,(r=new Rn(t,n)).resolveRefs(),r.errors}function Nn(e){return mn((e=P(e,{errMsgProvider:Mn,ignoredIssues:{}})).rules,e.maxLookahead,e.tokenTypes,e.ignoredIssues,e.errMsgProvider,e.grammarName)}function Ln(e){c(e.rules,(function(e){var t=new Et;e.accept(t),c(t.dslMethods,(function(e){c(e,(function(e,t){e.idx=t+1}))}))}))}var xn="MismatchedTokenException",On="NoViableAltException",In="EarlyExitException",kn="NotAllInputParsedException",Dn=[xn,On,In,kn];function Pn(e){return b(Dn,e.name)}function Hn(e,t,n){this.name=xn,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function Fn(e,t,n){this.name=On,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}function Yn(e,t){this.name=kn,this.message=e,this.token=t,this.resyncedTokens=[]}function Vn(e,t,n){this.name=In,this.message=e,this.token=t,this.previousToken=n,this.resyncedTokens=[]}Object.freeze(Dn),Hn.prototype=Error.prototype,Fn.prototype=Error.prototype,Yn.prototype=Error.prototype,Vn.prototype=Error.prototype;var Un={},Bn="InRuleRecoveryException";function Wn(e){this.name=Bn,this.message=e}Wn.prototype=Error.prototype;var jn=function(){function e(){}return e.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=_(e,"recoveryEnabled")?e.recoveryEnabled:br.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=zn)},e.prototype.getTokenToInsert=function(e){var t=nt(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){for(var o=this,i=this.findReSyncTokenType(),s=this.exportLexerState(),a=[],l=!1,u=this.LA(1),h=this.LA(1),c=function(){var e=o.LA(0),t=new Hn(o.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:u,previous:e,ruleName:o.getCurrRuleFullName()}),u,o.LA(0));t.resyncedTokens=g(a),o.SAVE_ERROR(t)};!l;){if(this.tokenMatcher(h,r))return void c();if(n.call(this))return c(),void e.apply(this,t);this.tokenMatcher(h,i)?l=!0:(h=this.SKIP_TOKEN(),this.addToResyncTokens(h,a))}this.importLexerState(s)},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);return this.getNextPossibleTokenTypes(n)},e.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new Wn("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(o(t))return!1;var r=this.LA(1);return void 0!==E(t,(function(e){return n.tokenMatcher(r,e)}))},e.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},e.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey();return b(this.getFollowSetFromFollowKey(t),e)},e.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),n=2;;){var r=t.tokenType;if(b(e,r))return r;t=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(1===this.RULE_STACK.length)return Un;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 o(this.LAST_EXPLICIT_RULE_STACK)||(t=a(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_STACK[t]})),n=a(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.RULE_OCCURRENCE_STACK[t]}))),a(t,(function(r,o){return 0===o?Un:{ruleName:e.shortRuleNameToFullName(r),idxInCallingRule:n[o],inRule:e.shortRuleNameToFullName(t[o-1])}}))},e.prototype.flattenFollowSet=function(){var e=this;return l(a(this.buildFullFollowKeyStack(),(function(t){return e.getFollowSetFromFollowKey(t)})))},e.prototype.getFollowSetFromFollowKey=function(e){if(e===Un)return[tt];var t=e.ruleName+e.idxInCallingRule+Rt+e.inRule;return this.resyncFollows[t]},e.prototype.addToResyncTokens=function(e,t){return this.tokenMatcher(e,tt)||t.push(e),t},e.prototype.reSyncTo=function(e){for(var t=[],n=this.LA(1);!1===this.tokenMatcher(n,e);)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return g(t)},e.prototype.attemptInRepetitionRecovery=function(e,t,n,r,o,i,s){},e.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:S(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},e.prototype.getHumanReadableRuleStack=function(){var e=this;return o(this.LAST_EXPLICIT_RULE_STACK)?a(this.RULE_STACK,(function(t){return e.shortRuleNameToFullName(t)})):a(this.LAST_EXPLICIT_RULE_STACK,(function(t){return e.shortRuleNameToFullName(e.RULE_STACK[t])}))},e}();function zn(e,t,n,r,o,i,s){var a=this.getKeyForAutomaticLookahead(r,o),l=this.firstAfterRepMap[a];if(void 0===l){var u=this.getCurrRuleFullName();l=new i(this.getGAstProductions()[u],o).startWalking(),this.firstAfterRepMap[a]=l}var h=l.token,c=l.occurrence,d=l.isEndOfRule;1===this.RULE_STACK.length&&d&&void 0===h&&(h=tt,c=1),this.shouldInRepetitionRecoveryBeTried(h,c,s)&&this.tryInRepetitionRecovery(e,t,n,h)}var Gn,$n=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=_(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:br.dynamicTokensEnabled,this.maxLookahead=_(e,"maxLookahead")?e.maxLookahead:br.maxLookahead,this.lookAheadFuncsCache=W()?new Map:[],W()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var t=this;c(e,(function(e){t.TRACE_INIT(e.name+" Rule Lookahead",(function(){var n=function(e){Mt.reset(),e.accept(Mt);var t=Mt.dslMethods;return Mt.reset(),t}(e),r=n.alternation,o=n.repetition,i=n.option,s=n.repetitionMandatory,a=n.repetitionMandatoryWithSeparator,l=n.repetitionWithSeparator;c(r,(function(n){var r=0===n.idx?"":n.idx;t.TRACE_INIT(""+Ct(n)+r,(function(){var r,o,i,s,a,l,u=(r=n.idx,o=e,i=n.maxLookahead||t.maxLookahead,s=n.hasPredicates,a=t.dynamicTokensEnabled,(0,t.lookAheadBuilderForAlternatives)(l=ln(r,o,i),s,cn(l)?Le:Ne,a)),h=Pt(t.fullRuleNameToShort[e.name],Lt,n.idx);t.setLaFuncCache(h,u)}))})),c(o,(function(n){t.computeLookaheadFunc(e,n.idx,Ot,Zt.REPETITION,n.maxLookahead,Ct(n))})),c(i,(function(n){t.computeLookaheadFunc(e,n.idx,xt,Zt.OPTION,n.maxLookahead,Ct(n))})),c(s,(function(n){t.computeLookaheadFunc(e,n.idx,It,Zt.REPETITION_MANDATORY,n.maxLookahead,Ct(n))})),c(a,(function(n){t.computeLookaheadFunc(e,n.idx,Dt,Zt.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,Ct(n))})),c(l,(function(n){t.computeLookaheadFunc(e,n.idx,kt,Zt.REPETITION_WITH_SEPARATOR,n.maxLookahead,Ct(n))}))}))}))},e.prototype.computeLookaheadFunc=function(e,t,n,r,o,i){var s=this;this.TRACE_INIT(""+i+(0===t?"":t),(function(){var i=function(e,t,n,r,o,i){var s=un(e,t,o,n),a=cn(s)?Le:Ne;return i(s[0],a,r)}(t,e,o||s.maxLookahead,s.dynamicTokensEnabled,r,s.lookAheadBuilderForOptional),a=Pt(s.fullRuleNameToShort[e.name],n,t);s.setLaFuncCache(a,i)}))},e.prototype.lookAheadBuilderForOptional=function(e,t,n){return function(e,t,n){var r=x(e,(function(e){return 1===e.length})),i=e.length;if(r&&!n){var s=l(e);if(1===s.length&&o(s[0].categoryMatches)){var a=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===a}}var u=M(s,(function(e,t,n){return e[t.tokenTypeIdx]=!0,c(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<i;n++){for(var r=e[n],o=r.length,s=0;s<o;s++){var a=this.LA(s+1);if(!1===t(a,r[s]))continue e}return!0}return!1}}(e,t,n)},e.prototype.lookAheadBuilderForAlternatives=function(e,t,n,r){return function(e,t,n,r){var o=e.length,i=x(e,(function(e){return x(e,(function(e){return 1===e.length}))}));if(t)return function(t){for(var r=a(t,(function(e){return e.GATE})),i=0;i<o;i++){var s=e[i],l=s.length,u=r[i];if(void 0===u||!1!==u.call(this))e:for(var h=0;h<l;h++){for(var c=s[h],d=c.length,m=0;m<d;m++){var p=this.LA(m+1);if(!1===n(p,c[m]))continue e}return i}}};if(i&&!r){var s=M(a(e,(function(e){return l(e)})),(function(e,t,n){return c(t,(function(t){_(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),c(t.categoryMatches,(function(t){_(e,t)||(e[t]=n)}))})),e}),[]);return function(){var e=this.LA(1);return s[e.tokenTypeIdx]}}return function(){for(var t=0;t<o;t++){var r=e[t],i=r.length;e:for(var s=0;s<i;s++){for(var a=r[s],l=a.length,u=0;u<l;u++){var h=this.LA(u+1);if(!1===n(h,a[u]))continue e}return t}}}}(e,t,n,r)},e.prototype.getKeyForAutomaticLookahead=function(e,t){return Pt(this.getLastExplicitRuleShortName(),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}(),Kn=/^\s*function\s*(\S*)\s*\(/,Xn="name";function qn(e){return e.name||e.toString().match(Kn)[1]}function Qn(e,t){var n=Object.getOwnPropertyDescriptor(e,Xn);return!(!m(n)&&!n.configurable||(Object.defineProperty(e,Xn,{enumerable:!1,configurable:!0,writable:!1,value:t}),0))}function Jn(e,t){for(var n=i(e),r=n.length,o=0;o<r;o++)for(var s=e[n[o]],a=s.length,l=0;l<a;l++){var u=s[l];void 0===u.tokenTypeIdx&&(void 0!==u.fullName?this[u.fullName](u.children,t):this[u.name](u.children,t))}}!function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"}(Gn||(Gn={}));var Zn=["constructor","visit","validateVisitor"],er=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.LAST_EXPLICIT_RULE_STACK=[],this.CST_STACK=[],this.outputCst=_(e,"outputCst")?e.outputCst:br.outputCst,this.nodeLocationTracking=_(e,"nodeLocationTracking")?e.nodeLocationTracking:br.nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Vt,this.setNodeLocationFromNode=Vt,this.cstPostRule=Y,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Y,this.setNodeLocationFromNode=Y,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Yt,this.setNodeLocationFromNode=Yt,this.cstPostRule=Y,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Y,this.setNodeLocationFromNode=Y,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=Y,this.setNodeLocationFromNode=Y,this.cstPostRule=Y,this.setInitialNodeLocation=Y}else this.cstInvocationStateUpdate=Y,this.cstFinallyStateUpdate=Y,this.cstPostTerminal=Y,this.cstPostNonTerminal=Y,this.cstPostRule=Y,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==1?(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==1?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,t){var n,r,o,i=this.CST_STACK[this.CST_STACK.length-1];r=t,o=e,void 0===(n=i).children[o]?n.children[o]=[r]:n.children[o].push(r),this.setNodeLocationFromToken(i.location,t)},e.prototype.cstPostNonTerminal=function(e,t){if(!0!==this.isBackTracking()){var n=this.CST_STACK[this.CST_STACK.length-1];Ut(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}},e.prototype.getBaseCstVisitorConstructor=function(){if(m(this.baseCstVisitorConstructor)){var e=function(e,t){var n=function(){};Qn(n,e+"BaseSemantics");var r={visit:function(e,t){if(A(e)&&(e=e[0]),!m(e))return void 0!==e.fullName?this[e.fullName](e.children,t):this[e.name](e.children,t)},validateVisitor:function(){var e=function(e,t){var n=function(e,t){return T(a(t,(function(t){if(!p(e[t]))return{msg:"Missing visitor method: <"+t+"> on "+qn(e.constructor)+" CST Visitor.",type:Gn.MISSING_METHOD,methodName:t}})))}(e,t),r=function(e,t){var n=[];for(var r in e)yn.test(r)&&p(e[r])&&!b(Zn,r)&&!b(t,r)&&n.push({msg:"Redundant visitor method: <"+r+"> on "+qn(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 /"+yn.source+"/.",type:Gn.REDUNDANT_METHOD,methodName:r});return n}(e,t);return n.concat(r)}(this,t);if(!o(e)){var n=a(e,(function(e){return e.msg}));throw Error("Errors Detected in CST Visitor <"+qn(this.constructor)+">:\n\t"+n.join("\n\n").replace(/\n/g,"\n\t"))}}};return(n.prototype=r).constructor=n,n._RULE_NAMES=t,n}(this.className,this.allRuleNames);return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(m(this.baseCstVisitorWithDefaultsConstructor)){var e=function(e,t,n){var r=function(){};Qn(r,e+"BaseSemanticsWithDefaults");var o=Object.create(n.prototype);return c(t,(function(e){o[e]=Jn})),(r.prototype=o).constructor=r,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 o,i=Ht(this.getLastExplicitRuleShortName(),n,t,r);return void 0!==e.NAME?(o=e.NAME,this.nestedRuleInvocationStateUpdate(o,i),{shortName:i,nestedName:o}):void 0},e.prototype.nestedRuleFinallyClause=function(e,t){var n=this.CST_STACK,r=n[n.length-1];this.nestedRuleFinallyStateUpdate();var o=n[n.length-1];Ut(o,t,r),this.setNodeLocationFromNode(o.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}(),tr=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)):vr},e.prototype.LA=function(e){var t=this.currIdx+e;return t<0||this.tokVectorLength<=t?vr: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}(),nr=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=Sr),b(this.definedRulesNames,e)){var r={message:Mn.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:_r.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(r)}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=Sr);var r,o,i,s,a,l=[];l=l.concat((r=e,o=this.definedRulesNames,i=this.className,a=[],b(o,r)||(s="Invalid rule override, rule: ->"+r+"<- cannot be overridden in the grammar: ->"+i+"<-as it is not defined in any of the super grammars ",a.push({message:s,type:_r.INVALID_RULE_OVERRIDE,ruleName:r})),a)),this.definitionErrors.push.apply(this.definitionErrors,l);var u=this.defineRule(e,t,n);return this[e]=u,u},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(Pn(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return gt(s(this.gastProductionsCache))},e}(),rr=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,t){if(this.className=qn(this.constructor),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Le,this.definedRulesNames=[],this.tokensMap={},this.allRuleNames=[],this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},_(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(A(e)){if(o(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(A(e))this.tokensMap=M(e,(function(e,t){return e[t.name]=t,e}),{});else if(_(e,"modes")&&x(l(s(e.modes)),He)){var n=R(l(s(e.modes)));this.tokensMap=M(n,(function(e,t){return e[t.name]=t,e}),{})}else{if(!L(e))throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=C(e)}this.tokensMap.EOF=tt;var r=x(s(e),(function(e){return o(e.categoryMatches)}));this.tokenMatcher=r?Le:Ne,Ie(s(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,o=_(n,"resyncEnabled")?n.resyncEnabled:Sr.resyncEnabled,i=_(n,"recoveryValueFunc")?n.recoveryValueFunc:Sr.recoveryValueFunc,s=this.ruleShortNameIdx<<12;function a(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(e){return this.invokeRuleCatch(e,o,i)}finally{this.ruleFinallyStateUpdate()}}return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=e,this.fullRuleNameToShort[e]=s,(r=function(t,n){return void 0===t&&(t=0),this.ruleInvocationStateUpdate(s,e,t),a.call(this,n)}).ruleName=e,r.originalGrammarAction=t,r},e.prototype.invokeRuleCatch=function(e,t,n){var r=1===this.RULE_STACK.length,o=t&&!this.isBackTracking()&&this.recoveryEnabled;if(Pn(e)){var i=e;if(o){var s,a=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(a))return i.resyncedTokens=this.reSyncTo(a),this.outputCst?((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,s):n();throw this.outputCst&&((s=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=s),i}if(r)return this.moveToTerminatedState(),n();throw i}throw e},e.prototype.optionInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(xt,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(xt,t);return this.optionInternalLogic(e,t,n)},e.prototype.optionInternalLogic=function(e,t,n){var r,o,i=this,s=this.getLaFuncFromCache(n);if(void 0!==e.DEF){if(r=e.DEF,void 0!==(o=e.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else r=e;if(!0===s.call(this))return r.call(this)},e.prototype.atLeastOneInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(It,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(It,e);this.atLeastOneInternalLogic(e,t,n)},e.prototype.atLeastOneInternalLogic=function(e,t,n){var r,o,i=this,s=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else r=t;if(!0!==s.call(this))throw this.raiseEarlyExitException(e,Zt.REPETITION_MANDATORY,t.ERR_MSG);for(var l=this.doSingleRepetition(r);!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,It,e,Kt)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Dt,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(Dt,e);this.atLeastOneSepFirstInternalLogic(e,t,n)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,n){var r=this,o=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(n).call(this))throw this.raiseEarlyExitException(e,Zt.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);o.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,Xt],s,Dt,e,Xt)},e.prototype.manyInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Ot,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(Ot,e);return this.manyInternalLogic(e,t,n)},e.prototype.manyInternalLogic=function(e,t,n){var r,o,i=this,s=this.getLaFuncFromCache(n);if(void 0!==t.DEF){if(r=t.DEF,void 0!==(o=t.GATE)){var a=s;s=function(){return o.call(i)&&a.call(i)}}}else r=t;for(var l=!0;!0===s.call(this)&&!0===l;)l=this.doSingleRepetition(r);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],s,Ot,e,Gt,l)},e.prototype.manySepFirstInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(kt,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(kt,e);this.manySepFirstInternalLogic(e,t,n)},e.prototype.manySepFirstInternalLogic=function(e,t,n){var r=this,o=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(n).call(this)){o.call(this);for(var s=function(){return r.tokenMatcher(r.LA(1),i)};!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,s,o,$t],s,kt,e,$t)}},e.prototype.repetitionSepSecondInternal=function(e,t,n,r,o){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,o],n,Dt,e,o)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternalNoCst=function(e,t){var n=A(e)?e:e.DEF,r=this.getKeyForAutomaticLookahead(Lt,t),o=this.getLaFuncFromCache(r).call(this,n);if(void 0!==o)return n[o].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)},e.prototype.orInternal=function(e,t){var n=this.getKeyForAutomaticLookahead(Lt,t),r=this.nestedRuleBeforeClause(e,n);try{var o=A(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,o);if(void 0!==i){var s=o[i],a=this.nestedAltBeforeClause(s,t,Lt,i);try{return s.ALT.call(this)}finally{void 0!==a&&this.nestedRuleFinallyClause(a.shortName,a.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 Yn(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var o=void 0!==n?n.ARGS:void 0;return r=e.call(this,t,o),this.cstPostNonTerminal(r,void 0!==n&&void 0!==n.LABEL?n.LABEL:e.ruleName),r}catch(t){this.subruleInternalError(t,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw Pn(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 o=this.LA(1);!0===this.tokenMatcher(o,e)?(this.consumeToken(),r=o):this.consumeInternalError(e,o,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}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,o=this.LA(0);throw r=void 0!==n&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:o,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new Hn(r,t,o))},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(e){throw e.name===Bn?n:e}},e.prototype.saveRecogState=function(){var e=this.errors,t=S(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),tt)},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}(),or=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=P(e.errorMessageProvider,br.errorMessageProvider)},e.prototype.SAVE_ERROR=function(e){if(Pn(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:S(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 S(this._errors)},set:function(e){this._errors=e},enumerable:!0,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,t,n){for(var r=this.getCurrRuleFullName(),o=un(e,this.getGAstProductions()[r],t,this.maxLookahead)[0],i=[],s=1;s<=this.maxLookahead;s++)i.push(this.LA(s));var a=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:i,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new Vn(a,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,t){for(var n=this.getCurrRuleFullName(),r=ln(e,this.getGAstProductions()[n],this.maxLookahead),o=[],i=1;i<=this.maxLookahead;i++)o.push(this.LA(i));var s=this.LA(0),a=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:r,actual:o,previous:s,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Fn(a,this.LA(1),s))},e}(),ir=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,t){var n=this.gastProductionsCache[e];if(m(n))throw Error("Rule ->"+e+"<- does not exist in this grammar.");return Qt([n],t,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var t=u(e.ruleStack),n=this.getGAstProductions()[t];return new jt(n,e).startWalking()},e}(),sr={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(sr);var ar=!0,lr=Math.pow(2,8)-1,ur=et({name:"RECORDING_PHASE_TOKEN",pattern:Ue.NA});Ie([ur]);var hr=nt(ur,"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 cr={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:{}},dr=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 vr},e.prototype.topLevelRuleRecord=function(e,t){try{var n=new at({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(!0!==e.KNOWN_RECORDER_ERROR)try{e.message=e.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(t){throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return mr.call(this,ut,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){mr.call(this,ht,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){mr.call(this,ct,t,e,ar)},e.prototype.manyInternalRecord=function(e,t){mr.call(this,dt,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){mr.call(this,mt,t,e,ar)},e.prototype.orInternalRecord=function(e,t){return pr.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,t,n){if(gr(t),!e||!1===_(e,"ruleName")){var r=new Error("<SUBRULE"+fr(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 o=z(this.recordingProdStack),i=e.ruleName,s=new st({idx:t,nonTerminalName:i,referencedRule:void 0});return o.definition.push(s),this.outputCst?cr:sr},e.prototype.consumeInternalRecord=function(e,t,n){if(gr(t),!De(e)){var r=new Error("<CONSUME"+fr(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 o=z(this.recordingProdStack),i=new ft({idx:t,terminalType:e});return o.definition.push(i),hr},e}();function mr(e,t,n,r){void 0===r&&(r=!1),gr(n);var o=z(this.recordingProdStack),i=p(t)?t:t.DEF,s=new e({definition:[],idx:n});return _(t,"NAME")&&(s.name=t.NAME),r&&(s.separator=t.SEP),_(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),i.call(this),o.definition.push(s),this.recordingProdStack.pop(),sr}function pr(e,t){var n=this;gr(t);var r=z(this.recordingProdStack),o=!1===A(e),i=!1===o?e:e.DEF,s=new pt({definition:[],idx:t,ignoreAmbiguities:o&&!0===e.IGNORE_AMBIGUITIES});_(e,"NAME")&&(s.name=e.NAME),_(e,"MAX_LOOKAHEAD")&&(s.maxLookahead=e.MAX_LOOKAHEAD);var a=I(i,(function(e){return p(e.GATE)}));return s.hasPredicates=a,r.definition.push(s),c(i,(function(e){var t=new lt({definition:[]});s.definition.push(t),_(e,"NAME")&&(t.name=e.NAME),_(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:_(e,"GATE")&&(t.ignoreAmbiguities=!0),n.recordingProdStack.push(t),e.ALT.call(n),n.recordingProdStack.pop()})),sr}function fr(e){return 0===e?"":""+e}function gr(e){if(e<0||e>lr){var t=new Error("Invalid DSL Method idx value: <"+e+">\n\tIdx value must be a none negative value smaller than "+(lr+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}var yr=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(_(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=br.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=G(t),o=r.time,i=r.value,s=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(n+"<-- <"+e+"> time: "+o+"ms"),this.traceInitIndent--,i}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)}}(),vr=nt(tt,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(vr);var _r,br=Object.freeze({recoveryEnabled:!1,maxLookahead:4,ignoredIssues:{},dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Cn,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Sr=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});function Cr(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"}(_r||(_r={}));var Er,Mr=function(){function e(e,t){void 0===t&&(t=br),this.ignoredIssues=br.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),_(t,"ignoredIssues")&&t.ignoredIssues!==br.ignoredIssues&&B("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=_(t,"ignoredIssues")?t.ignoredIssues:br.ignoredIssues,this.skipValidations=_(t,"skipValidations")?t.skipValidations:br.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(){j(t)})),t.TRACE_INIT("Grammar Recording",(function(){try{t.enableRecording(),c(t.definedRulesNames,(function(e){var n=t[e].originalGrammarAction,r=void 0;t.TRACE_INIT(e+" Rule",(function(){r=t.topLevelRuleRecord(e,n)})),t.gastProductionsCache[e]=r}))}finally{t.disableRecording()}}));var i=[];if(t.TRACE_INIT("Grammar Resolving",(function(){i=An({rules:s(t.gastProductionsCache)}),t.definitionErrors.push.apply(t.definitionErrors,i)})),t.TRACE_INIT("Grammar Validations",(function(){if(o(i)&&!1===t.skipValidations){var e=Nn({rules:s(t.gastProductionsCache),maxLookahead:t.maxLookahead,tokenTypes:s(t.tokensMap),ignoredIssues:t.ignoredIssues,errMsgProvider:Mn,grammarName:r});t.definitionErrors.push.apply(t.definitionErrors,e)}})),o(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",(function(){var e,n,r=(e=s(t.gastProductionsCache),n={},c(e,(function(e){var t=new Nt(e).startWalking();k(n,t)})),n);t.resyncFollows=r})),t.TRACE_INIT("ComputeLookaheadFunctions",(function(){t.preComputeLookaheadFunctions(s(t.gastProductionsCache))}))),t.TRACE_INIT("expandAllNestedRuleNames",(function(){var e,n,r,o=(e=s(t.gastProductionsCache),n=t.fullRuleNameToShort,r={allRuleNames:[]},c(e,(function(e){var t=n[e.name];r.allRuleNames.push(e.name);var o=new Bt(t);e.accept(o),c(o.result,(function(t){t.def,t.key;var n=t.name;r.allRuleNames.push(e.name+n)}))})),r);t.allRuleNames=o.allRuleNames})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!o(t.definitionErrors))throw n=a(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}();Er=Mr,[jn,$n,er,tr,rr,nr,or,ir,dr,yr].forEach((function(e){var t=e.prototype;Object.getOwnPropertyNames(t).forEach((function(n){if("constructor"!==n){var r=Object.getOwnPropertyDescriptor(t,n);r&&(r.get||r.set)?Object.defineProperty(Er.prototype,n,r):Er.prototype[n]=e.prototype[n]}}))}));var Tr=function(e){function t(t,n){void 0===n&&(n=br);var r=C(n);return r.outputCst=!0,e.call(this,t,r)||this}return wr(t,e),t}(Mr),Rr=function(e){function t(t,n){void 0===n&&(n=br);var r=C(n);return r.outputCst=!1,e.call(this,t,r)||this}return wr(t,e),t}(Mr);function Ar(e,t){var n=void 0===t?{}:t,o=n.resourceBase,i=void 0===o?"https://unpkg.com/chevrotain@"+r+"/diagrams/":o,s=n.css;return"\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\n<link rel='stylesheet' href='"+(void 0===s?"https://unpkg.com/chevrotain@"+r+"/diagrams/diagrams.css":s)+"'>\n\n<script src='"+i+"vendor/railroad-diagrams.js'><\/script>\n<script src='"+i+"src/diagrams_builder.js'><\/script>\n<script src='"+i+"src/diagrams_behavior.js'><\/script>\n<script src='"+i+'src/main.js\'><\/script>\n\n<div id="diagrams" align="center"></div> \n\n<script>\n window.serializedGrammar = '+JSON.stringify(e,null," ")+';\n<\/script>\n\n<script>\n var diagramsDiv = document.getElementById("diagrams");\n main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);\n<\/script>\n'}var Nr="\n";function Lr(e){return"\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 "+a(e.rules,(function(e){return n=Dr(1,'$.RULE("'+(t=e).name+'", function() {')+Nr,(n+=kr(t.definition,2))+(Dr(2,"})")+Nr);var t,n})).join("\n")+"\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 "}function xr(e,t){if(e instanceof st)return function(e,t){return Dr(t,"$.SUBRULE"+e.idx+"($."+e.nonTerminalName+")"+Nr)}(e,t);if(e instanceof ut)return Or("OPTION",e,t);if(e instanceof ht)return Or("AT_LEAST_ONE",e,t);if(e instanceof ct)return Or("AT_LEAST_ONE_SEP",e,t);if(e instanceof mt)return Or("MANY_SEP",e,t);if(e instanceof dt)return Or("MANY",e,t);if(e instanceof pt)return function(e,t){var n=Dr(t,"$.OR"+e.idx+"([")+Nr,r=a(e.definition,(function(e){return function(e,t){var n=Dr(t,"{")+Nr;return e.name&&(n+=Dr(t+1,'NAME: "'+e.name+'",')+Nr),n+=Dr(t+1,"ALT: function() {")+Nr,n+=kr(e.definition,t+1),(n+=Dr(t+1,"}")+Nr)+Dr(t,"}")}(e,t+1)}));return(n+=r.join(","+Nr))+(Nr+Dr(t,"])"+Nr))}(e,t);if(e instanceof ft)return function(e,t){var n=e.terminalType.name;return Dr(t,"$.CONSUME"+e.idx+"(this.tokensMap."+n+")"+Nr)}(e,t);if(e instanceof lt)return kr(e.definition,t);throw Error("non exhaustive match")}function Or(e,t,n){var r=Dr(n,"$."+(e+t.idx)+"(");return t.name||t.separator?(r+="{"+Nr,t.name&&(r+=Dr(n+1,'NAME: "'+t.name+'"')+","+Nr),t.separator&&(r+=Dr(n+1,"SEP: this.tokensMap."+t.separator.name)+","+Nr),r+="DEF: "+Ir(t.definition,n+2)+Nr,r+=Dr(n,"}")+Nr):r+=Ir(t.definition,n+1),r+(Dr(n,")")+Nr)}function Ir(e,t){var n="function() {"+Nr;return(n+=kr(e,t))+(Dr(t,"}")+Nr)}function kr(e,t){var n="";return c(e,(function(e){n+=xr(e,t+1)})),n}function Dr(e,t){return Array(4*e+1).join(" ")+t}function Pr(e){var t=function(e){return" \n"+Lr(e)+"\nreturn new "+e.name+"(tokenVocabulary, config) \n"}({name:e.name,rules:e.rules}),r=new Function("tokenVocabulary","config","chevrotain",t);return function(t){return r(e.tokenVocabulary,t,n(42620))}}function Hr(e){return function(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"+Lr(e)+"\n \nreturn {\n "+e.name+": "+e.name+" \n}\n}));\n"}({name:e.name,rules:e.rules})}function Fr(){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")}},42787:(e,t,n)=>{"use strict";var r=n(39297),o=n(94901),i=n(48981),s=n(66119),a=n(12211),l=s("IE_PROTO"),u=Object,h=u.prototype;e.exports=a?u.getPrototypeOf:function(e){var t=i(e);if(r(t,l))return t[l];var n=t.constructor;return o(n)&&t instanceof n?n.prototype:t instanceof u?h:null}},43004:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},43174:(e,t,n)=>{"use strict";n.d(t,{J:()=>g});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(36289),i=!1,s=/[A-Z]|^ms/g,a=/_EMO_([^_]+?)_([^]*?)_EMO_/g,l=function(e){return 45===e.charCodeAt(1)},u=function(e){return null!=e&&"boolean"!=typeof e},h=(0,o.A)((function(e){return l(e)?e:e.replace(s,"-$&").toLowerCase()})),c=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(a,(function(e,t,n){return p={name:t,styles:n,next:p},t}))}return 1===r[e]||l(e)||"number"!=typeof t||0===t?t:t+"px"},d="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function m(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return p={name:o.name,styles:o.styles,next:p},o.name;var s=n;if(void 0!==s.styles){var a=s.next;if(void 0!==a)for(;void 0!==a;)p={name:a.name,styles:a.styles,next:p},a=a.next;return s.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=m(e,t,n[o])+";";else for(var s in n){var a=n[s];if("object"!=typeof a){var l=a;null!=t&&void 0!==t[l]?r+=s+"{"+t[l]+"}":u(l)&&(r+=h(s)+":"+c(s,l)+";")}else{if("NO_COMPONENT_SELECTOR"===s&&i)throw new Error(d);if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var p=m(e,t,a);switch(s){case"animation":case"animationName":r+=h(s)+":"+p+";";break;default:r+=s+"{"+p+"}"}}else for(var f=0;f<a.length;f++)u(a[f])&&(r+=h(s)+":"+c(s,a[f])+";")}}return r}(e,t,n);case"function":if(void 0!==e){var l=p,f=n(e);return p=l,m(e,t,f)}}var g=n;if(null==t)return g;var y=t[g];return void 0!==y?y:g}var p,f=/label:\s*([^\s;{]+)\s*(;|$)/g;function g(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";p=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=m(n,t,i)):o+=i[0];for(var s=1;s<e.length;s++)o+=m(n,t,e[s]),r&&(o+=i[s]);f.lastIndex=0;for(var a,l="";null!==(a=f.exec(o));)l+="-"+a[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:p}}},43724:(e,t,n)=>{"use strict";var r=n(79039);e.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},43784:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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}})}(n(95093))},43861:function(e,t,n){!function(e){"use strict";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];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,/^फ़र/i,/^मार्च/i,/^अप्रै/i,/^मई/i,/^जून/i,/^जुल/i,/^अग/i,/^सित/i,/^अक्टू/i,/^नव/i,/^दिस/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}})}(n(95093))},44114:(e,t,n)=>{"use strict";var r=n(46518),o=n(48981),i=n(26198),s=n(34527),a=n(96837);r({target:"Array",proto:!0,arity:1,forced:n(79039)((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var t=o(this),n=i(t),r=arguments.length;a(n+r);for(var l=0;l<r;l++)t[n]=arguments[l],n++;return s(t,n),n}})},44124:(e,t,n)=>{"use strict";var r=n(44576);e.exports=function(e,t){var n=r[e],o=n&&n.prototype;return o&&o[t]}},44204:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402).add,i=n(89286),s=n(83789),a=n(40507);e.exports=function(e){var t=r(this),n=s(e).getIterator(),l=i(t);return a(n,(function(e){o(l,e)})),l}},44209:(e,t,n)=>{"use strict";var r=n(78227),o=n(26269),i=r("iterator"),s=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||s[i]===e)}},44429:function(e,t,n){!function(e){"use strict";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");case"mm":return r+(1===e?"minuta":2===e||3===e||4===e?"minute":"minuta");case"h":return"jedan sat";case"hh":return r+(1===e?"sat":2===e||3===e||4===e?"sata":"sati");case"dd":return r+(1===e?"dan":"dana");case"MM":return r+(1===e?"mjesec":2===e||3===e||4===e?"mjeseca":"mjeseci");case"yy":return r+(1===e?"godina":2===e||3===e||4===e?"godine":"godina")}}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:t,m:function(e,t,n,r){if("m"===n)return t?"jedna minuta":r?"jednu minutu":"jedne minute"},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}})}(n(95093))},44576:function(e,t,n){"use strict";var r=function(e){return e&&e.Math===Math&&e};e.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n.g&&n.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},45719:function(e,t,n){!function(e){"use strict";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,o){var i,s=t.words[r];return 1===r.length?"y"===r&&n?"jedna godina":o||n?s[0]:s[1]:(i=t.correctGrammaticalCase(e,s),"yy"===r&&n&&"godinu"===i?e+" godina":e+" "+i)}};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(){return["[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"][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}})}(n(95093))},45766:function(e,t,n){!function(e){"use strict";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?o(n)[0]:r?o(n)[1]:o(n)[2]}function r(e){return e%10==0||e>10&&e<20}function o(e){return t[e].split("_")}function i(e,t,i,s){var a=e+" ";return 1===e?a+n(0,t,i[0],s):t?a+(r(e)?o(i)[1]:o(i)[0]):s?a+o(i)[1]:a+(r(e)?o(i)[1]:o(i)[2])}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:function(e,t,n,r){return t?"kelios sekundės":r?"kelių sekundžių":"kelias sekundes"},ss:i,m:n,mm:i,h:n,hh:i,d:n,dd:i,M:n,MM:i,y:n,yy:i},dayOfMonthOrdinalParse:/\d{1,2}-oji/,ordinal:function(e){return e+"-oji"},week:{dow:1,doy:4}})}(n(95093))},45876:(e,t,n)=>{"use strict";var r=n(46518),o=n(53838);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("isSubsetOf",(function(e){return e}))},{isSubsetOf:o})},46518:(e,t,n)=>{"use strict";var r=n(44576),o=n(77347).f,i=n(66699),s=n(36840),a=n(39433),l=n(77740),u=n(92796);e.exports=function(e,t){var n,h,c,d,m,p=e.target,f=e.global,g=e.stat;if(n=f?r:g?r[p]||a(p,{}):r[p]&&r[p].prototype)for(h in t){if(d=t[h],c=e.dontCallGetSet?(m=o(n,h))&&m.value:n[h],!u(f?h:p+(g?".":"#")+h,e.forced)&&void 0!==c){if(typeof d==typeof c)continue;l(d,c)}(e.sham||c&&c.sham)&&i(d,"sham",!0),s(n,h,d,e)}}},46637:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o=e+" ";switch(n){case"s":return t||r?"nekaj sekund":"nekaj sekundami";case"ss":return o+(1===e?t?"sekundo":"sekundi":2===e?t||r?"sekundi":"sekundah":e<5?t||r?"sekunde":"sekundah":"sekund");case"m":return t?"ena minuta":"eno minuto";case"mm":return o+(1===e?t?"minuta":"minuto":2===e?t||r?"minuti":"minutama":e<5?t||r?"minute":"minutami":t||r?"minut":"minutami");case"h":return t?"ena ura":"eno uro";case"hh":return o+(1===e?t?"ura":"uro":2===e?t||r?"uri":"urama":e<5?t||r?"ure":"urami":t||r?"ur":"urami");case"d":return t||r?"en dan":"enim dnem";case"dd":return o+(1===e?t||r?"dan":"dnem":2===e?t||r?"dni":"dnevoma":t||r?"dni":"dnevi");case"M":return t||r?"en mesec":"enim mesecem";case"MM":return o+(1===e?t||r?"mesec":"mesecem":2===e?t||r?"meseca":"mesecema":e<5?t||r?"mesece":"meseci":t||r?"mesecev":"meseci");case"y":return t||r?"eno leto":"enim letom";case"yy":return o+(1===e?t||r?"leto":"letom":2===e?t||r?"leti":"letoma":e<5?t||r?"leta":"leti":t||r?"let":"leti")}}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}})}(n(95093))},46706:(e,t,n)=>{"use strict";var r=n(79504),o=n(79306);e.exports=function(e,t,n){try{return r(o(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},47055:(e,t,n)=>{"use strict";var r=n(79504),o=n(79039),i=n(22195),s=Object,a=r("".split);e.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?a(e,""):s(e)}:s},47195:(e,t,n)=>{"use strict";n.d(t,{A:()=>C});var r,o=n(96540),i=n(21362),s=n(98855),a=n(26739),l=n(39241),u=n(74848);const h=(0,a.Ay)("fieldset",{shouldForwardProp:s.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),c=(0,a.Ay)("legend",{shouldForwardProp:s.A})((0,l.A)((({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:e})=>!e.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:e})=>e.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:e})=>e.withLabel&&e.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]}))));var d=n(76761),m=n(93583),p=n(1321),f=n(20439),g=n(24890),y=n(79844),w=n(85078);const v=(0,a.Ay)(y.Sh,{shouldForwardProp:e=>(0,s.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:y.WC})((0,l.A)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${g.A.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter((0,p.A)()).map((([t])=>({props:{color:t},style:{[`&.${g.A.focused} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.A.error} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${g.A.disabled} .${g.A.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:14}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:14}},{props:({ownerState:e})=>e.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{padding:"8.5px 14px"}}]}}))),_=(0,a.Ay)((function(e){const{children:t,classes:n,className:o,label:i,notched:s,...a}=e,l=null!=i&&""!==i,d={...e,notched:s,withLabel:l};return(0,u.jsx)(h,{"aria-hidden":!0,className:o,ownerState:d,...a,children:(0,u.jsx)(c,{ownerState:d,children:l?(0,u.jsx)("span",{children:i}):r||(r=(0,u.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}),{name:"MuiOutlinedInput",slot:"NotchedOutline"})((0,l.A)((({theme:e})=>{const t="light"===e.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}}))),b=(0,a.Ay)(y.ck,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:y.Oj})((0,l.A)((({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:e})=>e.multiline,style:{padding:0}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}}]})))),S=o.forwardRef((function(e,t){const n=(0,f.b)({props:e,name:"MuiOutlinedInput"}),{components:r={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:h=!1,notched:c,slots:p={},slotProps:S={},type:C="text",...E}=n,M=(e=>{const{classes:t}=e,n=(0,i.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},g.v,t);return{...t,...n}})(n),T=(0,d.A)(),R=(0,m.A)({props:n,muiFormControl:T,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),A={...n,color:R.color||"primary",disabled:R.disabled,error:R.error,focused:R.focused,formControl:T,fullWidth:s,hiddenLabel:R.hiddenLabel,multiline:h,size:R.size,type:C},N=p.root??r.Root??v,L=p.input??r.Input??b,[x,O]=(0,w.A)("notchedOutline",{elementType:_,className:M.notchedOutline,shouldForwardComponentProp:!0,ownerState:A,externalForwardedProps:{slots:p,slotProps:S},additionalProps:{label:null!=l&&""!==l&&R.required?(0,u.jsxs)(o.Fragment,{children:[l," ","*"]}):l}});return(0,u.jsx)(y.Ay,{slots:{root:N,input:L},slotProps:S,renderSuffix:e=>(0,u.jsx)(x,{...O,notched:void 0!==c?c:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:s,inputComponent:a,multiline:h,ref:t,type:C,...E,classes:{...M,notchedOutline:null}})}));S.muiName="Input";const C=S},47400:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(31601),o=n.n(r),i=n(76314),s=n.n(i),a=n(4417),l=n.n(a),u=new URL(n(87026),n.b),h=new URL(n(12608),n.b),c=new URL(n(40500),n.b),d=new URL(n(87698),n.b),m=s()(o()),p=l()(u),f=l()(h),g=l()(c),y=l()(d);m.push([e.id,`@charset "UTF-8";\n /*!\n * Copyright (c) HANDSONCODE sp. z o. o.\n *\n * HANDSONTABLE is a software distributed by HANDSONCODE sp. z o. o., a Polish corporation based in\n * Gdynia, Poland, at Aleja Zwyciestwa 96-98, registered by the District Court in Gdansk under number\n * 538651, EU tax ID number: PL5862294002, share capital: PLN 62,800.00.\n *\n * This software is protected by applicable copyright laws, including international treaties, and dual-\n * licensed - depending on whether your use for commercial purposes, meaning intended for or\n * resulting in commercial advantage or monetary compensation, or not.\n *\n * If your use is strictly personal or solely for evaluation purposes, meaning for the purposes of testing\n * the suitability, performance, and usefulness of this software outside the production environment,\n * you agree to be bound by the terms included in the "handsontable-non-commercial-license.pdf" file.\n *\n * Your use of this software for commercial purposes is subject to the terms included in an applicable\n * license agreement.\n *\n * In any case, you must not make any such use of this software as to develop software which may be\n * considered competitive with this software.\n *\n * UNLESS EXPRESSLY AGREED OTHERWISE, HANDSONCODE PROVIDES THIS SOFTWARE ON AN "AS IS"\n * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, AND IN NO EVENT AND UNDER NO\n * LEGAL THEORY, SHALL HANDSONCODE BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT,\n * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER ARISING FROM\n * USE OR INABILITY TO USE THIS SOFTWARE.\n *\n * Version: 15.3.0\n * Release date: 29/04/2025 (built at 24/04/2025 10:59:25)\n */.handsontable .table td,.handsontable .table th{border-top:none}.handsontable tr{background:#fff}.handsontable td{background-color:inherit}.handsontable .table caption+thead tr:first-child td,.handsontable .table caption+thead tr:first-child th,.handsontable .table colgroup+thead tr:first-child td,.handsontable .table colgroup+thead tr:first-child th,.handsontable .table thead:first-child tr:first-child td,.handsontable .table thead:first-child tr:first-child th{border-top:1px solid #ccc}.handsontable .table-bordered{border:0;border-collapse:separate}.handsontable .table-bordered td,.handsontable .table-bordered th{border-left:none}.handsontable .table-bordered td:first-child,.handsontable .table-bordered th:first-child{border-left:1px solid #ccc}.handsontable .table>tbody>tr>td,.handsontable .table>tbody>tr>th,.handsontable .table>tfoot>tr>td,.handsontable .table>tfoot>tr>th,.handsontable .table>thead>tr>td,.handsontable .table>thead>tr>th{line-height:21px;padding:0}.col-lg-1.handsontable,.col-lg-10.handsontable,.col-lg-11.handsontable,.col-lg-12.handsontable,.col-lg-2.handsontable,.col-lg-3.handsontable,.col-lg-4.handsontable,.col-lg-5.handsontable,.col-lg-6.handsontable,.col-lg-7.handsontable,.col-lg-8.handsontable,.col-lg-9.handsontable,.col-md-1.handsontable,.col-md-10.handsontable,.col-md-11.handsontable,.col-md-12.handsontable,.col-md-2.handsontable,.col-md-3.handsontable,.col-md-4.handsontable,.col-md-5.handsontable,.col-md-6.handsontable,.col-md-7.handsontable,.col-md-8.handsontable,.col-md-9.handsontable .col-sm-1.handsontable,.col-sm-10.handsontable,.col-sm-11.handsontable,.col-sm-12.handsontable,.col-sm-2.handsontable,.col-sm-3.handsontable,.col-sm-4.handsontable,.col-sm-5.handsontable,.col-sm-6.handsontable,.col-sm-7.handsontable,.col-sm-8.handsontable,.col-sm-9.handsontable .col-xs-1.handsontable,.col-xs-10.handsontable,.col-xs-11.handsontable,.col-xs-12.handsontable,.col-xs-2.handsontable,.col-xs-3.handsontable,.col-xs-4.handsontable,.col-xs-5.handsontable,.col-xs-6.handsontable,.col-xs-7.handsontable,.col-xs-8.handsontable,.col-xs-9.handsontable{padding-left:0;padding-right:0}.handsontable .table-striped>tbody>tr:nth-of-type(2n){background-color:#fff}.handsontable .hide{display:none}.handsontable .relative{position:relative}.handsontable .wtHider{position:relative;width:0}.handsontable .wtSpreader{height:auto;position:relative;width:0}.handsontable div,.handsontable input,.handsontable table,.handsontable tbody,.handsontable td,.handsontable textarea,.handsontable th,.handsontable thead{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable input,.handsontable textarea{min-height:auto}.handsontable table.htCore{border-collapse:separate;border-spacing:0;border-width:0;cursor:default;margin:0;max-height:none;max-width:none;outline-width:0;table-layout:fixed;width:0}.handsontable col,.handsontable col.rowHeader{width:50px}.handsontable td,.handsontable th{background-color:#fff;border-bottom:1px solid #ccc;border-left-width:0;border-right:1px solid #ccc;border-top-width:0;empty-cells:show;height:22px;line-height:21px;outline:none;outline-width:0;overflow:hidden;padding:0 4px;vertical-align:top;white-space:pre-wrap}[dir=rtl].handsontable td,[dir=rtl].handsontable th{border-left:1px solid #ccc;border-right-width:0}.handsontable th:last-child{border-bottom:1px solid #ccc;border-left:none;border-right:1px solid #ccc}[dir=rtl].handsontable th:last-child{border-left:1px solid #ccc;border-right:none}.handsontable td:first-of-type,.handsontable th:first-child{border-left:1px solid #ccc}[dir=rtl].handsontable td:first-of-type,[dir=rtl].handsontable th:first-child{border-right:1px solid #ccc}.handsontable .ht_clone_top th:nth-child(2){border-left-width:0;border-right:1px solid #ccc}[dir=rtl].handsontable .ht_clone_top th:nth-child(2){border-left:1px solid #ccc;border-right-width:0}.handsontable.htRowHeaders thead tr th:nth-child(2){border-left:1px solid #ccc}[dir=rtl].handsontable.htRowHeaders thead tr th:nth-child(2){border-right:1px solid #ccc}.handsontable tr:first-child td,.handsontable tr:first-child th{border-top:1px solid #ccc}.ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,.ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-left:1px solid #ccc;border-right-width:0}[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns) tbody tr th,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns) thead tr th:first-child,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.htGhostTable) tbody tr th,[dir=rtl].ht_master:not(.innerBorderInlineStart):not(.emptyColumns)~.handsontable:not(.ht_clone_top):not(.htGhostTable) thead tr th:first-child{border-left-width:0;border-right:1px solid #ccc}.ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr.lastChild th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom) thead tr:last-child th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr.lastChild th,.ht_master:not(.innerBorderTop):not(.innerBorderBottom)~.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable th{background-color:#f0f0f0;color:#222;font-weight:400;text-align:center;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#ccc}.handsontable thead th .relative{padding:2px 4px}.handsontable span.colHeader{display:inline-block;line-height:1.1}.handsontable .wtBorder{font-size:0;position:absolute}.handsontable .wtBorder.hidden{display:none!important}.handsontable .wtBorder.current{z-index:10}.handsontable .wtBorder.area{z-index:8}.handsontable .wtBorder.fill{z-index:6}.handsontable .wtBorder.corner{cursor:crosshair;font-size:0}.ht_clone_master{z-index:100}.ht_clone_inline_start{z-index:120}.ht_clone_bottom{z-index:130}.ht_clone_bottom_inline_start_corner{z-index:150}.ht_clone_top{z-index:160}.ht_clone_top_inline_start_corner{z-index:180}.handsontable col.hidden{width:0!important}.handsontable tr.hidden,.handsontable tr.hidden td,.handsontable tr.hidden th{display:none}.ht_clone_bottom,.ht_clone_inline_start,.ht_clone_top,.ht_master{overflow:hidden}.ht_master .wtHolder{overflow:auto}.handsontable .ht_clone_inline_start table.htCore>thead,.handsontable .ht_master table.htCore>tbody>tr>th,.handsontable .ht_master table.htCore>thead{visibility:hidden}.ht_clone_bottom .wtHolder,.ht_clone_inline_start .wtHolder,.ht_clone_top .wtHolder{overflow:hidden}.handsontable{color:#373737;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Helvetica Neue,Arial,sans-serif;font-size:13px;font-weight:400;position:relative;touch-action:manipulation}.handsontable a{color:#104acc}.handsontable.htAutoSize{left:-99000px;position:absolute;top:-99000px;visibility:hidden}.handsontable td.htInvalid{background-color:#ffbeba!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable td.invisibleSelection,.handsontable th.invisibleSelection{outline:none}.handsontable td.invisibleSelection::selection,.handsontable th.invisibleSelection::selection{background:hsla(0,0%,100%,0)}.hot-display-license-info{color:#373737;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Helvetica Neue,Arial,sans-serif;font-size:10px;font-weight:400;padding:5px 0 3px;text-align:left}.hot-display-license-info a{color:#104acc;font-size:10px}.handsontable .htFocusCatcher{border:0;height:0;margin:0;opacity:0;padding:0;position:absolute;width:0;z-index:-1}.handsontable .manualColumnResizer{cursor:col-resize;height:25px;position:absolute;top:0;width:5px;z-index:210}.handsontable .manualRowResizer{cursor:row-resize;height:5px;left:0;position:absolute;width:50px;z-index:210}.handsontable .manualColumnResizer.active,.handsontable .manualColumnResizer:hover,.handsontable .manualRowResizer.active,.handsontable .manualRowResizer:hover{background-color:#34a9db}.handsontable .manualColumnResizerGuide{background-color:#34a9db;border-left:none;border-right:1px dashed #777;display:none;margin-left:5px;margin-right:unset;position:absolute;right:unset;top:0;width:0}[dir=rtl].handsontable .manualColumnResizerGuide{border-left:1px dashed #777;border-right:none;left:unset;margin-left:unset;margin-right:5px}.handsontable .manualRowResizerGuide{background-color:#34a9db;border-bottom:1px dashed #777;bottom:0;display:none;height:0;left:0;margin-top:5px;position:absolute}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block;z-index:209}.handsontable td.area,.handsontable td.area-1,.handsontable td.area-2,.handsontable td.area-3,.handsontable td.area-4,.handsontable td.area-5,.handsontable td.area-6,.handsontable td.area-7{position:relative}.handsontable td.area-1:before,.handsontable td.area-2:before,.handsontable td.area-3:before,.handsontable td.area-4:before,.handsontable td.area-5:before,.handsontable td.area-6:before,.handsontable td.area-7:before,.handsontable td.area:before{background:#005eff;bottom:0;content:"";left:0;position:absolute;right:0;top:0}.handsontable td.area:before{opacity:.1}.handsontable td.area-1:before{opacity:.2}.handsontable td.area-2:before{opacity:.27}.handsontable td.area-3:before{opacity:.35}.handsontable td.area-4:before{opacity:.41}.handsontable td.area-5:before{opacity:.47}.handsontable td.area-6:before{opacity:.54}.handsontable td.area-7:before{opacity:.58}.handsontable tbody th.current,.handsontable thead th.current{box-shadow:inset 0 0 0 2px #4b89ff}.handsontable tbody th.ht__highlight,.handsontable thead th.ht__highlight{background-color:#dcdcdc}.handsontable tbody th.ht__active_highlight,.handsontable thead th.ht__active_highlight{background-color:#8eb0e7;color:#000}.handsontableInput{background-color:#fff;border:none;border-radius:0;box-shadow:inset 0 0 0 2px #5292f7;box-sizing:border-box!important;color:#000;display:block;font-family:inherit;font-size:inherit;line-height:21px;margin:0;outline-width:0;padding:1px 5px 0;resize:none}.handsontableInput:focus{outline:none}.handsontableInputHolder{left:0;position:absolute;top:0}.htSelectEditor{position:absolute;select{-webkit-appearance:menulist-button!important;border:2px solid #4b89ff;box-sizing:border-box!important;height:100%;width:100%}}.htSelectEditor select:focus{outline:none}.htSelectEditor .htAutocompleteArrow{display:none}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu{position:relative}.handsontable .htSubmenu :after{color:#777;content:"▶";font-size:9px;position:absolute;right:5px}[dir=rtl].handsontable .htSubmenu :after{content:""}[dir=rtl].handsontable .htSubmenu :before{color:#777;content:"◀";font-size:9px;left:5px;position:absolute}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{background:#fff;border:1px solid #ccc;border-collapse:separate}.handsontable.listbox td,.handsontable.listbox th,.handsontable.listbox tr:first-child td,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th{border-color:transparent!important}.handsontable.listbox td,.handsontable.listbox th{text-overflow:ellipsis;white-space:nowrap}.handsontable.listbox td.htDimmed{color:inherit;cursor:default;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr td.current,.handsontable.listbox tr:hover td{background:#eee}.ht_editor_hidden{z-index:-1}.ht_editor_visible{z-index:200}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.handsontable.mobile,.handsontable.mobile .wtHolder{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-overflow-scrolling:touch}.handsontable.mobile .handsontableInput:focus{-webkit-appearance:none;-webkit-box-shadow:inset 0 0 0 2px #5292f7;-moz-box-shadow:inset 0 0 0 2px #5292f7;box-shadow:inset 0 0 0 2px #5292f7}.handsontable .bottomSelectionHandle,.handsontable .bottomSelectionHandle-HitArea,.handsontable .topSelectionHandle,.handsontable .topSelectionHandle-HitArea{left:-10000px;right:unset;top:-10000px;z-index:9999}[dir=rtl].handsontable .bottomSelectionHandle,[dir=rtl].handsontable .bottomSelectionHandle-HitArea,[dir=rtl].handsontable .topSelectionHandle,[dir=rtl].handsontable .topSelectionHandle-HitArea{left:unset;right:-10000px}.handsontable.hide-tween{-webkit-animation:opacity-hide .3s;animation:opacity-hide .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable.show-tween{-webkit-animation:opacity-show .3s;animation:opacity-show .3s;animation-fill-mode:forwards;-webkit-animation-fill-mode:forwards}.handsontable .htAutocompleteArrow{color:#bbb;cursor:default;float:right;font-size:10px;text-align:center;width:16px}[dir=rtl].handsontable .htAutocompleteArrow{float:left}.handsontable td.htInvalid .htAutocompleteArrow{color:#555}.handsontable td.htInvalid .htAutocompleteArrow:hover{color:#1a1a1a}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable td.area .htAutocompleteArrow{color:#d3d3d3}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htCheckboxRendererLabel{cursor:pointer;display:inline-block;font-size:inherit;vertical-align:middle}.handsontable .htCheckboxRendererLabel.fullWidth{width:100%}.handsontable .collapsibleIndicator{background:#eee;border:1px solid #a6a6a6;border-radius:10px;-webkit-box-shadow:0 0 0 6px #eee;-moz-box-shadow:0 0 0 6px #eee;box-shadow:0 0 0 3px #eee;color:#222;cursor:pointer;font-size:10px;height:10px;left:unset;line-height:8px;position:absolute;right:5px;text-align:center;top:50%;transform:translateY(-50%);width:10px}[dir=rtl].handsontable .collapsibleIndicator{left:5px;right:unset}.handsontable[dir=ltr] thead th:has(.collapsibleIndicator) div.htRight span.colHeader{margin-right:20px}.handsontable[dir=rtl] thead th:has(.collapsibleIndicator) div.htLeft span.colHeader{margin-left:20px}.handsontable .columnSorting{position:relative}.handsontable[dir=ltr] div.htRight span[class*=ascending],.handsontable[dir=ltr] div.htRight span[class*=descending]{margin-left:-10px;margin-right:10px}.handsontable[dir=rtl] div.htLeft span[class*=ascending],.handsontable[dir=rtl] div.htLeft span[class*=descending]{margin-left:10px;margin-right:-10px}.handsontable[dir=ltr] div.htRight span[class*=ascending]:only-child,.handsontable[dir=ltr] div.htRight span[class*=descending]:only-child{margin-left:-15px;margin-right:15px}.handsontable[dir=rtl] div.htLeft span[class*=ascending]:only-child,.handsontable[dir=rtl] div.htLeft span[class*=descending]:only-child{margin-left:15px;margin-right:-15px}.handsontable .columnSorting.sortAction:hover{cursor:pointer;text-decoration:underline}.handsontable span.colHeader.columnSorting:before{background-position-x:right;background-repeat:no-repeat;background-size:contain;content:"";height:10px;left:unset;margin-top:-6px;padding-left:8px;padding-right:0;position:absolute;right:-9px;top:50%;width:5px}[dir=rtl].handsontable span.colHeader.columnSorting:before{background-position-x:left;left:-9px;padding-left:0;padding-right:8px;right:unset}.handsontable span.colHeader.columnSorting.ascending:before{background-image:url(${p})}.handsontable span.colHeader.columnSorting.descending:before{background-image:url(${f})}.htGhostTable .htCore span.colHeader.columnSorting:not(.indicatorDisabled):before{content:"*";display:inline-block;padding-right:20px;position:relative}.handsontable.htGhostTable table thead th{border-bottom-width:0}.handsontable.htGhostTable table tbody tr td,.handsontable.htGhostTable table tbody tr th{border-top-width:0}.handsontable .htCommentCell{position:relative}.handsontable .htCommentCell:after{border-left:6px solid transparent;border-right:none;border-top:6px solid #000;content:"";left:unset;position:absolute;right:0;top:0}[dir=rtl].handsontable .htCommentCell:after{border-left:none;border-right:6px solid transparent;left:0;right:unset}.htCommentsContainer .htComments{display:none;position:absolute;z-index:1059}.htCommentsContainer .htCommentTextArea{-webkit-appearance:none;background-color:#fff;border:none;border-left:3px solid #ccc;box-shadow:0 1px 3px rgba(0,0,0,.118),0 1px 2px rgba(0,0,0,.239);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;font-size:12px;height:90px;outline:0!important;padding:5px;width:215px}[dir=rtl].htCommentsContainer .htCommentTextArea{border-left:none;border-right:3px solid #ccc}.htCommentsContainer .htCommentTextArea:focus{border-left:3px solid #5292f7;border-right:none;box-shadow:0 1px 3px rgba(0,0,0,.118),0 1px 2px rgba(0,0,0,.239),inset 0 0 0 1px #5292f7}[dir=rtl].htCommentsContainer .htCommentTextArea:focus{border-left:none;border-right:3px solid #5292f7}\n/*!\n * Handsontable ContextMenu\n */.htContextMenu:not(.htGhostTable){display:none;position:absolute;z-index:1060}.htContextMenu .ht_clone_bottom,.htContextMenu .ht_clone_bottom_inline_start_corner,.htContextMenu .ht_clone_inline_start,.htContextMenu .ht_clone_top,.htContextMenu .ht_clone_top_inline_start_corner{display:none}.htContextMenu .ht_master table.htCore{border-color:#ccc;border-style:solid;border-width:1px 2px 2px 1px}[dir=rtl].htContextMenu .ht_master table.htCore{border-left-width:2px;border-right-width:1px}.htContextMenu.handsontable:focus{outline:none}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htContextMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htContextMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htContextMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htContextMenu table tbody tr td.current{background:#f3f3f3}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;cursor:default;height:0;padding:0}.htContextMenu table tbody tr td.htDisabled{color:#999;cursor:default}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htContextMenu table tbody tr.htHidden{display:none}.htContextMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:6px}[dir=rtl].htContextMenu table tbody tr td .htItemWrapper{margin-left:6px;margin-right:10px}.htContextMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute;right:0}[dir=rtl].htContextMenu table tbody tr td div span.selected{left:0;right:4px}.htContextMenu .ht_master .wtHolder{overflow:hidden}textarea.HandsontableCopyPaste{opacity:0;outline:0 none!important;overflow:hidden;position:fixed!important;right:100%!important;top:0!important}\n\n/*!\n * Handsontable DropdownMenu\n */.handsontable .changeType{background:#eee;border:1px solid #bbb;border-radius:2px;color:#bbb;float:right;font-size:9px;line-height:9px;margin:3px 1px 0 5px;padding:2px}[dir=rtl].handsontable .changeType{float:left}.handsontable[dir=rtl] .changeType{margin:3px 5px 0 1px}.handsontable .changeType:before{content:"▼ "}.handsontable .changeType:hover{border:1px solid #777;color:#777;cursor:pointer}.htDropdownMenu:not(.htGhostTable){display:none;position:absolute;z-index:1060}.htDropdownMenu .ht_clone_bottom,.htDropdownMenu .ht_clone_bottom_inline_start_corner,.htDropdownMenu .ht_clone_inline_start,.htDropdownMenu .ht_clone_top,.htDropdownMenu .ht_clone_top_inline_start_corner{display:none}.htDropdownMenu table.htCore{border-color:#ccc;border-style:solid;border-width:1px 2px 2px 1px}[dir=rtl].htDropdownMenu table.htCore{border-left-width:2px;border-right-width:1px}.htDropdownMenu.handsontable:focus{outline:none}.htDropdownMenu .wtBorder{visibility:hidden}.htDropdownMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htDropdownMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htDropdownMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htDropdownMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htDropdownMenu table tbody tr td.current{background:#e9e9e9}.htDropdownMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;cursor:default;height:0;padding:0}.htDropdownMenu table tbody tr td.htDisabled{color:#999}.htDropdownMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htDropdownMenu:not(.htGhostTable) table tbody tr.htHidden{display:none}.htDropdownMenu table tbody tr td .htItemWrapper,[dir=rtl].htDropdownMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:10px}.htDropdownMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute;right:0}[dir=rtl].htDropdownMenu table tbody tr td div span.selected{left:0;right:4px}.htDropdownMenu .ht_master .wtHolder{overflow:hidden}\n\n/*!\n * Handsontable Filters\n */.htFiltersConditionsMenu:not(.htGhostTable){display:none;position:absolute;z-index:1070}.htFiltersConditionsMenu .ht_clone_bottom,.htFiltersConditionsMenu .ht_clone_bottom_inline_start_corner,.htFiltersConditionsMenu .ht_clone_inline_start,.htFiltersConditionsMenu .ht_clone_top,.htFiltersConditionsMenu .ht_clone_top_inline_start_corner{display:none}.htFiltersConditionsMenu table.htCore{border-color:#bbb;border-style:solid;border-width:1px 2px 2px 1px}.htFiltersConditionsMenu .wtBorder{visibility:hidden}.htFiltersConditionsMenu table tbody tr td{background:#fff;border-width:0;cursor:pointer;overflow:hidden;padding:4px 6px 0;text-overflow:ellipsis;white-space:nowrap}.htFiltersConditionsMenu table tbody tr td:first-child{border-width:0}[dir=rtl].htFiltersConditionsMenu table tbody tr td:first-child{border-left-width:0;border-right-width:0}.htFiltersConditionsMenu table tbody tr td.htDimmed{color:#323232;font-style:normal}.htFiltersConditionsMenu table tbody tr td.current{background:#e9e9e9}.htFiltersConditionsMenu table tbody tr td.htSeparator{border-top:1px solid #e6e6e6;height:0;padding:0}.htFiltersConditionsMenu table tbody tr td.htDisabled{color:#999}.htFiltersConditionsMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htFiltersConditionsMenu table tbody tr td .htItemWrapper{margin-left:10px;margin-right:10px}.htFiltersConditionsMenu table tbody tr td div span.selected{left:4px;margin-top:-2px;position:absolute}.htFiltersConditionsMenu .ht_master .wtHolder{overflow:hidden}.handsontable .htMenuFiltering{border-bottom:1px dotted #ccc;height:135px;overflow:hidden}.handsontable .ht_master table td.htCustomMenuRenderer{background-color:#fff;cursor:auto}.handsontable .htFiltersMenuLabel{font-size:.75em}.handsontable .htFiltersMenuActionBar{padding-bottom:3px;padding-top:10px;text-align:center}.handsontable .htFiltersMenuCondition.border{border-bottom:1px dotted #ccc!important}.handsontable .htFiltersMenuCondition .htUIInput{padding:0 0 5px}.handsontable .htFiltersMenuValue{border-bottom:1px dotted #ccc!important}.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch{padding:0}.handsontable .htFiltersMenuCondition .htUIInput input,.handsontable .htFiltersMenuValue .htUIMultipleSelectSearch input{box-sizing:border-box;font-family:inherit;font-size:.75em;padding:4px;width:100%}.htUIMultipleSelect .ht_master .wtHolder{overflow:auto}.handsontable .htFiltersActive .changeType{background-color:#d2e0d9;border:1px solid #509272;color:#18804e}.handsontable .htUISelectAll{margin-left:0;margin-right:10px}[dir=rtl].handsontable .htUISelectAll{margin-left:10px;margin-right:0}.handsontable .htUIClearAll,.handsontable .htUISelectAll{display:inline-block}.handsontable .htUIClearAll a,.handsontable .htUISelectAll a{font-size:.75em}.handsontable .htUISelectionControls{text-align:right}[dir=rtl].handsontable .htUISelectionControls{text-align:left}.handsontable .htCheckboxRendererInput{display:inline-block;height:1em;margin:0 5px 0 0;vertical-align:middle}[dir=rtl].handsontable .htCheckboxRendererInput{margin-left:5px;margin-right:0}.handsontable .htUIInput{padding:3px 0 7px;position:relative;text-align:center}.handsontable .htUIInput input{border:1px solid #d2d1d1;border-radius:2px}.handsontable .htUIInputIcon{position:absolute}.handsontable .htUIInput.htUIButton{cursor:pointer;display:inline-block}.handsontable .htUIInput.htUIButton input{background-color:#eee;color:#000;cursor:pointer;font-family:inherit;font-size:.75em;font-weight:700;height:19px;min-width:64px}.handsontable .htUIInput.htUIButton input:hover{border-color:#b9b9b9}.handsontable .htUIInput.htUIButtonOK{margin-left:0;margin-right:10px}[dir=rtl].handsontable .htUIInput.htUIButtonOK{margin-left:10px;margin-right:0}.handsontable .htUIInput.htUIButtonOK input{background-color:#0f9d58;border-color:#18804e;color:#fff}.handsontable .htUIInput.htUIButtonOK input:focus-visible{background-color:#92dd8d;border-color:#7cb878;color:#000}.handsontable .htUIInput.htUIButtonOK input:hover{border-color:#1a6f46}.handsontable .htUISelect{cursor:pointer;margin-bottom:7px;position:relative}.handsontable .htUISelectCaption{background-color:#e8e8e8;border:1px solid #d2d1d1;border-radius:2px;font-family:inherit;font-size:.75em;font-weight:700;overflow:hidden;padding:3px 20px 3px 10px;text-overflow:ellipsis;white-space:nowrap}.handsontable .htUISelectCaption:hover{background-color:#e8e8e8;border:1px solid #b9b9b9}.handsontable .htUISelectDropdown:after{content:"▲";font-size:7px;position:absolute;right:10px;top:0}.handsontable .htUISelectDropdown:before{content:"▼";font-size:7px;position:absolute;right:10px;top:8px}.handsontable .htUIMultipleSelect .handsontable .htCore{border:none}.handsontable .htUIMultipleSelect .handsontable .htCore td:hover{background-color:#f5f5f5}.handsontable .htUIMultipleSelectSearch input{border:1px solid #d2d1d1;border-radius:2px;padding:3px}.handsontable .htUIRadio{display:inline-block;height:100%;margin-left:0;margin-right:5px}[dir=rtl].handsontable .htUIRadio{margin-left:5px;margin-right:0}.handsontable .htUIRadio:last-child{margin-right:0}.handsontable .htUIRadio>input[type=radio]{margin-left:0;margin-right:.5ex}[dir=rtl].handsontable .htUIRadio>input[type=radio]{margin-left:.5ex;margin-right:0}.handsontable .htUIRadio label{vertical-align:middle}.handsontable .htFiltersMenuOperators{padding-bottom:5px}.handsontable th.beforeHiddenColumn{position:relative}.handsontable th.afterHiddenColumn:before,.handsontable th.beforeHiddenColumn:after{color:#bbb;font-size:5pt;position:absolute;top:50%;transform:translateY(-50%)}.handsontable th.afterHiddenColumn{position:relative}.handsontable[dir=ltr] th.afterHiddenColumn div.htLeft{margin-left:10px}.handsontable[dir=ltr] th.beforeHiddenColumn div.htRight,.handsontable[dir=rtl] th.afterHiddenColumn div.htRight{margin-right:10px}.handsontable[dir=rtl] th.beforeHiddenColumn div.htLeft{margin-left:10px}.handsontable th.beforeHiddenColumn:after{content:"◀";right:1px}[dir=rtl].handsontable th.beforeHiddenColumn:after{content:"▶";left:1px;right:auto}.handsontable th.afterHiddenColumn:before{content:"▶";left:1px}[dir=rtl].handsontable th.afterHiddenColumn:before{content:"◀";left:auto;right:1px}\n\n/*!\n * Handsontable HiddenRows\n */.handsontable th.afterHiddenRow:after,.handsontable th.beforeHiddenRow:before{color:#bbb;font-size:6pt;left:2px;line-height:6pt;position:absolute}.handsontable th.afterHiddenRow,.handsontable th.beforeHiddenRow{position:relative}.handsontable th.beforeHiddenRow:before{bottom:2px;content:"▲"}.handsontable th.afterHiddenRow:after{content:"▼";top:2px}.handsontable.ht__selection--rows tbody th.afterHiddenRow.ht__highlight:after,.handsontable.ht__selection--rows tbody th.beforeHiddenRow.ht__highlight:before{color:#eee}.handsontable td.afterHiddenRow.firstVisibleRow,.handsontable th.afterHiddenRow.firstVisibleRow{border-top:1px solid #ccc}.htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_inline_start td:first-of-type,.htRowHeaders .ht_master.innerBorderInlineStart~.ht_clone_top_inline_start_corner th:nth-child(2){border-left:0}.handsontable.ht__manualColumnMove.after-selection--columns thead th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualColumnMove.on-moving--columns *,.handsontable.ht__manualColumnMove.on-moving--columns thead th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualColumnMove.on-moving--columns .manualColumnResizer{display:none}.handsontable .ht__manualColumnMove--backlight,.handsontable .ht__manualColumnMove--guideline{display:none;height:100%;position:absolute}.handsontable .ht__manualColumnMove--guideline{background:#757575;margin-inline-end:0;margin-inline-start:-1px;top:0;width:2px;z-index:205}.handsontable .ht__manualColumnMove--backlight{background:#343434;background:rgba(52,52,52,.25);display:none;pointer-events:none;z-index:205}.handsontable.on-moving--columns .ht__manualColumnMove--backlight,.handsontable.on-moving--columns.show-ui .ht__manualColumnMove--guideline{display:block}.handsontable.ht__manualRowMove.after-selection--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grab;cursor:-webkit-grab;cursor:grab}.handsontable.ht__manualRowMove.on-moving--rows *,.handsontable.ht__manualRowMove.on-moving--rows tbody th.ht__highlight{cursor:move;cursor:-moz-grabbing;cursor:-webkit-grabbing;cursor:grabbing}.handsontable.ht__manualRowMove.on-moving--rows .manualRowResizer{display:none}.handsontable .ht__manualRowMove--backlight,.handsontable .ht__manualRowMove--guideline{display:none;position:absolute;width:100%}.handsontable .ht__manualRowMove--guideline{background:#757575;height:2px;left:0;margin-top:-1px;z-index:205}.handsontable .ht__manualRowMove--backlight{background:#343434;background:rgba(52,52,52,.25);display:none;pointer-events:none;z-index:205}.handsontable.on-moving--rows .ht__manualRowMove--backlight,.handsontable.on-moving--rows.show-ui .ht__manualRowMove--guideline{display:block}.handsontable tbody td[rowspan][class*=area][class*=highlight]:not([class*=fullySelectedMergedCell]):before{opacity:0}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-0]:before,.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-multiple]:before{opacity:.1}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-1]:before{opacity:.2}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-2]:before{opacity:.27}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-3]:before{opacity:.35}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-4]:before{opacity:.41}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-5]:before{opacity:.47}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-6]:before{opacity:.54}.handsontable tbody td[rowspan][class*=area][class*=highlight][class*=fullySelectedMergedCell-7]:before{opacity:.58}.handsontable[dir=ltr] div.htRight span[class*=sort-]{margin-left:-15px;margin-right:15px}.handsontable[dir=rtl] div.htLeft span[class*=sort-]{margin-left:15px;margin-right:-15px}.handsontable[dir=ltr] div.htRight span[class*=sort-]:only-child{margin-left:-20px;margin-right:20px}.handsontable[dir=rtl] div.htLeft span[class*=sort-]:only-child{margin-left:20px;margin-right:-20px}.handsontable span.colHeader.columnSorting:after{font-size:8px;height:8px;left:unset;line-height:1.1;margin-top:-2px;padding-left:5px;padding-right:unset;position:absolute;right:-15px;top:50%}[dir=rtl].handsontable span.colHeader.columnSorting:after{left:-15px;padding-left:unset;padding-right:5px;right:unset}.handsontable span.colHeader.columnSorting[class*=" sort-"]:after,.handsontable span.colHeader.columnSorting[class^=sort-]:after{content:"+"}.handsontable span.colHeader.columnSorting.sort-1:after{content:"1"}.handsontable span.colHeader.columnSorting.sort-2:after{content:"2"}.handsontable span.colHeader.columnSorting.sort-3:after{content:"3"}.handsontable span.colHeader.columnSorting.sort-4:after{content:"4"}.handsontable span.colHeader.columnSorting.sort-5:after{content:"5"}.handsontable span.colHeader.columnSorting.sort-6:after{content:"6"}.handsontable span.colHeader.columnSorting.sort-7:after{content:"7"}.htGhostTable th div button.changeType+span.colHeader.columnSorting:not(.indicatorDisabled){padding-right:5px}.handsontable thead th.hiddenHeader:not(:first-of-type){display:none}thead th.hiddenHeaderText .colHeader{opacity:0}.handsontable th.ht_nestingLevels{padding-left:7px;text-align:left}[dir=rtl].handsontable th.ht_nestingLevels{padding-right:7px;text-align:right}.handsontable th div.ht_nestingLevels{display:inline-block;left:11px;position:absolute;right:unset}[dir=rtl].handsontable th div.ht_nestingLevels{left:unset;right:11px}.handsontable.innerBorderInlineStart th div.ht_nestingLevels,.handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingLevels{left:unset;right:10px}[dir=rtl].handsontable.innerBorderInlineStart th div.ht_nestingLevels,[dir=rtl].handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingLevels{left:10px;right:unset}.handsontable th span.ht_nestingLevel{display:inline-block}.handsontable th span.ht_nestingLevel_empty{display:inline-block;float:left;height:1px;width:10px}[dir=rtl].handsontable th span.ht_nestingLevel_empty{float:right}.handsontable th span.ht_nestingLevel:after{bottom:3px;content:"┐";display:inline-block;font-size:9px;position:relative}.handsontable th div.ht_nestingButton{cursor:pointer;display:inline-block;left:unset;position:absolute;right:-2px}[dir=rtl].handsontable th div.ht_nestingButton{left:-2px;right:unset}.handsontable th div.ht_nestingButton.ht_nestingExpand:after{content:"+"}.handsontable th div.ht_nestingButton.ht_nestingCollapse:after{content:"-"}.handsontable.innerBorderInlineStart th div.ht_nestingButton,.handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingButton{left:unset;right:0}[dir=rtl].handsontable.innerBorderInlineStart th div.ht_nestingButton,[dir=rtl].handsontable.innerBorderInlineStart~.handsontable th div.ht_nestingButton{left:0;right:unset}\n\n/*!\n * Pikaday\n * Copyright © 2014 David Bushell | BSD & MIT license | https://dbushell.com/\n */.pika-single{background:#fff;border:1px solid;border-color:#ccc #ccc #bbb;color:#333;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;position:relative;z-index:9999}.pika-single:after,.pika-single:before{content:" ";display:table}.pika-single:after{clear:both}.pika-single.is-hidden{display:none}.pika-single.is-bound{box-shadow:0 5px 15px -5px rgba(0,0,0,.5);position:absolute}.pika-lendar{float:left;margin:8px;width:240px}.pika-title{position:relative;text-align:center}.pika-label{background-color:#fff;display:inline-block;font-size:14px;font-weight:700;line-height:20px;margin:0;overflow:hidden;padding:5px 3px;position:relative;z-index:9999}.pika-title select{cursor:pointer;left:0;margin:0;opacity:0;position:absolute;top:5px;z-index:9998}.pika-next,.pika-prev{background-color:transparent;background-position:50%;background-repeat:no-repeat;background-size:75% 75%;border:0;cursor:pointer;display:block;height:30px;opacity:.5;outline:none;overflow:hidden;padding:0;position:relative;text-indent:20px;white-space:nowrap;width:20px}.pika-next:hover,.pika-prev:hover{opacity:1}.is-rtl .pika-next,.pika-prev{background-image:url(${g});float:left}.is-rtl .pika-prev,.pika-next{background-image:url(${y});float:right}.pika-next.is-disabled,.pika-prev.is-disabled{cursor:default;opacity:.2}.pika-select{display:inline-block}.pika-table{border:0;border-collapse:collapse;border-spacing:0;width:100%}.pika-table td,.pika-table th{padding:0;width:14.285714285714286%}.pika-table th{color:#999;font-weight:700;line-height:25px}.pika-button,.pika-table th{font-size:12px;text-align:center}.pika-button{background:#f5f5f5;border:0;box-sizing:border-box;-moz-box-sizing:border-box;color:#666;cursor:pointer;display:block;height:auto;line-height:15px;margin:0;outline:none;padding:5px;width:100%}.pika-week{color:#999;font-size:11px}.is-today .pika-button{color:#3af;font-weight:700}.has-event .pika-button,.is-selected .pika-button{background:#3af;border-radius:3px;box-shadow:inset 0 1px 3px #178fe5;color:#fff;font-weight:700}.has-event .pika-button{background:#005da9;box-shadow:inset 0 1px 3px #0076c9}.is-disabled .pika-button,.is-inrange .pika-button{background:#d5e9f7}.is-startrange .pika-button{background:#6cb31d;border-radius:3px;box-shadow:none;color:#fff}.is-endrange .pika-button{background:#3af;border-radius:3px;box-shadow:none;color:#fff}.is-disabled .pika-button{color:#999;cursor:default;opacity:.3;pointer-events:none}.is-outside-current-month .pika-button{color:#999;opacity:.3}.is-selection-disabled{cursor:default;pointer-events:none}.pika-button:hover,.pika-row.pick-whole-week:hover .pika-button{background:#ff8000;border-radius:3px;box-shadow:none;color:#fff}.pika-table abbr{border-bottom:none;cursor:help}`,""]);const w=m},47777:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},48046:(e,t,n)=>{"use strict";n.d(t,{H:()=>i,N:()=>o});var r=n(77325);function o(e,t,n){return[...e.slice(0,t),...n,...e.slice(t)]}function i(e,t){return(0,r.y0)(e,(e=>!1===t.includes(e)))}},48303:function(e,t,n){!function(e){"use strict";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"})}(n(95093))},48386:(e,t,n)=>{"use strict";n.d(t,{_:()=>i});var r=n(41895),o=n(77792);class i extends r.n{insert(e,t){this.indexedValues=(0,o.N)(this.indexedValues,e,t,this.initValueOrFn),super.insert(e,t)}remove(e){this.indexedValues=(0,o.H)(this.indexedValues,e),super.remove(e)}}},48414:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},48646:(e,t,n)=>{"use strict";var r=n(69565),o=n(28551),i=n(1767),s=n(50851);e.exports=function(e,t){t&&"string"==typeof e||o(e);var n=s(e);return i(o(void 0!==n?r(n,e):e))}},48686:(e,t,n)=>{"use strict";var r=n(43724),o=n(79039);e.exports=r&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},48773:(e,t)=>{"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,o=r&&!n.call({1:2},1);t.f=o?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},48981:(e,t,n)=>{"use strict";var r=n(67750),o=Object;e.exports=function(e){return o(r(e))}},49138:(e,t,n)=>{"use strict";n.r(t),n.d(t,{CHECKBOX_CHECKED:()=>Le,CHECKBOX_RENDERER_NAMESPACE:()=>Ne,CHECKBOX_UNCHECKED:()=>xe,CONTEXTMENU_ITEMS_ADD_COMMENT:()=>E,CONTEXTMENU_ITEMS_ALIGNMENT:()=>A,CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM:()=>D,CONTEXTMENU_ITEMS_ALIGNMENT_CENTER:()=>L,CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY:()=>O,CONTEXTMENU_ITEMS_ALIGNMENT_LEFT:()=>N,CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE:()=>k,CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT:()=>x,CONTEXTMENU_ITEMS_ALIGNMENT_TOP:()=>I,CONTEXTMENU_ITEMS_BORDERS:()=>P,CONTEXTMENU_ITEMS_BORDERS_BOTTOM:()=>Y,CONTEXTMENU_ITEMS_BORDERS_LEFT:()=>V,CONTEXTMENU_ITEMS_BORDERS_RIGHT:()=>F,CONTEXTMENU_ITEMS_BORDERS_TOP:()=>H,CONTEXTMENU_ITEMS_CLEAR_COLUMN:()=>p,CONTEXTMENU_ITEMS_COPY:()=>f,CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY:()=>w,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS:()=>y,CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS:()=>g,CONTEXTMENU_ITEMS_CUT:()=>v,CONTEXTMENU_ITEMS_EDIT_COMMENT:()=>M,CONTEXTMENU_ITEMS_FREEZE_COLUMN:()=>_,CONTEXTMENU_ITEMS_HIDE_COLUMN:()=>j,CONTEXTMENU_ITEMS_HIDE_ROW:()=>G,CONTEXTMENU_ITEMS_INSERT_LEFT:()=>a,CONTEXTMENU_ITEMS_INSERT_RIGHT:()=>l,CONTEXTMENU_ITEMS_MERGE_CELLS:()=>S,CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD:()=>W,CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD:()=>B,CONTEXTMENU_ITEMS_NO_ITEMS:()=>o,CONTEXTMENU_ITEMS_READ_ONLY:()=>m,CONTEXTMENU_ITEMS_READ_ONLY_COMMENT:()=>R,CONTEXTMENU_ITEMS_REDO:()=>d,CONTEXTMENU_ITEMS_REMOVE_BORDERS:()=>U,CONTEXTMENU_ITEMS_REMOVE_COLUMN:()=>h,CONTEXTMENU_ITEMS_REMOVE_COMMENT:()=>T,CONTEXTMENU_ITEMS_REMOVE_ROW:()=>u,CONTEXTMENU_ITEMS_ROW_ABOVE:()=>i,CONTEXTMENU_ITEMS_ROW_BELOW:()=>s,CONTEXTMENU_ITEMS_SHOW_COLUMN:()=>z,CONTEXTMENU_ITEMS_SHOW_ROW:()=>$,CONTEXTMENU_ITEMS_UNDO:()=>c,CONTEXTMENU_ITEMS_UNFREEZE_COLUMN:()=>b,CONTEXTMENU_ITEMS_UNMERGE_CELLS:()=>C,CONTEXT_MENU_ITEMS_NAMESPACE:()=>r,FILTERS_BUTTONS_CANCEL:()=>Me,FILTERS_BUTTONS_CLEAR:()=>Ce,FILTERS_BUTTONS_OK:()=>Ee,FILTERS_BUTTONS_PLACEHOLDER_SEARCH:()=>Te,FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE:()=>Ae,FILTERS_BUTTONS_PLACEHOLDER_VALUE:()=>Re,FILTERS_BUTTONS_SELECT_ALL:()=>Se,FILTERS_CONDITIONS_AFTER:()=>de,FILTERS_CONDITIONS_BEFORE:()=>me,FILTERS_CONDITIONS_BEGINS_WITH:()=>te,FILTERS_CONDITIONS_BETWEEN:()=>he,FILTERS_CONDITIONS_BY_VALUE:()=>ie,FILTERS_CONDITIONS_CONTAINS:()=>re,FILTERS_CONDITIONS_EMPTY:()=>Q,FILTERS_CONDITIONS_ENDS_WITH:()=>ne,FILTERS_CONDITIONS_EQUAL:()=>Z,FILTERS_CONDITIONS_GREATER_THAN:()=>se,FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL:()=>ae,FILTERS_CONDITIONS_LESS_THAN:()=>le,FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL:()=>ue,FILTERS_CONDITIONS_NAMESPACE:()=>X,FILTERS_CONDITIONS_NONE:()=>q,FILTERS_CONDITIONS_NOT_BETWEEN:()=>ce,FILTERS_CONDITIONS_NOT_CONTAIN:()=>oe,FILTERS_CONDITIONS_NOT_EMPTY:()=>J,FILTERS_CONDITIONS_NOT_EQUAL:()=>ee,FILTERS_CONDITIONS_TODAY:()=>pe,FILTERS_CONDITIONS_TOMORROW:()=>fe,FILTERS_CONDITIONS_YESTERDAY:()=>ge,FILTERS_DIVS_FILTER_BY_CONDITION:()=>ye,FILTERS_DIVS_FILTER_BY_VALUE:()=>we,FILTERS_LABELS_CONJUNCTION:()=>ve,FILTERS_LABELS_DISJUNCTION:()=>_e,FILTERS_NAMESPACE:()=>K,FILTERS_VALUES_BLANK_CELLS:()=>be});const r="ContextMenu:items",o=`${r}.noItems`,i=`${r}.insertRowAbove`,s=`${r}.insertRowBelow`,a=`${r}.insertColumnOnTheLeft`,l=`${r}.insertColumnOnTheRight`,u=`${r}.removeRow`,h=`${r}.removeColumn`,c=`${r}.undo`,d=`${r}.redo`,m=`${r}.readOnly`,p=`${r}.clearColumn`,f=`${r}.copy`,g=`${r}.copyWithHeaders`,y=`${r}.copyWithGroupHeaders`,w=`${r}.copyHeadersOnly`,v=`${r}.cut`,_=`${r}.freezeColumn`,b=`${r}.unfreezeColumn`,S=`${r}.mergeCells`,C=`${r}.unmergeCells`,E=`${r}.addComment`,M=`${r}.editComment`,T=`${r}.removeComment`,R=`${r}.readOnlyComment`,A=`${r}.align`,N=`${r}.align.left`,L=`${r}.align.center`,x=`${r}.align.right`,O=`${r}.align.justify`,I=`${r}.align.top`,k=`${r}.align.middle`,D=`${r}.align.bottom`,P=`${r}.borders`,H=`${r}.borders.top`,F=`${r}.borders.right`,Y=`${r}.borders.bottom`,V=`${r}.borders.left`,U=`${r}.borders.remove`,B=`${r}.nestedHeaders.insertChildRow`,W=`${r}.nestedHeaders.detachFromParent`,j=`${r}.hideColumn`,z=`${r}.showColumn`,G=`${r}.hideRow`,$=`${r}.showRow`,K="Filters:",X=`${K}conditions`,q=`${X}.none`,Q=`${X}.isEmpty`,J=`${X}.isNotEmpty`,Z=`${X}.isEqualTo`,ee=`${X}.isNotEqualTo`,te=`${X}.beginsWith`,ne=`${X}.endsWith`,re=`${X}.contains`,oe=`${X}.doesNotContain`,ie=`${X}.byValue`,se=`${X}.greaterThan`,ae=`${X}.greaterThanOrEqualTo`,le=`${X}.lessThan`,ue=`${X}.lessThanOrEqualTo`,he=`${X}.isBetween`,ce=`${X}.isNotBetween`,de=`${X}.after`,me=`${X}.before`,pe=`${X}.today`,fe=`${X}.tomorrow`,ge=`${X}.yesterday`,ye=`${K}labels.filterByCondition`,we=`${K}labels.filterByValue`,ve=`${K}labels.conjunction`,_e=`${K}labels.disjunction`,be=`${K}values.blankCells`,Se=`${K}buttons.selectAll`,Ce=`${K}buttons.clear`,Ee=`${K}buttons.ok`,Me=`${K}buttons.cancel`,Te=`${K}buttons.placeholder.search`,Re=`${K}buttons.placeholder.value`,Ae=`${K}buttons.placeholder.secondValue`,Ne="CheckboxRenderer:",Le=`${Ne}checked`,xe=`${Ne}unchecked`},49450:(e,t,n)=>{"use strict";function r(e){try{return e.matches(":focus-visible")}catch(e){}return!1}n.d(t,{A:()=>r})},49565:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(96540),o=n(34164),i=n(21362),s=n(82777),a=n(26739),l=n(53356),u=n(39241),h=n(20439),c=n(34578),d=n(96148),m=n(1908);function p(e){return(0,m.Ay)("MuiPaper",e)}(0,d.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var f=n(74848);const g=(0,a.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t[`elevation${n.elevation}`]]}})((0,u.A)((({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:e})=>!e.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]})))),y=r.forwardRef((function(e,t){const n=(0,h.b)({props:e,name:"MuiPaper"}),r=(0,l.A)(),{className:a,component:u="div",elevation:d=1,square:m=!1,variant:y="elevation",...w}=n,v={...n,component:u,elevation:d,square:m,variant:y},_=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,s={root:["root",r,!t&&"rounded","elevation"===r&&`elevation${n}`]};return(0,i.A)(s,p,o)})(v);return(0,f.jsx)(g,{as:u,ownerState:v,className:(0,o.A)(_.root,a),ref:t,...w,style:{..."elevation"===y&&{"--Paper-shadow":(r.vars||r).shadows[d],...r.vars&&{"--Paper-overlay":r.vars.overlays?.[d]},...!r.vars&&"dark"===r.palette.mode&&{"--Paper-overlay":`linear-gradient(${(0,s.X4)("#fff",(0,c.A)(d))}, ${(0,s.X4)("#fff",(0,c.A)(d))})`}},...w.style}})}))},49649:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>y,HX:()=>w,tT:()=>_});var r=n(58168),o=n(24684),i=n(43174),s=n(71287),a=n(30041),l=n(96540),u=n(36289),h=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,c=(0,u.A)((function(e){return h.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),d=function(e){return"theme"!==e},m=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?c:d},p=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!=typeof r&&n&&(r=e.__emotion_forwardProp),r},f=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,a.SF)(t,n,r),(0,s.s)((function(){return(0,a.sk)(t,n,r)})),null},g=function e(t,n){var s,u,h=t.__emotion_real===t,c=h&&t.__emotion_base||t;void 0!==n&&(s=n.label,u=n.target);var d=p(t,n,h),g=d||m(c),y=!g("as");return function(){var w=arguments,v=h&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==s&&v.push("label:"+s+";"),null==w[0]||void 0===w[0].raw)v.push.apply(v,w);else{var _=w[0];v.push(_[0]);for(var b=w.length,S=1;S<b;S++)v.push(w[S],_[S])}var C=(0,o.w)((function(e,t,n){var r=y&&e.as||c,s="",h=[],p=e;if(null==e.theme){for(var w in p={},e)p[w]=e[w];p.theme=l.useContext(o.T)}"string"==typeof e.className?s=(0,a.Rk)(t.registered,h,e.className):null!=e.className&&(s=e.className+" ");var _=(0,i.J)(v.concat(h),t.registered,p);s+=t.key+"-"+_.name,void 0!==u&&(s+=" "+u);var b=y&&void 0===d?m(r):g,S={};for(var C in e)y&&"as"===C||b(C)&&(S[C]=e[C]);return S.className=s,n&&(S.ref=n),l.createElement(l.Fragment,null,l.createElement(f,{cache:t,serialized:_,isStringTag:"string"==typeof r}),l.createElement(r,S))}));return C.displayName=void 0!==s?s:"Styled("+("string"==typeof c?c:c.displayName||c.name||"Component")+")",C.defaultProps=t.defaultProps,C.__emotion_real=C,C.__emotion_base=c,C.__emotion_styles=v,C.__emotion_forwardProp=d,Object.defineProperty(C,"toString",{value:function(){return"."+u}}),C.withComponent=function(t,o){return e(t,(0,r.A)({},n,o,{shouldForwardProp:p(C,o,!0)})).apply(void 0,v)},C}}.bind(null);function y(e,t){return g(e,t)}function w(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){g[e]=g(e)}));const v=[];function _(e){return v[0]=e,(0,i.J)(v)}},49900:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(836);const o=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},50192:(e,t,n)=>{"use strict";n.d(t,{E6:()=>r,Hb:()=>a,LX:()=>i,OS:()=>h,PP:()=>o,QP:()=>u,Yt:()=>s,_8:()=>l});const r="active-header",o="header",i="area",s="focus",a="fill",l="row",u="column",h="custom-selection"},50283:(e,t,n)=>{"use strict";var r=n(79504),o=n(79039),i=n(94901),s=n(39297),a=n(43724),l=n(10350).CONFIGURABLE,u=n(33706),h=n(91181),c=h.enforce,d=h.get,m=String,p=Object.defineProperty,f=r("".slice),g=r("".replace),y=r([].join),w=a&&!o((function(){return 8!==p((function(){}),"length",{value:8}).length})),v=String(String).split("String"),_=e.exports=function(e,t,n){"Symbol("===f(m(t),0,7)&&(t="["+g(m(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!s(e,"name")||l&&e.name!==t)&&(a?p(e,"name",{value:t,configurable:!0}):e.name=t),w&&n&&s(n,"arity")&&e.length!==n.arity&&p(e,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&p(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var r=c(e);return s(r,"source")||(r.source=y(v,"string"==typeof t?t:"")),e};Function.prototype.toString=_((function(){return i(this)&&d(this).source||u(this)}),"toString")},50304:function(e,t,n){!function(e){"use strict";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 年"}})}(n(95093))},50851:(e,t,n)=>{"use strict";var r=n(36955),o=n(55966),i=n(64117),s=n(26269),a=n(78227)("iterator");e.exports=function(e){if(!i(e))return o(e,a)||o(e,"@@iterator")||s[r(e)]}},51504:e=>{function t(){}t.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 o(){r.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,o=n.length;r<o;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],o=[];if(r&&t)for(var i=0,s=r.length;i<s;i++)r[i].fn!==t&&r[i].fn._!==t&&o.push(r[i]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t},52044:(e,t,n)=>{"use strict";function r(e,t=166){let n;function r(...r){clearTimeout(n),n=setTimeout((()=>{e.apply(this,r)}),t)}return r.clear=()=>{clearTimeout(n)},r}n.d(t,{A:()=>r})},52246:(e,t,n)=>{"use strict";n.d(t,{o:()=>i}),n(44114);var r=n(48386),o=n(77325);class i extends r._{constructor(){super(arguments.length>0&&void 0!==arguments[0]&&arguments[0])}getHiddenIndexes(){return(0,o.mu)(this.getValues(),((e,t,n)=>(t&&e.push(n),e)),[])}}},52477:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},52648:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},52658:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t=[]){if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"==typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}},52967:(e,t,n)=>{"use strict";var r=n(46706),o=n(20034),i=n(67750),s=n(73506);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=r(Object.prototype,"__proto__","set"))(n,[]),t=n instanceof Array}catch(e){}return function(n,r){return i(n),s(r),o(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},53172:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540);const o=[];function i(e){r.useEffect(e,o)}},53356:(e,t,n)=>{"use strict";n.d(t,{A:()=>s}),n(96540);var r=n(14921),o=n(4894),i=n(31355);function s(){const e=(0,r.A)(o.A);return e[i.A]||e}},53838:(e,t,n)=>{"use strict";var r=n(97080),o=n(25170),i=n(38469),s=n(83789);e.exports=function(e){var t=r(this),n=s(e);return!(o(t)>n.size)&&!1!==i(t,(function(e){if(!n.includes(e))return!1}),!0)}},53872:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:0,doy:4}})}(n(95093))},53921:(e,t,n)=>{"use strict";var r=n(46518),o=n(72652),i=n(97040);r({target:"Object",stat:!0},{fromEntries:function(e){var t={};return o(e,(function(e,n){i(t,e,n)}),{AS_ENTRIES:!0}),t}})},53948:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(24902),o=n(92296),i=n(82227),s=n(33044);const a=function(e){const{elementType:t,externalSlotProps:n,ownerState:a,skipResolvingSlotProps:l=!1,...u}=e,h=l?{}:(0,s.A)(n,a),{props:c,internalRef:d}=(0,i.A)({...u,externalSlotProps:h}),m=(0,r.A)(d,h?.ref,e.additionalProps?.ref);return(0,o.A)(t,{...c,ref:m},a)}},54011:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>h});var o=new Uint8Array(16);function i(){if(!r&&!(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(o)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=[],l=0;l<256;++l)a.push((l+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&s.test(e)}(n))throw TypeError("Stringified UUID is invalid");return n},h=function(e,t,n){var r=(e=e||{}).random||(e.rng||i)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return u(r)}},54403:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(78854).A},54405:(e,t)=>{"use strict";Symbol.for("react.transitional.element"),Symbol.for("react.portal");var n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler");Symbol.for("react.provider");var i=Symbol.for("react.consumer"),s=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),c=Symbol.for("react.lazy"),d=(Symbol.for("react.view_transition"),Symbol.for("react.client.reference"));t.Hy=function(e){return"string"==typeof e||"function"==typeof e||e===n||e===o||e===r||e===l||e===u||"object"==typeof e&&null!==e&&(e.$$typeof===c||e.$$typeof===h||e.$$typeof===s||e.$$typeof===i||e.$$typeof===a||e.$$typeof===d||void 0!==e.getModuleId)}},54520:(e,t,n)=>{"use strict";n(22489)},54566:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},54587:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(91092).A},54691:function(e,t,n){!function(e){"use strict";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(){return 6===this.day()?"[το προηγούμενο] dddd [{}] LT":"[την προηγούμενη] dddd [{}] LT"},sameElse:"L"},calendar:function(e,t){var n,r=this._calendarEl[e],o=t&&t.hours();return n=r,("undefined"!=typeof Function&&n instanceof Function||"[object Function]"===Object.prototype.toString.call(n))&&(r=r.apply(t)),r.replace("{}",o%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}})}(n(95093))},54697:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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}})}(n(95093))},54903:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},54950:(e,t,n)=>{"use strict";n.d(t,{TS:()=>h,gB:()=>u,sl:()=>s}),n(16280);var r=n(34647);const{register:o,getItem:i,hasItem:s,getNames:a,getValues:l}=(0,r.A)("renderers");function u(e){if("function"==typeof e)return e;if(!s(e))throw Error(`No registered renderer found under "${e}" name`);return i(e)}function h(e,t){"string"!=typeof e&&(e=(t=e).RENDERER_TYPE),o(e,t)}},55056:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},55655:(e,t,n)=>{"use strict";n.d(t,{A:()=>re});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach((function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)})),this.tags=[],this.ctr=0},e}(),o=Math.abs,i=String.fromCharCode,s=Object.assign;function a(e){return e.trim()}function l(e,t,n){return e.replace(t,n)}function u(e,t){return e.indexOf(t)}function h(e,t){return 0|e.charCodeAt(t)}function c(e,t,n){return e.slice(t,n)}function d(e){return e.length}function m(e){return e.length}function p(e,t){return t.push(e),e}var f=1,g=1,y=0,w=0,v=0,_="";function b(e,t,n,r,o,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:f,column:g,length:s,return:""}}function S(e,t){return s(b("",null,null,"",null,null,0),e,{length:-e.length},t)}function C(){return v=w>0?h(_,--w):0,g--,10===v&&(g=1,f--),v}function E(){return v=w<y?h(_,w++):0,g++,10===v&&(g=1,f++),v}function M(){return h(_,w)}function T(){return w}function R(e,t){return c(_,e,t)}function A(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function N(e){return f=g=1,y=d(_=e),w=0,[]}function L(e){return _="",e}function x(e){return a(R(w-1,k(91===e?e+2:40===e?e+1:e)))}function O(e){for(;(v=M())&&v<33;)E();return A(e)>2||A(v)>3?"":" "}function I(e,t){for(;--t&&E()&&!(v<48||v>102||v>57&&v<65||v>70&&v<97););return R(e,T()+(t<6&&32==M()&&32==E()))}function k(e){for(;E();)switch(v){case e:return w;case 34:case 39:34!==e&&39!==e&&k(v);break;case 40:41===e&&k(e);break;case 92:E()}return w}function D(e,t){for(;E()&&e+v!==57&&(e+v!==84||47!==M()););return"/*"+R(t,w-1)+"*"+i(47===e?e:E())}function P(e){for(;!A(M());)E();return R(e,w)}var H="-ms-",F="-moz-",Y="-webkit-",V="comm",U="rule",B="decl",W="@keyframes";function j(e,t){for(var n="",r=m(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function z(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case B:return e.return=e.return||e.value;case V:return"";case W:return e.return=e.value+"{"+j(e.children,r)+"}";case U:e.value=e.props.join(",")}return d(n=j(e.children,r))?e.return=e.value+"{"+n+"}":""}function G(e){return L($("",null,null,null,[""],e=N(e),0,[0],e))}function $(e,t,n,r,o,s,a,c,m){for(var f=0,g=0,y=a,w=0,v=0,_=0,b=1,S=1,R=1,A=0,N="",L=o,k=s,H=r,F=N;S;)switch(_=A,A=E()){case 40:if(108!=_&&58==h(F,y-1)){-1!=u(F+=l(x(A),"&","&\f"),"&\f")&&(R=-1);break}case 34:case 39:case 91:F+=x(A);break;case 9:case 10:case 13:case 32:F+=O(_);break;case 92:F+=I(T()-1,7);continue;case 47:switch(M()){case 42:case 47:p(X(D(E(),T()),t,n),m);break;default:F+="/"}break;case 123*b:c[f++]=d(F)*R;case 125*b:case 59:case 0:switch(A){case 0:case 125:S=0;case 59+g:-1==R&&(F=l(F,/\f/g,"")),v>0&&d(F)-y&&p(v>32?q(F+";",r,n,y-1):q(l(F," ","")+";",r,n,y-2),m);break;case 59:F+=";";default:if(p(H=K(F,t,n,f,g,o,c,N,L=[],k=[],y),s),123===A)if(0===g)$(F,t,H,H,L,s,y,c,k);else switch(99===w&&110===h(F,3)?100:w){case 100:case 108:case 109:case 115:$(e,H,H,r&&p(K(e,H,H,0,0,o,c,N,o,L=[],y),k),o,k,y,c,r?L:k);break;default:$(F,H,H,H,[""],k,0,c,k)}}f=g=v=0,b=R=1,N=F="",y=a;break;case 58:y=1+d(F),v=_;default:if(b<1)if(123==A)--b;else if(125==A&&0==b++&&125==C())continue;switch(F+=i(A),A*b){case 38:R=g>0?1:(F+="\f",-1);break;case 44:c[f++]=(d(F)-1)*R,R=1;break;case 64:45===M()&&(F+=x(E())),w=M(),g=y=d(N=F+=P(T())),A++;break;case 45:45===_&&2==d(F)&&(b=0)}}return s}function K(e,t,n,r,i,s,u,h,d,p,f){for(var g=i-1,y=0===i?s:[""],w=m(y),v=0,_=0,S=0;v<r;++v)for(var C=0,E=c(e,g+1,g=o(_=u[v])),M=e;C<w;++C)(M=a(_>0?y[C]+" "+E:l(E,/&\f/g,y[C])))&&(d[S++]=M);return b(e,t,n,0===i?U:h,d,p,f)}function X(e,t,n){return b(e,t,n,V,i(v),c(e,2,-2),0)}function q(e,t,n,r){return b(e,t,n,B,c(e,0,r),c(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,o=0;r=o,o=M(),38===r&&12===o&&(t[n]=1),!A(o);)E();return R(e,w)},J=new WeakMap,Z=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var o=[],s=function(e,t){return L(function(e,t){var n=-1,r=44;do{switch(A(r)){case 0:38===r&&12===M()&&(t[n]=1),e[n]+=Q(w-1,t,n);break;case 2:e[n]+=x(r);break;case 4:if(44===r){e[++n]=58===M()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=E());return e}(N(e),t))}(t,o),a=n.props,l=0,u=0;l<s.length;l++)for(var h=0;h<a.length;h++,u++)e.props[u]=o[l]?s[l].replace(/&\f/g,a[h]):a[h]+" "+s[l]}}},ee=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function te(e,t){switch(function(e,t){return 45^h(e,0)?(((t<<2^h(e,0))<<2^h(e,1))<<2^h(e,2))<<2^h(e,3):0}(e,t)){case 5103:return Y+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Y+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Y+e+F+e+H+e+e;case 6828:case 4268:return Y+e+H+e+e;case 6165:return Y+e+H+"flex-"+e+e;case 5187:return Y+e+l(e,/(\w+).+(:[^]+)/,Y+"box-$1$2"+H+"flex-$1$2")+e;case 5443:return Y+e+H+"flex-item-"+l(e,/flex-|-self/,"")+e;case 4675:return Y+e+H+"flex-line-pack"+l(e,/align-content|flex-|-self/,"")+e;case 5548:return Y+e+H+l(e,"shrink","negative")+e;case 5292:return Y+e+H+l(e,"basis","preferred-size")+e;case 6060:return Y+"box-"+l(e,"-grow","")+Y+e+H+l(e,"grow","positive")+e;case 4554:return Y+l(e,/([^-])(transform)/g,"$1"+Y+"$2")+e;case 6187:return l(l(l(e,/(zoom-|grab)/,Y+"$1"),/(image-set)/,Y+"$1"),e,"")+e;case 5495:case 3959:return l(e,/(image-set\([^]*)/,Y+"$1$`$1");case 4968:return l(l(e,/(.+:)(flex-)?(.*)/,Y+"box-pack:$3"+H+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Y+e+e;case 4095:case 3583:case 4068:case 2532:return l(e,/(.+)-inline(.+)/,Y+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(d(e)-1-t>6)switch(h(e,t+1)){case 109:if(45!==h(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+Y+"$2-$3$1"+F+(108==h(e,t+3)?"$3":"$2-$3"))+e;case 115:return~u(e,"stretch")?te(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==h(e,t+1))break;case 6444:switch(h(e,d(e)-3-(~u(e,"!important")&&10))){case 107:return l(e,":",":"+Y)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Y+(45===h(e,14)?"inline-":"")+"box$3$1"+Y+"$2$3$1"+H+"$2box$3")+e}break;case 5936:switch(h(e,t+11)){case 114:return Y+e+H+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Y+e+H+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Y+e+H+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Y+e+H+e+e}return e}var ne=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case B:e.return=te(e.value,e.length);break;case W:return j([S(e,{value:l(e.value,"@","@"+Y)})],r);case U:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return j([S(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return j([S(e,{props:[l(t,/:(plac\w+)/,":"+Y+"input-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),S(e,{props:[l(t,/:(plac\w+)/,H+"input-$1")]})],r)}return""}))}}],re=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,s=e.stylisPlugins||ne,a={},l=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;l.push(e)}));var u,h,c,d,p=[z,(d=function(e){u.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],f=(h=[Z,ee].concat(s,p),c=m(h),function(e,t,n,r){for(var o="",i=0;i<c;i++)o+=h[i](e,t,n,r)||"";return o});i=function(e,t,n,r){u=n,j(G(e?e+"{"+t.styles+"}":t.styles),f),r&&(g.inserted[t.name]=!0)};var g={key:t,sheet:new r({key:t,container:o,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:i};return g.sheet.hydrate(l),g}},55802:function(e,t,n){!function(e){"use strict";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 ปี"}})}(n(95093))},55966:(e,t,n)=>{"use strict";var r=n(79306),o=n(64117);e.exports=function(e,t){var n=e[t];return o(n)?void 0:r(n)}},56e3:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},56195:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},56279:(e,t,n)=>{"use strict";var r=n(36840);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},56464:function(e,t,n){!function(e){"use strict";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],o=/^(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 i(e){return e>1&&e<5&&1!=~~(e/10)}function s(e,t,n,r){var o=e+" ";switch(n){case"s":return t||r?"pár sekund":"pár sekundami";case"ss":return t||r?o+(i(e)?"sekundy":"sekund"):o+"sekundami";case"m":return t?"minuta":r?"minutu":"minutou";case"mm":return t||r?o+(i(e)?"minuty":"minut"):o+"minutami";case"h":return t?"hodina":r?"hodinu":"hodinou";case"hh":return t||r?o+(i(e)?"hodiny":"hodin"):o+"hodinami";case"d":return t||r?"den":"dnem";case"dd":return t||r?o+(i(e)?"dny":"dní"):o+"dny";case"M":return t||r?"měsíc":"měsícem";case"MM":return t||r?o+(i(e)?"měsíce":"měsíců"):o+"měsíci";case"y":return t||r?"rok":"rokem";case"yy":return t||r?o+(i(e)?"roky":"let"):o+"lety"}}e.defineLocale("cs",{months:t,monthsShort:n,monthsRegex:o,monthsShortRegex:o,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,ss:s,m:s,mm:s,h:s,hh:s,d:s,dd:s,M:s,MM:s,y:s,yy:s},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},56575:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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}})}(n(95093))},56969:(e,t,n)=>{"use strict";var r=n(72777),o=n(10757);e.exports=function(e){var t=r(e,"string");return o(t)?t:t+""}},57145:(e,t,n)=>{"use strict";var r=n(46518),o=n(79504),i=n(79306),s=n(25397),a=n(35370),l=n(44124),u=n(6469),h=Array,c=o(l("Array","sort"));r({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&i(e);var t=s(this),n=a(h,t);return c(n,e)}}),u("toSorted")},57514:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(836),o=n(98762);const i=e=>{const t={systemProps:{},otherProps:{}},n=e?.theme?.unstable_sxConfig??o.A;return Object.keys(e).forEach((r=>{n[r]?t.systemProps[r]=e[r]:t.otherProps[r]=e[r]})),t};function s(e){const{sx:t,...n}=e,{systemProps:o,otherProps:s}=i(n);let a;return a=Array.isArray(t)?[o,...t]:"function"==typeof t?(...e)=>{const n=t(...e);return(0,r.Q)(n)?{...o,...n}:o}:{...o,...t},{...s,sx:a}}},57609:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},57657:(e,t,n)=>{"use strict";var r,o,i,s=n(79039),a=n(94901),l=n(20034),u=n(2360),h=n(42787),c=n(36840),d=n(78227),m=n(96395),p=d("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(o=h(h(i)))!==Object.prototype&&(r=o):f=!0),!l(r)||s((function(){var e={};return r[p].call(e)!==e}))?r={}:m&&(r=u(r)),a(r[p])||c(r,p,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},57777:function(e,t,n){!function(e){"use strict";var t=["جنوری","فروری","مارچ","اپریل","مئی","جون","جولائی","اگست","ستمبر","اکتوبر","نومبر","دسمبر"],n=["اتوار","پیر","منگل","بدھ","جمعرات","جمعہ","ہفتہ"];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}})}(n(95093))},58002:(e,t,n)=>{"use strict";n.d(t,{B6:()=>u,H8:()=>l,U0:()=>w,UP:()=>m,Yh:()=>y,gm:()=>h,nr:()=>d,rr:()=>p,un:()=>f,wF:()=>c,zG:()=>g});var r=n(32919),o=n(13968);const i=e=>{const t={value:!1,test:(n,r)=>{t.value=e(n,r)}};return t},s={chrome:i(((e,t)=>/Chrome/.test(e)&&/Google/.test(t))),chromeWebKit:i((e=>/CriOS/.test(e))),edge:i((e=>/Edge/.test(e))),edgeWebKit:i((e=>/EdgiOS/.test(e))),firefox:i((e=>/Firefox/.test(e))),firefoxWebKit:i((e=>/FxiOS/.test(e))),mobile:i((e=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e))),safari:i(((e,t)=>/Safari/.test(e)&&/Apple Computer/.test(t)))},a={mac:i((e=>/^Mac/.test(e))),win:i((e=>/^Win/.test(e))),linux:i((e=>/^Linux/.test(e))),ios:i((e=>/iPhone|iPad|iPod/i.test(e)))};function l(){return s.chrome.value}function u(){return s.chromeWebKit.value}function h(){return s.firefox.value}function c(){return s.firefoxWebKit.value}function d(){return s.safari.value}function m(){return s.edge.value}function p(){return s.mobile.value}function f(){return a.ios.value}function g(){let{maxTouchPoints:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return e>2&&a.mac.value}function y(){return a.win.value}function w(){return a.mac.value}(0,o.Nt)()&&(function(){let{userAgent:e=navigator.userAgent,vendor:t=navigator.vendor}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.v4)(s,(n=>{let{test:r}=n;r(e,t)}))}(),function(){let{platform:e=navigator.platform}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(0,r.v4)(a,(t=>{let{test:n}=t;n(e)}))}())},58004:(e,t,n)=>{"use strict";var r=n(46518),o=n(79039),i=n(68750);r({target:"Set",proto:!0,real:!0,forced:!n(84916)("intersection",(function(e){return 2===e.size&&e.has(1)&&e.has(2)}))||o((function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))}))},{intersection:i})},58076:function(e,t,n){!function(e){"use strict";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 o=t.words[r];return 1===r.length?n?o[0]:o[1]:e+" "+t.correctGrammaticalCase(e,o)}};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(){return["[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"][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}})}(n(95093))},58168:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(null,arguments)}n.d(t,{A:()=>r})},58622:(e,t,n)=>{"use strict";var r=n(44576),o=n(94901),i=r.WeakMap;e.exports=o(i)&&/native code/.test(String(i))},58676:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},59225:(e,t,n)=>{"use strict";var r,o,i,s,a=n(44576),l=n(18745),u=n(76080),h=n(94901),c=n(39297),d=n(79039),m=n(20397),p=n(67680),f=n(4055),g=n(22812),y=n(89544),w=n(38574),v=a.setImmediate,_=a.clearImmediate,b=a.process,S=a.Dispatch,C=a.Function,E=a.MessageChannel,M=a.String,T=0,R={},A="onreadystatechange";d((function(){r=a.location}));var N=function(e){if(c(R,e)){var t=R[e];delete R[e],t()}},L=function(e){return function(){N(e)}},x=function(e){N(e.data)},O=function(e){a.postMessage(M(e),r.protocol+"//"+r.host)};v&&_||(v=function(e){g(arguments.length,1);var t=h(e)?e:C(e),n=p(arguments,1);return R[++T]=function(){l(t,void 0,n)},o(T),T},_=function(e){delete R[e]},w?o=function(e){b.nextTick(L(e))}:S&&S.now?o=function(e){S.now(L(e))}:E&&!y?(s=(i=new E).port2,i.port1.onmessage=x,o=u(s.postMessage,s)):a.addEventListener&&h(a.postMessage)&&!a.importScripts&&r&&"file:"!==r.protocol&&!d(O)?(o=O,a.addEventListener("message",x,!1)):o=A in f("script")?function(e){m.appendChild(f("script"))[A]=function(){m.removeChild(this),N(e)}}:function(e){setTimeout(L(e),0)}),e.exports={set:v,clear:_}},59527:function(e,t,n){!function(e){"use strict";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"};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;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(95093))},59848:(e,t,n)=>{"use strict";n(86368),n(29309)},60431:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(96540),o=n(34164),i=n(19750),s=n(21362),a=n(82777),l=n(54587),u=n(98855),h=n(26739),c=n(39241),d=n(20439),m=n(38329),p=n(8861),f=n(39407),g=n(1321),y=n(96148),w=n(1908);function v(e){return(0,w.Ay)("MuiButton",e)}const _=(0,y.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge","loading","loadingWrapper","loadingIconPlaceholder","loadingIndicator","loadingPositionCenter","loadingPositionStart","loadingPositionEnd"]),b=r.createContext({}),S=r.createContext(void 0);var C=n(74848);const E=[{props:{size:"small"},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:"medium"},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:"large"},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],M=(0,h.Ay)(m.A,{shouldForwardProp:e=>(0,u.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`${n.variant}${(0,f.A)(n.color)}`],t[`size${(0,f.A)(n.size)}`],t[`${n.variant}Size${(0,f.A)(n.size)}`],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})((0,c.A)((({theme:e})=>{const t="light"===e.palette.mode?e.palette.grey[300]:e.palette.grey[800],n="light"===e.palette.mode?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:"6px 16px",border:0,borderRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create(["background-color","box-shadow","border-color","color"],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:"none"},[`&.${_.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:"contained"},style:{color:"var(--variant-containedColor)",backgroundColor:"var(--variant-containedBg)",boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${_.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${_.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:"outlined"},style:{padding:"5px 15px",border:"1px solid currentColor",borderColor:"var(--variant-outlinedBorder, currentColor)",backgroundColor:"var(--variant-outlinedBg)",color:"var(--variant-outlinedColor)",[`&.${_.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:"text"},style:{padding:"6px 8px",color:"var(--variant-textColor)",backgroundColor:"var(--variant-textBg)"}},...Object.entries(e.palette).filter((0,g.A)()).map((([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.5)`:(0,a.X4)(e.palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette[t].main,e.palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette[t].main,e.palette.action.hoverOpacity)}}}}))),{props:{color:"inherit"},style:{color:"inherit",borderColor:"currentColor","--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette.text.primary,e.palette.action.hoverOpacity),"--variant-outlinedBg":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / ${e.vars.palette.action.hoverOpacity})`:(0,a.X4)(e.palette.text.primary,e.palette.action.hoverOpacity)}}}},{props:{size:"small",variant:"text"},style:{padding:"4px 5px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"text"},style:{padding:"8px 11px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"outlined"},style:{padding:"3px 9px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"outlined"},style:{padding:"7px 21px",fontSize:e.typography.pxToRem(15)}},{props:{size:"small",variant:"contained"},style:{padding:"4px 10px",fontSize:e.typography.pxToRem(13)}},{props:{size:"large",variant:"contained"},style:{padding:"8px 22px",fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:"none","&:hover":{boxShadow:"none"},[`&.${_.focusVisible}`]:{boxShadow:"none"},"&:active":{boxShadow:"none"},[`&.${_.disabled}`]:{boxShadow:"none"}}},{props:{fullWidth:!0},style:{width:"100%"}},{props:{loadingPosition:"center"},style:{transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),[`&.${_.loading}`]:{color:"transparent"}}}]}}))),T=(0,h.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart,t[`iconSize${(0,f.A)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:8,marginLeft:-4,variants:[{props:{size:"small"},style:{marginLeft:-2}},{props:{loadingPosition:"start",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"start",loading:!0,fullWidth:!0},style:{marginRight:-8}},...E]}))),R=(0,h.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd,t[`iconSize${(0,f.A)(n.size)}`]]}})((({theme:e})=>({display:"inherit",marginRight:-4,marginLeft:8,variants:[{props:{size:"small"},style:{marginRight:-2}},{props:{loadingPosition:"end",loading:!0},style:{transition:e.transitions.create(["opacity"],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:"end",loading:!0,fullWidth:!0},style:{marginLeft:-8}},...E]}))),A=(0,h.Ay)("span",{name:"MuiButton",slot:"LoadingIndicator"})((({theme:e})=>({display:"none",position:"absolute",visibility:"visible",variants:[{props:{loading:!0},style:{display:"flex"}},{props:{loadingPosition:"start"},style:{left:14}},{props:{loadingPosition:"start",size:"small"},style:{left:10}},{props:{variant:"text",loadingPosition:"start"},style:{left:6}},{props:{loadingPosition:"center"},style:{left:"50%",transform:"translate(-50%)",color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:"end"},style:{right:14}},{props:{loadingPosition:"end",size:"small"},style:{right:10}},{props:{variant:"text",loadingPosition:"end"},style:{right:6}},{props:{loadingPosition:"start",fullWidth:!0},style:{position:"relative",left:-10}},{props:{loadingPosition:"end",fullWidth:!0},style:{position:"relative",right:-10}}]}))),N=(0,h.Ay)("span",{name:"MuiButton",slot:"LoadingIconPlaceholder"})({display:"inline-block",width:"1em",height:"1em"}),L=r.forwardRef((function(e,t){const n=r.useContext(b),a=r.useContext(S),u=(0,i.A)(n,e),h=(0,d.b)({props:u,name:"MuiButton"}),{children:c,color:m="primary",component:g="button",className:y,disabled:w=!1,disableElevation:_=!1,disableFocusRipple:E=!1,endIcon:L,focusVisibleClassName:x,fullWidth:O=!1,id:I,loading:k=null,loadingIndicator:D,loadingPosition:P="center",size:H="medium",startIcon:F,type:Y,variant:V="text",...U}=h,B=(0,l.A)(I),W=D??(0,C.jsx)(p.A,{"aria-labelledby":B,color:"inherit",size:16}),j={...h,color:m,component:g,disabled:w,disableElevation:_,disableFocusRipple:E,fullWidth:O,loading:k,loadingIndicator:W,loadingPosition:P,size:H,type:Y,variant:V},z=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,loading:a,loadingPosition:l,classes:u}=e,h={root:["root",a&&"loading",i,`${i}${(0,f.A)(t)}`,`size${(0,f.A)(o)}`,`${i}Size${(0,f.A)(o)}`,`color${(0,f.A)(t)}`,n&&"disableElevation",r&&"fullWidth",a&&`loadingPosition${(0,f.A)(l)}`],startIcon:["icon","startIcon",`iconSize${(0,f.A)(o)}`],endIcon:["icon","endIcon",`iconSize${(0,f.A)(o)}`],loadingIndicator:["loadingIndicator"],loadingWrapper:["loadingWrapper"]},c=(0,s.A)(h,v,u);return{...u,...c}})(j),G=(F||k&&"start"===P)&&(0,C.jsx)(T,{className:z.startIcon,ownerState:j,children:F||(0,C.jsx)(N,{className:z.loadingIconPlaceholder,ownerState:j})}),$=(L||k&&"end"===P)&&(0,C.jsx)(R,{className:z.endIcon,ownerState:j,children:L||(0,C.jsx)(N,{className:z.loadingIconPlaceholder,ownerState:j})}),K=a||"",X="boolean"==typeof k?(0,C.jsx)("span",{className:z.loadingWrapper,style:{display:"contents"},children:k&&(0,C.jsx)(A,{className:z.loadingIndicator,ownerState:j,children:W})}):null;return(0,C.jsxs)(M,{ownerState:j,className:(0,o.A)(n.className,z.root,y,K),component:g,disabled:w||k,focusRipple:!E,focusVisibleClassName:(0,o.A)(z.focusVisible,x),ref:t,type:Y,id:k?B:I,...U,classes:z,children:[G,"end"!==P&&X,c,"end"===P&&X,$]})}))},60708:function(e,t,n){!function(e){"use strict";var t=["ޖެނުއަރީ","ފެބްރުއަރީ","މާރިޗު","އޭޕްރީލު","މޭ","ޖޫން","ޖުލައި","އޯގަސްޓު","ސެޕްޓެމްބަރު","އޮކްޓޯބަރު","ނޮވެމްބަރު","ޑިސެމްބަރު"],n=["އާދިއްތަ","ހޯމަ","އަންގާރަ","ބުދަ","ބުރާސްފަތި","ހުކުރު","ހޮނިހިރު"];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}})}(n(95093))},60788:(e,t,n)=>{"use strict";var r=n(20034),o=n(22195),i=n(78227)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"===o(e))}},61034:(e,t,n)=>{"use strict";var r=n(69565),o=n(39297),i=n(1625),s=n(65213),a=n(67979),l=RegExp.prototype;e.exports=s.correct?function(e){return e.flags}:function(e){return s.correct||!i(l,e)||o(e,"flags")?e.flags:r(a,e)}},61290:function(e,t,n){!function(e){"use strict";var t={1:"১",2:"২",3:"৩",4:"৪",5:"৫",6:"৬",7:"৭",8:"৮",9:"৯",0:"০"},n={"১":"1","২":"2","৩":"3","৪":"4","৫":"5","৬":"6","৭":"7","৮":"8","৯":"9","০":"0"};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}})}(n(95093))},61509:function(e,t,n){!function(e){"use strict";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},o={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,n,i,s){var a=r(t),l=o[e][r(t)];return 2===a&&(l=l[n?0:1]),l.replace(/%d/i,t)}},s=["يناير","فبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوفمبر","ديسمبر"];e.defineLocale("ar",{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,(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}})}(n(95093))},61626:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},61701:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(79306),s=n(28551),a=n(1767),l=n(19462),u=n(96319),h=n(9539),c=n(30684),d=n(84549),m=n(96395),p=!m&&!c("map",(function(){})),f=!m&&!p&&d("map",TypeError),g=m||p||f,y=l((function(){var e=this.iterator,t=s(o(this.next,e));if(!(this.done=!!t.done))return u(e,this.mapper,[t.value,this.counter++],!0)}));r({target:"Iterator",proto:!0,real:!0,forced:g},{map:function(e){s(this);try{i(e)}catch(e){h(this,"throw",e)}return f?o(f,this,e):new y(a(this),{mapper:e})}})},61828:(e,t,n)=>{"use strict";var r=n(79504),o=n(39297),i=n(25397),s=n(19617).indexOf,a=n(30421),l=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,h=[];for(n in r)!o(a,n)&&o(r,n)&&l(h,n);for(;t.length>u;)o(r,n=t[u++])&&(~s(h,n)||l(h,n));return h}},62106:(e,t,n)=>{"use strict";var r=n(50283),o=n(24913);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),o.f(e,t,n)}},62475:function(e,t){var n,r;"undefined"!=typeof self&&self,void 0===(r="function"==typeof(n=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("/");for(var n={type:"Flags",global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};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")}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=[];for(e.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),e.push(this.alternative());return{type:"Disjunction",value:e}},e.prototype.alternative=function(){for(var e=[];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"}l(e);var t=this.disjunction();return this.consumeChar(")"),{type:e,value:t}}!function(){throw Error("Internal Error - Should never get here!")}()},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",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;l(t)}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()}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:[i("\n"),i("\r"),i("\u2028"),i("\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(){return{type:"GroupBackReference",value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case"d":e=u;break;case"D":e=u,t=!0;break;case"s":e=c;break;case"S":e=c,t=!0;break;case"w":e=h;break;case"W":e=h,t=!0}return l(e),{type:"Set",value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case"f":e=i("\f");break;case"n":e=i("\n");break;case"r":e=i("\r");break;case"t":e=i("\t");break;case"v":e=i("\v")}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 ");return{type:"Character",value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\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(){return{type:"Character",value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case"\n":case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),t=!0);this.isClassAtom();){var n=this.classAtom();if("Character"===n.type&&this.isRangeDash()){this.consumeChar("-");var r=this.classAtom();if("Character"===r.type){if(r.value<n.value)throw Error("Range out of order in character class");e.push({from:n.value,to:r.value})}else s(n.value,e),e.push(i("-")),s(r.value,e)}else s(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:i("\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;this.consumeChar("("),"?"===this.peekChar(0)?(this.consumeChar("?"),this.consumeChar(":"),e=!1):this.groupIdx++;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===o.test(e))throw Error("Expecting a positive integer");for(;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");for(;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:i(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(e){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 o=this.popChar();if(!1===n.test(o))throw Error("Expecting a HexDecimal digits");t+=o}return{type:"Character",value:parseInt(t,16)}},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]/,o=/[1-9]/;function i(e){return e.charCodeAt(0)}function s(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!")}var u=[];for(t=i("0");t<=i("9");t++)u.push(t);var h=[i("_")].concat(u);for(t=i("a");t<=i("z");t++)h.push(t);for(t=i("A");t<=i("Z");t++)h.push(t);var c=[i(" "),i("\f"),i("\n"),i("\r"),i("\t"),i("\v"),i("\t"),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i(" "),i("\u2028"),i("\u2029"),i(" "),i(" "),i(" "),i("\ufeff")];function d(){}return d.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))}},d.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)}this.visitChildren(e)},d.prototype.visitPattern=function(e){},d.prototype.visitFlags=function(e){},d.prototype.visitDisjunction=function(e){},d.prototype.visitAlternative=function(e){},d.prototype.visitStartAnchor=function(e){},d.prototype.visitEndAnchor=function(e){},d.prototype.visitWordBoundary=function(e){},d.prototype.visitNonWordBoundary=function(e){},d.prototype.visitLookahead=function(e){},d.prototype.visitNegativeLookahead=function(e){},d.prototype.visitCharacter=function(e){},d.prototype.visitSet=function(e){},d.prototype.visitGroup=function(e){},d.prototype.visitGroupBackReference=function(e){},d.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:d,VERSION:"0.4.0"}})?n.apply(t,[]):n)||(e.exports=r)},62529:e=>{"use strict";e.exports=function(e,t){return{value:e,done:t}}},63132:(e,t,n)=>{"use strict";function r(e,t){if(!e.containerQueries)return t;const n=Object.keys(t).filter((e=>e.startsWith("@container"))).sort(((e,t)=>{const n=/min-width:\s*([0-9.]+)/;return+(e.match(n)?.[1]||0)-+(t.match(n)?.[1]||0)}));return n.length?n.reduce(((e,n)=>{const r=t[n];return delete e[n],e[n]=r,e}),{...t}):t}function o(e,t){return"@"===t||t.startsWith("@")&&(e.some((e=>t.startsWith(`@${e}`)))||!!t.match(/^@\d/))}function i(e,t){const n=t.match(/^@([^/]+)?\/?(.+)?$/);if(!n)return null;const[,r,o]=n,i=Number.isNaN(+r)?r||0:+r;return e.containerQueries(o).up(i)}function s(e){const t=(e,t)=>e.replace("@media",t?`@container ${t}`:"@container");function n(n,r){n.up=(...n)=>t(e.breakpoints.up(...n),r),n.down=(...n)=>t(e.breakpoints.down(...n),r),n.between=(...n)=>t(e.breakpoints.between(...n),r),n.only=(...n)=>t(e.breakpoints.only(...n),r),n.not=(...n)=>{const o=t(e.breakpoints.not(...n),r);return o.includes("not all and")?o.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):o}}const r={},o=e=>(n(r,e),r);return n(o),{...e,containerQueries:o}}n.d(t,{Ay:()=>s,CT:()=>i,_S:()=>r,ob:()=>o})},63164:function(e,t,n){!function(e){"use strict";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?"오전":"오후"}})}(n(95093))},63248:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>m,MC:()=>u});var r=n(49649),o=n(836),i=n(65387),s=n(95548),a=n(18139);const l=(0,i.A)();function u(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}function h(e){return e?(t,n)=>n[e]:null}function c(e,t){const n="function"==typeof t?t(e):t;if(Array.isArray(n))return n.flatMap((t=>c(e,t)));if(Array.isArray(n?.variants)){let t;if(n.isProcessed)t=n.style;else{const{variants:e,...r}=n;t=r}return d(e,n.variants,[t])}return n?.isProcessed?n.style:n}function d(e,t,n=[]){let r;e:for(let o=0;o<t.length;o+=1){const i=t[o];if("function"==typeof i.props){if(r??={...e,...e.ownerState,ownerState:e.ownerState},!i.props(r))continue}else for(const t in i.props)if(e[t]!==i.props[t]&&e.ownerState?.[t]!==i.props[t])continue e;"function"==typeof i.style?(r??={...e,...e.ownerState,ownerState:e.ownerState},n.push(i.style(r))):n.push(i.style)}return n}function m(e={}){const{themeId:t,defaultTheme:n=l,rootShouldForwardProp:i=u,slotShouldForwardProp:m=u}=e;function f(e){!function(e,t,n){e.theme=function(e){for(const t in e)return!1;return!0}(e.theme)?n:e.theme[t]||e.theme}(e,t,n)}return(e,t={})=>{(0,r.HX)(e,(e=>e.filter((e=>e!==s.A))));const{name:n,slot:l,skipVariantsResolver:g,skipSx:y,overridesResolver:w=h(p(l)),...v}=t,_=void 0!==g?g:l&&"Root"!==l&&"root"!==l||!1,b=y||!1;let S=u;"Root"===l||"root"===l?S=i:l?S=m:function(e){return"string"==typeof e&&e.charCodeAt(0)>96}(e)&&(S=void 0);const C=(0,r.Ay)(e,{shouldForwardProp:S,label:void 0,...v}),E=e=>{if("function"==typeof e&&e.__emotion_real!==e)return function(t){return c(t,e)};if((0,o.Q)(e)){const t=(0,a.A)(e);return t.variants?function(e){return c(e,t)}:t.style}return e},M=(...t)=>{const r=[],o=t.map(E),i=[];if(r.push(f),n&&w&&i.push((function(e){const t=e.theme,r=t.components?.[n]?.styleOverrides;if(!r)return null;const o={};for(const t in r)o[t]=c(e,r[t]);return w(e,o)})),n&&!_&&i.push((function(e){const t=e.theme,r=t?.components?.[n]?.variants;return r?d(e,r):null})),b||i.push(s.A),Array.isArray(o[0])){const e=o.shift(),t=new Array(r.length).fill(""),n=new Array(i.length).fill("");let s;s=[...t,...e,...n],s.raw=[...t,...e.raw,...n],r.unshift(s)}const a=[...r,...o,...i],l=C(...a);return e.muiName&&(l.muiName=e.muiName),l};return C.withConfig&&(M.withConfig=C.withConfig),M}}function p(e){return e?e.charAt(0).toLowerCase()+e.slice(1):e}},63487:(e,t,n)=>{"use strict";n.d(t,{R:()=>C}),n(16280),n(44114);var r=n(77325),o=n(24360),i=n(82617),s=n(85975),a=n(83986);const l=["afterCellMetaReset","afterChange","afterContextMenuDefaultOptions","beforeContextMenuSetItems","afterDropdownMenuDefaultOptions","beforeDropdownMenuSetItems","afterContextMenuHide","beforeContextMenuShow","afterContextMenuShow","afterCopyLimit","beforeCreateCol","afterColumnSequenceChange","afterCreateCol","beforeCreateRow","afterCreateRow","afterDeselect","afterDestroy","afterDocumentKeyDown","afterDrawSelection","beforeRemoveCellClassNames","beforeCompositionStart","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","afterSetTheme","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","modifyGetCoordsElement","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"],u=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"]]),h=new Map([[]]);function c(e,t,n){d(e,t),t.set(e,n)}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 e.set(f(e,t),n),n}function p(e,t){return e.get(f(e,t))}function f(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")}n(57145),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(98992),n(54520),n(72577),n(3949);var g=new WeakMap,y=new WeakMap,w=new WeakMap,v=new WeakSet;class _{constructor(){var e;d(this,e=v),e.add(this),c(this,g,new Map),c(this,y,new Map),c(this,w,new Set),l.forEach((e=>f(v,this,b).call(this,e)))}getHooks(e){var t;return null!==(t=p(g,this).get(e))&&void 0!==t?t:[]}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};p(g,this).has(e)||(f(v,this,b).call(this,e),l.push(e));const r=p(g,this).get(e);if(r.find((e=>e.callback===t)))return;const o=Number.isInteger(n.orderIndex)?n.orderIndex:0,i=!!n.runOnce,s=!!n.initialHook;let a=!1;if(s){const e=r.find((e=>e.initialHook));e&&(e.callback=t,a=!0)}if(!a){r.push({callback:t,orderIndex:o,runOnce:i,initialHook:s,skip:!1});let n=p(w,this).has(e);n||0===o||(n=!0,p(w,this).add(e)),n&&r.length>1&&p(g,this).set(e,r.toSorted(((e,t)=>e.orderIndex-t.orderIndex)))}}has(e){return p(g,this).has(e)&&p(g,this).get(e).length>0}remove(e,t){if(!p(g,this).has(e))return!1;const n=p(g,this).get(e),r=n.find((e=>e.callback===t));if(r){let t=p(y,this).get(e);return r.skip=!0,t+=1,t>100&&(p(g,this).set(e,n.filter((e=>!e.skip))),t=0),p(y,this).set(e,t),!0}return!1}destroy(){p(g,this).clear(),p(y,this).clear(),m(g,this,null),m(y,this,null)}}function b(e){p(g,this).set(e,[]),p(y,this).set(e,0)}const S=s.O`The plugin hook "[hookName]" was removed in Handsontable [removedInVersion].\x20
  114. Please consult release notes https://github.com/handsontable/handsontable/releases/tag/[removedInVersion] to\x20
  115. learn about the migration path.`;class C{constructor(){var e,t,n;e=this,t="globalBucket",n=new _,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}static getSingleton(){return E}getBucket(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return e?(e.pluginHookBucket||(e.pluginHookBucket=new _),e.pluginHookBucket):this.globalBucket}add(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,s=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,r.z0)(t,(t=>this.add(e,t,n))):(u.has(e)&&(0,i.R8)((0,o.V2)(S,{hookName:e,removedInVersion:u.get(e)})),h.has(e)&&(0,i.R8)(h.get(e)),this.getBucket(n).add(e,t,{orderIndex:s,runOnce:!1})),this}once(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3?arguments[3]:void 0;return Array.isArray(t)?(0,r.z0)(t,(t=>this.once(e,t,n))):this.getBucket(n).add(e,t,{orderIndex:o,runOnce:!0}),this}addAsFixed(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return Array.isArray(t)?(0,r.z0)(t,(t=>this.addAsFixed(e,t,n))):this.getBucket(n).add(e,t,{initialHook:!0}),this}remove(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return this.getBucket(n).remove(e,t)}has(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return this.getBucket(t).has(e)}run(e,t,n,r,o,i,s,l){{const u=this.getBucket().getHooks(t),h=u?u.length:0;let c=0;if(h)for(;c<h;){if(!u[c]||u[c].skip){c+=1;continue}const h=(0,a.Ty)(u[c].callback,e,n,r,o,i,s,l);void 0!==h&&(n=h),u[c]&&u[c].runOnce&&this.remove(t,u[c].callback),c+=1}}{const u=this.getBucket(e).getHooks(t),h=u?u.length:0;let c=0;if(h)for(;c<h;){if(!u[c]||u[c].skip){c+=1;continue}const h=(0,a.Ty)(u[c].callback,e,n,r,o,i,s,l);void 0!==h&&(n=h),u[c]&&u[c].runOnce&&this.remove(t,u[c].callback,e),c+=1}}return n}destroy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getBucket(e).destroy()}register(e){this.isRegistered(e)||l.push(e)}deregister(e){this.isRegistered(e)&&l.splice(l.indexOf(e),1)}isDeprecated(e){return h.has(e)||u.has(e)}isRegistered(e){return l.indexOf(e)>=0}getRegistered(){return l}}const E=new C},63662:(e,t,n)=>{"use strict";function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.d(t,{A:()=>r})},63984:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(96540),o=n(836),i=n(21362),s=n(79844),a=n(98855),l=n(26739),u=n(39241),h=n(1321),c=n(20439),d=n(89026),m=n(39407),p=n(74848);const f=(0,l.Ay)(s.Sh,{shouldForwardProp:e=>(0,a.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,s.WC)(e,t),!n.disableUnderline&&t.underline]}})((0,u.A)((({theme:e})=>{const t="light"===e.palette.mode,n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",o=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",i=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:o,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${d.A.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${d.A.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:i},variants:[{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${d.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${d.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${d.A.disabled}, .${d.A.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${d.A.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,h.A)()).map((([t])=>({props:{disableUnderline:!1,color:t},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t]?.main}`}}}))),{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:12}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:12}},{props:({ownerState:e})=>e.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.multiline&&e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}}]}}))),g=(0,l.Ay)(s.ck,{name:"MuiFilledInput",slot:"Input",overridesResolver:s.Oj})((0,u.A)((({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===e.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===e.palette.mode?null:"#fff",caretColor:"light"===e.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:e})=>e.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:e})=>e.startAdornment,style:{paddingLeft:0}},{props:({ownerState:e})=>e.endAdornment,style:{paddingRight:0}},{props:({ownerState:e})=>e.hiddenLabel&&"small"===e.size,style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:e})=>e.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]})))),y=r.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiFilledInput"}),{disableUnderline:r=!1,components:a={},componentsProps:l,fullWidth:u=!1,hiddenLabel:h,inputComponent:y="input",multiline:w=!1,slotProps:v,slots:_={},type:b="text",...S}=n,C={...n,disableUnderline:r,fullWidth:u,inputComponent:y,multiline:w,type:b},E=(e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:o,size:s,hiddenLabel:a,multiline:l}=e,u={root:["root",!n&&"underline",r&&"adornedStart",o&&"adornedEnd","small"===s&&`size${(0,m.A)(s)}`,a&&"hiddenLabel",l&&"multiline"],input:["input"]},h=(0,i.A)(u,d.N,t);return{...t,...h}})(n),M={root:{ownerState:C},input:{ownerState:C}},T=v??l?(0,o.A)(M,v??l):M,R=_.root??a.Root??f,A=_.input??a.Input??g;return(0,p.jsx)(s.Ay,{slots:{root:R,input:A},slotProps:T,fullWidth:u,inputComponent:y,multiline:w,ref:t,type:b,...S,classes:E})}));y.muiName="Input";const w=y},64051:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},64117:e=>{"use strict";e.exports=function(e){return null==e}},64226:function(e,t,n){!function(e){"use strict";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="";return e>20?t=40===e||50===e||60===e||80===e||100===e?"fed":"ain":e>0&&(t=["","af","il","ydd","ydd","ed","ed","ed","fed","fed","fed","eg","fed","eg","eg","fed","eg","eg","fed","eg","fed"][e]),e+t},week:{dow:1,doy:4}})}(n(95093))},64449:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402).has,i=n(25170),s=n(83789),a=n(38469),l=n(40507),u=n(9539);e.exports=function(e){var t=r(this),n=s(e);if(i(t)<=n.size)return!1!==a(t,(function(e){if(n.includes(e))return!1}),!0);var h=n.getIterator();return!1!==l(h,(function(e){if(o(t,e))return u(h,"normal",!1)}))}},65213:(e,t,n)=>{"use strict";var r=n(44576),o=n(79039),i=r.RegExp,s=!o((function(){var e=!0;try{i(".","d")}catch(t){e=!1}var t={},n="",r=e?"dgimsy":"gimsy",o=function(e,r){Object.defineProperty(t,e,{get:function(){return n+=r,!0}})},s={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};for(var a in e&&(s.hasIndices="d"),s)o(a,s[a]);return Object.getOwnPropertyDescriptor(i.prototype,"flags").get.call(t)!==r||n!==r}));e.exports={correct:s}},65387:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(836);var o=n(63132);const i={borderRadius:4};var s=n(33372),a=n(95548),l=n(98762);function u(e,t){const n=this;if(n.vars){if(!n.colorSchemes?.[e]||"function"!=typeof n.getColorSchemeSelector)return{};let r=n.getColorSchemeSelector(e);return"&"===r?t:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:t})}return n.palette.mode===e?t:{}}const h=function(e={},...t){const{breakpoints:n={},palette:h={},spacing:c,shape:d={},...m}=e,p=function(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:r=5,...o}=e,i=(e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>({...e,[t.key]:t.val})),{})})(t),s=Object.keys(i);function a(e){return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n})`}function l(e){return`@media (max-width:${("number"==typeof t[e]?t[e]:e)-r/100}${n})`}function u(e,o){const i=s.indexOf(o);return`@media (min-width:${"number"==typeof t[e]?t[e]:e}${n}) and (max-width:${(-1!==i&&"number"==typeof t[s[i]]?t[s[i]]:o)-r/100}${n})`}return{keys:s,values:i,up:a,down:l,between:u,only:function(e){return s.indexOf(e)+1<s.length?u(e,s[s.indexOf(e)+1]):a(e)},not:function(e){const t=s.indexOf(e);return 0===t?a(s[1]):t===s.length-1?l(s[t]):u(e,s[s.indexOf(e)+1]).replace("@media","@media not all and")},unit:n,...o}}(n),f=(0,s.A)(c);let g=(0,r.A)({breakpoints:p,direction:"ltr",components:{},palette:{mode:"light",...h},spacing:f,shape:{...i,...d}},m);return g=(0,o.Ay)(g),g.applyStyles=u,g=t.reduce(((e,t)=>(0,r.A)(e,t)),g),g.unstable_sxConfig={...l.A,...m?.unstable_sxConfig},g.unstable_sx=function(e){return(0,a.A)({sx:e,theme:this})},g}},65418:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(52044).A},65543:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}})}(n(95093))},65615:(e,t,n)=>{"use strict";n.d(t,{As:()=>i,Im:()=>l,O9:()=>s,b0:()=>a,gd:()=>u,k_:()=>b});var r=n(95093),o=n(85975);function i(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()}return t}function s(e){return void 0!==e}function a(e){return void 0===e}function l(e){return null===e||""===e||a(e)}function u(e){return"[object RegExp]"===Object.prototype.toString.call(e)}const h="length",c=e=>parseInt(e,16),d=e=>parseInt(e,10),m=(e,t,n)=>e.substr(t,n),p=e=>e.codePointAt(0)-65,f=e=>`${e}`.replace(/\-/g,""),g=e=>c(m(f(e),c("12"),p("F")))/(c(m(f(e),p("B"),~~![][h]))||9),y=()=>"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 w=!1;const v={invalid:()=>o.O`
  116. The license key for Handsontable is invalid.\x20
  117. If you need any help, contact us at support@handsontable.com.`,expired:e=>{let{keyValidityDate:t,hotVersion:n}=e;return o.O`
  118. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  119. version ${n}. Renew your license key at handsontable.com or downgrade to a version released prior\x20
  120. to ${t}. If you need any help, contact us at sales@handsontable.com.`},missing:()=>o.O`
  121. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  122. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  123. passing the key: 'non-commercial-and-evaluation'. If you need any help, contact\x20
  124. us at support@handsontable.com.`,non_commercial:()=>""},_={invalid:()=>o.O`
  125. The license key for Handsontable is invalid.\x20
  126. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> on how to\x20
  127. 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 o.O`
  128. The license key for Handsontable expired on ${t}, and is not valid for the installed\x20
  129. version ${n}. <a href="https://handsontable.com/pricing" target="_blank">Renew</a> your\x20
  130. license key or downgrade to a version released prior to ${t}. If you need any\x20
  131. help, contact us at <a href="mailto:sales@handsontable.com">sales@handsontable.com</a>.`},missing:()=>o.O`
  132. The license key for Handsontable is missing. Use your purchased key to activate the product.\x20
  133. Alternatively, you can activate Handsontable to use for non-commercial purposes by\x20
  134. passing the key: 'non-commercial-and-evaluation'.\x20
  135. <a href="https://handsontable.com/docs/tutorial-license-key.html" target="_blank">Read more</a> about it in\x20
  136. the documentation or contact us at <a href="mailto:support@handsontable.com">support@handsontable.com</a>.`,non_commercial:()=>""};function b(e,t){const n=!l(e),o="string"==typeof e&&"non-commercial-and-evaluation"===e.toLowerCase(),i="15.3.0";let s,a="invalid",u="invalid";const b=function(e){let t=[][h],n=t;if(e[h]!==p("Z"))return!1;for(let t="",r="B<H4P+".split(""),o=p(r.shift());o;o=p(r.shift()||"A"))--o<""[h]?n|=(d(`${d(c(t)+(c(m(e,Math.abs(o),2))+[]).padStart(2,"0"))}`)%97||2)>>1:t=m(e,o,o?1===r[h]?9:8:6);return n===t}(e=f(e||""));if(n||o||b)if(b){const t=r("29/04/2025","DD/MM/YYYY"),n=Math.floor(t.toDate().getTime()/864e5),o=g(e);s=r(864e5*(o+1),"x").format("MMMM DD, YYYY"),n>o?(a="expired",u="expired"):(a="valid",u="valid")}else o?(a="non_commercial",u="valid"):(a="invalid",u="invalid");else a="missing",u="missing";if(y()&&(a="valid",u="valid"),w||"valid"===a||(v[a]({keyValidityDate:s,hotVersion:i})&&console["non_commercial"===a?"info":"warn"](v[a]({keyValidityDate:s,hotVersion:i})),w=!0),"valid"!==u&&t.parentNode&&_[u]({keyValidityDate:s,hotVersion:i})){const e=document.createElement("div");e.className="handsontable hot-display-license-info",e.innerHTML=_[u]({keyValidityDate:s,hotVersion:i}),t.parentNode.insertBefore(e,t.nextSibling)}}},66119:(e,t,n)=>{"use strict";var r=n(25745),o=n(33392),i=r("keys");e.exports=function(e){return i[e]||(i[e]=o(e))}},66422:(e,t,n)=>{"use strict";n.d(t,{$o:()=>f,B6:()=>p,D9:()=>v,DY:()=>U,DZ:()=>T,H0:()=>D,Jg:()=>u,Ku:()=>H,L2:()=>w,L4:()=>E,MG:()=>S,Nb:()=>R,Nf:()=>a,PF:()=>I,Pk:()=>y,Qg:()=>A,S2:()=>Y,SM:()=>b,Sb:()=>h,VN:()=>F,Vy:()=>B,Xq:()=>k,ZA:()=>d,ZW:()=>_,_R:()=>C,_h:()=>x,ax:()=>o,dV:()=>L,g:()=>s,gg:()=>i,gq:()=>P,n:()=>g,nF:()=>c,pt:()=>m,rE:()=>V,t0:()=>l,u8:()=>O,vC:()=>r,wD:()=>N,wP:()=>M});const r=e=>["tabindex",e],o=()=>["role","treegrid"],i=()=>["role","presentation"],s=()=>["role","gridcell"],a=()=>["role","rowheader"],l=()=>["role","rowgroup"],u=()=>["role","columnheader"],h=()=>["role","row"],c=()=>["role","menu"],d=()=>["role","menuitem"],m=()=>["role","menuitemcheckbox"],p=()=>["role","combobox"],f=()=>["role","listbox"],g=()=>["role","option"],y=()=>["role","checkbox"],w=()=>["scope","col"],v=()=>["scope","row"],_=()=>["type","text"],b=e=>["aria-label",e],S=()=>["aria-hidden","true"],C=()=>["aria-disabled","true"],E=()=>["aria-multiselectable","true"],M=e=>["aria-haspopup",e],T=e=>["aria-rowcount",e],R=e=>["aria-colcount",e],A=e=>["aria-rowindex",e],N=e=>["aria-colindex",e],L=e=>["aria-expanded",e],x=e=>["aria-sort",e],O=()=>["aria-readonly","true"],I=()=>["aria-invalid","true"],k=e=>["aria-checked",e],D=()=>["aria-selected","true"],P=()=>["aria-autocomplete","list"],H=e=>["aria-controls",e],F=e=>["aria-activedescendant",e],Y=e=>["aria-live",e],V=e=>["aria-relevant",e],U=e=>["aria-setsize",e],B=e=>["aria-posinset",e]},66584:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},66699:(e,t,n)=>{"use strict";var r=n(43724),o=n(24913),i=n(6980);e.exports=r?function(e,t,n){return o.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},66933:(e,t,n)=>{"use strict";var r=n(79504),o=n(34376),i=n(94901),s=n(22195),a=n(655),l=r([].push);e.exports=function(e){if(i(e))return e;if(o(e)){for(var t=e.length,n=[],r=0;r<t;r++){var u=e[r];"string"==typeof u?l(n,u):"number"!=typeof u&&"Number"!==s(u)&&"String"!==s(u)||l(n,a(u))}var h=n.length,c=!0;return function(e,t){if(c)return c=!1,t;if(o(this))return t;for(var r=0;r<h;r++)if(n[r]===e)return t}}}},67246:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,B:()=>i});var r=n(96148),o=n(1908);function i(e){return(0,o.Ay)("MuiInput",e)}const s={...n(26410).A,...(0,r.A)("MuiInput",["root","underline","input"])}},67357:(e,t,n)=>{"use strict";var r=n(46518),o=n(79504),i=n(67750),s=n(91291),a=n(655),l=n(79039),u=o("".charAt);r({target:"String",proto:!0,forced:l((function(){return"\ud842"!=="𠮷".at(-2)}))},{at:function(e){var t=a(i(this)),n=t.length,r=s(e),o=r>=0?r:n+r;return o<0||o>=n?void 0:u(t,o)}})},67680:(e,t,n)=>{"use strict";var r=n(79504);e.exports=r([].slice)},67750:(e,t,n)=>{"use strict";var r=n(64117),o=TypeError;e.exports=function(e){if(r(e))throw new o("Can't call method on "+e);return e}},67979:(e,t,n)=>{"use strict";var r=n(28551);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}},68750:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402),i=n(25170),s=n(83789),a=n(38469),l=n(40507),u=o.Set,h=o.add,c=o.has;e.exports=function(e){var t=r(this),n=s(e),o=new u;return i(t)>n.size?l(n.getIterator(),(function(e){c(t,e)&&h(o,e)})):a(t,(function(e){n.includes(e)&&h(o,e)})),o}},69330:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},69478:(e,t,n)=>{"use strict";n.d(t,{j:()=>i}),n(44114);var r=n(20091),o=n(66422);function i(e,t,n,i,s,a,l){const u=l.ariaTags,h=[],c=[],d=[],m=[];l.className&&(0,r.iQ)(t,l.className),l.readOnly?(h.push(l.readOnlyCellClassName),u&&m.push((0,o.u8)())):u&&d.push((0,o.u8)()[0]),!1===l.valid&&l.invalidCellClassName?(h.push(l.invalidCellClassName),u&&m.push((0,o.PF)())):(c.push(l.invalidCellClassName),u&&d.push((0,o.PF)()[0])),!1===l.wordWrap&&l.noWordWrapClassName&&h.push(l.noWordWrapClassName),!a&&l.placeholder&&h.push(l.placeholderCellClassName),(0,r.vy)(t,c),(0,r.iQ)(t,h),(0,r.De)(t,d),(0,r.Bq)(t,m)}i.RENDERER_TYPE="base"},69532:function(e,t,n){!function(e){"use strict";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,o){return e+" "+n(t[o],e,r)}function o(e,r,o){return n(t[o],e,r)}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:function(e,t){return t?"dažas sekundes":"dažām sekundēm"},ss:r,m:o,mm:r,h:o,hh:r,d:o,dd:r,M:o,MM:r,y:o,yy:r},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},69565:(e,t,n)=>{"use strict";var r=n(40616),o=Function.prototype.call;e.exports=r?o.bind(o):function(){return o.apply(o,arguments)}},70081:(e,t,n)=>{"use strict";var r=n(69565),o=n(79306),i=n(28551),s=n(16823),a=n(50851),l=TypeError;e.exports=function(e,t){var n=arguments.length<2?a(e):t;if(o(n))return i(r(n,e));throw new l(s(e)+" is not iterable")}},70217:function(e,t,n){!function(e){"use strict";e.defineLocale("gd",{months:["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"],monthsShort:["Faoi","Gear","Màrt","Gibl","Cèit","Ògmh","Iuch","Lùn","Sult","Dàmh","Samh","Dùbh"],monthsParseExact:!0,weekdays:["Didòmhnaich","Diluain","Dimàirt","Diciadain","Diardaoin","Dihaoine","Disathairne"],weekdaysShort:["Did","Dil","Dim","Dic","Dia","Dih","Dis"],weekdaysMin:["Dò","Lu","Mà","Ci","Ar","Ha","Sa"],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){return e+(1===e?"d":e%10==2?"na":"mh")},week:{dow:1,doy:4}})}(n(95093))},71026:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=n(96540),o=n(33983),i=n(34164),s=n(21362),a=n(26739),l=n(20439),u=n(40583),h=n(96148),c=n(1908);function d(e){return(0,c.Ay)("MuiList",e)}(0,h.A)("MuiList",["root","padding","dense","subheader"]);var m=n(74848);const p=(0,a.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),f=r.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiList"}),{children:o,className:a,component:h="ul",dense:c=!1,disablePadding:f=!1,subheader:g,...y}=n,w=r.useMemo((()=>({dense:c})),[c]),v={...n,component:h,dense:c,disablePadding:f},_=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,s.A)(i,d,t)})(v);return(0,m.jsx)(u.A.Provider,{value:w,children:(0,m.jsxs)(p,{as:h,className:(0,i.A)(_.root,a),ref:t,ownerState:v,...y,children:[g,o]})})})),g=n(244).A;var y=n(30301),w=n(37313),v=n(41538);function _(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function b(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function S(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join("")))}function C(e,t,n,r,o,i){let s=!1,a=o(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const t=!r&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&S(a,i)&&!t)return a.focus(),!0;a=o(e,a,n)}return!1}const E=r.forwardRef((function(e,t){const{actions:n,autoFocus:i=!1,autoFocusItem:s=!1,children:a,className:l,disabledItemsFocusable:u=!1,disableListWrap:h=!1,onKeyDown:c,variant:d="selectedMenu",...p}=e,E=r.useRef(null),M=r.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,w.A)((()=>{i&&E.current.focus()}),[i]),r.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,{direction:t})=>{const n=!E.current.style.width;if(e.clientHeight<E.current.clientHeight&&n){const n=`${g((0,v.A)(e))}px`;E.current.style["rtl"===t?"paddingLeft":"paddingRight"]=n,E.current.style.width=`calc(100% + ${n})`}return E.current}})),[]);const T=(0,y.A)(E,t);let R=-1;r.Children.forEach(a,((e,t)=>{r.isValidElement(e)?(e.props.disabled||("selectedMenu"===d&&e.props.selected||-1===R)&&(R=t),R===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(R+=1,R>=a.length&&(R=-1))):R===t&&(R+=1,R>=a.length&&(R=-1))}));const A=r.Children.map(a,((e,t)=>{if(t===R){const t={};return s&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===d&&(t.tabIndex=0),r.cloneElement(e,t)}return e}));return(0,m.jsx)(f,{role:"menu",ref:T,className:l,onKeyDown:e=>{const t=E.current,n=e.key;if(e.ctrlKey||e.metaKey||e.altKey)return void(c&&c(e));const r=(0,o.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),C(t,r,h,u,_);else if("ArrowUp"===n)e.preventDefault(),C(t,r,h,u,b);else if("Home"===n)e.preventDefault(),C(t,null,h,u,_);else if("End"===n)e.preventDefault(),C(t,null,h,u,b);else if(1===n.length){const o=M.current,i=n.toLowerCase(),s=performance.now();o.keys.length>0&&(s-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=s,o.keys.push(i);const a=r&&!o.repeating&&S(r,o);o.previousKeyMatched&&(a||C(t,r,!1,u,_,o))?e.preventDefault():o.previousKeyMatched=!1}c&&c(e)},tabIndex:i?0:-1,...p,children:A})}))},71072:(e,t,n)=>{"use strict";var r=n(61828),o=n(88727);e.exports=Object.keys||function(e){return r(e,o)}},71287:(e,t,n)=>{"use strict";var r;n.d(t,{i:()=>a,s:()=>s});var o=n(96540),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,s=i||function(e){return e()},a=i||o.useLayoutEffect},71409:(e,t,n)=>{"use strict";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 o(e){return r(e,[","])}function i(e,t,n){let r=-1;for("function"==typeof t?(n=t,t=e):r=e-1;++r<=t&&!1!==n(r););}function s(e,t,n){let r=e+1;for("function"==typeof t&&(n=t,t=0);--r>=t&&!1!==n(r););}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}n.d(t,{B5:()=>a,LA:()=>o,Ti:()=>i,fk:()=>s,kf:()=>r,qE:()=>l}),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(98992),n(81454)},72264:function(e,t,n){!function(e){"use strict";var t={1:"၁",2:"၂",3:"၃",4:"၄",5:"၅",6:"၆",7:"၇",8:"၈",9:"၉",0:"၀"},n={"၁":"1","၂":"2","၃":"3","၄":"4","၅":"5","၆":"6","၇":"7","၈":"8","၉":"9","၀":"0"};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}})}(n(95093))},72475:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},72577:(e,t,n)=>{"use strict";n(20116)},72652:(e,t,n)=>{"use strict";var r=n(76080),o=n(69565),i=n(28551),s=n(16823),a=n(44209),l=n(26198),u=n(1625),h=n(70081),c=n(50851),d=n(9539),m=TypeError,p=function(e,t){this.stopped=e,this.result=t},f=p.prototype;e.exports=function(e,t,n){var g,y,w,v,_,b,S,C=n&&n.that,E=!(!n||!n.AS_ENTRIES),M=!(!n||!n.IS_RECORD),T=!(!n||!n.IS_ITERATOR),R=!(!n||!n.INTERRUPTED),A=r(t,C),N=function(e){return g&&d(g,"normal"),new p(!0,e)},L=function(e){return E?(i(e),R?A(e[0],e[1],N):A(e[0],e[1])):R?A(e,N):A(e)};if(M)g=e.iterator;else if(T)g=e;else{if(!(y=c(e)))throw new m(s(e)+" is not iterable");if(a(y)){for(w=0,v=l(e);v>w;w++)if((_=L(e[w]))&&u(f,_))return _;return new p(!1)}g=h(e,y)}for(b=M?e.next:g.next;!(S=o(b,g)).done;){try{_=L(S.value)}catch(e){d(g,"throw",e)}if("object"==typeof _&&_&&u(f,_))return _}return new p(!1)}},72777:(e,t,n)=>{"use strict";var r=n(69565),o=n(20034),i=n(10757),s=n(55966),a=n(84270),l=n(78227),u=TypeError,h=l("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var n,l=s(e,h);if(l){if(void 0===t&&(t="default"),n=r(l,e,t),!o(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},73386:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},73404:(e,t,n)=>{"use strict";e.exports=n(3072)},73506:(e,t,n)=>{"use strict";var r=n(13925),o=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+o(e)+" as a prototype")}},73635:function(e,t,n){!function(e){"use strict";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){return e+(/сехет$/i.exec(e)?"рен":/ҫул$/i.exec(e)?"тан":"ран")},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}})}(n(95093))},73739:function(e,t,n){!function(e){"use strict";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?"വൈകുന്നേരം":"രാത്രി"}})}(n(95093))},74063:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},75337:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96540),o=n(24902),i=n(10644),s=n(17726),a=n(74848);const l=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function u(e){const t=[],n=[];return Array.from(e.querySelectorAll(l)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector(`input[type="radio"]${t}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function h(){return!0}const c=function(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:l=!1,disableRestoreFocus:c=!1,getTabbable:d=u,isEnabled:m=h,open:p}=e,f=r.useRef(!1),g=r.useRef(null),y=r.useRef(null),w=r.useRef(null),v=r.useRef(null),_=r.useRef(!1),b=r.useRef(null),S=(0,o.A)((0,s.A)(t),b),C=r.useRef(null);r.useEffect((()=>{p&&b.current&&(_.current=!n)}),[n,p]),r.useEffect((()=>{if(!p||!b.current)return;const e=(0,i.A)(b.current);return b.current.contains(e.activeElement)||(b.current.hasAttribute("tabIndex")||b.current.setAttribute("tabIndex","-1"),_.current&&b.current.focus()),()=>{c||(w.current&&w.current.focus&&(f.current=!0,w.current.focus()),w.current=null)}}),[p]),r.useEffect((()=>{if(!p||!b.current)return;const e=(0,i.A)(b.current),t=t=>{C.current=t,!l&&m()&&"Tab"===t.key&&e.activeElement===b.current&&t.shiftKey&&(f.current=!0,y.current&&y.current.focus())},n=()=>{const t=b.current;if(null===t)return;if(!e.hasFocus()||!m()||f.current)return void(f.current=!1);if(t.contains(e.activeElement))return;if(l&&e.activeElement!==g.current&&e.activeElement!==y.current)return;if(e.activeElement!==v.current)v.current=null;else if(null!==v.current)return;if(!_.current)return;let n=[];if(e.activeElement!==g.current&&e.activeElement!==y.current||(n=d(b.current)),n.length>0){const e=Boolean(C.current?.shiftKey&&"Tab"===C.current?.key),t=n[0],r=n[n.length-1];"string"!=typeof t&&"string"!=typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const r=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(r),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,l,c,m,p,d]);const E=e=>{null===w.current&&(w.current=e.relatedTarget),_.current=!0};return(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)("div",{tabIndex:p?0:-1,onFocus:E,ref:g,"data-testid":"sentinelStart"}),r.cloneElement(t,{ref:S,onFocus:e=>{null===w.current&&(w.current=e.relatedTarget),_.current=!0,v.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,a.jsx)("div",{tabIndex:p?0:-1,onFocus:E,ref:y,"data-testid":"sentinelEnd"})]})}},76080:(e,t,n)=>{"use strict";var r=n(27476),o=n(79306),i=n(40616),s=r(r.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?s(e,t):function(){return e.apply(t,arguments)}}},76314:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var u=0;u<e.length;u++){var h=[].concat(e[u]);r&&s[h[0]]||(void 0!==i&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=i),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),o&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=o):h[4]="".concat(o)),t.push(h))}},t}},76396:(e,t,n)=>{"use strict";n.d(t,{ML:()=>p,NB:()=>g,Qz:()=>a,_e:()=>f,ay:()=>s,f7:()=>y}),n(16280),n(44114),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(98992),n(37550);var r=n(94814),o=n(77325),i=n(65615);const s=0,a=1,l=2,u=3,h=[u,l],c=[["number"],["number","string"],["number","undefined"],["number","string","undefined"]],d=Symbol("root"),m=Symbol("child");function p(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),o=t===d;let i=s;if(n){const t=e[0];0===e.length?i=a:o&&t instanceof r.A?i=u:o&&Array.isArray(t)?i=p(t,m):e.length>=2&&e.length<=4&&!e.some(((e,t)=>!c[t].includes(typeof e)))&&(i=l)}return i}function f(e){let{createCellCoords:t,createCellRange:n,keepDirection:r=!1,propToCol:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!h.includes(e))throw new Error("Unsupported selection ranges schema type was provided.");return function(s){const a=e===u;let l=a?s.from.row:s[0],h=a?s.from.col:s[1],c=a?s.to.row:s[2],d=a?s.to.col:s[3];if("function"==typeof o&&("string"==typeof h&&(h=o(h)),"string"==typeof d&&(d=o(d))),(0,i.b0)(c)&&(c=l),(0,i.b0)(d)&&(d=h),!r){const e=l,t=h,n=c,r=d;l=Math.min(e,n),h=Math.min(t,r),c=Math.max(e,n),d=Math.max(t,r)}const m=t(l,h),p=t(c,d);return n(m,m,p)}}function g(e){const t=p(e.getSelected());if(t===s||t===a)return[];const n=f(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;(0,o.z0)(e.getSelected(),(e=>{const{from:t,to:i}=n(e),s=Math.max(t.col,0),a=i.col-s+1;(0,o.z0)(Array.from(new Array(a),((e,t)=>s+t)),(e=>{r.has(e)||r.add(e)}))}));const i=Array.from(r).sort(((e,t)=>e-t));return(0,o.mu)(i,((e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])}function y(e){const t=p(e.getSelected());if(t===s||t===a)return[];const n=f(t,{createCellCoords:e._createCellCoords.bind(e),createCellRange:e._createCellRange.bind(e)}),r=new Set;(0,o.z0)(e.getSelected(),(e=>{const{from:t,to:i}=n(e),s=Math.max(t.row,0),a=i.row-s+1;(0,o.z0)(Array.from(new Array(a),((e,t)=>s+t)),(e=>{r.has(e)||r.add(e)}))}));const i=Array.from(r).sort(((e,t)=>e-t));return(0,o.mu)(i,((e,t,n,r)=>(0!==n&&t===r[n-1]+1?e[e.length-1][1]+=1:e.push([t,1]),e)),[])}},76761:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),o=n(1713);function i(){return r.useContext(o.A)}},77075:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},77325:(e,t,n)=>{"use strict";function r(e){const t=e.length;let n=0;for(;n<t;)e[n]=[e[n]],n+=1}function o(e,t){const n=t.length;let r=0;for(;r<n;)e.push(t[r]),r+=1}function i(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 o=0;o<n;o++)for(let n=0;n<r;n++)t[n]||(t[n]=[]),t[n][o]=e[o][n];return t}function s(e,t,n,r){let o=-1,i=e,s=n;Array.isArray(e)||(i=Array.from(e));const a=i.length;for(r&&a&&(o+=1,s=i[o]),o+=1;o<a;)s=t(s,i[o],o,i),o+=1;return s}function a(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const o=r.length,i=[];let s=-1;for(;n<o;){const e=r[n];t(e,n,r)&&(s+=1,i[s]=e),n+=1}return i}function l(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const o=r.length,i=[];let s=-1;for(;n<o;){const e=r[n];s+=1,i[s]=t(e,n,r),n+=1}return i}function u(e,t){let n=0,r=e;Array.isArray(e)||(r=Array.from(e));const o=r.length;for(;n<o&&!1!==t(r[n],n,r);)n+=1;return e}function h(e){const t=[];return u(e,(e=>{-1===t.indexOf(e)&&t.push(e)})),t}function c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const[r,...o]=[...t];let i=r;return u(o,(e=>{i=i.filter((t=>!e.includes(t)))})),i}function d(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:" ";return e.split(t)}n.d(t,{Gn:()=>d,Sh:()=>o,YD:()=>l,Zz:()=>r,fg:()=>c,h9:()=>i,jF:()=>h,mu:()=>s,y0:()=>a,z0:()=>u}),n(44114),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(98992),n(54520)},77329:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},77347:(e,t,n)=>{"use strict";var r=n(43724),o=n(69565),i=n(48773),s=n(6980),a=n(25397),l=n(56969),u=n(39297),h=n(35917),c=Object.getOwnPropertyDescriptor;t.f=r?c:function(e,t){if(e=a(e),t=l(t),h)try{return c(e,t)}catch(e){}if(u(e,t))return s(!o(i.f,e,t),e[t])}},77387:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63662);function o(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,r.A)(e,t)}},77584:(e,t,n)=>{"use strict";var r=n(20034),o=n(66699);e.exports=function(e,t){r(t)&&"cause"in t&&o(e,"cause",t.cause)}},77629:(e,t,n)=>{"use strict";var r=n(96395),o=n(44576),i=n(39433),s="__core-js_shared__",a=e.exports=o[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.43.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.43.0/LICENSE",source:"https://github.com/zloirock/core-js"})},77659:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},77710:(e,t,n)=>{"use strict";n.d(t,{A:()=>s}),n(44114);var r=n(32919),o=n(83986);const i={_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,i,s,a){if(this._localHooks[e]){const l=this._localHooks[e].length;for(let u=0;u<l;u++)(0,o.Ty)(this._localHooks[e][u],this,t,n,r,i,s,a)}},clearLocalHooks(){return this._localHooks={},this}};(0,r.LH)(i,"MIXIN_NAME","localHooks",{writable:!1,enumerable:!1});const s=i},77740:(e,t,n)=>{"use strict";var r=n(39297),o=n(35031),i=n(77347),s=n(24913);e.exports=function(e,t,n){for(var a=o(t),l=s.f,u=i.f,h=0;h<a.length;h++){var c=a[h];r(e,c)||n&&r(n,c)||l(e,c,u(t,c))}}},77792:(e,t,n)=>{"use strict";n.d(t,{H:()=>s,N:()=>i}),n(98992),n(81454);var r=n(83986),o=n(77325);function i(e,t,n,o){const i=n.length?n[0]:void 0;return[...e.slice(0,i),...n.map(((e,t)=>(0,r.Tn)(o)?o(e,t):o)),...void 0===i?[]:e.slice(i)]}function s(e,t){return(0,o.y0)(e,((e,n)=>!1===t.includes(n)))}},77853:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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}})}(n(95093))},78164:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(96540),o=n(21362),i=n(836),s=n(79844),a=n(98855),l=n(26739),u=n(39241),h=n(1321),c=n(20439),d=n(67246),m=n(74848);const p=(0,l.Ay)(s.Sh,{shouldForwardProp:e=>(0,a.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...(0,s.WC)(e,t),!n.disableUnderline&&t.underline]}})((0,u.A)((({theme:e})=>{let t="light"===e.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(t=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:e})=>e.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:e})=>!e.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${d.A.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${d.A.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${t}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${d.A.disabled}, .${d.A.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${t}`}},[`&.${d.A.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter((0,h.A)()).map((([t])=>({props:{color:t,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[t].main}`}}})))]}}))),f=(0,l.Ay)(s.ck,{name:"MuiInput",slot:"Input",overridesResolver:s.Oj})({}),g=r.forwardRef((function(e,t){const n=(0,c.b)({props:e,name:"MuiInput"}),{disableUnderline:r=!1,components:a={},componentsProps:l,fullWidth:u=!1,inputComponent:h="input",multiline:g=!1,slotProps:y,slots:w={},type:v="text",..._}=n,b=(e=>{const{classes:t,disableUnderline:n}=e,r={root:["root",!n&&"underline"],input:["input"]},i=(0,o.A)(r,d.B,t);return{...t,...i}})(n),S={root:{ownerState:{disableUnderline:r}}},C=y??l?(0,i.A)(y??l,S):S,E=w.root??a.Root??p,M=w.input??a.Input??f;return(0,m.jsx)(s.Ay,{slots:{root:E,input:M},slotProps:C,fullWidth:u,inputComponent:h,multiline:g,ref:t,type:v,..._,classes:b})}));g.muiName="Input";const y=g},78227:(e,t,n)=>{"use strict";var r=n(44576),o=n(25745),i=n(39297),s=n(33392),a=n(4495),l=n(7040),u=r.Symbol,h=o("wks"),c=l?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(h,e)||(h[e]=a&&i(u,e)?u[e]:c("Symbol."+e)),h[e]}},78474:function(e,t,n){!function(e){"use strict";var t={0:"-чү",1:"-чи",2:"-чи",3:"-чү",4:"-чү",5:"-чи",6:"-чы",7:"-чи",8:"-чи",9:"-чу",10:"-чу",20:"-чы",30:"-чу",40:"-чы",50:"-чү",60:"-чы",70:"-чи",80:"-чи",90:"-чу",100:"-чү"};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){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(95093))},78854:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(96540),o=n(3576);const i=function(e){const t=r.useRef(e);return(0,o.A)((()=>{t.current=e})),r.useRef(((...e)=>(0,t.current)(...e))).current}},79039:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},79306:(e,t,n)=>{"use strict";var r=n(94901),o=n(16823),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(o(e)+" is not a function")}},79402:function(e,t,n){!function(e){"use strict";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;return e+(1==~~(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")},week:{dow:1,doy:4}})}(n(95093))},79472:(e,t,n)=>{"use strict";var r,o=n(44576),i=n(18745),s=n(94901),a=n(84215),l=n(82839),u=n(67680),h=n(22812),c=o.Function,d=/MSIE .\./.test(l)||"BUN"===a&&((r=o.Bun.version.split(".")).length<3||"0"===r[0]&&(r[1]<3||"3"===r[1]&&"0"===r[2]));e.exports=function(e,t){var n=t?2:1;return d?function(r,o){var a=h(arguments.length,1)>n,l=s(r)?r:c(r),d=a?u(arguments,n):[],m=a?function(){i(l,this,d)}:l;return t?e(m,o):e(m)}:e}},79504:(e,t,n)=>{"use strict";var r=n(40616),o=Function.prototype,i=o.call,s=r&&o.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},79680:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}function n(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;return n(0===t?e/10:t)}if(e<1e4){for(;e>=10;)e/=10;return n(e)}return n(e/=1e3)}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:function(e){return n(e.substr(0,e.indexOf(" ")))?"a "+e:"an "+e},past:function(e){return n(e.substr(0,e.indexOf(" ")))?"viru "+e:"virun "+e},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}})}(n(95093))},79720:(e,t,n)=>{"use strict";n.d(t,{B:()=>r,b:()=>o});const r="gridDefault",o="editorManager.handlingEditor"},79834:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},79844:(e,t,n)=>{"use strict";n.d(t,{ck:()=>k,Sh:()=>I,Ay:()=>P,Oj:()=>O,WC:()=>x});var r=n(4076),o=n(96540),i=n(34164),s=n(21362),a=n(52044),l=n(24902),u=n(3576),h=n(78854),c=n(88612),d=n(74848);function m(e){return parseInt(e,10)||0}const p={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};function f(e){return function(e){for(const t in e)return!1;return!0}(e)||0===e.outerHeightStyle&&!e.overflowing}const g=o.forwardRef((function(e,t){const{onChange:n,maxRows:r,minRows:i=1,style:s,value:g,...y}=e,{current:w}=o.useRef(null!=g),v=o.useRef(null),_=(0,l.A)(t,v),b=o.useRef(null),S=o.useRef(null),C=o.useCallback((()=>{const t=v.current,n=S.current;if(!t||!n)return;const o=(0,c.A)(t).getComputedStyle(t);if("0px"===o.width)return{outerHeightStyle:0,overflowing:!1};n.style.width=o.width,n.value=t.value||e.placeholder||"x","\n"===n.value.slice(-1)&&(n.value+=" ");const s=o.boxSizing,a=m(o.paddingBottom)+m(o.paddingTop),l=m(o.borderBottomWidth)+m(o.borderTopWidth),u=n.scrollHeight;n.value="x";const h=n.scrollHeight;let d=u;return i&&(d=Math.max(Number(i)*h,d)),r&&(d=Math.min(Number(r)*h,d)),d=Math.max(d,h),{outerHeightStyle:d+("border-box"===s?a+l:0),overflowing:Math.abs(d-u)<=1}}),[r,i,e.placeholder]),E=(0,h.A)((()=>{const e=v.current,t=C();if(!e||!t||f(t))return!1;const n=t.outerHeightStyle;return null!=b.current&&b.current!==n})),M=o.useCallback((()=>{const e=v.current,t=C();if(!e||!t||f(t))return;const n=t.outerHeightStyle;b.current!==n&&(b.current=n,e.style.height=`${n}px`),e.style.overflow=t.overflowing?"hidden":""}),[C]),T=o.useRef(-1);return(0,u.A)((()=>{const e=(0,a.A)(M),t=v?.current;if(!t)return;const n=(0,c.A)(t);let r;return n.addEventListener("resize",e),"undefined"!=typeof ResizeObserver&&(r=new ResizeObserver((()=>{E()&&(r.unobserve(t),cancelAnimationFrame(T.current),M(),T.current=requestAnimationFrame((()=>{r.observe(t)})))})),r.observe(t)),()=>{e.clear(),cancelAnimationFrame(T.current),n.removeEventListener("resize",e),r&&r.disconnect()}}),[C,M,E]),(0,u.A)((()=>{M()})),(0,d.jsxs)(o.Fragment,{children:[(0,d.jsx)("textarea",{value:g,onChange:e=>{w||M();const t=e.target,r=t.value.length,o=t.value.endsWith("\n"),i=t.selectionStart===r;o&&i&&t.setSelectionRange(r,r),n&&n(e)},ref:_,rows:i,style:s,...y}),(0,d.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:S,tabIndex:-1,style:{...p,...s,paddingTop:0,paddingBottom:0}})]})}));var y,w=n(10104),v=n(93583),_=n(1713),b=n(76761),S=n(26739),C=n(4977),E=n(39241),M=n(20439),T=n(39407),R=n(30301),A=n(37313),N=n(99692),L=n(26410);const x=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${(0,T.A)(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},O=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},I=(0,S.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:x})((0,E.A)((({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${L.A.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:e})=>e.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:e,size:t})=>e.multiline&&"small"===t,style:{paddingTop:1}},{props:({ownerState:e})=>e.fullWidth,style:{width:"100%"}}]})))),k=(0,S.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:O})((0,E.A)((({theme:e})=>{const t="light"===e.palette.mode,n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},o=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${L.A.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":o,"&:focus::-moz-placeholder":o,"&:focus::-ms-input-placeholder":o},[`&.${L.A.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:e})=>!e.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:e})=>e.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}}))),D=(0,C.Dp)({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),P=o.forwardRef((function(e,t){const n=(0,M.b)({props:e,name:"MuiInputBase"}),{"aria-describedby":a,autoComplete:l,autoFocus:u,className:h,color:c,components:m={},componentsProps:p={},defaultValue:f,disabled:S,disableInjectingGlobalStyles:C,endAdornment:E,error:x,fullWidth:O=!1,id:P,inputComponent:H="input",inputProps:F={},inputRef:Y,margin:V,maxRows:U,minRows:B,multiline:W=!1,name:j,onBlur:z,onChange:G,onClick:$,onFocus:K,onKeyDown:X,onKeyUp:q,placeholder:Q,readOnly:J,renderSuffix:Z,rows:ee,size:te,slotProps:ne={},slots:re={},startAdornment:oe,type:ie="text",value:se,...ae}=n,le=null!=F.value?F.value:se,{current:ue}=o.useRef(null!=le),he=o.useRef(),ce=o.useCallback((e=>{}),[]),de=(0,R.A)(he,Y,F.ref,ce),[me,pe]=o.useState(!1),fe=(0,b.A)(),ge=(0,v.A)({props:n,muiFormControl:fe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ge.focused=fe?fe.focused:me,o.useEffect((()=>{!fe&&S&&me&&(pe(!1),z&&z())}),[fe,S,me,z]);const ye=fe&&fe.onFilled,we=fe&&fe.onEmpty,ve=o.useCallback((e=>{(0,N.lq)(e)?ye&&ye():we&&we()}),[ye,we]);(0,A.A)((()=>{ue&&ve({value:le})}),[le,ve,ue]),o.useEffect((()=>{ve(he.current)}),[]);let _e=H,be=F;W&&"input"===_e&&(be=ee?{type:void 0,minRows:ee,maxRows:ee,...be}:{type:void 0,maxRows:U,minRows:B,...be},_e=g),o.useEffect((()=>{fe&&fe.setAdornedStart(Boolean(oe))}),[fe,oe]);const Se={...n,color:ge.color||"primary",disabled:ge.disabled,endAdornment:E,error:ge.error,focused:ge.focused,formControl:fe,fullWidth:O,hiddenLabel:ge.hiddenLabel,multiline:W,size:ge.size,startAdornment:oe,type:ie},Ce=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:a,formControl:l,fullWidth:u,hiddenLabel:h,multiline:c,readOnly:d,size:m,startAdornment:p,type:f}=e,g={root:["root",`color${(0,T.A)(n)}`,r&&"disabled",o&&"error",u&&"fullWidth",a&&"focused",l&&"formControl",m&&"medium"!==m&&`size${(0,T.A)(m)}`,c&&"multiline",p&&"adornedStart",i&&"adornedEnd",h&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled","search"===f&&"inputTypeSearch",c&&"inputMultiline","small"===m&&"inputSizeSmall",h&&"inputHiddenLabel",p&&"inputAdornedStart",i&&"inputAdornedEnd",d&&"readOnly"]};return(0,s.A)(g,L.g,t)})(Se),Ee=re.root||m.Root||I,Me=ne.root||p.root||{},Te=re.input||m.Input||k;return be={...be,...ne.input??p.input},(0,d.jsxs)(o.Fragment,{children:[!C&&"function"==typeof D&&(y||(y=(0,d.jsx)(D,{}))),(0,d.jsxs)(Ee,{...Me,ref:t,onClick:e=>{he.current&&e.currentTarget===e.target&&he.current.focus(),$&&$(e)},...ae,...!(0,w.A)(Ee)&&{ownerState:{...Se,...Me.ownerState}},className:(0,i.A)(Ce.root,Me.className,h,J&&"MuiInputBase-readOnly"),children:[oe,(0,d.jsx)(_.A.Provider,{value:null,children:(0,d.jsx)(Te,{"aria-invalid":ge.error,"aria-describedby":a,autoComplete:l,autoFocus:u,defaultValue:f,disabled:ge.disabled,id:P,onAnimationStart:e=>{ve("mui-auto-fill-cancel"===e.animationName?he.current:{value:"x"})},name:j,placeholder:Q,readOnly:J,required:ge.required,rows:ee,value:le,onKeyDown:X,onKeyUp:q,type:ie,...be,...!(0,w.A)(Te)&&{as:_e,ownerState:{...Se,...be.ownerState}},ref:de,className:(0,i.A)(Ce.input,be.className,J&&"MuiInputBase-readOnly"),onBlur:e=>{z&&z(e),F.onBlur&&F.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):pe(!1)},onChange:(e,...t)=>{if(!ue){const t=e.target||he.current;if(null==t)throw new Error((0,r.A)(1));ve({value:t.value})}F.onChange&&F.onChange(e,...t),G&&G(e,...t)},onFocus:e=>{K&&K(e),F.onFocus&&F.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):pe(!0)}})}),E,Z?Z({...ge,startAdornment:oe}):null]})]})}))},79846:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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: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:4}})}(n(95093))},79978:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(79504),s=n(67750),a=n(94901),l=n(20034),u=n(60788),h=n(655),c=n(55966),d=n(61034),m=n(2478),p=n(78227),f=n(96395),g=p("replace"),y=TypeError,w=i("".indexOf),v=i("".replace),_=i("".slice),b=Math.max;r({target:"String",proto:!0},{replaceAll:function(e,t){var n,r,i,p,S,C,E,M,T,R,A=s(this),N=0,L="";if(l(e)){if((n=u(e))&&(r=h(s(d(e))),!~w(r,"g")))throw new y("`.replaceAll` does not allow non-global regexes");if(i=c(e,g))return o(i,e,A,t);if(f&&n)return v(h(A),e,t)}for(p=h(A),S=h(e),(C=a(t))||(t=h(t)),E=S.length,M=b(1,E),T=w(p,S);-1!==T;)R=C?h(t(S,T,p)):m(S,p,T,[],void 0,t),L+=_(p,N,T)+R,N=T+E,T=T+M>p.length?-1:w(p,S,T+M);return N<p.length&&(L+=_(p,N)),L}})},80688:(e,t,n)=>{"use strict";n.d(t,{A:()=>E});var r=n(96540),o=n(21362),i=n(34164),s=n(93583),a=n(76761),l=n(39407),u=n(26739),h=n(39241),c=n(1321),d=n(20439),m=n(96148),p=n(1908);function f(e){return(0,p.Ay)("MuiFormLabel",e)}const g=(0,m.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]);var y=n(74848);const w=(0,u.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled]}})((0,h.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter((0,c.A)()).map((([t])=>({props:{color:t},style:{[`&.${g.focused}`]:{color:(e.vars||e).palette[t].main}}}))),{props:{},style:{[`&.${g.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}}}]})))),v=(0,u.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk"})((0,h.A)((({theme:e})=>({[`&.${g.error}`]:{color:(e.vars||e).palette.error.main}})))),_=r.forwardRef((function(e,t){const n=(0,d.b)({props:e,name:"MuiFormLabel"}),{children:r,className:u,color:h,component:c="label",disabled:m,error:p,filled:g,focused:_,required:b,...S}=n,C=(0,a.A)(),E=(0,s.A)({props:n,muiFormControl:C,states:["color","required","focused","disabled","error","filled"]}),M={...n,color:E.color||"primary",component:c,disabled:E.disabled,error:E.error,filled:E.filled,focused:E.focused,required:E.required},T=(e=>{const{classes:t,color:n,focused:r,disabled:i,error:s,filled:a,required:u}=e,h={root:["root",`color${(0,l.A)(n)}`,i&&"disabled",s&&"error",a&&"filled",r&&"focused",u&&"required"],asterisk:["asterisk",s&&"error"]};return(0,o.A)(h,f,t)})(M);return(0,y.jsxs)(w,{as:c,ownerState:M,className:(0,i.A)(T.root,u),ref:t,...S,children:[r,E.required&&(0,y.jsxs)(v,{ownerState:M,"aria-hidden":!0,className:T.asterisk,children:[" ","*"]})]})}));var b=n(98855);function S(e){return(0,p.Ay)("MuiInputLabel",e)}(0,m.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const C=(0,u.Ay)(_,{shouldForwardProp:e=>(0,b.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${g.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((0,h.A)((({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:e})=>e.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:e})=>e.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:e})=>!e.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:e,ownerState:t})=>"filled"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:e,ownerState:t,size:n})=>"filled"===e&&t.shrink&&"small"===n,style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:e,ownerState:t})=>"outlined"===e&&t.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]})))),E=r.forwardRef((function(e,t){const n=(0,d.b)({name:"MuiInputLabel",props:e}),{disableAnimation:r=!1,margin:u,shrink:h,variant:c,className:m,...p}=n,f=(0,a.A)();let g=h;void 0===g&&f&&(g=f.filled||f.focused||f.adornedStart);const w=(0,s.A)({props:n,muiFormControl:f,states:["size","variant","required","focused"]}),v={...n,disableAnimation:r,formControl:f,shrink:g,size:w.size,variant:w.variant,required:w.required,focused:w.focused},_=(e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:s,variant:a,required:u}=e,h={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",r&&"medium"!==r&&`size${(0,l.A)(r)}`,a],asterisk:[u&&"asterisk"]},c=(0,o.A)(h,S,t);return{...t,...c}})(v);return(0,y.jsx)(C,{"data-shrink":g,ref:t,className:(0,i.A)(_.root,m),...p,ownerState:v,classes:_})}))},80741:e=>{"use strict";var t=Math.ceil,n=Math.floor;e.exports=Math.trunc||function(e){var r=+e;return(r>0?n:t)(r)}},80747:(e,t,n)=>{"use strict";var r=n(66699),o=n(16193),i=n(24659),s=Error.captureStackTrace;e.exports=function(e,t,n,a){i&&(s?s(e,t):r(e,"stack",o(n,a)))}},81148:(e,t,n)=>{"use strict";var r=n(46518),o=n(69565),i=n(72652),s=n(79306),a=n(28551),l=n(1767),u=n(9539),h=n(84549)("every",TypeError);r({target:"Iterator",proto:!0,real:!0,forced:h},{every:function(e){a(this);try{s(e)}catch(e){u(this,"throw",e)}if(h)return o(h,this,e);var t=l(this),n=0;return!i(t,(function(t,r){if(!e(t,n++))return r()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})},81454:(e,t,n)=>{"use strict";n(61701)},81765:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},82218:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},82227:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(34164),o=n(52658);const i=function(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"==typeof e[t]))).forEach((n=>{t[n]=e[n]})),t},s=function(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:s,externalForwardedProps:a,className:l}=e;if(!t){const e=(0,r.A)(n?.className,l,a?.className,s?.className),t={...n?.style,...a?.style,...s?.style},o={...n,...a,...s};return e.length>0&&(o.className=e),Object.keys(t).length>0&&(o.style=t),{props:o,internalRef:void 0}}const u=(0,o.A)({...a,...s}),h=i(s),c=i(a),d=t(u),m=(0,r.A)(d?.className,n?.className,l,a?.className,s?.className),p={...d?.style,...n?.style,...a?.style,...s?.style},f={...d,...n,...c,...h};return m.length>0&&(f.className=m),Object.keys(p).length>0&&(f.style=p),{props:f,internalRef:d.ref}}},82271:function(e,t,n){!function(e){"use strict";function t(e,t,n){return"m"===n?t?"минута":"минуту":e+" "+(r=+e,o={ss:t?"секунда_секунды_секунд":"секунду_секунды_секунд",mm:t?"минута_минуты_минут":"минуту_минуты_минут",hh:"час_часа_часов",dd:"день_дня_дней",ww:"неделя_недели_недель",MM:"месяц_месяца_месяцев",yy:"год_года_лет"}[n].split("_"),r%10==1&&r%100!=11?o[0]:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?o[1]:o[2]);var r,o}var n=[/^янв/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:n,longMonthsParse:n,shortMonthsParse:n,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:t,m:t,mm:t,h:"час",hh:t,d:"день",dd:t,w:"неделя",ww:t,M:"месяц",MM:t,y:"год",yy:t},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}})}(n(95093))},82617:(e,t,n)=>{"use strict";n.d(t,{R8:()=>o,z3:()=>i});var r=n(65615);function o(){(0,r.O9)(console)&&console.warn(...arguments)}function i(){(0,r.O9)(console)&&console.error(...arguments)}},82682:function(e,t,n){!function(e){"use strict";var t={1:"١",2:"٢",3:"٣",4:"٤",5:"٥",6:"٦",7:"٧",8:"٨",9:"٩",0:"٠"},n={"١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","٠":"0"};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}})}(n(95093))},82777:(e,t,n)=>{"use strict";n.d(t,{X4:()=>d,e$:()=>p,eM:()=>c,YL:()=>u,a:()=>g,Cg:()=>m,Me:()=>a,Nd:()=>f,Y9:()=>w,j4:()=>y});var r=n(4076);const o=function(e,t=Number.MIN_SAFE_INTEGER,n=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,n))};function i(e,t=0,n=1){return o(e,t,n)}function s(e){if(e.type)return e;if("#"===e.charAt(0))return s(function(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?`rgb${4===n.length?"a":""}(${n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", ")})`:""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(n))throw new Error((0,r.A)(9,e));let o,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),o=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(o))throw new Error((0,r.A)(10,o))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:o}}const a=(e,t)=>{try{return(e=>{const t=s(e);return t.values.slice(0,3).map(((e,n)=>t.type.includes("hsl")&&0!==n?`${e}%`:e)).join(" ")})(e)}catch(t){return e}};function l(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return t.includes("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):t.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=t.includes("color")?`${n} ${r.join(" ")}`:`${r.join(", ")}`,`${t}(${r})`}function u(e){e=s(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),a=(e,t=(e+n/30)%12)=>o-i*Math.max(Math.min(t-3,9-t,1),-1);let u="rgb";const h=[Math.round(255*a(0)),Math.round(255*a(8)),Math.round(255*a(4))];return"hsla"===e.type&&(u+="a",h.push(t[3])),l({type:u,values:h})}function h(e){let t="hsl"===(e=s(e)).type||"hsla"===e.type?s(u(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function c(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)}function d(e,t){return e=s(e),t=i(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]=`/${t}`:e.values[3]=t,l(e)}function m(e,t,n){try{return d(e,t)}catch(t){return e}}function p(e,t){if(e=s(e),t=i(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return l(e)}function f(e,t,n){try{return p(e,t)}catch(t){return e}}function g(e,t){if(e=s(e),t=i(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(e.type.includes("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return l(e)}function y(e,t,n){try{return g(e,t)}catch(t){return e}}function w(e,t,n){try{return function(e,t=.15){return h(e)>.5?p(e,t):g(e,t)}(e,t)}catch(t){return e}}},82839:(e,t,n)=>{"use strict";var r=n(44576).navigator,o=r&&r.userAgent;e.exports=o?String(o):""},82993:(e,t,n)=>{"use strict";n.d(t,{by:()=>u,qV:()=>h,tR:()=>s}),n(16280);var r=n(34647);const{register:o,getItem:i,hasItem:s,getNames:a,getValues:l}=(0,r.A)("validators");function u(e){if("function"==typeof e)return e;if(!s(e))throw Error(`No registered validator found under "${e}" name`);return i(e)}function h(e,t){"string"!=typeof e&&(e=(t=e).VALIDATOR_TYPE),o(e,t)}},83023:(e,t,n)=>{"use strict";function r(e,t,n){e.addEventListener(t,n,!1)}function o(e,t,n){e.removeEventListener(t,n,!1)}function i(e){return e.ownerDocument.defaultView.getComputedStyle(e)}function s(e){const t={minHeight:200,maxHeight:300,minWidth:100,maxWidth:300,textContent:e=>e.value,...arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}},n=e.body,s=e.createTextNode(""),a=e.createElement("span");let l;function u(){var e,r;s.textContent=t.textContent(l),a.style.position="absolute",a.style.fontSize=i(l).fontSize,a.style.fontFamily=i(l).fontFamily,a.style.whiteSpace="pre",n.appendChild(a);const o=parseInt((null===(e=i(l))||void 0===e?void 0:e.paddingInlineStart)||0,10),u=parseInt((null===(r=i(l))||void 0===r?void 0:r.paddingInlineEnd)||0,10),h=a.clientWidth+o+u+1;n.removeChild(a);const c=l.style;c.height=`${t.minHeight}px`,t.minWidth>h?c.width=`${t.minWidth}px`:h>t.maxWidth?c.width=`${t.maxWidth}px`:c.width=`${h}px`;const d=l.scrollHeight?l.scrollHeight-1:0;t.minHeight>d?c.height=`${t.minHeight}px`:t.maxHeight<d?(c.height=`${t.maxHeight}px`,c.overflowY="visible"):c.height=`${d}px`}function h(){e.defaultView.setTimeout(u,0)}return{init:function(e,n){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];l=e,function(e){if(e&&e.minHeight)if("inherit"===e.minHeight)t.minHeight=l.clientHeight;else{const n=parseInt(e.minHeight,10);isNaN(n)||(t.minHeight=n)}if(e&&e.maxHeight)if("inherit"===e.maxHeight)t.maxHeight=l.clientHeight;else{const n=parseInt(e.maxHeight,10);isNaN(n)||(t.maxHeight=n)}if(e&&e.minWidth)if("inherit"===e.minWidth)t.minWidth=l.clientWidth;else{const n=parseInt(e.minWidth,10);isNaN(n)||(t.minWidth=n)}if(e&&e.maxWidth)if("inherit"===e.maxWidth)t.maxWidth=l.clientWidth;else{const n=parseInt(e.maxWidth,10);isNaN(n)||(t.maxWidth=n)}a.firstChild||(a.className="autoResize",a.style.display="inline-block",a.appendChild(s))}(n),"TEXTAREA"===l.nodeName&&(l.style.resize="none",l.style.height=`${t.minHeight}px`,l.style.minWidth=`${t.minWidth}px`,l.style.maxWidth=`${t.maxWidth}px`,l.style.overflowY="hidden"),o&&(r(l,"input",u),r(l,"keydown",h)),u()},resize:u,unObserve(){o(l,"input",u),o(l,"keydown",h)}}}n.d(t,{j:()=>s})},83440:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402),i=n(89286),s=n(25170),a=n(83789),l=n(38469),u=n(40507),h=o.has,c=o.remove;e.exports=function(e){var t=r(this),n=a(e),o=i(t);return s(t)<=n.size?l(t,(function(e){n.includes(e)&&c(o,e)})):u(n.getIterator(),(function(e){h(o,e)&&c(o,e)})),o}},83508:(e,t,n)=>{"use strict";n.d(t,{A:()=>x});var r=n(96540),o=n(34164),i=n(21362),s=n(91092),a=n(26739),l=n(20439),u=n(78164),h=n(63984),c=n(47195),d=n(80688),m=n(98300),p=n(93583),f=n(76761),g=n(39241),y=n(39407),w=n(96148),v=n(1908);function _(e){return(0,v.Ay)("MuiFormHelperText",e)}const b=(0,w.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var S,C=n(74848);const E=(0,a.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${(0,y.A)(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})((0,g.A)((({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${b.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${b.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:e})=>e.contained,style:{marginLeft:14,marginRight:14}}]})))),M=r.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiFormHelperText"}),{children:r,className:s,component:a="p",disabled:u,error:h,filled:c,focused:d,margin:m,required:g,variant:w,...v}=n,b=(0,f.A)(),M=(0,p.A)({props:n,muiFormControl:b,states:["variant","size","disabled","error","filled","focused","required"]}),T={...n,component:a,contained:"filled"===M.variant||"outlined"===M.variant,variant:M.variant,size:M.size,disabled:M.disabled,error:M.error,filled:M.filled,focused:M.focused,required:M.required};delete T.ownerState;const R=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:s,filled:a,focused:l,required:u}=e,h={root:["root",o&&"disabled",s&&"error",r&&`size${(0,y.A)(r)}`,n&&"contained",l&&"focused",a&&"filled",u&&"required"]};return(0,i.A)(h,_,t)})(T);return(0,C.jsx)(E,{as:a,className:(0,o.A)(R.root,s),ref:t,...v,ownerState:T,children:" "===r?S||(S=(0,C.jsx)("span",{className:"notranslate","aria-hidden":!0,children:"​"})):r})}));var T=n(7388);function R(e){return(0,v.Ay)("MuiTextField",e)}(0,w.A)("MuiTextField",["root"]);var A=n(85078);const N={standard:u.A,filled:h.A,outlined:c.A},L=(0,a.Ay)(m.A,{name:"MuiTextField",slot:"Root"})({}),x=r.forwardRef((function(e,t){const n=(0,l.b)({props:e,name:"MuiTextField"}),{autoComplete:r,autoFocus:a=!1,children:u,className:h,color:c="primary",defaultValue:m,disabled:p=!1,error:f=!1,FormHelperTextProps:g,fullWidth:y=!1,helperText:w,id:v,InputLabelProps:_,inputProps:b,InputProps:S,inputRef:E,label:x,maxRows:O,minRows:I,multiline:k=!1,name:D,onBlur:P,onChange:H,onFocus:F,placeholder:Y,required:V=!1,rows:U,select:B=!1,SelectProps:W,slots:j={},slotProps:z={},type:G,value:$,variant:K="outlined",...X}=n,q={...n,autoFocus:a,color:c,disabled:p,error:f,fullWidth:y,multiline:k,required:V,select:B,variant:K},Q=(e=>{const{classes:t}=e;return(0,i.A)({root:["root"]},R,t)})(q),J=(0,s.A)(v),Z=w&&J?`${J}-helper-text`:void 0,ee=x&&J?`${J}-label`:void 0,te=N[K],ne={slots:j,slotProps:{input:S,inputLabel:_,htmlInput:b,formHelperText:g,select:W,...z}},re={},oe=ne.slotProps.inputLabel;"outlined"===K&&(oe&&void 0!==oe.shrink&&(re.notched=oe.shrink),re.label=x),B&&(W&&W.native||(re.id=void 0),re["aria-describedby"]=void 0);const[ie,se]=(0,A.A)("root",{elementType:L,shouldForwardComponentProp:!0,externalForwardedProps:{...ne,...X},ownerState:q,className:(0,o.A)(Q.root,h),ref:t,additionalProps:{disabled:p,error:f,fullWidth:y,required:V,color:c,variant:K}}),[ae,le]=(0,A.A)("input",{elementType:te,externalForwardedProps:ne,additionalProps:re,ownerState:q}),[ue,he]=(0,A.A)("inputLabel",{elementType:d.A,externalForwardedProps:ne,ownerState:q}),[ce,de]=(0,A.A)("htmlInput",{elementType:"input",externalForwardedProps:ne,ownerState:q}),[me,pe]=(0,A.A)("formHelperText",{elementType:M,externalForwardedProps:ne,ownerState:q}),[fe,ge]=(0,A.A)("select",{elementType:T.A,externalForwardedProps:ne,ownerState:q}),ye=(0,C.jsx)(ae,{"aria-describedby":Z,autoComplete:r,autoFocus:a,defaultValue:m,fullWidth:y,multiline:k,name:D,rows:U,maxRows:O,minRows:I,type:G,value:$,id:J,inputRef:E,onBlur:P,onChange:H,onFocus:F,placeholder:Y,inputProps:de,slots:{input:j.htmlInput?ce:void 0},...le});return(0,C.jsxs)(ie,{...se,children:[null!=x&&""!==x&&(0,C.jsx)(ue,{htmlFor:J,id:ee,...he,children:x}),B?(0,C.jsx)(fe,{"aria-describedby":Z,id:J,labelId:ee,value:$,input:ye,...ge,children:u}):ye,w&&(0,C.jsx)(me,{id:Z,...pe,children:w})]})}))},83650:(e,t,n)=>{"use strict";var r=n(97080),o=n(94402),i=n(89286),s=n(83789),a=n(40507),l=o.add,u=o.has,h=o.remove;e.exports=function(e){var t=r(this),n=s(e).getIterator(),o=i(t);return a(n,(function(e){u(t,e)?h(o,e):l(o,e)})),o}},83789:(e,t,n)=>{"use strict";var r=n(79306),o=n(28551),i=n(69565),s=n(91291),a=n(1767),l="Invalid size",u=RangeError,h=TypeError,c=Math.max,d=function(e,t){this.set=e,this.size=c(t,0),this.has=r(e.has),this.keys=r(e.keys)};d.prototype={getIterator:function(){return a(o(i(this.keys,this.set)))},includes:function(e){return i(this.has,this.set,e)}},e.exports=function(e){o(e);var t=+e.size;if(t!=t)throw new h(l);var n=s(t);if(n<0)throw new u(l);return new d(e,n)}},83986:(e,t,n)=>{"use strict";n.d(t,{OH:()=>s,Tn:()=>o,Ty:()=>l,cF:()=>a,sg:()=>i});var r=n(65615);function o(e){return"function"==typeof e}function i(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=null;return function(){for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];return r&&clearTimeout(r),r=setTimeout((()=>{t=e.apply(this,i)}),n),t}}function s(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),o=0;o<t;o++)r[o]=arguments[o];return e.apply(this,n.concat(r))}}function a(e){const t=e.length;return function n(r){return function(){for(var o=arguments.length,i=new Array(o),s=0;s<o;s++)i[s]=arguments[s];const a=r.concat(i);let l;return l=a.length>=t?e.apply(this,a):n(a),l}}([])}function l(e,t,n,o,i,s,a,l){return(0,r.O9)(l)?e.call(t,n,o,i,s,a,l):(0,r.O9)(a)?e.call(t,n,o,i,s,a):(0,r.O9)(s)?e.call(t,n,o,i,s):(0,r.O9)(i)?e.call(t,n,o,i):(0,r.O9)(o)?e.call(t,n,o):(0,r.O9)(n)?e.call(t,n):e.call(t)}},84215:(e,t,n)=>{"use strict";var r=n(44576),o=n(82839),i=n(22195),s=function(e){return o.slice(0,e.length)===e};e.exports=s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&"string"==typeof Bun.version?"BUN":r.Deno&&"object"==typeof Deno.version?"DENO":"process"===i(r.process)?"NODE":r.window&&r.document?"BROWSER":"REST"},84270:(e,t,n)=>{"use strict";var r=n(69565),o=n(94901),i=n(20034),s=TypeError;e.exports=function(e,t){var n,a;if("string"===t&&o(n=e.toString)&&!i(a=r(n,e)))return a;if(o(n=e.valueOf)&&!i(a=r(n,e)))return a;if("string"!==t&&o(n=e.toString)&&!i(a=r(n,e)))return a;throw new s("Can't convert object to primitive value")}},84389:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>Sa}),n(16280),n(44114),n(53921),n(17642),n(58004),n(33853),n(45876),n(32475),n(15024),n(31698),n(98992),n(54520),n(3949),n(81454),n(59848);var r=n(20091),o=n(83986),i=n(65615),s=n(58002),a=n(38419),l=n(25155),u=n(11080),h=n(28061);function c(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function d(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 m=new WeakSet;class p{constructor(e,t,n){var r,o;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(r=this,o=m),o.add(r),c(this,"hot",void 0),c(this,"tableMeta",void 0),c(this,"selection",void 0),c(this,"eventManager",void 0),c(this,"destroyed",!1),c(this,"activeEditor",void 0),c(this,"cellProperties",void 0),this.hot=e,this.tableMeta=t,this.selection=n,this.eventManager=new h.A(e),this.hot.addHook("afterDocumentKeyDown",(e=>d(m,this,f).call(this,e))),this.hot.addHook("beforeCompositionStart",(e=>d(m,this,f).call(this,e))),this.hot.view._wt.update("onCellDblClick",((e,t,n)=>d(m,this,g).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,o=this.hot.runHooks("modifyGetCellCoords",n,r,!1,"meta");let i=n,s=r;if(Array.isArray(o)&&([i,s]=o),this.cellProperties=this.hot.getCellMeta(i,s),!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(s),o=this.hot.getSourceDataAtCell(this.hot.toPhysicalRow(i),s);this.activeEditor=(0,u.L3)(e,this.hot),this.activeEditor.prepare(n,r,t,a,o,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 o=this.hot.runHooks("beforeBeginEditing",r.highlight.row,r.highlight.col,e,t,n);t instanceof MouseEvent&&"boolean"!=typeof o&&(o=0===this.hot.selection.getLayerLevel()&&r.isSingle()),!1!==o?(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:o,columnIndexMapper:i}=this.hot,s=o.isHidden(this.hot.toPhysicalRow(n))||i.isHidden(this.hot.toPhysicalColumn(r));return!(this.cellProperties.readOnly||!t||s)}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 f(e){const t=this.hot.getSelectedRangeLast();if(!this.hot.isListening()||!t||t.highlight.isHeader()||(0,l.d)(e))return;const{keyCode:n}=e,r=(e.ctrlKey||e.metaKey)&&!e.altKey;(!this.activeEditor||this.activeEditor&&!this.activeEditor.isWaiting())&&((0,a.Yf)(n)||(0,a.SI)(n)||r||this.isEditorOpened()||this.openEditor("",e))}function g(e,t){t.isCell()&&this.openEditor(null,e,!0)}const y=new WeakMap;p.getInstance=function(e,t,n){let r=y.get(e);return r||(r=new p(e,t,n),y.set(e,r)),r};const w=p;var v=n(32919),_=n(82617);function b(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 C(e,t){return e.get(M(e,t))}function E(e,t,n){return e.set(M(e,t),n),n}function M(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 T=Object.freeze({CELL:"cell",MIXED:"mixed"});var R=new WeakMap,A=new WeakMap,N=new WeakMap,L=new WeakMap,x=new WeakMap,O=new WeakSet;class I{constructor(e){var t,n=this;S(this,t=O),t.add(this),b(this,R,void 0),b(this,A,void 0),b(this,N,1),b(this,L,null),b(this,x,new Map);const r=e.getSettings();E(R,this,e),E(A,this,r.imeFastEdit?T.MIXED:T.CELL),C(R,this).addHook("afterUpdateSettings",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return M(O,n,H).call(n,...t)})),C(R,this).addHook("afterSelection",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return M(O,n,D).call(n,...t)})),C(R,this).addHook("afterSelectionFocusSet",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return M(O,n,D).call(n,...t)})),C(R,this).addHook("afterSelectionEnd",(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return M(O,n,P).call(n,...t)}))}getFocusMode(){return C(A,this)}setFocusMode(e){Object.values(T).includes(e)?E(A,this,e):(0,_.R8)(`"${e}" is not a valid focus mode.`)}getRefocusDelay(){return C(N,this)}setRefocusDelay(e){E(N,this,e)}setRefocusElementGetter(e){E(L,this,e)}getRefocusElement(){var e;return"function"==typeof C(L,this)?C(L,this).call(this):null===(e=C(R,this).getActiveEditor())||void 0===e?void 0:e.TEXTAREA}focusOnHighlightedCell(e){const t=e=>{var t,n;const o=null===(t=C(R,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!o)return;let i=C(R,this).runHooks("modifyFocusedElement",o.row,o.col,e);(0,r.sb)(i)||(i=e),!i||null!==(n=C(R,this).getActiveEditor())&&void 0!==n&&n.isOpened()||i.focus({preventScroll:!0})};e?t(e):M(O,this,k).call(this,(e=>t(e)))}refocusToEditorTextarea(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C(N,this);var n,r;!C(R,this).getSettings().imeFastEdit||null!==(e=C(R,this).getActiveEditor())&&void 0!==e&&e.isOpened()||(null===(n=C(R,this).getActiveEditor())||void 0===n||null===(r=n.refreshValue)||void 0===r||r.call(n),C(x,this).has(t)||C(x,this).set(t,(0,o.sg)((()=>{var e;C(R,this).isDestroyed||null===(e=this.getRefocusElement())||void 0===e||e.select()}),t)),C(x,this).get(t)())}}function k(e){var t;const n=null===(t=C(R,this).getSelectedRangeLast())||void 0===t?void 0:t.highlight;if(!n||!C(R,this).selection.isCellVisible(n))return void e(null);const r=C(R,this).getCell(n.row,n.col,!0);null===r?C(R,this).addHookOnce("afterScroll",(()=>{e(C(R,this).getCell(n.row,n.col,!0))})):e(r)}function D(){M(O,this,k).call(this,(e=>{const{activeElement:t}=C(R,this).rootDocument;t&&(0,r.E3)(t)&&t.blur(),this.focusOnHighlightedCell(e)}))}function P(){M(O,this,k).call(this,(e=>{this.getFocusMode()===T.MIXED&&"TD"===(null==e?void 0:e.nodeName)&&this.refocusToEditorTextarea()}))}function H(e){"boolean"==typeof e.imeFastEdit&&this.setFocusMode(e.imeFastEdit?T.MIXED:T.CELL)}var F=n(77325),Y=n(22257),V=n(6833),U=n(54950),B=n(82993),W=n(24360),j=n(71409),z=n(13968);function G(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function $(e,t){return e.get(X(e,t))}function K(e,t,n){return e.set(X(e,t),n),n}function X(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 q=new WeakMap,Q=new WeakMap,J=new WeakMap,Z=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=new WeakMap,oe=new WeakMap,ie=new WeakMap;const se=class{constructor(e,t,n,r,o,i){let s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;G(this,q,void 0),G(this,Q,void 0),G(this,J,void 0),G(this,Z,void 0),G(this,ee,void 0),G(this,te,void 0),G(this,ne,void 0),G(this,re,void 0),G(this,oe,[null,null]),G(this,ie,[null,null]),K(q,this,n),K(Q,this,t),K(J,this,o),K(Z,this,i),K(ee,this,s),K(te,this,r),K(ne,this,e),this.registerEvents()}registerEvents(){$(te,this).addEventListener($(J,this).holder,"contextmenu",(e=>this.onContextMenu(e))),$(te,this).addEventListener($(J,this).TABLE,"mouseover",(e=>this.onMouseOver(e))),$(te,this).addEventListener($(J,this).TABLE,"mouseout",(e=>this.onMouseOut(e)));const e=()=>{$(te,this).addEventListener($(J,this).holder,"touchstart",(e=>this.onTouchStart(e))),$(te,this).addEventListener($(J,this).holder,"touchend",(e=>this.onTouchEnd(e))),this.momentumScrolling||(this.momentumScrolling={}),$(te,this).addEventListener($(J,this).holder,"scroll",(()=>{clearTimeout(this.momentumScrolling._timeout),this.momentumScrolling.ongoing||$(q,this).getSetting("onBeforeTouchScroll"),this.momentumScrolling.ongoing=!0,this.momentumScrolling._timeout=setTimeout((()=>{this.touchApplied||(this.momentumScrolling.ongoing=!1,$(q,this).getSetting("onAfterMomentumScroll"))}),200)}))};(0,s.rr)()?e():((0,z.yd)()&&e(),(()=>{$(te,this).addEventListener($(J,this).holder,"mouseup",(e=>this.onMouseUp(e))),$(te,this).addEventListener($(J,this).holder,"mousedown",(e=>this.onMouseDown(e)))})())}selectedCellWasTouched(e){const t=this.parentCell(e).coords;if($(re,this)&&t){const[e,n]=[t.row,$(re,this).from.row],[r,o]=[t.col,$(re,this).from.col];return e===n&&r===o}return!1}parentCell(e){const t={},n=$(J,this).TABLE,o=(0,r.cr)(e,["TD","TH"],n);return o?(t.coords=$(J,this).getCoords(o),t.TD=o):(0,r.nB)(e,"wtBorder")&&(0,r.nB)(e,"current")?(t.coords=$(Z,this).getFocusSelection().cellRange.highlight,t.TD=$(J,this).getCell(t.coords)):(0,r.nB)(e,"wtBorder")&&(0,r.nB)(e,"area")&&$(Z,this).getAreaSelection().cellRange&&(t.coords=$(Z,this).getAreaSelection().cellRange.to,t.TD=$(J,this).getCell(t.coords)),t}onMouseDown(e){const t=$(Q,this).rootDocument.activeElement,n=(0,o.OH)(r.PA,e.target),i=e.target;if(!["TD","TH"].includes(t.nodeName)&&(i===t||n(0)===t||n(1)===t))return;const s=this.parentCell(i);(0,r.nB)(i,"corner")?$(q,this).getSetting("onCellCornerMouseDown",e,i):s.TD&&$(q,this).has("onCellMouseDown")&&this.callListener("onCellMouseDown",e,s.coords,s.TD),(0===e.button||this.touchApplied)&&s.TD&&($(ie,this)[0]=s.TD,clearTimeout($(oe,this)[0]),$(oe,this)[0]=setTimeout((()=>{$(ie,this)[0]=null}),1e3))}onContextMenu(e){if($(q,this).has("onCellContextMenu")){const t=this.parentCell(e.target);t.TD&&this.callListener("onCellContextMenu",e,t.coords,t.TD)}}onMouseOver(e){if(!$(q,this).has("onCellMouseOver"))return;const t=$(J,this).TABLE,n=(0,r.cr)(e.target,["TD","TH"],t),o=$(ee,this)||this;n&&n!==o.lastMouseOver&&(0,r.aO)(n,t)&&(o.lastMouseOver=n,this.callListener("onCellMouseOver",e,$(J,this).getCoords(n),n))}onMouseOut(e){if(!$(q,this).has("onCellMouseOut"))return;const t=$(J,this).TABLE,n=(0,r.cr)(e.target,["TD","TH"],t),o=(0,r.cr)(e.relatedTarget,["TD","TH"],t),i=$(ee,this)||this;n&&n!==o&&(0,r.aO)(n,t)&&(this.callListener("onCellMouseOut",e,$(J,this).getCoords(n),n),null===o&&(i.lastMouseOver=null))}onMouseUp(e){const t=this.parentCell(e.target);t.TD&&$(q,this).has("onCellMouseUp")&&this.callListener("onCellMouseUp",e,t.coords,t.TD),(0===e.button||this.touchApplied)&&(t.TD===$(ie,this)[0]&&t.TD===$(ie,this)[1]?((0,r.nB)(e.target,"corner")?this.callListener("onCellCornerDblClick",e,t.coords,t.TD):this.callListener("onCellDblClick",e,t.coords,t.TD),$(ie,this)[0]=null,$(ie,this)[1]=null):t.TD===$(ie,this)[0]&&($(ie,this)[1]=t.TD,clearTimeout($(oe,this)[1]),$(oe,this)[1]=setTimeout((()=>{$(ie,this)[1]=null}),500)))}onTouchStart(e){K(re,this,$(Z,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,o=(0,i.O9)(r)&&r.row>=0&&r.col>=0;if(e.cancelable&&o&&$(q,this).getSetting("isDataViewInstance")){const t=["A","BUTTON","INPUT"];(0,s.un)()&&((0,s.B6)()||(0,s.wF)())&&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 o=$(q,this).getSettingPure(e);o&&o(t,n,r,$(ne,this).call(this))}destroy(){clearTimeout($(oe,this)[0]),clearTimeout($(oe,this)[1]),$(te,this).destroy()}};function ae(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(8872);const le=class{constructor(e,t,n){ae(this,"offset",void 0),ae(this,"total",void 0),ae(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))}};function ue(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const he=class{constructor(e,t,n){ue(this,"offset",void 0),ue(this,"total",void 0),ue(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))}};function ce(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class de{constructor(){ce(this,"currentSize",0),ce(this,"nextSize",0),ce(this,"currentOffset",0),ce(this,"nextOffset",0)}setSize(e){this.currentSize=this.nextSize,this.nextSize=e}setOffset(e){this.currentOffset=this.nextOffset,this.nextOffset=e}}function me(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class pe{constructor(){me(this,"size",new de),me(this,"workingSpace",0),me(this,"sharedSize",null)}setSize(e){this.size.setSize(e)}setOffset(e){this.size.setOffset(e)}getViewSize(){return this.size}isShared(){return null!==this.sharedSize}isPlaceOn(e){return this.workingSpace===e}append(e){this.workingSpace=1,e.workingSpace=2,this.sharedSize=e.getViewSize()}prepend(e){this.workingSpace=2,e.workingSpace=1,this.sharedSize=e.getViewSize()}}n(13609);class fe{constructor(e,t){var n,r,o;n=this,o=[],(r=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(r="order"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,this.order=[...Array(t).keys()].map((t=>e+t))}get length(){return this.order.length}has(e){return this.order.indexOf(e)>-1}get(e){return e<this.order.length?this.order[e]:-1}remove(e){this.order.splice(this.order.indexOf(e),1)}prepend(e){return this.order.unshift(e),this.order.pop()}}class ge{constructor(e){var t,n,r;t=this,r=void 0,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="sizeSet"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.sizeSet=e}diff(){const{sizeSet:e}=this,{currentSize:t,nextSize:n}=e.getViewSize();let r=Math.max(n,t);if(0===r)return[];const{currentOffset:o,nextOffset:i}=e.getViewSize(),s=new fe(o,t),a=new fe(i,n),l=[];for(let t=0;t<r;t++){const o=s.get(t),i=a.get(t);if(-1===i)l.push(["remove",o]);else if(-1===o)!e.isShared()||e.isShared()&&e.isPlaceOn(2)?l.push(["append",i]):l.push(["prepend",i]);else if(i>o)s.has(i)&&(s.remove(i),n<=s.length&&(r-=1)),l.push(["replace",i,o]);else if(i<o){const e=s.prepend(i);l.push(["insert_before",i,o,e])}else l.push(["none",i])}return l}}function ye(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class we{constructor(e,t){ye(this,"rootNode",void 0),ye(this,"nodesPool",void 0),ye(this,"sizeSet",new pe),ye(this,"collectedNodes",[]),ye(this,"viewDiffer",new ge(this.sizeSet)),ye(this,"leads",[]),this.rootNode=e,this.nodesPool=t}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}applyCommand(e){const{rootNode:t}=this,[n,r,o,i]=e,s=this.nodesPool(r);switch(this.collectedNodes.push(s),n){case"prepend":t.insertBefore(s,t.firstChild);break;case"append":t.appendChild(s);break;case"insert_before":t.insertBefore(s,this.nodesPool(o)),t.removeChild(this.nodesPool(i));break;case"replace":t.replaceChild(s,this.nodesPool(o));break;case"remove":t.removeChild(s)}}start(){this.collectedNodes.length=0,this.leads=this.viewDiffer.diff()}render(){this.leads.length>0&&this.applyCommand(this.leads.shift())}end(){for(;this.leads.length>0;)this.applyCommand(this.leads.shift())}}class ve extends we{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 _e(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class be{constructor(e){_e(this,"nodeType",void 0),_e(this,"pool",new Map),this.nodeType=e.toUpperCase()}setRootDocument(e){this.rootDocument=e}obtain(e,t){const n="number"==typeof t?`${e}x${t}`:e.toString();if(this.pool.has(n))return this.pool.get(n);const r=this.rootDocument.createElement(this.nodeType);return this.pool.set(n,r),r}}function Se(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ce{constructor(e,t){Se(this,"nodesPool",null),Se(this,"nodeType",void 0),Se(this,"rootNode",void 0),Se(this,"table",null),Se(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 Ee=n(66422);function Me(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Te extends Ce{constructor(){super("TH"),Me(this,"orderViews",new WeakMap),Me(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new ve(e,(e=>this.nodesPool.obtain(this.sourceRowIndex,e))),this.orderViews.set(e,t)),t}render(){const{rowsToRender:e,rowHeaderFunctions:t,rowHeadersCount:n,rows:o,cells:i}=this.table;for(let s=0;s<e;s++){const e=this.table.renderedRowToSource(s),a=o.getRenderedNode(s);this.sourceRowIndex=e;const l=this.obtainOrderView(a),u=i.obtainOrderView(a);l.appendView(u).setSize(n).setOffset(0).start();for(let o=n-1;o>=0;o--){l.render();const n=l.getCurrentNode();n.className="",n.removeAttribute("style"),(0,r.De)(n,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,r.Bq)(n,[(0,Ee.Nf)(),(0,Ee.D9)(),(0,Ee.wD)(o+1),(0,Ee.vC)(-1)]),t[o](e,n,o)}l.end()}}}class Re extends Ce{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,o=r+t;for(let t=0,r=e;t<r;t++){for(n=this.rootNode.childNodes[t],n||(n=this.table.rootDocument.createElement("tr"),this.rootNode.appendChild(n)),this.renderedNodes=n.childNodes.length;this.renderedNodes<o;)n.appendChild(this.table.rootDocument.createElement("th")),this.renderedNodes+=1;for(;this.renderedNodes>o;)n.removeChild(n.lastChild),this.renderedNodes-=1}const i=this.rootNode.childNodes.length;if(i>e)for(let t=e;t<i;t++)this.rootNode.removeChild(this.rootNode.lastChild)}else n&&(0,r.Ie)(n)}render(){const{columnHeadersCount:e}=this.table;this.table.isAriaEnabled()&&(0,r.Bq)(this.rootNode,[(0,Ee.t0)()]);for(let t=0;t<e;t+=1){const{columnHeaderFunctions:e,columnsToRender:n,rowHeadersCount:o}=this.table,i=this.rootNode.childNodes[t];this.table.isAriaEnabled()&&(0,r.Bq)(i,[(0,Ee.Sb)(),(0,Ee.Qg)(t+1)]);for(let s=-1*o;s<n;s+=1){const n=this.table.renderedColumnToSource(s),a=i.childNodes[s+o];a.className="",a.removeAttribute("style"),(0,r.De)(a,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.isAriaEnabled()&&(0,r.Bq)(a,[(0,Ee.wD)(s+1+this.table.rowHeadersCount),(0,Ee.vC)(-1),(0,Ee.Jg)(),...s>=0?[(0,Ee.L2)()]:[(0,Ee.Sb)()]]),e[t](n,a,t)}}}}var Ae=n(85975);let Ne=!1;class Le extends Ce{constructor(e){super(null,e)}adjust(){const{columnsToRender:e,rowHeadersCount:t}=this.table,n=e+t;for(;this.renderedNodes<n;)this.rootNode.appendChild(this.table.rootDocument.createElement("col")),this.renderedNodes+=1;for(;this.renderedNodes>n;)this.rootNode.removeChild(this.rootNode.lastChild),this.renderedNodes-=1}render(){this.adjust();const{columnsToRender:e,rowHeadersCount:t}=this.table;!Ne&&e>1e3&&(Ne=!0,(0,_.R8)(Ae.O`Performance tip: Handsontable rendered more than 1000 visible columns.\x20
  137. Consider limiting the number of rendered columns by specifying the table width and/or\x20
  138. turning off the "renderAllColumns" option.`));for(let e=0;e<t;e++){const t=this.table.renderedColumnToSource(e),n=this.table.columnUtils.getHeaderWidth(t);this.rootNode.childNodes[e].style.width=`${n}px`}for(let n=0;n<e;n++){const e=this.table.renderedColumnToSource(n),r=this.table.columnUtils.getWidth(e);this.rootNode.childNodes[n+t].style.width=`${r}px`}const n=this.rootNode.firstChild;n&&(0,r.iQ)(n,"rowHeader")}}const xe="ht__row_even",Oe="ht__row_odd";let Ie=!1;class ke extends Ce{constructor(e){var t,n,r;super("TR",e),t=this,r=void 0,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="orderView"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,this.orderView=new we(e,(e=>this.nodesPool.obtain(e)))}getRenderedNode(e){return this.orderView.getNode(e)}hasStaleContent(e){return this.orderView.hasStaleContent(e)}render(){const{rowsToRender:e}=this.table;!Ie&&e>1e3&&(Ie=!0,(0,_.R8)(Ae.O`Performance tip: Handsontable rendered more than 1000 visible rows.\x20
  139. Consider limiting the number of rendered rows by specifying the table height and/or\x20
  140. turning off the "renderAllRows" option.`)),this.table.isAriaEnabled()&&(0,r.Bq)(this.rootNode,[(0,Ee.t0)()]),this.orderView.setSize(e).setOffset(this.table.renderedRowToSource(0)).start();for(let o=0;o<e;o++){this.orderView.render();const e=this.orderView.getCurrentNode(),i=this.table.renderedRowToSource(o);var t,n;this.table.isAriaEnabled()&&(0,r.Bq)(e,[(0,Ee.Sb)(),(0,Ee.Qg)(i+(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)]),(i+1)%2==0?(0,r.nB)(e,xe)||((0,r.vy)(e,Oe),(0,r.iQ)(e,xe)):(0,r.nB)(e,Oe)||((0,r.vy)(e,xe),(0,r.iQ)(e,Oe))}this.orderView.end()}}function De(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Pe extends Ce{constructor(){super("TD"),De(this,"orderViews",new WeakMap),De(this,"sourceRowIndex",0)}obtainOrderView(e){let t;return this.orderViews.has(e)?t=this.orderViews.get(e):(t=new ve(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:o}=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),h=o.obtainOrderView(l);u.prependView(h).setSize(t).setOffset(0).start();for(let n=0;n<t;n++){u.render();const t=this.table.renderedColumnToSource(n),o=u.getCurrentNode();var i,s;(0,r.nB)(o,"hide")||(o.className=""),o.removeAttribute("style"),o.removeAttribute("dir"),(0,r.De)(o,[new RegExp("aria-(.*)"),new RegExp("role")]),this.table.cellRenderer(e,t,o),this.table.isAriaEnabled()&&(0,r.Bq)(o,[...o.hasAttribute("role")?[]:[(0,Ee.g)()],(0,Ee.vC)(-1),(0,Ee.wD)(t+(null!==(i=null===(s=this.table.rowUtils)||void 0===s||null===(s=s.dataAccessObject)||void 0===s?void 0:s.rowHeaders.length)&&void 0!==i?i:0)+1)])}u.end()}}}function He(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Fe{constructor(e){let{cellRenderer:t,stylesHandler:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};He(this,"rootNode",void 0),He(this,"rootDocument",void 0),He(this,"rowHeaders",null),He(this,"columnHeaders",null),He(this,"colGroup",null),He(this,"rows",null),He(this,"cells",null),He(this,"rowFilter",null),He(this,"columnFilter",null),He(this,"rowUtils",null),He(this,"columnUtils",null),He(this,"rowsToRender",0),He(this,"columnsToRender",0),He(this,"rowHeaderFunctions",[]),He(this,"rowHeadersCount",0),He(this,"columnHeaderFunctions",[]),He(this,"columnHeadersCount",0),He(this,"cellRenderer",void 0),He(this,"activeOverlayName",void 0),He(this,"stylesHandler",void 0),this.rootNode=e,this.rootDocument=this.rootNode.ownerDocument,this.cellRenderer=t,this.stylesHandler=n}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:o}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.setTable(this),t.setTable(this),n.setTable(this),r.setTable(this),o.setTable(this),this.rowHeaders=e,this.columnHeaders=t,this.colGroup=n,this.rows=r,this.cells=o}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),r=this.rowUtils;if(e.firstChild){const t=this.renderedRowToSource(n),o=r.getHeightByOverlayName(t,this.activeOverlayName),i=this.stylesHandler.areCellsBorderBox()?0:1;e.firstChild.style.height=o?o-i+"px":""}}}}class Ye{constructor(){let{TABLE:e,THEAD:t,COLGROUP:n,TBODY:r,rowUtils:o,columnUtils:i,cellRenderer:s,stylesHandler:a}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.renderer=new Fe(e,{cellRenderer:s,stylesHandler:a}),this.renderer.setRenderers({rowHeaders:new Te,columnHeaders:new Re(t),colGroup:new Le(n),rows:new ke(r),cells:new Pe}),this.renderer.setAxisUtils(o,i)}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()}}function Ve(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ue{constructor(e,t){Ve(this,"dataAccessObject",void 0),Ve(this,"wtSettings",void 0),Ve(this,"headerWidths",new Map),this.dataAccessObject=e,this.wtSettings=t}getWidth(e){return this.wtSettings.getSetting("columnWidth",e)||this.wtSettings.getSetting("defaultColumnWidth")}getHeaderHeight(e){let t=this.dataAccessObject.stylesHandler.getDefaultRowHeight();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))}calculateWidths(){const{wtSettings:e}=this;let t=e.getSetting("rowHeaderWidth");if(t=e.getSetting("onModifyRowHeaderWidth",t),null!=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?r:n,this.headerWidths.set(e,n)}}}}function Be(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class We{constructor(e,t){Be(this,"dataAccessObject",void 0),Be(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 je="top",ze="bottom",Ge="inline_start",$e="top_inline_start_corner",Ke="bottom_inline_start_corner",Xe=[je,ze,Ge,$e,Ke],qe=new Map([[je,`ht_clone_${je}`],[ze,`ht_clone_${ze}`],[Ge,`ht_clone_${Ge} ht_clone_left`],[$e,`ht_clone_${$e} ht_clone_top_left_corner`],[Ke,`ht_clone_${Ke} ht_clone_bottom_left_corner`]]);function Qe(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Je=class{constructor(e,t,n,o,i){Qe(this,"wtSettings",null),Qe(this,"domBindings",void 0),Qe(this,"TBODY",null),Qe(this,"THEAD",null),Qe(this,"COLGROUP",null),Qe(this,"hasTableHeight",!0),Qe(this,"hasTableWidth",!0),Qe(this,"isTableVisible",!1),Qe(this,"tableOffset",0),Qe(this,"holderOffset",0),this.domBindings=n,this.isMaster="master"===i,this.name=i,this.dataAccessObject=e,this.facadeGetter=t,this.wtSettings=o,this.instance=this.dataAccessObject.wot,this.wot=this.dataAccessObject.wot,this.TABLE=n.rootTable,(0,r.vg)(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 s=this.wtSettings.getSettingPure("rowHeaderWidth");this.wtSettings.update("rowHeaderWidth",(()=>this._modifyRowHeaderWidth(s))),this.rowUtils=new We(this.dataAccessObject,this.wtSettings),this.columnUtils=new Ue(this.dataAccessObject,this.wtSettings),this.tableRenderer=new Ye({TABLE:this.TABLE,THEAD:this.THEAD,COLGROUP:this.COLGROUP,TBODY:this.TBODY,rowUtils:this.rowUtils,columnUtils:this.columnUtils,cellRenderer:this.wtSettings.getSettingPure("cellRenderer"),stylesHandler:this.dataAccessObject.stylesHandler})}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&&(0,r.nB)(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")&&(0,r.Bq)(n,[(0,Ee.gg)()]),n}createHider(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.nB)(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.className="wtHider",t&&t.insertBefore(n,e),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.Bq)(n,[(0,Ee.gg)()]),n}createHolder(e){const t=e.parentNode;let n;return t&&t.nodeType===Node.ELEMENT_NODE&&(0,r.nB)(t,"wtHolder")||(n=this.domBindings.rootDocument.createElement("div"),n.style.position="relative",n.className="wtHolder",(0,r.Bq)(n,[(0,Ee.vC)(-1)]),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")&&(0,r.Bq)(n.parentNode,[(0,Ee.gg)()])),n.appendChild(e)),this.wtSettings.getSetting("ariaTags")&&(0,r.Bq)(n,[(0,Ee.gg)()]),n}draw(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const{wtSettings:t}=this,{wtOverlays:n,wtViewport:o}=this.dataAccessObject,i=t.getSetting("totalRows"),s=t.getSetting("totalColumns"),a=t.getSetting("rowHeaders"),l=a.length,u=t.getSetting("columnHeaders"),h=u.length;let c=e;if(this.isMaster&&(n.beforeDraw(),this.holderOffset=(0,r.cY)(this.holder),c=o.createCalculators(c),l&&!t.getSetting("fixedColumnsStart"))){const e=n.inlineStartOverlay.getScrollPosition(),t=this.correctHeaderWidth;this.correctHeaderWidth=0!==e,t!==this.correctHeaderWidth&&(c=!1)}if(c)this.isMaster&&n.refresh(!0);else{this.isMaster?this.tableOffset=(0,r.cY)(this.TABLE):this.tableOffset=this.dataAccessObject.parentTableOffset;const e=Math.max(this.getFirstRenderedRow(),0),t=Math.max(this.getFirstRenderedColumn(),0);this.rowFilter=new he(e,i,h),this.columnFilter=new le(t,s,l);let c=!0;if(this.isMaster){this.alignOverlaysWithTrimmingContainer();const e={};this.wtSettings.getSetting("beforeDraw",!0,e),c=!0!==e.skipRender}c&&(this.tableRenderer.setHeaderContentRenderers(a,u),(this.is(ze)||this.is(Ke))&&this.tableRenderer.setHeaderContentRenderers(a,[]),this.resetOversizedRows(),this.tableRenderer.setActiveOverlayName(this.name).setViewportSize(this.getRenderedRowsCount(),this.getRenderedColumnsCount()).setFilters(this.rowFilter,this.columnFilter).render(),this.isMaster&&this.markOversizedColumnHeaders(),this.adjustColumnHeaderHeights(),(this.isMaster||this.is(ze))&&this.markOversizedRows(),this.isMaster?(this.wtSettings.getSetting("externalRowCalculator")||o.createVisibleCalculators(),n.refresh(!1),n.applyToDOM(),this.wtSettings.getSetting("onDraw",!0)):this.is(ze)&&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(c),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 o=this.dataAccessObject.stylesHandler.getDefaultRowHeight();let i,s,a;const l=this.wtSettings.getSetting("columnHeaderHeight")||[];for(;n;)n-=1,i=this.getColumnHeaderHeight(n),s=this.getColumnHeader(t,n),s&&(a=(0,r.eU)(s),(!i&&o<a||i<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;for(let r=0,o=e.getSetting("columnHeaders").length;r<o;r++)if(n[r]){if(!t[r]||0===t[r].childNodes.length)return;t[r].childNodes[0].style.height=`${n[r]}px`}}resetOversizedRows(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject;if((this.isMaster||this.is(ze))&&!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,!this.isMaster,"render");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 o=this.getRow(t);if(!o&&t>=0)throw new Error("TR was expected to be rendered but is not");const i=o.childNodes[this.columnFilter.sourceColumnToVisibleRowHeadedColumn(n)];if(!i&&n>=0)throw new Error("TD or TH was expected to be rendered but is not");return i}getRow(e){let t=null,n=null;var r,o;return e<0?(t=null===(r=this.rowFilter)||void 0===r?void 0:r.sourceRowToVisibleColHeadedRow(e),n=this.THEAD):(t=null===(o=this.rowFilter)||void 0===o?void 0:o.sourceToRendered(e),n=this.TBODY),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.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;if(t>=this.wtSettings.getSetting("rowHeaders").length)return;const n=this.rowFilter.sourceToRendered(e),r=n<0?this.rowFilter.sourceRowToVisibleColHeadedRow(e):n,o=(n<0?this.THEAD:this.TBODY).childNodes[r];return null==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)],o=null==n?void 0:n.childNodes[r];o&&t.push(o)}return t}getCoords(e){let t=e;if("TD"!==t.nodeName&&"TH"!==t.nodeName&&(t=(0,r.kp)(t,["TD","TH"])),null===t)return null;const n=t.parentNode;if(!n)return null;const o=n.parentNode;let i=(0,r.Pe)(n),s=t.cellIndex;(0,r.yn)($e,t,this.wtRootElement)||(0,r.yn)(je,t,this.wtRootElement)?"THEAD"===o.nodeName&&(i-=o.childNodes.length):(0,r.yn)(Ke,t,this.wtRootElement)||(0,r.yn)(ze,t,this.wtRootElement)?i=this.wtSettings.getSetting("totalRows")-o.childNodes.length+i:o===this.THEAD?i=this.rowFilter.visibleColHeadedRowToSourceRow(i):this.rowFilter&&(i=this.rowFilter.renderedToSource(i)),(0,r.yn)($e,t,this.wtRootElement)||(0,r.yn)(Ge,t,this.wtRootElement)||(0,r.yn)(Ke,t,this.wtRootElement)?s=this.columnFilter.offsettedTH(s):this.columnFilter&&(s=this.columnFilter.visibleRowHeadedColumnToSourceColumn(s));const a=this.wtSettings.getSetting("onModifyGetCoordsElement",i,s);return a&&Array.isArray(a)&&([i,s]=a),this.wot.createCellCoords(i,s)}markOversizedRows(){if(this.wtSettings.getSetting("externalRowCalculator"))return;let e=this.TBODY.childNodes.length;const t=e*this.dataAccessObject.stylesHandler.getDefaultRowHeight(),n=(0,r.eU)(this.TBODY)-1,o=this.wot.stylesHandler.areCellsBorderBox(),i=o?r.DK:r.eU,s=o?0:1,a=o?1:0;let l,u,h,c,d;if(t!==n||this.wtSettings.getSetting("fixedRowsBottom"))for(;e;){e-=1,h=this.rowFilter.renderedToSource(e),l=this.getRowHeight(h),c=this.getTrForRow(h),d=c.querySelector("th");const t=0===h?a:0;u=d?i(d):i(c)-s,(!l&&this.dataAccessObject.stylesHandler.getDefaultRowHeight()<u-t||l<u)&&(o||(u+=1),this.dataAccessObject.wtViewport.oversizedRows[h]=u)}}getTrForRow(e){return this.TBODY.childNodes[this.rowFilter.sourceToRendered(e)]}isColumnHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("rowHeaders").length;return Math.abs(e)<=t}isRowHeaderRendered(e){if(e>=0)return!1;const t=this.wtSettings.getSetting("columnHeaders").length;return Math.abs(e)<=t}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)}hasDefinedSize(){return this.hasTableHeight&&this.hasTableWidth}getWidth(){return(0,r.Gq)(this.TABLE)}getHeight(){return(0,r.DK)(this.TABLE)}getTotalWidth(){const e=(0,r.Gq)(this.hider);return 0!==e?e:this.getWidth()}getTotalHeight(){const e=(0,r.DK)(this.hider);return 0!==e?e:this.getHeight()}isVisible(){return(0,r.zN)(this.TABLE)}_modifyRowHeaderWidth(e){let t=(0,o.Tn)(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}},Ze={getFirstRenderedRow(){return 0===this.getRenderedRowsCount()?-1:0},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return this.getRenderedRowsCount()-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsTop"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount(){return this.dataAccessObject.columnHeaders.length}};(0,v.LH)(Ze,"MIXIN_NAME","stickyRowsTop",{writable:!1,enumerable:!1});const et=Ze,tt={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}};(0,v.LH)(tt,"MIXIN_NAME","calculatedColumns",{writable:!1,enumerable:!1});const nt=tt;class rt extends Je{constructor(e,t,n,r){super(e,t,n,r,je)}}(0,v.co)(rt,et),(0,v.co)(rt,nt);const ot=rt;function it(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 st=new WeakSet;function at(e){const{wtSettings:t,inlineStartOverlay:n,wtTable:o,wtViewport:i,totalColumns:s,rootWindow:a}=this.dataAccessObject;if(n.mainTableScrollableElement===a){let l=null;if(t.getSetting("rtlMode")){const e=o.TABLE.getBoundingClientRect(),t=this.dataAccessObject.rootWindow.document.documentElement.offsetWidth;l=Math.abs(e.right-t)}else l=(0,r.cY)(o.wtRootElement).left;const u=Math.abs((0,r.v_)(a,a));if(l>u){const t=(0,r.xM)(a);let o=i.getRowHeaderWidth();for(let r=1;r<=s;r++)if(o+=n.sumCellSizes(r-1,r),l+o-u>=t){e=r-2;break}}}return e}function lt(e){const{topOverlay:t,wtTable:n,wtViewport:o,totalRows:i,rootWindow:s}=this.dataAccessObject;if(t.mainTableScrollableElement===s){const a=(0,r.cY)(n.wtRootElement),l=(0,r.hY)(s,s);if(a.top>l){const n=(0,r.eU)(s);let u=o.getColumnHeaderHeight();for(let r=1;r<=i;r++)if(u+=t.sumCellSizes(r-1,r),a.top+u-l>=n){e=r-2;break}}}return e}const ut=class{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=st),n.add(t),function(e,t,n){(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"dataAccessObject",void 0),this.dataAccessObject=e}scrollViewport(e,t,n){if(e.col<0||e.row<0)return!1;const r=this.scrollViewportHorizontally(e.col,t),o=this.scrollViewportVertically(e.row,n);return r||o}scrollViewportHorizontally(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:n,totalColumns:r}=this.dataAccessObject;if(!n)return!1;const o=(0,v.nA)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollHorizontally",e,o),!Number.isInteger(e)||e<0||e>r)return!1;t=o.value;const{fixedColumnsStart:i,inlineStartOverlay:s}=this.dataAccessObject,a="auto"===t;if(a&&e<i)return!1;const l=this.getFirstVisibleColumn(),u=this.getLastVisibleColumn();let h=!1;return(a&&(e<l||e>u)||!a)&&(h=s.scrollTo(e,a?e>=this.getLastPartiallyVisibleColumn():"end"===t)),h}scrollViewportVertically(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto";const{drawn:n,totalRows:r}=this.dataAccessObject;if(!n)return!1;const o=(0,v.nA)(t);if(e=this.dataAccessObject.wtSettings.getSetting("onBeforeViewportScrollVertically",e,o),!Number.isInteger(e)||e<0||e>r)return!1;t=o.value;const{fixedRowsBottom:i,fixedRowsTop:s,topOverlay:a}=this.dataAccessObject,l="auto"===t;if(l&&(e<s||e>r-i-1))return!1;const u=this.getFirstVisibleRow(),h=this.getLastVisibleRow();let c=!1;return(l&&(e<u||e>h)||!l)&&(c=a.scrollTo(e,l?e>=this.getLastPartiallyVisibleRow():"bottom"===t)),c}getFirstVisibleRow(){return this.dataAccessObject.wtTable.getFirstVisibleRow()}getLastVisibleRow(){return it(st,this,lt).call(this,this.dataAccessObject.wtTable.getLastVisibleRow())}getFirstPartiallyVisibleRow(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleRow()}getLastPartiallyVisibleRow(){return it(st,this,lt).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleRow())}getFirstVisibleColumn(){return this.dataAccessObject.wtTable.getFirstVisibleColumn()}getLastVisibleColumn(){return it(st,this,at).call(this,this.dataAccessObject.wtTable.getLastVisibleColumn())}getFirstPartiallyVisibleColumn(){return this.dataAccessObject.wtTable.getFirstPartiallyVisibleColumn()}getLastPartiallyVisibleColumn(){return it(st,this,at).call(this,this.dataAccessObject.wtTable.getLastPartiallyVisibleColumn())}};var ht=n(3709),ct=n(94814);function dt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class mt{get eventManager(){return new h.A(this)}constructor(e,t){dt(this,"wtTable",void 0),dt(this,"wtScroll",void 0),dt(this,"wtViewport",void 0),dt(this,"wtOverlays",void 0),dt(this,"selectionManager",void 0),dt(this,"wtEvent",void 0),dt(this,"guid",`wt_${(0,W.DU)()}`),dt(this,"drawInterrupted",!1),dt(this,"drawn",!1),dt(this,"activeOverlayName","master"),dt(this,"domBindings",void 0),dt(this,"wtSettings",void 0),this.domBindings={rootTable:e,rootDocument:e.ownerDocument,rootWindow:e.ownerDocument.defaultView},this.wtSettings=t,this.wtScroll=new ut(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){(0,r.c6)(n,e[t])}])}}createCellCoords(e,t){return new ht.A(e,t,this.wtSettings.getSetting("rtlMode"))}createCellRange(e,t,n){return new ct.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()||(0,r.Sx)(this.wtTable.wtRootElement.parentNode)?this.drawInterrupted=!0:this.wtTable.draw(e),this}getCell(e){if(!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))return this.wtTable.getCell(e);const t=this.wtSettings.getSetting("totalRows"),n=this.wtSettings.getSetting("fixedRowsTop"),r=this.wtSettings.getSetting("fixedRowsBottom"),o=this.wtSettings.getSetting("fixedColumnsStart");if(e.row<n&&e.col<o)return this.wtOverlays.topInlineStartCornerOverlay.clone.wtTable.getCell(e);if(e.row<n)return this.wtOverlays.topOverlay.clone.wtTable.getCell(e);if(e.col<o&&e.row>=t-r){if(this.wtOverlays.bottomInlineStartCornerOverlay&&this.wtOverlays.bottomInlineStartCornerOverlay.clone)return this.wtOverlays.bottomInlineStartCornerOverlay.clone.wtTable.getCell(e)}else{if(e.col<o)return this.wtOverlays.inlineStartOverlay.clone.wtTable.getCell(e);if(e.row<t&&e.row>=t-r&&this.wtOverlays.bottomOverlay&&this.wtOverlays.bottomOverlay.clone)return this.wtOverlays.bottomOverlay.clone.wtTable.getCell(e)}return this.wtTable.getCell(e)}scrollViewport(e,t,n){return this.wtScroll.scrollViewport(e,t,n)}scrollViewportHorizontally(e,t){return this.wtScroll.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this.wtScroll.scrollViewportVertically(e,t)}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 stylesHandler(){return e.stylesHandler},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 pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ft extends mt{constructor(e,t,n){super(e,t),pt(this,"cloneSource",void 0),pt(this,"cloneOverlay",void 0);const r=this.wtSettings.getSetting("facade",this);this.cloneSource=n.source,this.cloneOverlay=n.overlay,this.stylesHandler=n.stylesHandler,this.wtTable=this.cloneOverlay.createTable(this.getTableDao(),r,this.domBindings,this.wtSettings),this.wtViewport=n.viewport,this.selectionManager=n.selectionManager,this.wtEvent=new se(r,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager,n.event),this.findOriginalHeaders()}}class gt{constructor(e,t,n,o,i){var s,a,l;s=this,l=null,(a=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(a="wtSettings"))in s?Object.defineProperty(s,a,{value:l,enumerable:!0,configurable:!0,writable:!0}):s[a]=l,(0,v.LH)(this,"wot",e,{writable:!1}),this.domBindings=i,this.facadeGetter=t,this.wtSettings=o;const{TABLE:u,hider:h,spreader:c,holder:d,wtRootElement:m}=this.wot.wtTable;this.instance=this.wot,this.type=n,this.mainTableScrollableElement=null,this.TABLE=u,this.hider=h,this.spreader=c,this.holder=d,this.wtRootElement=m,this.trimmingContainer=(0,r.fX)(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=(0,r.fX)(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=(0,r.K7)(e.TABLE)}getRelativeCellPosition(e,t,n){if(!1===this.clone.wtTable.holder.contains(e))return void(0,_.R8)(`The provided element is not a child of the ${this.type} overlay`);const r=this.mainTableScrollableElement===this.domBindings.rootWindow,o=n<this.wtSettings.getSetting("fixedColumnsStart"),i=t<this.wtSettings.getSetting("fixedRowsTop"),s=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 h=null;return h=r?this.getRelativeCellPositionWithinWindow(i,o,u,l):this.getRelativeCellPositionWithinHolder(i,s,o,u,l),h}getRelativeStartPosition(e){return this.isRtl()?e.offsetParent.offsetWidth-e.offsetLeft-e.offsetWidth:e.offsetLeft}getRelativeCellPositionWithinWindow(e,t,n,o){const i=this.wot.wtTable.wtRootElement.getBoundingClientRect();let s=0,a=0;if(t){let e=i.left;this.isRtl()&&(e=this.domBindings.rootWindow.innerWidth-(i.left+i.width+(0,r.XJ)())),s=e<=0?-1*e:0}else s=o.start;return a=e?this.clone.wtTable.TABLE.getBoundingClientRect().top-i.top:o.top,{start:n.start+s,top:n.top+a}}getRelativeCellPositionWithinHolder(e,t,n,r,o){const i=this.wot.wtOverlays.inlineStartOverlay.getScrollPosition(),s=this.wot.wtOverlays.topOverlay.getScrollPosition();let a=0,l=0;if(n||(a=i-o.start),t){const e=this.wot.wtTable.wtRootElement.getBoundingClientRect();l=-1*this.clone.wtTable.TABLE.getBoundingClientRect().top+e.top}else e||(l=s-o.top);return{start:r.start-a,top:r.top-l}}makeClone(){if(-1===Xe.indexOf(this.type))throw new Error(`Clone type "${this.type}" is not supported.`);const{wtTable:e,wtSettings:t}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=n.createElement("div"),s=n.createElement("table"),a=e.wtRootElement.parentNode;i.className=`${qe.get(this.type)} handsontable`,i.setAttribute("dir",this.isRtl()?"rtl":"ltr"),i.style.position="absolute",i.style.top=0,i.style.overflow="visible",this.isRtl()?i.style.right=0:i.style.left=0,t.getSetting("ariaTags")&&(0,r.Bq)(i,[(0,Ee.gg)()]),s.className=e.TABLE.className,e.TABLE.getAttribute("role")&&s.setAttribute("role",e.TABLE.getAttribute("role")),i.appendChild(s),a.appendChild(i);const l=this.wtSettings.getSetting("preventOverflow");return!0===l||"horizontal"===l&&this.type===je||"vertical"===l&&this.type===Ge?this.mainTableScrollableElement=o:"hidden"===o.getComputedStyle(a).getPropertyValue("overflow")?this.mainTableScrollableElement=e.holder:this.mainTableScrollableElement=(0,r.K7)(e.TABLE),new ft(s,this.wtSettings,{source:this.wot,overlay:this,viewport:this.wot.wtViewport,event:this.wot.wtEvent,selectionManager:this.wot.selectionManager,stylesHandler:this.wot.stylesHandler})}refresh(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this.needFullRender){const t=this.clone.cloneSource;t.activeOverlayName=this.clone.wtTable.name,this.clone.draw(e),t.activeOverlayName="master"}}reset(){const e=this.clone.wtTable.holder,t=this.clone.wtTable.hider;[e.style,t.style,e.parentNode.style].forEach((e=>{e.width="",e.height=""}))}isRtl(){return this.wtSettings.getSetting("rtlMode")}destroy(){this.clone.eventManager.destroy()}}const yt=e=>{const t=e.stylesHandler;if(t.isClassicTheme())return Object.freeze({width:6,height:6,borderWidth:1,borderStyle:"solid",borderColor:"#FFF"});const n=t.getCSSVariableValue("cell-autofill-size"),r=t.getCSSVariableValue("cell-autofill-border-width"),o=t.getCSSVariableValue("cell-autofill-border-color");return Object.freeze({width:n,height:n,borderWidth:r,borderStyle:"solid",borderColor:o})};class wt extends gt{constructor(e,t,n,r){var o,i,s;super(e,t,je,n,r),o=this,s=-1,(i=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(i="cachedFixedRowsTop"))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,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 ot(...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 o=0,i=!1;if(this.trimmingContainer!==t||n&&"vertical"===n)o=this.getScrollPosition(),(0,r.ZK)(e);else{const{wtTable:t}=this.wot,n=t.hider.getBoundingClientRect();i=Math.ceil(n.bottom)===e.offsetHeight,o=this.getOverlayOffset(),(0,r.ON)(e,"0px",`${o}px`)}const s=this.adjustHeaderBordersPosition(o,i);return this.adjustElementsSize(),s}setScrollPosition(e){const{rootWindow:t}=this.domBindings,n=this.mainTableScrollableElement;let o=!1;if(n===t&&e!==t.scrollY){const n=t.scrollY;t.scrollTo((0,r.Vp)(t),e),o=n!==t.scrollY}else if(e!==n.scrollTop){const t=n.scrollTop;n.scrollTop=e,o=t!==n.scrollTop}return o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const n=this.wot.stylesHandler.getDefaultRowHeight();let r=e,o=0;for(;r<t;){const e=this.wot.wtTable.getRowHeight(r);o+=void 0===e?n:e,r+=1}return o}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===s){let o=t.getWorkspaceWidth();t.hasVerticalScroll()&&(o-=(0,r.XJ)(n)),o=Math.min(o,e.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.DK)(this.clone.wtTable.TABLE);e.hasDefinedSize()||(a=0),i.height=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=yt(this.wot),n=this.wot.selectionManager.getFocusSelection()?parseInt(t.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)+n}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:o}=this,i=(n.cloneSource?n.cloneSource:n).wtTable.holder,s=o.getSetting("columnHeaders"),a=0===o.getSetting("fixedRowsTop")&&s.length>0&&!(0,r.nB)(i.parentNode,"innerBorderTop")?1:0;let l=this.getTableParentOffset(),u=0;if(t&&this.wot.wtTable.getRowHeight(e)>this.wot.wtViewport.getViewportHeight()&&(t=!1),t&&i.offsetHeight!==i.clientHeight&&(u=(0,r.XJ)(this.domBindings.rootDocument)),t){const t=o.getSetting("fixedRowsBottom"),r=o.getSetting("totalRows");l+=this.sumCellSizes(0,e+1),l-=n.wtViewport.getViewportHeight()-this.sumCellSizes(r-t,r),l+=1,l+=a}else l+=this.sumCellSizes(o.getSetting("fixedRowsTop"),e);return l+=u,(0,r.p6)(this.mainTableScrollableElement)===l-a&&a>0&&this.wot.wtOverlays.expandHiderVerticallyBy(a),this.setScrollPosition(l)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.hY)(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()-this.clone.wtTable.getTotalHeight();n=Math.max(this.getScrollPosition()-this.getTableParentOffset(),0),n>e&&(n=0)}return n}adjustHeaderBordersPosition(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{wtSettings:n}=this,o=this.wot.wtTable.holder.parentNode,i=n.getSetting("totalColumns"),s="horizontal"===n.getSetting("preventOverflow");i?(0,r.vy)(o,"emptyColumns"):(0,r.iQ)(o,"emptyColumns");let a=!1;if(!t&&!s){const t=n.getSetting("fixedRowsTop"),i=this.cachedFixedRowsTop!==t,s=n.getSetting("columnHeaders");if((i||0===t)&&s.length>0){const t=(0,r.nB)(o,"innerBorderTop");this.cachedFixedRowsTop=n.getSetting("fixedRowsTop"),e||0===n.getSetting("totalRows")?((0,r.iQ)(o,"innerBorderTop"),a=!t):((0,r.vy)(o,"innerBorderTop"),a=t)}}return a}}const vt={getFirstRenderedRow(){const e=this.getRenderedRowsCount();return 0===e?-1:this.wtSettings.getSetting("totalRows")-e},getFirstVisibleRow(){return this.getFirstRenderedRow()},getFirstPartiallyVisibleRow(){return this.getFirstRenderedRow()},getLastRenderedRow(){return 0===this.getRenderedRowsCount()?-1:this.wtSettings.getSetting("totalRows")-1},getLastVisibleRow(){return this.getLastRenderedRow()},getLastPartiallyVisibleRow(){return this.getLastRenderedRow()},getRenderedRowsCount(){return Math.min(this.wtSettings.getSetting("totalRows"),this.wtSettings.getSetting("fixedRowsBottom"))},getVisibleRowsCount(){return this.getRenderedRowsCount()},getColumnHeadersCount:()=>0};(0,v.LH)(vt,"MIXIN_NAME","stickyRowsBottom",{writable:!1,enumerable:!1});const _t=vt;class bt extends Je{constructor(e,t,n,r){super(e,t,n,r,ze)}}(0,v.co)(bt,_t),(0,v.co)(bt,nt);const St=bt;class Ct extends gt{constructor(e,t,n,r){var o,i,s;super(e,t,ze,n,r),o=this,s=-1,(i=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(i="cachedFixedRowsBottom"))in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,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 St(...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 o=this.adjustHeaderBordersPosition(n);return this.adjustElementsSize(),o}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,o=this.clone.wtTable.holder.parentNode;let i=0;t.hasVerticalScroll()||(i+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(i+=(0,r.XJ)(n)),o.style.bottom=`${i}px`}setScrollPosition(e){const{rootWindow:t}=this.domBindings,n=this.mainTableScrollableElement;let o=!1;if(n===t&&e!==t.scrollY){const e=t.scrollY;t.scrollTo((0,r.Vp)(t),top),o=e!==t.scrollY}else if(e!==n.scrollTop){const t=n.scrollTop;n.scrollTop=e,o=t!==n.scrollTop}return o}onScroll(){this.wtSettings.getSetting("onScrollHorizontally")}sumCellSizes(e,t){const{wtTable:n,stylesHandler:r}=this.wot,o=r.getDefaultRowHeight();let i=e,s=0;for(;i<t;){const e=n.getRowHeight(i);s+=void 0===e?o:e,i+=1}return s}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"horizontal"===s){let o=t.getWorkspaceWidth();t.hasVerticalScroll()&&(o-=(0,r.XJ)(n)),o=Math.min(o,e.wtRootElement.scrollWidth),i.width=`${o}px`}else i.width="";this.clone.wtTable.holder.style.width=i.width;let a=(0,r.DK)(this.clone.wtTable.TABLE);e.hasDefinedSize()||(a=0),i.height=`${a}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 o=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder;let i=0;t&&o.offsetHeight!==o.clientHeight&&(i=(0,r.XJ)(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+=i,this.setScrollPosition(n)}getTableParentOffset(){return this.mainTableScrollableElement===this.domBindings.rootWindow?this.wot.wtTable.holderOffset.top:0}getScrollPosition(){return(0,r.hY)(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=e-this.clone.wtTable.getTotalHeight(),r=this.domBindings.rootDocument.documentElement.clientHeight;n=Math.max(this.getTableParentOffset()-this.getScrollPosition()-r+e,0),n>t&&(n=0)}return n}adjustHeaderBordersPosition(e){const t=this.wtSettings.getSetting("fixedRowsBottom"),n=this.cachedFixedRowsBottom!==t,o=this.wtSettings.getSetting("columnHeaders");let i=!1;if((n||0===t)&&o.length>0){const t=this.wot.wtTable.holder.parentNode,n=(0,r.nB)(t,"innerBorderBottom");this.cachedFixedRowsBottom=this.wtSettings.getSetting("fixedRowsBottom"),e||0===this.wtSettings.getSetting("totalRows")?((0,r.iQ)(t,"innerBorderBottom"),i=!n):((0,r.vy)(t,"innerBorderBottom"),i=n)}return i}}const Et={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}};(0,v.LH)(Et,"MIXIN_NAME","calculatedRows",{writable:!1,enumerable:!1});const Mt=Et,Tt={getFirstRenderedColumn(){return 0===this.getRenderedColumnsCount()?-1:0},getFirstVisibleColumn(){return this.getFirstRenderedColumn()},getFirstPartiallyVisibleColumn(){return this.getFirstRenderedColumn()},getLastRenderedColumn(){return this.getRenderedColumnsCount()-1},getLastVisibleColumn(){return this.getLastRenderedColumn()},getLastPartiallyVisibleColumn(){return this.getLastRenderedColumn()},getRenderedColumnsCount(){return Math.min(this.wtSettings.getSetting("totalColumns"),this.wtSettings.getSetting("fixedColumnsStart"))},getVisibleColumnsCount(){return this.getRenderedColumnsCount()},getRowHeadersCount(){return this.dataAccessObject.rowHeaders.length}};(0,v.LH)(Tt,"MIXIN_NAME","stickyColumnsStart",{writable:!1,enumerable:!1});const Rt=Tt;class At extends Je{constructor(e,t,n,r){super(e,t,n,r,Ge)}}(0,v.co)(At,Mt),(0,v.co)(At,Rt);const Nt=At;class Lt extends gt{constructor(e,t,n,r){super(e,t,Ge,n,r)}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Nt(...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,o=this.wtSettings.getSetting("preventOverflow");let i=0;this.trimmingContainer!==t||o&&"horizontal"===o?(i=this.getScrollPosition(),(0,r.ZK)(n)):(i=this.getOverlayOffset()*(this.isRtl()?-1:1),(0,r.ON)(n,`${i}px`,"0px"));const s=this.adjustHeaderBordersPosition(i);return this.adjustElementsSize(),s}setScrollPosition(e){const{rootWindow:t}=this.domBindings;let n=!1;this.isRtl()&&(e=-e);const o=this.mainTableScrollableElement;if(o===t&&e!==t.scrollX){const o=t.scrollX;t.scrollTo(e,(0,r.v1)(t)),n=o!==t.scrollX}else if(e!==o.scrollLeft){const t=o.scrollLeft;o.scrollLeft=e,n=t!==o.scrollLeft}return n}onScroll(){this.wtSettings.getSetting("onScrollVertically")}sumCellSizes(e,t){const n=this.wtSettings.getSetting("defaultColumnWidth");let r=e,o=0;for(;r<t;)o+=this.wot.wtTable.getColumnWidth(r)||n,r+=1;return o}adjustElementsSize(){this.updateTrimmingContainer(),this.needFullRender&&(this.adjustRootElementSize(),this.adjustRootChildrenSize())}adjustRootElementSize(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n,rootWindow:o}=this.domBindings,i=this.clone.wtTable.holder.parentNode.style,s=this.wtSettings.getSetting("preventOverflow");if(this.trimmingContainer!==o||"vertical"===s){let o=t.getWorkspaceHeight();t.hasHorizontalScroll()&&(o-=(0,r.XJ)(n)),o=Math.min(o,e.wtRootElement.scrollHeight),i.height=`${o}px`}else i.height="";this.clone.wtTable.holder.style.height=i.height;const a=(0,r.Gq)(this.clone.wtTable.TABLE);i.width=`${a}px`}adjustRootChildrenSize(){const{holder:e}=this.clone.wtTable,t=yt(this.wot),n=this.wot.selectionManager.getFocusSelection()?parseInt(t.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)+n}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,o=n.getSetting("rowHeaders"),i=n.getSetting("fixedColumnsStart"),s=(this.wot.cloneSource?this.wot.cloneSource:this.wot).wtTable.holder,a=0===i&&o.length>0&&!(0,r.nB)(s.parentNode,"innerBorderInlineStart")?1:0;let l=this.getTableParentOffset(),u=0;return t&&this.wot.wtTable.getColumnWidth(e)>this.wot.wtViewport.getViewportWidth()&&(t=!1),t&&s.offsetWidth!==s.clientWidth&&(u=(0,r.XJ)(this.domBindings.rootDocument)),t?(l+=this.sumCellSizes(0,e+1),l-=this.wot.wtViewport.getViewportWidth(),l+=a):l+=this.sumCellSizes(this.wtSettings.getSetting("fixedColumnsStart"),e),l+=u,(0,r.h$)(this.mainTableScrollableElement)===l-a&&a>0&&this.wot.wtOverlays.expandHiderHorizontallyBy(a),this.setScrollPosition(l)}getTableParentOffset(){let e=0;return this.wtSettings.getSetting("preventOverflow")||this.trimmingContainer!==this.domBindings.rootWindow||(e=this.wot.wtTable.holderOffset.left),e}getScrollPosition(){return Math.abs((0,r.v_)(this.mainTableScrollableElement,this.domBindings.rootWindow))}getOverlayOffset(){const{rootWindow:e}=this.domBindings,t=this.wtSettings.getSetting("preventOverflow");let n=0;return 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),n>this.wot.wtTable.getTotalWidth()-this.clone.wtTable.getTotalWidth()&&(n=0)),n}adjustHeaderBordersPosition(e){const{wtSettings:t}=this,n=this.wot.wtTable.holder.parentNode,o=t.getSetting("rowHeaders"),i=t.getSetting("fixedColumnsStart"),s=t.getSetting("totalRows"),a="vertical"===t.getSetting("preventOverflow");s?(0,r.vy)(n,"emptyRows"):(0,r.iQ)(n,"emptyRows");let l=!1;if(!a)if(i&&!o.length)(0,r.iQ)(n,"innerBorderLeft innerBorderInlineStart");else if(!i&&o.length){const t=(0,r.nB)(n,"innerBorderInlineStart");e?((0,r.iQ)(n,"innerBorderLeft innerBorderInlineStart"),l=!t):((0,r.vy)(n,"innerBorderLeft innerBorderInlineStart"),l=t)}return l}}class xt extends Je{constructor(e,t,n,r){super(e,t,n,r,$e)}}(0,v.co)(xt,et),(0,v.co)(xt,Rt);const Ot=xt;function It(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class kt extends gt{constructor(e,t,n,r,o,i){super(e,t,$e,n,r),It(this,"topOverlay",void 0),It(this,"inlineStartOverlay",void 0),this.topOverlay=o,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Ot(...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();(0,r.ON)(e,`${t}px`,`${n}px`)}else(0,r.ZK)(e);let t=(0,r.DK)(this.clone.wtTable.TABLE);const n=(0,r.Gq)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(t=0),e.style.height=`${t}px`,e.style.width=`${n}px`,!1}}class Dt extends Je{constructor(e,t,n,r){super(e,t,n,r,Ke)}}(0,v.co)(Dt,_t),(0,v.co)(Dt,Rt);const Pt=Dt;class Ht extends gt{constructor(e,t,n,r,o,i){super(e,t,Ke,n,r),this.bottomOverlay=o,this.inlineStartOverlay=i}createTable(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return new Pt(...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(0,r.ZK)(t),this.repositionOverlay();let n=(0,r.DK)(this.clone.wtTable.TABLE);const o=(0,r.Gq)(this.clone.wtTable.TABLE);return this.wot.wtTable.hasDefinedSize()||(n=0),t.style.height=`${n}px`,t.style.width=`${o}px`,!1}repositionOverlay(){const{wtTable:e,wtViewport:t}=this.wot,{rootDocument:n}=this.domBindings,o=this.clone.wtTable.holder.parentNode;let i=0;t.hasVerticalScroll()||(i+=t.getWorkspaceHeight()-e.getTotalHeight()),t.hasVerticalScroll()&&t.hasHorizontalScroll()&&(i+=(0,r.XJ)(n)),o.style.bottom=`${i}px`}}function Ft(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Yt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Vt(e,t,n){return e.set(Bt(e,t),n),n}function Ut(e,t){return e.get(Bt(e,t))}function Bt(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 Wt=new WeakMap,jt=new WeakMap,zt=new WeakMap,Gt=new WeakMap;const $t=class{constructor(e,t,n,o,i,s){Yt(this,"wot",null),Ft(this,Wt,[]),Yt(this,"topOverlay",null),Yt(this,"bottomOverlay",null),Yt(this,"inlineStartOverlay",null),Yt(this,"topInlineStartCornerOverlay",null),Yt(this,"bottomInlineStartCornerOverlay",null),Yt(this,"browserLineHeight",void 0),Yt(this,"wtSettings",null),Ft(this,jt,!1),Ft(this,zt,0),Ft(this,Gt,null),Yt(this,"resizeObserver",new ResizeObserver((e=>{(0,z.xi)((()=>{Array.isArray(e)&&e.length&&(Vt(zt,this,Ut(zt,this)+1),100===Ut(zt,this)&&((0,_.R8)("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!==Ut(Gt,this)&&clearTimeout(Ut(Gt,this)),Vt(Gt,this,setTimeout((()=>{Vt(zt,this,0)}),100)),this.wtSettings.getSetting("onContainerElementResize"))}))}))),this.wot=e,this.wtSettings=o,this.domBindings=n,this.facadeGetter=t,this.wtTable=s;const{rootDocument:a,rootWindow:l}=this.domBindings;this.instance=this.wot,this.eventManager=i,this.scrollbarSize=(0,r.XJ)(a);const u="hidden"===l.getComputedStyle(s.wtRootElement.parentNode).getPropertyValue("overflow");this.scrollableElement=u?s.holder:(0,r.K7)(s.TABLE),this.initOverlays(),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=[...Ut(Wt,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),o=1.2*parseInt(n.fontSize,10);this.browserLineHeight=r||o}initOverlays(){const e=[this.wot,this.facadeGetter,this.wtSettings,this.domBindings];this.topOverlay=new wt(...e),this.bottomOverlay=new Ct(...e),this.inlineStartOverlay=new Lt(...e),this.topInlineStartCornerOverlay=new kt(...e,this.topOverlay,this.inlineStartOverlay),this.bottomInlineStartCornerOverlay=new Ht(...e,this.bottomOverlay,this.inlineStartOverlay),Vt(Wt,this,[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay])}beforeDraw(){Vt(jt,this,Ut(Wt,this).reduce(((e,t)=>t.hasRenderingStateChanged()||e),!1)),Ut(Wt,this).forEach((e=>e.updateStateOfRendering("before")))}afterDraw(){this.syncScrollWithMaster(),Ut(Wt,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 o=t.devicePixelRatio&&t.devicePixelRatio>1,i=this.scrollableElement===t,a=this.wtSettings.getSetting("preventWheel"),l={passive:i};let u;(a||o||!(0,s.H8)())&&this.eventManager.addEventListener(this.wtTable.wtRootElement,"wheel",(e=>this.onCloneWheel(e,a)),l),[this.topOverlay,this.bottomOverlay,this.inlineStartOverlay,this.topInlineStartCornerOverlay,this.bottomInlineStartCornerOverlay].forEach((e=>{this.eventManager.addEventListener(e.clone.wtTable.holder,"wheel",(e=>this.onCloneWheel(e,a)),l)})),this.eventManager.addEventListener(t,"resize",(()=>{(0,z.xi)((()=>{clearTimeout(u),this.wtSettings.getSetting("onWindowResize"),u=setTimeout((()=>{Vt(zt,this,0)}),200)}))})),i||this.resizeObserver.observe(this.wtTable.wtRootElement.parentElement)}onTableScroll(e){const t=this.domBindings.rootWindow,n=this.inlineStartOverlay.mainTableScrollableElement,r=this.topOverlay.mainTableScrollableElement,o=e.target;this.keyPressed&&(r!==t&&o!==t&&!e.target.contains(r)||n!==t&&o!==t&&!e.target.contains(n))||this.syncScrollPositions(e)}onCloneWheel(e,t){const{rootWindow:n}=this.domBindings,r=this.inlineStartOverlay.mainTableScrollableElement,o=this.topOverlay.mainTableScrollableElement,i=e.target,s=o!==n&&i!==n&&!i.contains(o),a=r!==n&&i!==n&&!i.contains(r);if(this.keyPressed&&(s||a)||this.scrollableElement===n)return;const l=this.translateMouseWheelToScroll(e);(t||this.scrollableElement!==n&&l)&&e.preventDefault()}onKeyDown(e){this.keyPressed=(0,a.m0)(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),o=this.scrollHorizontally(n);return r||o}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 e=this.topOverlay.clone.wtTable.holder,t=this.inlineStartOverlay.clone.wtTable.holder;let n=this.scrollableElement.scrollLeft,r=this.scrollableElement.scrollTop;if(this.wot.wtViewport.isHorizontallyScrollableByWindow()&&(n=this.scrollableElement.scrollX),this.wot.wtViewport.isVerticallyScrollableByWindow()&&(r=this.scrollableElement.scrollY),this.horizontalScrolling=this.lastScrollX!==n,this.verticalScrolling=this.lastScrollY!==r,this.lastScrollX=n,this.lastScrollY=r,this.horizontalScrolling){e.scrollLeft=n;const t=this.bottomOverlay.needFullRender?this.bottomOverlay.clone.wtTable.holder:null;t&&(t.scrollLeft=n)}this.verticalScrolling&&(t.scrollTop=r),this.refreshAll()}syncScrollWithMaster(){if(!Ut(jt,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),Vt(jt,this,!1)}updateMainScrollableElements(){this.eventManager.clearEvents(!0),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=(0,r.K7)(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];this.updateLastSpreaderSize()&&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,o=this.wtSettings.getSetting("totalColumns"),i=this.wtSettings.getSetting("totalRows"),s=e.getRowHeaderWidth(),a=e.getColumnHeaderHeight()+this.topOverlay.sumCellSizes(0,i)+1,l=s+this.inlineStartOverlay.sumCellSizes(0,o),u=t.hider.style,h=(()=>!r&&this.scrollableElement.scrollTop>Math.max(0,a-t.holder.clientHeight))()?1:0,c=(()=>!r&&this.scrollableElement.scrollLeft>Math.max(0,l-t.holder.clientWidth))()?1:0;u.width=`${l+c}px`,u.height=`${a+h}px`,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(0,F.z0)(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];(0,F.z0)(t,(t=>{t&&(t.clone.wtTable.TABLE.className=e.className)}))}};function Kt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Xt{constructor(e){Kt(this,"settings",{}),Kt(this,"defaults",Object.freeze(this.getDefaults())),(0,v.v4)(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,currentRowClassName:null,currentColumnClassName:null,preventOverflow:()=>!1,preventWheel:!1,data:void 0,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:()=>[],columnHeaders:()=>[],totalRows:void 0,totalColumns:void 0,cellRenderer:(e,t,n)=>{const o=this.getSetting("data",e,t);(0,r.c6)(n,null==o?"":o)},columnWidth(){},rowHeight(){},rowHeightByOverlayName(){},defaultColumnWidth:50,selections:null,hideBorderOnMouseDownOver:!1,viewportRowCalculatorOverride:null,viewportColumnCalculatorOverride:null,viewportRowRenderingThreshold:null,viewportColumnRenderingThreshold: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,onModifyRowHeaderWidth:null,onModifyGetCellCoords:null,onModifyGetCoordsElement:null,onModifyGetCoords: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?(0,v.v4)(e,((e,t)=>{this.settings[t]=e})):this.settings[e]=t,this}getSetting(e,t,n,r,o){return"function"==typeof this.settings[e]?this.settings[e](t,n,r,o):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 qt extends Je{constructor(e,t,n,r){super(e,t,n,r,"master")}alignOverlaysWithTrimmingContainer(){const e=(0,r.fX)(this.wtRootElement),{rootWindow:t}=this.domBindings;if(e===t)this.wtSettings.getSetting("preventOverflow")||(this.holder.style.overflow="visible",this.wtRootElement.style.overflow="visible");else{const n=e.parentElement,o=(0,r.gd)(e,"height",t),i=(0,r.gd)(e,"overflow",t),s=this.holder.style,{scrollWidth:a,scrollHeight:l}=e;let u=e.offsetWidth,h=e.offsetHeight;if(n&&["auto","hidden","scroll"].includes(i)){const r=e.cloneNode(!1);r.style.overflow="auto",r.style.position="absolute",e.nextElementSibling?n.insertBefore(r,e.nextElementSibling):n.appendChild(r);const o=parseInt(t.getComputedStyle(r).height,10);n.removeChild(r),0===o&&(h=0)}h=Math.min(h,l),s.height="auto"===o?"auto":`${h}px`,u=Math.min(u,a),s.width=`${u}px`,s.overflow="",this.hasTableHeight="auto"===s.height||h>0,this.hasTableWidth=u>0}this.isTableVisible=(0,r.zN)(this.TABLE)}markOversizedColumnHeaders(){const{wtSettings:e}=this,{wtViewport:t}=this.dataAccessObject,n="master",r=e.getSetting("columnHeaders").length;if(r&&!t.hasOversizedColumnHeadersMarked[n]){const o=e.getSetting("rowHeaders").length,i=this.getRenderedColumnsCount();for(let e=0;e<r;e++)for(let e=-1*o;e<i;e++)this.markIfOversizedColumnHeader(e);t.hasOversizedColumnHeadersMarked[n]=!0}}}(0,v.co)(qt,Mt),(0,v.co)(qt,nt);const Qt=qt;function Jt(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Zt{constructor(){Jt(this,"count",0),Jt(this,"startRow",0),Jt(this,"endRow",0),Jt(this,"startPosition",0),Jt(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalRows:t}=e;this.count=t,this.endRow=this.count-1}process(){}finalize(){}}function en(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n(18107),n(67357);class tn{constructor(){en(this,"count",0),en(this,"startRow",null),en(this,"endRow",null),en(this,"startPosition",null),en(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:o}=t;n<=r&&(this.startRow=e),n>=r&&n<=o&&null===this.startRow&&(this.startRow=e),this.endRow=e}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:o,totalRows:i,needReverse:s,startPositions:a,rowHeight:l}=e;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const e=a[this.endRow]+l-a[this.startRow-1];if(this.startRow-=1,e>=r-o)break}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null,n+r-o<0||n>a.at(-1)+l?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function nn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class rn extends tn{constructor(){super(...arguments),nn(this,"rowStartOffset",0),nn(this,"rowEndOffset",0)}finalize(e){var t;super.finalize(e);const{overrideFn:n,totalRows:r,startPositions:o}=e;if(null!==this.startRow&&"function"==typeof n){const e=this.startRow,t=this.endRow;n(this),this.rowStartOffset=e-this.startRow,this.rowEndOffset=this.endRow-t}this.startRow<0&&(this.startRow=0),this.startPosition=null!==(t=o[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 on(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class sn{constructor(){on(this,"count",0),on(this,"startRow",null),on(this,"endRow",null),on(this,"startPosition",null),on(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedHeight:n,zeroBasedScrollOffset:r,innerViewportHeight:o,rowHeight:i}=t;n>=r&&n+i<=o&&(null===this.startRow&&(this.startRow=e),this.endRow=e)}finalize(e){var t;const{scrollOffset:n,viewportHeight:r,horizontalScrollbarHeight:o,totalRows:i,needReverse:s,startPositions:a,rowHeight:l}=e;if(this.endRow===i-1&&s)for(this.startRow=this.endRow;this.startRow>0;){const e=a[this.endRow]+l-a[this.startRow-1];if(e<=r-o&&(this.startRow-=1),e>=r-o)break}this.startPosition=null!==(t=a[this.startRow])&&void 0!==t?t:null,n+r-o<(null===this.startRow?0:e.getRowHeight(this.startRow))||n>a.at(-1)?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,i<this.endRow&&(this.endRow=i-1),null!==this.startRow&&(this.count=this.endRow-this.startRow+1)}}function an(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ln{constructor(){an(this,"count",0),an(this,"startColumn",0),an(this,"endColumn",0),an(this,"startPosition",0),an(this,"isVisibleInTrimmingContainer",!0)}initialize(e){let{totalColumns:t}=e;this.count=t,this.endColumn=this.count-1}process(){}finalize(){}}function un(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class hn{constructor(){un(this,"count",0),un(this,"startColumn",null),un(this,"endColumn",null),un(this,"startPosition",null),un(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:o}=t;n<=r&&(this.startColumn=e),n>=r&&n<=r+(r>0?o+1:o)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e)),this.endColumn=e}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:o,zeroBasedScrollOffset:i,totalColumns:s,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;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,n+r-(i>0?r+1:r)<-1*o||n>l.at(-1)+u||-1*n-r>0?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}function cn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class dn extends hn{constructor(){super(...arguments),cn(this,"columnStartOffset",0),cn(this,"columnEndOffset",0)}finalize(e){var t;super.finalize(e);const{overrideFn:n,totalColumns:r,startPositions:o}=e;if(null!==this.startColumn&&"function"==typeof n){const e=this.startColumn,t=this.endColumn;n(this),this.columnStartOffset=e-this.startColumn,this.columnEndOffset=this.endColumn-t}this.startColumn<0&&(this.startColumn=0),this.startPosition=null!==(t=o[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 mn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class pn{constructor(){mn(this,"count",0),mn(this,"startColumn",null),mn(this,"endColumn",null),mn(this,"startPosition",null),mn(this,"isVisibleInTrimmingContainer",!1)}initialize(){}process(e,t){const{totalCalculatedWidth:n,zeroBasedScrollOffset:r,viewportWidth:o,columnWidth:i}=t;n>=r&&n+i<=r+(r>0?o+1:o)&&(null!==this.startColumn&&void 0!==this.startColumn||(this.startColumn=e),this.endColumn=e)}finalize(e){var t;const{scrollOffset:n,viewportWidth:r,inlineStartOffset:o,zeroBasedScrollOffset:i,totalColumns:s,needReverse:a,startPositions:l,columnWidth:u}=e;if(this.endColumn===s-1&&a)for(this.startColumn=this.endColumn;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 h=n+r-(i>0?r+1:r),c=null===this.startColumn?0:e.getColumnWidth(this.startColumn);h<-1*o||n>l.at(-1)||-1*n-r>-1*c?this.isVisibleInTrimmingContainer=!1:this.isVisibleInTrimmingContainer=!0,s<this.endColumn&&(this.endColumn=s-1),null!==this.startColumn&&(this.count=this.endColumn-this.startColumn+1)}}var fn=n(88514);function gn(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class yn extends fn.C{constructor(e){let{calculationTypes:t,viewportHeight:n,scrollOffset:r,totalRows:o,defaultRowHeight:i,rowHeightFn:s,overrideFn:a,horizontalScrollbarHeight:l}=e;super(t),gn(this,"viewportHeight",0),gn(this,"scrollOffset",0),gn(this,"zeroBasedScrollOffset",0),gn(this,"totalRows",0),gn(this,"rowHeightFn",null),gn(this,"rowHeight",0),gn(this,"overrideFn",null),gn(this,"horizontalScrollbarHeight",0),gn(this,"innerViewportHeight",0),gn(this,"totalCalculatedHeight",0),gn(this,"startPositions",[]),gn(this,"needReverse",!0),this.defaultHeight=i,this.viewportHeight=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalRows=o,this.rowHeightFn=s,this.overrideFn=a,this.horizontalScrollbarHeight=null!=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)?this.defaultHeight:t}}var wn=n(94726);const vn=class{constructor(e,t,n,r,o){this.dataAccessObject=e,this.wot=e.wot,this.instance=this.wot,this.domBindings=t,this.wtSettings=n,this.wtTable=o,this.oversizedRows=[],this.oversizedColumnHeaders=[],this.hasOversizedColumnHeadersMarked={},this.clientHeight=0,this.rowHeaderWidth=NaN,this.rowsVisibleCalculator=null,this.columnsVisibleCalculator=null,this.rowsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllRows")?new Zt:new rn],["fullyVisible",()=>new sn],["partiallyVisible",()=>new tn]]),this.columnsCalculatorTypes=new Map([["rendered",()=>this.wtSettings.getSetting("renderAllColumns")?new ln:new dn],["fullyVisible",()=>new pn],["partiallyVisible",()=>new hn]]),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;return n=t===this.domBindings.rootWindow?e.documentElement.clientHeight:(0,r.DK)(t)>0&&t.clientHeight>0?t.clientHeight:1/0,n}getViewportHeight(){let e=this.getWorkspaceHeight();if(e===1/0)return e;const t=this.getColumnHeaderHeight();return t>0&&(e-=t),e}getWorkspaceWidth(){const{rootDocument:e,rootWindow:t}=this.domBindings,n=this.dataAccessObject.inlineStartOverlayTrimmingContainer;let r;if(n===t){const t=this.wtSettings.getSetting("totalColumns");r=this.wtTable.holder.offsetWidth,this.getRowHeaderWidth()+this.sumColumnWidths(0,t)>r&&(r=e.documentElement.clientWidth)}else r=n.clientWidth;return r}getViewportWidth(){const e=this.getWorkspaceWidth();if(e===1/0)return e;const t=this.getRowHeaderWidth();return t>0?e-t:e}hasVerticalScroll(){if(this.isVerticallyScrollableByWindow()){const e=this.domBindings.rootDocument.documentElement;return e.scrollHeight>e.clientHeight}const{holder:e,hider:t}=this.wtTable,n=e.clientHeight,r=t.offsetHeight;return n<r||r>this.getWorkspaceHeight()}hasHorizontalScroll(){if(this.isVerticallyScrollableByWindow()){const e=this.domBindings.rootDocument.documentElement;return e.scrollWidth>e.clientWidth}const{holder:e,hider:t}=this.wtTable,n=e.clientWidth,r=t.offsetWidth;return n<r||r>this.getWorkspaceWidth()}isVerticallyScrollableByWindow(){return this.dataAccessObject.topOverlayTrimmingContainer===this.domBindings.rootWindow}isHorizontallyScrollableByWindow(){return this.dataAccessObject.inlineStartOverlayTrimmingContainer===this.domBindings.rootWindow}sumColumnWidths(e,t){let n=0,r=e;for(;r<t;)n+=this.wtTable.getColumnWidth(r),r+=1;return n}getWorkspaceOffset(){return(0,r.cY)(this.wtTable.holder)}getColumnHeaderHeight(){return this.wtSettings.getSetting("columnHeaders").length?isNaN(this.columnHeaderHeight)&&(this.columnHeaderHeight=(0,r.DK)(this.wtTable.THEAD)):this.columnHeaderHeight=0,this.columnHeaderHeight}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,o=t.length;n<o;n++)e?(this.rowHeaderWidth+=(0,r.Gq)(e),e=e.nextSibling):this.rowHeaderWidth+=50}else this.rowHeaderWidth=0;return this.rowHeaderWidth=this.wtSettings.getSetting("onModifyRowHeaderWidth",this.rowHeaderWidth)||this.rowHeaderWidth,this.rowHeaderWidth}createRowsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let o,i,s=this.getViewportHeight();this.rowHeaderWidth=NaN;let a=this.dataAccessObject.topScrollPosition-this.dataAccessObject.topParentOffset;const l=t.getSetting("fixedRowsTop"),u=t.getSetting("fixedRowsBottom"),h=t.getSetting("totalRows");return l&&a>=0&&(i=this.dataAccessObject.topOverlay.sumCellSizes(0,l),a+=i,s-=i),u&&this.dataAccessObject.bottomOverlay.clone&&(i=this.dataAccessObject.bottomOverlay.sumCellSizes(h-u,h),s-=i),o=n.holder.clientHeight===n.holder.offsetHeight?0:(0,r.XJ)(this.domBindings.rootDocument),new yn({calculationTypes:e.map((e=>[e,this.rowsCalculatorTypes.get(e)()])),viewportHeight:s,scrollOffset:a,totalRows:t.getSetting("totalRows"),defaultRowHeight:this.instance.stylesHandler.getDefaultRowHeight(),rowHeightFn:e=>n.getRowHeight(e),overrideFn:t.getSettingPure("viewportRowCalculatorOverride"),horizontalScrollbarHeight:o})}createColumnsCalculator(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["rendered","fullyVisible","partiallyVisible"];const{wtSettings:t,wtTable:n}=this;let o=this.getViewportWidth(),i=Math.abs(this.dataAccessObject.inlineStartScrollPosition)-this.dataAccessObject.inlineStartParentOffset;this.columnHeaderHeight=NaN;const s=t.getSetting("fixedColumnsStart");if(s&&i>=0){const e=this.dataAccessObject.inlineStartOverlay.sumCellSizes(0,s);i+=e,o-=e}return n.holder.clientWidth!==n.holder.offsetWidth&&(o-=(0,r.XJ)(this.domBindings.rootDocument)),new wn.U({calculationTypes:e.map((e=>[e,this.columnsCalculatorTypes.get(e)()])),viewportWidth:o,scrollOffset:i,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:o,rowStartOffset:i,rowEndOffset:s}=this.rowsRenderCalculator,a=this.wtSettings.getSetting("totalRows")-1,l=this.wtSettings.getSetting("viewportRowRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),n=Math.min(a,n+Math.min(s,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),n=Math.min(a,n+Math.ceil(s/2))),!(t<r||t===r&&t>0||n>o||n===o&&n<a)}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:o,columnStartOffset:i,columnEndOffset:s}=this.columnsRenderCalculator,a=this.wtSettings.getSetting("totalColumns")-1,l=this.wtSettings.getSetting("viewportColumnRenderingThreshold");return Number.isInteger(l)&&l>0?(t=Math.max(0,t-Math.min(i,l)),n=Math.min(a,n+Math.min(s,l))):"auto"===l&&(t=Math.max(0,t-Math.ceil(i/2)),n=Math.min(a,n+Math.ceil(s/2))),!(t<r||t===r&&t>0||n>o||n===o&&n<a)}resetHasOversizedColumnHeadersMarked(){(0,v.v4)(this.hasOversizedColumnHeadersMarked,((e,t,n)=>{n[t]=void 0}))}};function _n(e,t,n){bn(e,t),t.set(e,n)}function bn(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sn(e,t){return e.get(En(e,t))}function Cn(e,t,n){return e.set(En(e,t),n),n}function En(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")}n(93514);var Mn=new WeakMap,Tn=new WeakMap,Rn=new WeakSet;class An{constructor(){var e;bn(this,e=Rn),e.add(this),_n(this,Mn,void 0),_n(this,Tn,void 0)}setActiveOverlay(e){return Cn(Tn,this,e),this}setActiveSelection(e){return Cn(Mn,this,e),this}scan(){const e=Sn(Mn,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,o]=Sn(Mn,this).getCorners(),{wtTable:i}=Sn(Tn,this),s=i.getRenderedColumnsCount(),a=i.getColumnHeadersCount();let l=0;for(let u=-i.getRowHeadersCount();u<s;u++){const s=i.columnFilter.renderedToSource(u);if(!(s<n||s>o)){for(let u=-a;u<0;u++){if(u<t||u>r)continue;const h=u+a;let c=i.getColumnHeader(s,h);const d=Sn(Tn,this).getSetting("onBeforeHighlightingColumnHeader",s,h,{selectionType:Sn(Mn,this).settings.selectionType,columnCursor:l,selectionWidth:o-n+1});null!==d&&(d!==s&&(c=i.getColumnHeader(d,h)),e(c))}l+=1}}}scanRowsInHeadersRange(e){const[t,n,r,o]=Sn(Mn,this).getCorners(),{wtTable:i}=Sn(Tn,this),s=i.getRenderedRowsCount(),a=i.getRowHeadersCount();let l=0;for(let u=-i.getColumnHeadersCount();u<s;u++){const s=i.rowFilter.renderedToSource(u);if(!(s<t||s>r)){for(let u=-a;u<0;u++){if(u<n||u>o)continue;const h=u+a;let c=i.getRowHeader(s,h);const d=Sn(Tn,this).getSetting("onBeforeHighlightingRowHeader",s,h,{selectionType:Sn(Mn,this).settings.selectionType,rowCursor:l,selectionHeight:r-t+1});null!==d&&(d!==s&&(c=i.getRowHeader(d,h)),e(c))}l+=1}}}scanCellsRange(e){const{wtTable:t}=Sn(Tn,this);En(Rn,this,Nn).call(this,((n,o)=>{const i=t.getCell(Sn(Tn,this).createCellCoords(n,o)),s=Sn(Tn,this).getSetting("onAfterDrawSelection",n,o,Sn(Mn,this).settings.layerLevel);"string"==typeof s&&(0,r.iQ)(i,s),e(i)}))}scanRowsInCellsRange(e){const[t,,n]=Sn(Mn,this).getCorners(),{wtTable:r}=Sn(Tn,this);En(Rn,this,Ln).call(this,((o,i)=>{if(o>=t&&o<=n){const t=r.getCell(Sn(Tn,this).createCellCoords(o,i));e(t)}}))}scanColumnsInCellsRange(e){const[,t,,n]=Sn(Mn,this).getCorners(),{wtTable:r}=Sn(Tn,this);En(Rn,this,Ln).call(this,((o,i)=>{if(i>=t&&i<=n){const t=r.getCell(Sn(Tn,this).createCellCoords(o,i));e(t)}}))}}function Nn(e){let[t,n,o,i]=Sn(Mn,this).getCorners();if(t<0&&o<0||n<0&&i<0)return;const{wtTable:s}=Sn(Tn,this),a=t!==o||n!==i;if(n=Math.max(n,0),i=Math.max(i,0),t=Math.max(t,0),o=Math.max(o,0),a){if(n=Math.max(n,s.getFirstRenderedColumn()),i=Math.min(i,s.getLastRenderedColumn()),t=Math.max(t,s.getFirstRenderedRow()),o=Math.min(o,s.getLastRenderedRow()),i<n||o<t)return}else{const e=s.getCell(Sn(Tn,this).createCellCoords(t,n));if(!(0,r.sb)(e))return}for(let r=t;r<=o;r+=1)for(let t=n;t<=i;t+=1)e(r,t)}function Ln(e){const{wtTable:t}=Sn(Tn,this),n=t.getRenderedRowsCount(),r=t.getRenderedColumnsCount();for(let o=0;o<n;o+=1){const n=t.rowFilter.renderedToSource(o);for(let o=0;o<r;o+=1)e(n,t.columnFilter.renderedToSource(o))}}const xn=class{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=yt(this.instance),this.cornerCenterPointOffset=-Math.ceil(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 e=0,t=this.main.childNodes.length;e<t;e++){const t=this.main.childNodes[e];this.eventManager.addEventListener(t,"mouseenter",(t=>this.onMouseEnter(t,this.main.childNodes[e])))}}onMouseDown(){this.mouseDown=!0}onMouseUp(){this.mouseDown=!1}onMouseEnter(e,t){if(!this.mouseDown||!this.wot.getSetting("hideBorderOnMouseDownOver"))return;e.preventDefault(),(0,l.CA)(e);const n=this,r=this.wot.rootDocument.body,o=t.getBoundingClientRect();t.style.display="none",this.eventManager.addEventListener(r,"mousemove",(function e(i){var s;((s=i).clientY<Math.floor(o.top)||s.clientY>Math.ceil(o.top+o.height)||s.clientX<Math.floor(o.left)||s.clientX>Math.ceil(o.left+o.width))&&(n.eventManager.removeEventListener(r,"mousemove",e),t.style.display="block")}))}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}px`,this.cornerStyle.height=`${this.cornerDefaultStyle.height}px`,this.cornerStyle.border=[`${this.cornerDefaultStyle.borderWidth}px`,this.cornerDefaultStyle.borderStyle,this.cornerDefaultStyle.borderColor].join(" "),(0,s.rr)()&&this.instance.getSetting("isDataViewInstance")&&this.createMultipleSelectorHandles(),this.disappear();const{wtTable:o}=this.wot;let i=o.bordersHolder;i||(i=t.createElement("div"),i.className="htBorders",o.bordersHolder=i,o.spreader.appendChild(i)),i.appendChild(this.main)}createMultipleSelectorHandles(){const{rootDocument:e,stylesHandler:t}=this.wot,n=t.getCSSVariableValue("cell-mobile-handle-size"),r=t.getCSSVariableValue("cell-mobile-handle-border-radius"),o=t.getCSSVariableValue("cell-mobile-handle-background-color"),i=t.getCSSVariableValue("cell-mobile-handle-border-width"),s=t.getCSSVariableValue("cell-mobile-handle-border-color");this.selectionHandles={top:e.createElement("DIV"),topHitArea:e.createElement("DIV"),bottom:e.createElement("DIV"),bottomHitArea:e.createElement("DIV")},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 a={position:"absolute",height:"40px",width:"40px","border-radius":`${parseInt(40/1.5,10)}px`};(0,v.v4)(a,((e,t)=>{this.selectionHandles.styles.bottomHitArea[t]=e,this.selectionHandles.styles.topHitArea[t]=e}));const l=t.isClassicTheme()?{position:"absolute",height:"10px",width:"10px","border-radius":`${parseInt(10/1.5,10)}px`,background:"#F5F5FF",border:"1px solid #4285c8"}:{position:"absolute",height:`${n}px`,width:`${n}px`,"border-radius":`${r}px`,background:`${o}`,border:`${i}px solid ${s}`};(0,v.v4)(l,((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,o,i){const s=this.wot.wtSettings.getSetting("rtlMode")?"right":"left",{top:a,topHitArea:l,bottom:u,bottomHitArea:h}=this.selectionHandles.styles,c=parseInt(a.borderWidth,10),d=parseInt(a.width,10),m=parseInt(l.width,10),p=this.wot.wtTable.getWidth(),f=this.wot.wtTable.getHeight();a.top=`${parseInt(n-d-1,10)}px`,a[s]=`${parseInt(r-d-1,10)}px`,l.top=`${parseInt(n-m/4*3,10)}px`,l[s]=`${parseInt(r-m/4*3,10)}px`;const g=Math.min(parseInt(r+o,10),p-d-2*c),y=Math.min(parseInt(r+o-m/4,10),p-m-2*c);u[s]=`${g}px`,h[s]=`${y}px`;const w=Math.min(parseInt(n+i,10),f-d-2*c),v=Math.min(parseInt(n+i-m/4,10),f-m-2*c);u.top=`${w}px`,h.top=`${v}px`,this.settings.border.cornerVisible&&this.settings.border.cornerVisible()?(a.display="block",l.display="block",this.isPartRange(e,t)?(u.display="none",h.display="none"):(u.display="block",h.display="block")):(a.display="none",u.display="none",l.display="none",h.display="none"),e===this.wot.wtSettings.getSetting("fixedRowsTop")||t===this.wot.wtSettings.getSetting("fixedColumnsStart")?(a.zIndex="9999",l.zIndex="9999"):(a.zIndex="",l.zIndex="")}appear(e){if(this.disabled)return;let[t,n,o,i]=e;if(t<0&&o<0||n<0&&i<0)return void this.disappear();const{wtTable:a,rootDocument:l,rootWindow:u}=this.wot,h=t!==o||n!==i,c=a.getFirstRenderedRow(),d=a.getLastRenderedRow(),m=a.getFirstRenderedColumn(),p=a.getLastRenderedColumn();if(m<0&&p<0||c<0&&d<0)return void this.disappear();let f;if(h){if(n=Math.max(n,m),i=Math.min(i,p),t=Math.max(t,c),o=Math.min(o,d),i<n||o<t)return void this.disappear();f=a.getCell(this.wot.createCellCoords(t,n))}else if(f=a.getCell(this.wot.createCellCoords(t,n)),!(0,r.sb)(f))return void this.disappear();const g=h?a.getCell(this.wot.createCellCoords(o,i)):f,y=(0,r.cY)(f),w=h?(0,r.cY)(g):y,v=(0,r.cY)(a.TABLE),_=y.top,b=y.left,S=this.wot.wtSettings.getSetting("rtlMode");let C=0,E=0;if(S){const e=(0,r.Gq)(a.TABLE),t=(0,r.Gq)(f),n=u.innerWidth-v.left-e;E=b+t-w.left,C=u.innerWidth-b-t-n-1}else E=w.left+(0,r.Gq)(g)-b,C=b-v.left-1;if(this.isEntireColumnSelected(t,o)){const e=t,r=this.getDimensionsFromHeader("columns",n,i,e,v);let o=null;r&&([o,C,E]=r),o&&(f=o)}let M=_-v.top-1,T=w.top+(0,r.DK)(g)-_;if(this.isEntireRowSelected(n,i)){const e=n,r=this.getDimensionsFromHeader("rows",t,o,e,v);let i=null;r&&([i,M,T]=r),i&&(f=i)}const R=u.getComputedStyle(f);parseInt(R.borderTopWidth,10)>0&&(M+=1,T=T>0?T-1:0),parseInt(R[S?"borderRightWidth":"borderLeftWidth"],10)>0&&(C+=1,E=E>0?E-1:0);const A=S?"right":"left";this.topStyle.top=`${M}px`,this.topStyle[A]=`${C}px`,this.topStyle.width=`${E}px`,this.topStyle.display="block",this.startStyle.top=`${M}px`,this.startStyle[A]=`${C}px`,this.startStyle.height=`${T}px`,this.startStyle.display="block";const N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=M+T-N+"px",this.bottomStyle[A]=`${C}px`,this.bottomStyle.width=`${E}px`,this.bottomStyle.display="block",this.endStyle.top=`${M}px`,this.endStyle[A]=C+E-N+"px",this.endStyle.height=`${T+1}px`,this.endStyle.display="block";let L=this.settings.border.cornerVisible;L="function"==typeof L?L(this.settings.layerLevel):L;const x=this.wot.getSetting("onModifyGetCellCoords",o,i,!1,"render");let[O,I]=[o,i];if(x&&Array.isArray(x)&&([,,O,I]=x),(0,s.rr)()||!L||this.isPartRange(O,I))this.cornerStyle.display="none";else{this.cornerStyle.top=M+T+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle[A]=C+E+this.cornerCenterPointOffset-this.cornerDefaultStyle.borderWidth+"px",this.cornerStyle.borderRightWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderLeftWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.borderBottomWidth=`${this.cornerDefaultStyle.borderWidth}px`,this.cornerStyle.width=this.cornerDefaultStyle.width,this.cornerStyle.display="none";let e=(0,r.fX)(a.TABLE);const t=e===u;t&&(e=l.documentElement);const n=parseInt(this.cornerDefaultStyle.borderWidth,10)-1,s=Math.ceil(parseInt(this.cornerDefaultStyle.width,10)/2),h=Math.ceil(parseInt(this.cornerDefaultStyle.height,10)/2);if(i===this.wot.getSetting("totalColumns")-1){const o=t?g.getBoundingClientRect().left:g.offsetLeft;let i=!1,a=0;S?(a=o-parseInt(this.cornerDefaultStyle.width,10)/2,i=a<0):(a=o+(0,r.Gq)(g)+parseInt(this.cornerDefaultStyle.width,10)/2,i=a>=(0,r.xM)(e)),i&&(this.cornerStyle[A]=`${Math.floor(C+E+this.cornerCenterPointOffset-s-n)}px`,this.cornerStyle[S?"borderLeftWidth":"borderRightWidth"]=0)}if(o===this.wot.getSetting("totalRows")-1){const o=(t?g.getBoundingClientRect().top:g.offsetTop)+(0,r.DK)(g)+parseInt(this.cornerDefaultStyle.height,10)/2>=(0,r.eU)(e),i=this.wot.stylesHandler.isClassicTheme();if(o){const e=Math.floor(M+T+this.cornerCenterPointOffset-h-n);i?(this.cornerStyle.top=`${e}px`,this.cornerStyle.borderBottomWidth=0):this.cornerStyle.top=e-1+"px"}}this.cornerStyle.display="block"}(0,s.rr)()&&this.instance.getSetting("isDataViewInstance")&&this.updateMultipleSelectionHandlesPosition(o,i,M,C,E,T)}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,o,i){const{wtTable:s}=this.wot,a=s.wtRootElement.parentNode;let l=null,u=null,h=null,c=null,d=null,m=null,p=null,f=null;switch(e){case"rows":l=function(){return s.getRowHeader(...arguments)},u=function(){return(0,r.DK)(...arguments)},h="ht__selection--rows",m="top";break;case"columns":l=function(){return s.getColumnHeader(...arguments)},u=function(){return(0,r.Gq)(...arguments)},h="ht__selection--columns",m="left"}if(a.classList.contains(h)){const e=this.wot.getSetting("columnHeaders").length;if(p=l(t,e-o),f=l(n,e-o),!p||!f)return!1;const s=(0,r.cY)(p),a=(0,r.cY)(f);return p&&f&&(c=s[m]-i[m]-1,d=a[m]+u(f)-s[m]),[p,c,d]}return!1}changeBorderStyle(e,t){const n=this[e].style,o=t[e];!o||o.hide?(0,r.iQ)(this[e],"hidden"):((0,r.nB)(this[e],"hidden")&&(0,r.vy)(this[e],"hidden"),n.backgroundColor=o.color,"top"!==e&&"bottom"!==e||(n.height=`${o.width}px`),"start"!==e&&"end"!==e||(n.width=`${o.width}px`))}changeBorderToDefaultStyle(e){const t=this[e].style;t.backgroundColor="#000",t.width="1px",t.height="1px"}toggleHiddenClass(e,t){this.changeBorderToDefaultStyle(e),t?(0,r.iQ)(this[e],"hidden"):(0,r.vy)(this[e],"hidden")}disappear(){this.topStyle.display="none",this.bottomStyle.display="none",this.startStyle.display="none",this.endStyle.display="none",this.cornerStyle.display="none",(0,s.rr)()&&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)}};function On(e,t,n){In(e,t),t.set(e,n)}function In(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kn(e,t){return e.get(Pn(e,t))}function Dn(e,t,n){return e.set(Pn(e,t),n),n}function Pn(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 Hn=new WeakMap,Fn=new WeakMap,Yn=new WeakMap,Vn=new WeakMap,Un=new WeakMap,Bn=new WeakMap,Wn=new WeakSet;class jn{constructor(e){var t;In(this,t=Wn),t.add(this),On(this,Hn,void 0),On(this,Fn,void 0),On(this,Yn,new An),On(this,Vn,new WeakMap),On(this,Un,new WeakSet),On(this,Bn,new Map),Dn(Fn,this,e)}setActiveOverlay(e){return Dn(Hn,this,e),kn(Yn,this).setActiveOverlay(kn(Hn,this)),kn(Vn,this).has(kn(Hn,this))||kn(Vn,this).set(kn(Hn,this),new Set),this}getFocusSelection(){return null!==kn(Fn,this)?kn(Fn,this).getFocus():null}getAreaSelection(){return null!==kn(Fn,this)?kn(Fn,this).createLayeredArea():null}getBorderInstance(e){if(!e.settings.border)return null;if(kn(Bn,this).has(e)){const t=kn(Bn,this).get(e);if(t.has(kn(Hn,this)))return t.get(kn(Hn,this));const n=new xn(kn(Hn,this),e.settings);return t.set(kn(Hn,this),n),n}const t=new xn(kn(Hn,this),e.settings);return kn(Bn,this).set(e,new Map([[kn(Hn,this),t]])),t}getBorderInstances(e){var t,n;return Array.from(null!==(t=null===(n=kn(Bn,this).get(e))||void 0===n?void 0:n.values())&&void 0!==t?t:[])}destroyBorders(e){kn(Bn,this).get(e).forEach((e=>e.destroy())),kn(Bn,this).delete(e)}render(e){if(null===kn(Fn,this))return;e&&Pn(Wn,this,zn).call(this);const t=Array.from(kn(Fn,this)),n=new Map,o=new Map;for(let e=0;e<t.length;e++){const r=t[e],{className:i,headerAttributes:s,createLayers:a,selectionType:l}=r.settings;kn(Un,this).has(r)||(kn(Un,this).add(r),r.addLocalHook("destroy",(()=>this.destroyBorders(r))));const u=this.getBorderInstance(r);if(r.isEmpty()){null==u||u.disappear();continue}i&&kn(Yn,this).setActiveSelection(r).scan().forEach((e=>{if(n.has(e)){const t=n.get(e);t.has(i)&&!0===a?t.set(i,t.get(i)+1):t.set(i,1)}else n.set(e,new Map([[i,1]]));s&&(o.has(e)||o.set(e,[]),"TH"===e.nodeName&&o.get(e).push(...s))}));const h=r.getCorners();kn(Hn,this).getSetting("onBeforeDrawBorders",h,l),null==u||u.appear(h)}n.forEach(((e,t)=>{var n;const o=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();o.forEach((e=>kn(Vn,this).get(kn(Hn,this)).add(e))),(0,r.iQ)(t,o),"TD"===t.nodeName&&Array.isArray(null===(n=kn(Fn,this).options)||void 0===n?void 0:n.cellAttributes)&&(0,r.Bq)(t,kn(Fn,this).options.cellAttributes)})),Array.from(o.keys()).forEach((e=>{(0,r.Bq)(e,[...o.get(e)])}))}}function zn(){const e=kn(Vn,this).get(kn(Hn,this)),t=kn(Hn,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 o=kn(Hn,this).wtTable.TABLE.querySelectorAll(`.${e}`);let i=[];Array.isArray(null===(t=kn(Fn,this).options)||void 0===t?void 0:t.cellAttributes)&&(i=kn(Fn,this).options.cellAttributes.map((e=>e[0]))),Array.isArray(null===(n=kn(Fn,this).options)||void 0===n?void 0:n.headerAttributes)&&(i=[...i,...kn(Fn,this).options.headerAttributes.map((e=>e[0]))]);for(let t=0,n=o.length;t<n;t++)(0,r.vy)(o[t],e),(0,r.De)(o[t],i)})),e.clear()}function Gn(e,t,n){$n(e,t),t.set(e,n)}function $n(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Kn(e,t){return e.get(qn(e,t))}function Xn(e,t,n){return e.set(qn(e,t),n),n}function qn(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 Qn=new WeakMap,Jn=new WeakMap,Zn=new WeakMap,er=new WeakMap,tr=new WeakMap,nr=new WeakMap,rr=new WeakMap,or=new WeakSet;class ir{constructor(e){var t;$n(this,t=or),t.add(this),Gn(this,Qn,void 0),Gn(this,Jn,void 0),Gn(this,Zn,void 0),Gn(this,er,void 0),Gn(this,tr,!0),Gn(this,nr,{}),Gn(this,rr,{}),Xn(Jn,this,e.rootTable.parentElement.parentElement),Xn(er,this,e.rootDocument)}isClassicTheme(){return Kn(tr,this)}getCSSVariableValue(e){var t;if(Kn(tr,this))return null;if(Kn(nr,this)[`--ht-${e}`])return Kn(nr,this)[`--ht-${e}`];const n=null!==(t=qn(or,this,hr).call(this,`--ht-${e}`))&&void 0!==t?t:qn(or,this,cr).call(this,`--ht-${e}`);return null!==n?(Kn(nr,this)[`--ht-${e}`]=n,n):void 0}getStyleForTD(e){var t;return null===(t=Kn(rr,this))||void 0===t?void 0:t.td[e]}getDefaultRowHeight(){if(Kn(tr,this))return 23;const e=qn(or,this,sr).call(this);return!e&&(0,r.nB)(Kn(Jn,this),"ht-wrapper")?((0,_.R8)(`The "${Kn(Qn,this)}" theme is enabled, but its stylesheets are missing or not imported correctly. Import the correct CSS files in order to use that theme.`),Xn(tr,this,!0),this.useTheme(),23):e}areCellsBorderBox(){return"border-box"===this.getStyleForTD("box-sizing")}useTheme(e){if(!e)return qn(or,this,lr).call(this),Xn(tr,this,!0),void Xn(Qn,this,e||void 0);e&&e!==Kn(Qn,this)&&(Kn(Qn,this)&&qn(or,this,dr).call(this),Xn(Qn,this,e),Xn(tr,this,!1),qn(or,this,ar).call(this),qn(or,this,lr).call(this))}getThemeName(){return Kn(Qn,this)}removeClassNames(){(0,r.nB)(Kn(Jn,this),Kn(Qn,this))&&(0,r.vy)(Kn(Jn,this),Kn(Qn,this))}}function sr(){const e=this.getCSSVariableValue("line-height"),t=this.getCSSVariableValue("cell-vertical-padding"),n=Math.ceil(parseFloat(this.getStyleForTD("border-bottom-width")));return null===e||null===t||isNaN(n)?null:e+2*t+n}function ar(){(0,r.vy)(Kn(Jn,this),/ht-theme-.*/g),(0,r.iQ)(Kn(Jn,this),Kn(Qn,this))}function lr(){this.isClassicTheme()||Xn(Zn,this,getComputedStyle(Kn(Jn,this)));const e=qn(or,this,ur).call(this,["box-sizing","border-bottom-width"]);Kn(rr,this).td={...Kn(rr,this).td,"box-sizing":e["box-sizing"],"border-bottom-width":e["border-bottom-width"]}}function ur(e){const t=Kn(er,this),n=Kn(Jn,this),r=t.createElement("table"),o=t.createElement("tbody"),i=t.createElement("tr"),s=t.createElement("tr"),a=t.createElement("td");s.appendChild(a),o.appendChild(i),o.appendChild(s),r.appendChild(o),n.appendChild(r);const l=getComputedStyle(a),u={};return e.forEach((e=>{u[e]=l.getPropertyValue(e)})),n.removeChild(r),u}function hr(e){const t=Math.ceil(parseFloat(qn(or,this,cr).call(this,e)));return Number.isNaN(t)?null:t}function cr(e){const t=Kn(Zn,this).getPropertyValue(e);return""===t?null:t}function dr(){Xn(rr,this,{}),Xn(nr,this,{}),Xn(tr,this,!0)}class mr extends mt{constructor(e,t){super(e,new Xt(t)),this.stylesHandler=new ir(this.domBindings);const n=this.wtSettings.getSetting("facade",this);this.wtTable=new Qt(this.getTableDao(),n,this.domBindings,this.wtSettings),this.wtViewport=new vn(this.getViewportDao(),this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.selectionManager=new jn(this.wtSettings.getSetting("selections")),this.wtEvent=new se(n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable,this.selectionManager),this.wtOverlays=new $t(this,n,this.domBindings,this.wtSettings,this.eventManager,this.wtTable),this.exportSettingsAsClassNames(),this.findOriginalHeaders()}exportSettingsAsClassNames(){const e=[],t=[];(0,v.v4)({rowHeaders:"htRowHeaders",columnHeaders:"htColumnHeaders"},((n,r)=>{this.wtSettings.getSetting(r).length&&t.push(n),e.push(n)})),(0,r.vy)(this.wtTable.wtRootElement.parentNode,e),(0,r.iQ)(this.wtTable.wtRootElement.parentNode,t)}getOverlayByName(e){var t;if(!Xe.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 pr{constructor(e){e instanceof mt?this._wot=e:this._initFromSettings(e)}_initFromSettings(e){e.facade=e=>{const t=new pr(e);return()=>t},this._wot=new mr(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 activeOverlayName(){return this._wot.activeOverlayName}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}get stylesHandler(){return this._wot.stylesHandler}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){return this._wot.scrollViewport(e,t,n)}scrollViewportHorizontally(e,t){return this._wot.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wot.scrollViewportVertically(e,t)}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,o){return this._wot.wtSettings.getSetting(e,t,n,r,o)}hasSetting(e){return this._wot.wtSettings.hasSetting(e)}destroy(){this._wot.destroy()}}function fr(e){let{isShiftKey:t,isLeftClick:n,isRightClick:r,coords:o,selection:i,controller:s,cellCoordsFactory:a}=e;const l=i.isSelected()?i.getSelectedRange().current():null,u=i.isSelectedByCorner(),h=i.isSelectedByRowHeader();if(i.markSource("mouse"),t&&l)o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(o):(u||h)&&o.row>=0&&o.col>=0&&!s.cell?i.setRangeEnd(a(o.row,o.col)):u&&o.row<0&&!s.column?i.setRangeEnd(a(l.to.row,o.col)):h&&o.col<0&&!s.row?i.setRangeEnd(a(o.row,l.to.col)):(!u&&!h&&o.col<0||u&&o.col<0)&&!s.row?i.selectRows(Math.max(l.from.row,0),o.row,o.col):(!u&&!h&&o.row<0||h&&o.row<0)&&!s.column&&i.selectColumns(Math.max(l.from.col,0),o.col,o.row);else{const e=!i.inInSelection(o),t=n||r&&e;o.row<0&&o.col>=0&&!s.column?t&&i.selectColumns(o.col,o.col,o.row):o.col<0&&o.row>=0&&!s.row?t&&i.selectRows(o.row,o.row,o.col):o.col>=0&&o.row>=0&&!s.cell?t&&i.setRangeStart(o):o.col<0&&o.row<0&&i.selectAll(!0,!0,{disableHeadersHighlight:!0,focusPosition:{row:0,col:0}})}i.markEndSource()}const gr=new Map([["mousedown",fr],["mouseover",function(e){let{isLeftClick:t,coords:n,selection:r,controller:o,cellCoordsFactory:i}=e;if(!t)return;const s=r.isSelectedByRowHeader(),a=r.isSelectedByColumnHeader(),l=r.tableProps.countCols(),u=r.tableProps.countRows();r.markSource("mouse"),a&&!o.column?r.setRangeEnd(i(u-1,n.col)):s&&!o.row?r.setRangeEnd(i(n.row,l-1)):o.cell||r.setRangeEnd(n),r.markEndSource()}],["touchstart",fr]]);function yr(e,t){let{coords:n,selection:r,controller:o,cellCoordsFactory:i}=t;gr.get(e.type)({coords:n,selection:r,controller:o,cellCoordsFactory:i,isShiftKey:e.shiftKey,isLeftClick:(0,l.Ml)(e)||"touchstart"===e.type,isRightClick:(0,l.nO)(e)})}const wr=new WeakMap,vr=Symbol("rootInstance");function _r(e){return e===vr}function br(e){return wr.has(e)}function Sr(e,t,n){Cr(e,t),t.set(e,n)}function Cr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Er(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Mr(e,t){return e.get(Rr(e,t))}function Tr(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")}var Ar=new WeakMap,Nr=new WeakMap,Lr=new WeakMap,xr=new WeakMap,Or=new WeakMap,Ir=new WeakMap,kr=new WeakMap,Dr=new WeakMap,Pr=new WeakSet;function Hr(){return parseInt(this.hot.rootElement.getAttribute((0,Ee.Nb)()[0]),10)}function Fr(e){const t=Rr(Pr,this,Hr).call(this)+e;(0,r.Bq)(this.hot.rootElement,...(0,Ee.Nb)(t))}function Yr(){const e=this.hot.rootElement;this.hasVerticalScroll()?(0,r.iQ)(e,"htHasScrollY"):(0,r.vy)(e,"htHasScrollY"),this.hasHorizontalScroll()?(0,r.iQ)(e,"htHasScrollX"):(0,r.vy)(e,"htHasScrollX")}const Vr=class{constructor(e){var t;Cr(this,t=Pr),t.add(this),Er(this,"hot",void 0),Er(this,"eventManager",void 0),Er(this,"settings",void 0),Er(this,"THEAD",void 0),Er(this,"TBODY",void 0),Er(this,"_wt",void 0),Er(this,"activeWt",void 0),Sr(this,Ar,0),Sr(this,Nr,0),Er(this,"postponedAdjustElementsSize",!1),Sr(this,Lr,!1),Sr(this,xr,void 0),Sr(this,Or,void 0),Sr(this,Ir,0),Sr(this,kr,0),Sr(this,Dr,null),this.hot=e,this.eventManager=new h.A(this.hot),this.settings=this.hot.getSettings(),this.createElements(),this.registerEvents(),this.initializeWalkontable()}render(){if(!this.hot.isRenderSuspended()){const e=this.hot.forceFullRender;this.hot.runHooks("beforeRender",e),this.postponedAdjustElementsSize&&(this.postponedAdjustElementsSize=!1,this.adjustElementsSize()),this._wt.draw(!e),Rr(Pr,this,Yr).call(this),this.hot.runHooks("afterRender",e),this.hot.forceFullRender=!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){return this._wt.scrollViewport(e,t,n)}scrollViewportHorizontally(e,t){return this._wt.scrollViewportHorizontally(e,t)}scrollViewportVertically(e,t){return this._wt.scrollViewportVertically(e,t)}createElements(){const{rootElement:e,rootDocument:t}=this.hot,n=e.getAttribute("style");n&&e.setAttribute("data-originalstyle",n),(0,r.iQ)(e,"handsontable"),Tr(Or,this,t.createElement("TABLE")),(0,r.iQ)(Mr(Or,this),"htCore"),this.hot.getSettings().tableClassName&&(0,r.iQ)(Mr(Or,this),this.hot.getSettings().tableClassName),this.settings.ariaTags&&((0,r.Bq)(Mr(Or,this),[(0,Ee.gg)()]),(0,r.Bq)(e,[(0,Ee.ax)(),(0,Ee.DZ)(-1),(0,Ee.Nb)(this.hot.countCols()),(0,Ee.L4)()])),this.THEAD=t.createElement("THEAD"),Mr(Or,this).appendChild(this.THEAD),this.TBODY=t.createElement("TBODY"),Mr(Or,this).appendChild(this.TBODY),this.hot.table=Mr(Or,this),this.hot.container.insertBefore(Mr(Or,this),this.hot.container.firstChild)}registerEvents(){const{rootElement:e,rootDocument:t,selection:n,rootWindow:o}=this.hot,i=t.documentElement;this.eventManager.addEventListener(e,"mousedown",(e=>{Tr(Lr,this,!0),this.isTextSelectionAllowed(e.target)||((0,r.LL)(o),e.preventDefault(),o.focus())})),this.eventManager.addEventListener(e,"mouseup",(()=>{Tr(Lr,this,!1)})),this.eventManager.addEventListener(e,"mousemove",(e=>{Mr(Lr,this)&&!this.isTextSelectionAllowed(e.target)&&(this.settings.fragmentSelection&&(0,r.LL)(o),e.preventDefault())})),this.eventManager.addEventListener(i,"keyup",(e=>{n.isInProgress()&&!e.shiftKey&&n.finish()})),this.eventManager.addEventListener(i,"mouseup",(o=>{n.isInProgress()&&(0,l.Ml)(o)&&n.finish(),Tr(xr,this,!1);const i=(0,r.E3)(t.activeElement);(0,r.Xy)(t.activeElement)&&!i||!i&&(n.isSelected()||n.isSelectedByAnyHeader()||e.contains(o.target)||(0,l.nO)(o))||this.hot.unlisten()})),this.eventManager.addEventListener(i,"contextmenu",(e=>{n.isInProgress()&&(0,l.nO)(e)&&(n.finish(),Tr(xr,this,!1))})),this.eventManager.addEventListener(i,"touchend",(()=>{n.isInProgress()&&n.finish(),Tr(xr,this,!1)})),this.eventManager.addEventListener(i,"mousedown",(n=>{const o=n.target,s=n.x||n.clientX,a=n.y||n.clientY;let l=n.target;if(Mr(xr,this)||!e||!this.hot.view)return;const{holder:u}=this._wt.wtTable;if(l===u){const e=(0,r.XJ)(t);if(t.elementFromPoint(s+e,a)!==u||t.elementFromPoint(s,a+e)!==u)return}else for(;l!==i;){if(null===l){if(n.isTargetWebComponent)break;return}if(l===e)return;l=l.parentNode}("function"==typeof this.settings.outsideClickDeselects?this.settings.outsideClickDeselects(o):this.settings.outsideClickDeselects)?this.hot.deselectCell():this.hot.destroyEditor(!1,!1)}));let s=(0,r.Ly)(o);for(;null!==s;)this.eventManager.addEventListener(s.document.documentElement,"click",(()=>{this.hot.unlisten()})),s=(0,r.Ly)(s);this.eventManager.addEventListener(Mr(Or,this),"selectstart",(e=>{this.settings.fragmentSelection||(0,r.Xy)(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 o=n.getNearestNotHiddenIndex(e,t),i=n.getRenderableFromVisualIndex(o);if(!Number.isInteger(i))return 0;let s=0;return t<0?s=i+1:t>0&&(s=r-i),s}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}getStylesHandler(){return this._wt.stylesHandler}getDefaultRowHeight(){return this._wt.stylesHandler.getDefaultRowHeight()}addClassNameToLicenseElement(e){var t;const n=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");n&&(0,r.iQ)(n,e)}removeClassNameFromLicenseElement(e){var t;const n=null===(t=this.hot.rootElement.parentNode)||void 0===t?void 0:t.querySelector(".hot-display-license-info");n&&(0,r.vy)(n,e)}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:Mr(Or,this),isDataViewInstance:()=>br(this.hot),preventOverflow:()=>this.settings.preventOverflow,preventWheel:()=>this.settings.preventWheel,viewportColumnRenderingThreshold:()=>this.settings.viewportColumnRenderingThreshold,viewportRowRenderingThreshold:()=>this.settings.viewportRowRenderingThreshold,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),Tr(Nr,this,e.length),this.hot.getSettings().ariaTags&&Rr(Pr,this,Hr).call(this)===this.hot.countCols()&&Rr(Pr,this,Fr).call(this,Mr(Nr,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),Tr(Ar,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,o]=this.translateFromRenderableToVisualIndex(e,t),i=this.hot.runHooks("modifyGetCellCoords",r,o,!1,"meta");let s=r,a=o;Array.isArray(i)&&([s,a]=i);const l=this.hot.getCellMeta(s,a),u=this.hot.colToProp(a);let h=this.hot.getDataAtRowProp(s,u);this.hot.hasHook("beforeValueRender")&&(h=this.hot.runHooks("beforeValueRender",h,l)),this.hot.runHooks("beforeRenderer",n,r,o,u,h,l),this.hot.getCellRenderer(l)(this.hot,n,r,o,u,h,l),this.hot.runHooks("afterRenderer",n,r,o,u,h,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&&(0,r.zN)(this.hot.rootElement)&&this.hot.refreshDimensions()},onCellMouseDown:(e,t,n,r)=>{const o=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.hot.listen(),this.activeWt=r,Tr(xr,this,!0),Tr(Dr,this,{x:e.clientX,y:e.clientY}),this.hot.runHooks("beforeOnCellMouseDown",e,o,n,i),(0,l.d)(e)||(yr(e,{coords:o,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseDown",e,o,n),this.activeWt=this._wt)},onCellContextMenu:(e,t,n,r)=>{const o=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,Tr(xr,this,!1),this.hot.selection.isInProgress()&&this.hot.selection.finish(),this.hot.runHooks("beforeOnCellContextMenu",e,o,n),(0,l.d)(e)||(this.hot.runHooks("afterOnCellContextMenu",e,o,n),this.activeWt=this._wt)},onCellMouseOut:(e,t,n,r)=>{const o=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOut",e,o,n),(0,l.d)(e)||(this.hot.runHooks("afterOnCellMouseOut",e,o,n),this.activeWt=this._wt)},onCellMouseOver:(e,t,n,r)=>{const o=this.translateFromRenderableToVisualCoords(t),i={row:!1,column:!1,cell:!1};this.activeWt=r,this.hot.runHooks("beforeOnCellMouseOver",e,o,n,i),(0,l.d)(e)||(!Mr(xr,this)||Mr(Dr,this)&&Mr(Dr,this).x===e.clientX&&Mr(Dr,this).y===e.clientY||yr(e,{coords:o,selection:this.hot.selection,controller:i,cellCoordsFactory:(e,t)=>this.hot._createCellCoords(e,t)}),this.hot.runHooks("afterOnCellMouseOver",e,o,n),this.activeWt=this._wt,Tr(Dr,this,null))},onCellMouseUp:(e,t,n,r)=>{const o=this.translateFromRenderableToVisualCoords(t);this.activeWt=r,this.hot.runHooks("beforeOnCellMouseUp",e,o,n),(0,l.d)(e)||this.hot.isDestroyed||(this.hot.runHooks("afterOnCellMouseUp",e,o,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,t)=>{const n=this.hot.rowIndexMapper,r=e<0;let o=e;return r||(o=n.getVisualFromRenderableIndex(e),null!==o)?(o=this.hot.runHooks("beforeViewportScrollVertically",o,t),this.hot.runHooks("beforeViewportScroll"),r?o:n.getRenderableFromVisualIndex(o)):e},onBeforeViewportScrollHorizontally:(e,t)=>{const n=this.hot.columnIndexMapper,r=e<0;let o=e;return r||(o=n.getVisualFromRenderableIndex(e),null!==o)?(o=this.hot.runHooks("beforeViewportScrollHorizontally",o,t),this.hot.runHooks("beforeViewportScroll"),r?o:n.getRenderableFromVisualIndex(o)):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,o=e<0;let i=e;o||(i=r.getVisualFromRenderableIndex(e));const s=this.hot.runHooks("beforeHighlightingRowHeader",i,t,n);return o?s:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,1))},onBeforeHighlightingColumnHeader:(e,t,n)=>{const r=this.hot.columnIndexMapper,o=e<0;let i=e;o||(i=r.getVisualFromRenderableIndex(e));const s=this.hot.runHooks("beforeHighlightingColumnHeader",i,t,n);return o?s:r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(s,1))},onAfterDrawSelection:(e,t,n)=>{let r;const[o,i]=this.translateFromRenderableToVisualIndex(e,t),s=this.hot.selection.getSelectedRange();if(s.size()>0){const e=s.peekByIndex(null!=n?n:0);r=[e.from.row,e.from.col,e.to.row,e.to.col]}return this.hot.runHooks("afterDrawSelection",o,i,r,n)},onBeforeDrawBorders:(e,t)=>{const[n,r,o,i]=e,s=[this.hot.rowIndexMapper.getVisualFromRenderableIndex(n),this.hot.columnIndexMapper.getVisualFromRenderableIndex(r),this.hot.rowIndexMapper.getVisualFromRenderableIndex(o),this.hot.columnIndexMapper.getVisualFromRenderableIndex(i)];return this.hot.runHooks("beforeDrawBorders",s,t)},onBeforeTouchScroll:()=>this.hot.runHooks("beforeTouchScroll"),onAfterMomentumScroll:()=>this.hot.runHooks("afterMomentumScroll"),onModifyRowHeaderWidth:e=>this.hot.runHooks("modifyRowHeaderWidth",e),onModifyGetCellCoords:(e,t,n,r)=>{const o=this.hot.rowIndexMapper,i=this.hot.columnIndexMapper,s=t>=0?i.getVisualFromRenderableIndex(t):t,a=e>=0?o.getVisualFromRenderableIndex(e):e,l=this.hot.runHooks("modifyGetCellCoords",a,s,n,r);if(Array.isArray(l)){const[e,t,n,r]=l;return[e>=0?o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(e,1)):e,t>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(t,1)):t,n>=0?o.getRenderableFromVisualIndex(o.getNearestNotHiddenIndex(n,-1)):n,r>=0?i.getRenderableFromVisualIndex(i.getNearestNotHiddenIndex(r,-1)):r]}},onModifyGetCoordsElement:(e,t)=>{const n=this.hot.rowIndexMapper,r=this.hot.columnIndexMapper,o=t>=0?r.getVisualFromRenderableIndex(t):t,i=e>=0?n.getVisualFromRenderableIndex(e):e,s=this.hot.runHooks("modifyGetCoordsElement",i,o);if(Array.isArray(s)){const[e,t]=s;return[e>=0?n.getRenderableFromVisualIndex(n.getNearestNotHiddenIndex(e,1)):e,t>=0?r.getRenderableFromVisualIndex(r.getNearestNotHiddenIndex(t,1)):t]}},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,o=e.endRow;if("number"==typeof t)e.startRow=Math.max(r-t,0),e.endRow=Math.min(o+t,n-1);else if("auto"===t){const t=Math.max(1,Math.ceil(o/n*12));e.startRow=Math.max(r-t,0),e.endRow=Math.min(o+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,o=e.endColumn;if("number"==typeof t&&(e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(o+t,n-1)),"auto"===t){const t=Math.max(1,Math.ceil(o/n*6));e.startColumn=Math.max(r-t,0),e.endColumn=Math.min(o+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 pr(e),this.activeWt=this._wt;const t=this._wt.wtTable.spreader,{width:n,height:o}=this.hot.rootElement.getBoundingClientRect();this.setLastSize(n,o),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.render()}))}isTextSelectionAllowed(e){if((0,r.Xy)(e))return!0;const t=(0,r.aO)(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 Mr(xr,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(!(0,r.nB)(n,"relative"))return(0,r.Ie)(t),void this.appendRowHeader(e,t);this.updateCellHeader(n.querySelector(".rowHeader"),e,this.hot.getRowHeader)}else{const{rootDocument:n,getRowHeader:r}=this.hot,o=n.createElement("div"),i=n.createElement("span");o.className="relative",i.className="rowHeader",this.updateCellHeader(i,e,r),o.appendChild(i),t.appendChild(o)}this.hot.runHooks("afterGetRowHeader",e,t)}appendColHeader(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.hot.getColHeader,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;const i=()=>{const t=e>=0?this.hot.getColumnMeta(e).headerClassName:null;return t?t.split(" "):[]};if(t.firstChild){const s=t.firstChild;(0,r.nB)(s,"relative")?(this.updateCellHeader(s.querySelector(".colHeader"),e,n,o),s.className="",(0,r.iQ)(s,["relative",...i()])):((0,r.Ie)(t),this.appendColHeader(e,t,n,o))}else{const{rootDocument:s}=this.hot,a=s.createElement("div"),l=s.createElement("span"),u=i();a.classList.add("relative",...u),l.className="colHeader",this.settings.ariaTags&&((0,r.Bq)(a,...(0,Ee.gg)()),(0,r.Bq)(l,...(0,Ee.gg)())),this.updateCellHeader(l,e,n,o),a.appendChild(l),t.appendChild(a)}this.hot.runHooks("afterGetColHeader",e,t,o)}updateCellHeader(e,t,n){let o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=t;const s=this._wt.wtOverlays.getParentOverlay(e)||this._wt;e.parentNode&&((0,r.nB)(e,"colHeader")?i=s.wtTable.columnFilter.sourceToRendered(t):(0,r.nB)(e,"rowHeader")&&(i=s.wtTable.rowFilter.sourceToRendered(t))),i>-1?(0,r.Mv)(e,n(t,o)):((0,r.c6)(e,String.fromCharCode(160)),(0,r.iQ)(e,"cornerHeader"))}maximumVisibleElementWidth(e){const t=this._wt.wtViewport.getWorkspaceWidth()-e;return t>0?t:0}maximumVisibleElementHeight(e){const t=this._wt.wtViewport.getWorkspaceHeight()-e;return t>0?t:0}setLastSize(e,t){Tr(Ir,this,e),Tr(kr,this,t)}getLastSize(){return{width:Mr(Ir,this),height:Mr(kr,this)}}getFirstRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleRow(){if(!this._wt.wtViewport.rowsRenderCalculator)return null;const e=this.hot.rowIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedRow());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countRows()-1,-1)}getFirstRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getFirstRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:0,1)}getLastRenderedVisibleColumn(){if(!this._wt.wtViewport.columnsRenderCalculator)return null;const e=this.hot.columnIndexMapper,t=e.getVisualFromRenderableIndex(this._wt.wtTable.getLastRenderedColumn());return e.getNearestNotHiddenIndex(null!=t?t:this.hot.countCols()-1,-1)}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 Mr(Ar,this)}getRowHeadersCount(){return Mr(Nr,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)}getActiveOverlayName(){return this._wt.activeOverlayName}isVisible(){return this._wt.wtTable.isVisible()}hasVerticalScroll(){return this._wt.wtViewport.hasVerticalScroll()}hasHorizontalScroll(){return this._wt.wtViewport.hasHorizontalScroll()}getTableWidth(){return this._wt.wtTable.getWidth()}getTableHeight(){return this._wt.wtTable.getHeight()}getTableOffset(){return this._wt.wtViewport.getWorkspaceOffset()}getRowHeaderWidth(){return this._wt.wtViewport.getRowHeaderWidth()}getColumnHeaderHeight(){return this._wt.wtViewport.getColumnHeaderHeight()}isVerticallyScrollableByWindow(){return this._wt.wtViewport.isVerticallyScrollableByWindow()}isHorizontallyScrollableByWindow(){return this._wt.wtViewport.isHorizontallyScrollableByWindow()}destroy(){this._wt.destroy(),this.eventManager.destroy()}};var Ur=n(85874);function Br(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Wr=class{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];Br(this,"hot",void 0),Br(this,"data",void 0),Br(this,"dataType","array"),Br(this,"colToProp",(()=>{})),Br(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(0,F.z0)(this.data,((n,r)=>{const o=this.getAtCell(r,e);t.push(o)})),t}getAtRow(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=void 0===t&&void 0===n,{dataDotNotation:s}=this.hot.getSettings();let a=null,l=null;if(a=this.modifyRowData(e),Array.isArray(a))l=[],i?a.forEach(((t,n)=>{l[n]=this.getAtPhysicalCell(e,n,a)})):(0,j.Ti)(t,n,(n=>{l[n-t]=this.getAtPhysicalCell(e,n,a)}));else if((0,v.Gv)(a)||(0,o.Tn)(a))if(l=r?[]:{},!i||r){const o=0,i=this.countFirstRowKeys()-1;(0,j.Ti)(o,i,(u=>{const h=this.colToProp(u);if(u>=(t||o)&&u<=(n||i)&&!Number.isInteger(h)){const t=this.getAtPhysicalCell(e,h,a);r?l.push(t):s?(0,v.oq)(l,h,t):l[h]=t}}))}else(0,v.v4)(a,((t,n)=>{const r=this.getAtPhysicalCell(e,n,a);s?(0,v.oq)(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=(0,v.nA)(n);this.hot.runHooks("modifySourceData",e,t,r,"set"),r.isTouched()&&(n=r.value)}["__proto__","constructor","prototype"].includes(e)||(Number.isInteger(t)?this.data[e][t]=n:(0,v.oq)(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?(0,v.UU)(n,t):n[t]}else r="function"==typeof t?t(n):n[t];if(this.hot.hasHook("modifySourceData")){const n=(0,v.nA)(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,o=null,i=null,s=null,a=null;null===e||null===t?(r=!0,o=0,s=this.countRows()-1):(o=Math.min(e.row,t.row),i=Math.min(e.col,t.col),s=Math.max(e.row,t.row),a=Math.max(e.col,t.col));const l=[];return(0,j.Ti)(o,s,(e=>{l.push(r?this.getAtRow(e,void 0,void 0,n):this.getAtRow(e,i,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(0,Ur.E)(this.data)}destroy(){this.data=null,this.hot=null}};n(37550);var jr=n(85408),zr=n(52246),Gr=n(41895),$r=n(31803),Kr=n(48386),Xr=n(41496);const qr=new Map([["hiding",zr.o],["index",Gr.n],["linkedPhysicalIndexToValue",$r.z],["physicalIndexToValue",Kr._],["trimming",Xr.q]]);var Qr=n(48046),Jr=n(77710);let Zr=0;class eo{constructor(){var e,t,n;e=this,t="collection",n=new Map,(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}register(e,t){!1===this.collection.has(e)&&(this.collection.set(e,t),t.addLocalHook("change",(()=>this.runLocalHooks("change",t))),Zr+=1)}unregister(e){const t=this.collection.get(e);(0,i.O9)(t)&&(t.destroy(),this.collection.delete(e),this.runLocalHooks("change",t),Zr-=1)}unregisterAll(){this.collection.forEach(((e,t)=>this.unregister(t))),this.collection.clear()}get(e){return(0,i.b0)(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 to(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,v.co)(eo,Jr.A);class no extends eo{constructor(e,t){super(),to(this,"mergedValuesCache",[]),to(this,"aggregationFunction",void 0),to(this,"fallbackValue",void 0),this.aggregationFunction=e,this.fallbackValue=t}getMergedValues(){if(!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0]))return this.mergedValuesCache;if(0===this.getLength())return[];const e=(0,F.YD)(this.get(),(e=>e.getValues())),t=[],n=(0,i.O9)(e[0])&&e[0].length||0;for(let r=0;r<n;r+=1){const n=[];for(let t=0;t<this.getLength();t+=1)n.push(e[t][r]);t.push(n)}return(0,F.YD)(t,this.aggregationFunction)}getMergedValueAtIndex(e,t){const n=this.getMergedValues(t)[e];return(0,i.O9)(n)?n:this.fallbackValue}updateCache(){this.mergedValuesCache=this.getMergedValues(!1)}}function ro(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 oo=new WeakMap;class io{constructor(){var e,t,n;n=[],function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e=this,t=oo),t.set(e,n)}subscribe(e){var t;return this.addLocalHook("change",e),this._write((t=oo).get(ro(t,this))),this}unsubscribe(){return this.runLocalHooks("unsubscribe"),this.clearLocalHooks(),this}_write(e){return e.length>0&&this.runLocalHooks("change",e),this}_writeInitialChanges(e){var t,n;n=e,(t=oo).set(ro(t,this),n)}}function so(e,t){const n=[];let r=0,o=0;for(;r<e.length&&o<t.length;r++,o++)e[r]!==t[o]&&n.push({op:"replace",index:o,oldValue:e[r],newValue:t[o]});for(;r<t.length;r++)n.push({op:"insert",index:r,oldValue:void 0,newValue:t[r]});for(;o<e.length;o++)n.push({op:"remove",index:o,oldValue:e[o],newValue:void 0});return n}function ao(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function lo(e,t){return e.get(ho(e,t))}function uo(e,t,n){return e.set(ho(e,t),n),n}function ho(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")}(0,v.co)(io,Jr.A);var co=new WeakMap,mo=new WeakMap,po=new WeakMap,fo=new WeakMap,go=new WeakMap;class yo{constructor(){let{initialIndexValue:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};ao(this,co,new Set),ao(this,mo,[]),ao(this,po,[]),ao(this,fo,!1),ao(this,go,!1),uo(go,this,null!=e&&e)}createObserver(){const e=new io;return lo(co,this).add(e),e.addLocalHook("unsubscribe",(()=>{lo(co,this).delete(e)})),e._writeInitialChanges(so(lo(mo,this),lo(po,this))),e}emit(e){let t=lo(po,this);lo(fo,this)&&lo(mo,this).length===e.length||(0===e.length?e=new Array(t.length).fill(lo(go,this)):uo(mo,this,new Array(e.length).fill(lo(go,this))),lo(fo,this)||(uo(fo,this,!0),t=lo(mo,this)));const n=so(t,e);lo(co,this).forEach((e=>e._write(n))),uo(po,this,e)}}function wo(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}new Set;class vo{constructor(){wo(this,"indexesSequence",new jr.K),wo(this,"trimmingMapsCollection",new no((e=>e.some((e=>!0===e))),!1)),wo(this,"hidingMapsCollection",new no((e=>e.some((e=>!0===e))),!1)),wo(this,"variousMapsCollection",new eo),wo(this,"hidingChangesObservable",new yo({initialIndexValue:!1})),wo(this,"notTrimmedIndexesCache",[]),wo(this,"notHiddenIndexesCache",[]),wo(this,"isBatched",!1),wo(this,"indexesSequenceChanged",!1),wo(this,"indexesChangeSource",void 0),wo(this,"trimmedIndexesChanged",!1),wo(this,"hiddenIndexesChanged",!1),wo(this,"renderablePhysicalIndexesCache",[]),wo(this,"fromPhysicalToVisualIndexesCache",new Map),wo(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,function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!qr.has(e))throw new Error(`The provided map type ("${e}") does not exist.`);return new(qr.get(e))(t)}(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 Xr.q?this.trimmingMapsCollection.register(e,t):t instanceof zr.o?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(0,i.O9)(t)?t:null}getPhysicalFromRenderableIndex(e){const t=this.renderablePhysicalIndexesCache[e];return(0,i.O9)(t)?t:null}getVisualFromPhysicalIndex(e){const t=this.fromPhysicalToVisualIndexesCache.get(e);return(0,i.O9)(t)?t:null}getVisualFromRenderableIndex(e){return this.getVisualFromPhysicalIndex(this.getPhysicalFromRenderableIndex(e))}getRenderableFromVisualIndex(e){const t=this.fromVisualToRenderableIndexesCache.get(e);return(0,i.O9)(t)?t:null}getNearestNotHiddenIndex(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(null===this.getPhysicalFromVisualIndex(e))return null;if(this.fromVisualToRenderableIndexesCache.has(e))return e;const r=Array.from(this.fromVisualToRenderableIndexesCache.keys());let o=-1;return o=t>0?r.findIndex((t=>t>e)):r.reverse().findIndex((t=>t<e)),-1===o?n?this.getNearestNotHiddenIndex(e,-t,!1):null:r[o]}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(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.notTrimmedIndexesCache:this.getIndexesSequence().filter((e=>!1===this.isTrimmed(e)))}getNotTrimmedIndexesLength(){return this.getNotTrimmedIndexes().length}getNotHiddenIndexes(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.notHiddenIndexesCache:this.getIndexesSequence().filter((e=>!1===this.isHidden(e)))}getNotHiddenIndexesLength(){return this.getNotHiddenIndexes().length}getRenderableIndexes(){return!0===(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])?this.renderablePhysicalIndexesCache:this.getNotTrimmedIndexes().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=(0,F.YD)(e,(e=>this.getPhysicalFromVisualIndex(e))),r=this.getNotTrimmedIndexesLength(),o=e.length,i=(0,Qr.H)(this.getIndexesSequence(),n),s=i.filter((e=>!1===this.isTrimmed(e)));let a=i.indexOf(s[s.length-1])+1;if(t+o<r){const e=s[t];a=i.indexOf(e)}this.indexesChangeSource="move",this.setIndexesSequence((0,Qr.N)(i,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=(0,i.O9)(n)?n:this.getNumberOfIndexes(),o=this.getIndexesSequence().includes(n)?this.getIndexesSequence().indexOf(n):this.getNumberOfIndexes(),s=(0,F.YD)(new Array(t).fill(r),((e,t)=>e+t));this.suspendOperations(),this.indexesChangeSource="insert",this.indexesSequence.insert(o,s),this.indexesChangeSource=void 0,this.trimmingMapsCollection.insertToEvery(o,s),this.hidingMapsCollection.insertToEvery(o,s),this.variousMapsCollection.insertToEvery(o,s),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)}}}(0,v.co)(vo,Jr.A);var _o=n(63487);function bo(e){const t=/^([a-zA-Z]{2})-([a-zA-Z]{2})$/.exec(e);return t?`${t[1].toLowerCase()}-${t[2].toUpperCase()}`:e}function So(e){(0,i.O9)(e)&&(0,_.z3)(Ae.O`Language with code "${e}" was not found. You should register particular language\x20
  141. before using it. Read more about this issue at: https://docs.handsontable.com/i18n/missing-language-code.`)}var Co=n(34647);const{register:Eo,getValues:Mo}=(0,Co.A)("phraseFormatters");Eo("pluralize",(function(e,t){return Array.isArray(e)&&Number.isInteger(t)?e[t]:e}));var To=n(49138);const Ro={languageCode:"en-US",[To.CONTEXTMENU_ITEMS_NO_ITEMS]:"No available options",[To.CONTEXTMENU_ITEMS_ROW_ABOVE]:"Insert row above",[To.CONTEXTMENU_ITEMS_ROW_BELOW]:"Insert row below",[To.CONTEXTMENU_ITEMS_INSERT_LEFT]:"Insert column left",[To.CONTEXTMENU_ITEMS_INSERT_RIGHT]:"Insert column right",[To.CONTEXTMENU_ITEMS_REMOVE_ROW]:["Remove row","Remove rows"],[To.CONTEXTMENU_ITEMS_REMOVE_COLUMN]:["Remove column","Remove columns"],[To.CONTEXTMENU_ITEMS_UNDO]:"Undo",[To.CONTEXTMENU_ITEMS_REDO]:"Redo",[To.CONTEXTMENU_ITEMS_READ_ONLY]:"Read only",[To.CONTEXTMENU_ITEMS_CLEAR_COLUMN]:"Clear column",[To.CONTEXTMENU_ITEMS_ALIGNMENT]:"Alignment",[To.CONTEXTMENU_ITEMS_ALIGNMENT_LEFT]:"Left",[To.CONTEXTMENU_ITEMS_ALIGNMENT_CENTER]:"Center",[To.CONTEXTMENU_ITEMS_ALIGNMENT_RIGHT]:"Right",[To.CONTEXTMENU_ITEMS_ALIGNMENT_JUSTIFY]:"Justify",[To.CONTEXTMENU_ITEMS_ALIGNMENT_TOP]:"Top",[To.CONTEXTMENU_ITEMS_ALIGNMENT_MIDDLE]:"Middle",[To.CONTEXTMENU_ITEMS_ALIGNMENT_BOTTOM]:"Bottom",[To.CONTEXTMENU_ITEMS_FREEZE_COLUMN]:"Freeze column",[To.CONTEXTMENU_ITEMS_UNFREEZE_COLUMN]:"Unfreeze column",[To.CONTEXTMENU_ITEMS_BORDERS]:"Borders",[To.CONTEXTMENU_ITEMS_BORDERS_TOP]:"Top",[To.CONTEXTMENU_ITEMS_BORDERS_RIGHT]:"Right",[To.CONTEXTMENU_ITEMS_BORDERS_BOTTOM]:"Bottom",[To.CONTEXTMENU_ITEMS_BORDERS_LEFT]:"Left",[To.CONTEXTMENU_ITEMS_REMOVE_BORDERS]:"Remove border(s)",[To.CONTEXTMENU_ITEMS_ADD_COMMENT]:"Add comment",[To.CONTEXTMENU_ITEMS_EDIT_COMMENT]:"Edit comment",[To.CONTEXTMENU_ITEMS_REMOVE_COMMENT]:"Delete comment",[To.CONTEXTMENU_ITEMS_READ_ONLY_COMMENT]:"Read-only comment",[To.CONTEXTMENU_ITEMS_MERGE_CELLS]:"Merge cells",[To.CONTEXTMENU_ITEMS_UNMERGE_CELLS]:"Unmerge cells",[To.CONTEXTMENU_ITEMS_COPY]:"Copy",[To.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_HEADERS]:["Copy with header","Copy with headers"],[To.CONTEXTMENU_ITEMS_COPY_WITH_COLUMN_GROUP_HEADERS]:["Copy with group header","Copy with group headers"],[To.CONTEXTMENU_ITEMS_COPY_COLUMN_HEADERS_ONLY]:["Copy header only","Copy headers only"],[To.CONTEXTMENU_ITEMS_CUT]:"Cut",[To.CONTEXTMENU_ITEMS_NESTED_ROWS_INSERT_CHILD]:"Insert child row",[To.CONTEXTMENU_ITEMS_NESTED_ROWS_DETACH_CHILD]:"Detach from parent",[To.CONTEXTMENU_ITEMS_HIDE_COLUMN]:["Hide column","Hide columns"],[To.CONTEXTMENU_ITEMS_SHOW_COLUMN]:["Show column","Show columns"],[To.CONTEXTMENU_ITEMS_HIDE_ROW]:["Hide row","Hide rows"],[To.CONTEXTMENU_ITEMS_SHOW_ROW]:["Show row","Show rows"],[To.FILTERS_CONDITIONS_NONE]:"None",[To.FILTERS_CONDITIONS_EMPTY]:"Is empty",[To.FILTERS_CONDITIONS_NOT_EMPTY]:"Is not empty",[To.FILTERS_CONDITIONS_EQUAL]:"Is equal to",[To.FILTERS_CONDITIONS_NOT_EQUAL]:"Is not equal to",[To.FILTERS_CONDITIONS_BEGINS_WITH]:"Begins with",[To.FILTERS_CONDITIONS_ENDS_WITH]:"Ends with",[To.FILTERS_CONDITIONS_CONTAINS]:"Contains",[To.FILTERS_CONDITIONS_NOT_CONTAIN]:"Does not contain",[To.FILTERS_CONDITIONS_GREATER_THAN]:"Greater than",[To.FILTERS_CONDITIONS_GREATER_THAN_OR_EQUAL]:"Greater than or equal to",[To.FILTERS_CONDITIONS_LESS_THAN]:"Less than",[To.FILTERS_CONDITIONS_LESS_THAN_OR_EQUAL]:"Less than or equal to",[To.FILTERS_CONDITIONS_BETWEEN]:"Is between",[To.FILTERS_CONDITIONS_NOT_BETWEEN]:"Is not between",[To.FILTERS_CONDITIONS_AFTER]:"After",[To.FILTERS_CONDITIONS_BEFORE]:"Before",[To.FILTERS_CONDITIONS_TODAY]:"Today",[To.FILTERS_CONDITIONS_TOMORROW]:"Tomorrow",[To.FILTERS_CONDITIONS_YESTERDAY]:"Yesterday",[To.FILTERS_VALUES_BLANK_CELLS]:"Blank cells",[To.FILTERS_DIVS_FILTER_BY_CONDITION]:"Filter by condition",[To.FILTERS_DIVS_FILTER_BY_VALUE]:"Filter by value",[To.FILTERS_LABELS_CONJUNCTION]:"And",[To.FILTERS_LABELS_DISJUNCTION]:"Or",[To.FILTERS_BUTTONS_SELECT_ALL]:"Select all",[To.FILTERS_BUTTONS_CLEAR]:"Clear",[To.FILTERS_BUTTONS_OK]:"OK",[To.FILTERS_BUTTONS_CANCEL]:"Cancel",[To.FILTERS_BUTTONS_PLACEHOLDER_SEARCH]:"Search",[To.FILTERS_BUTTONS_PLACEHOLDER_VALUE]:"Value",[To.FILTERS_BUTTONS_PLACEHOLDER_SECOND_VALUE]:"Second value",[To.CHECKBOX_CHECKED]:"Checked",[To.CHECKBOX_UNCHECKED]:"Unchecked"},Ao=To,No=Ro.languageCode,{register:Lo,getItem:xo,hasItem:Oo,getValues:Io}=(0,Co.A)("languagesDictionaries");function ko(e,t){let n=e,r=t;return(0,v.Gv)(e)&&(r=e,n=r.languageCode),function(e,t){var n,r;e!==No&&(n=t,r=xo(No),(0,v.v4)(r,((e,t)=>{(0,i.b0)(n[t])&&(n[t]=e)})))}(n,r),Lo(n,(0,v.Go)(r)),(0,v.Go)(r)}function Do(e){return Po(e)?(0,v.Go)(xo(e)):null}function Po(e){return Oo(e)}function Ho(e,t,n){const r=Do(e);if(null===r)return null;const o=r[t];if((0,i.b0)(o))return null;const s=function(e,t){let n=e;return(0,F.z0)(Mo(),(r=>{n=r(e,t)})),n}(o,n);return Array.isArray(s)?s[0]:s}ko(Ro);var Fo=n(50192);class Yo{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")}}(0,v.co)(Yo,Jr.A);const Vo=Yo;const Uo=class extends Vo{constructor(e,t){var n,r,o;super(e,null),n=this,o=null,(r=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(r="visualCellRange"))in n?Object.defineProperty(n,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):n[r]=o,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),o=this.getNearestNotHiddenCoords(n,-1);return null===r||null===o?null:((r.row>o.row||r.col>o.col)&&(r=t,o=n),this.settings.createCellRange(r,r,o))}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 o=this.getNearestNotHiddenIndex(this.settings.columnIndexMapper,e.col,n);return null===o?null:this.settings.createCellCoords(r,o)}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,o=this.settings.visualToRenderableCoords(this.visualCellRange.highlight);let i=null;if(null!==o&&null!==o.col&&null!==o.row||(i=this.getNearestNotHiddenCoords(t,n,r)),null!==i&&e.overlaps(i)){const t=e.highlight.clone();if(t.row>=0&&(t.row=i.row),t.col>=0&&(t.col=i.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!==o&&null===i&&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)}};function Bo(e){let{activeHeaderClassName:t,...n}=e;return new Uo({className:t,...n,selectionType:Fo.E6})}function Wo(e){let{areaCornerVisible:t,...n}=e;return new Uo({className:"area",createLayers:!0,border:{width:1,color:"#4b89ff",cornerVisible:t},...n,selectionType:Fo.LX})}function jo(e){let{...t}=e;return new Uo({className:"highlight",...t,selectionType:Fo.LX})}function zo(e){let{columnClassName:t,...n}=e;return new Uo({className:t,...n,selectionType:Fo.QP})}function Go(e){let{headerClassName:t,...n}=e;return new Uo({className:t,...n,selectionType:Fo.PP})}function $o(e){let{rowClassName:t,...n}=e;return new Uo({className:t,...n,selectionType:Fo._8})}function Ko(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Xo(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 qo=new WeakSet;class Qo{constructor(e){var t,n;(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(t=this,n=qo),n.add(t),Ko(this,"options",void 0),Ko(this,"layerLevel",0),Ko(this,"focus",void 0),Ko(this,"fill",void 0),Ko(this,"layeredAreas",new Map),Ko(this,"areas",new Map),Ko(this,"rowHeaders",new Map),Ko(this,"columnHeaders",new Map),Ko(this,"activeRowHeaders",new Map),Ko(this,"activeColumnHeaders",new Map),Ko(this,"activeCornerHeaders",new Map),Ko(this,"rowHighlights",new Map),Ko(this,"columnHighlights",new Map),Ko(this,"customSelections",[]),this.options=e,this.focus=function(e){let{cellCornerVisible:t,...n}=e;return new Uo({className:"current",headerAttributes:[(0,Ee.H0)()],border:{width:2,color:"#4b89ff",cornerVisible:t},...n,selectionType:Fo.Yt})}(e),this.fill=function(e){let{...t}=e;return new Uo({className:"fill",border:{width:1,color:"#ff0000"},...t,selectionType:Fo.Hb})}(e)}isEnabledFor(e,t){let n=e;e===Fo.Yt&&(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 Xo(qo,this,Jo).call(this,this.layeredAreas,Wo)}getLayeredAreas(){return[...this.layeredAreas.values()]}createArea(){return Xo(qo,this,Jo).call(this,this.areas,jo)}getAreas(){return[...this.areas.values()]}createRowHeader(){return Xo(qo,this,Jo).call(this,this.rowHeaders,Go)}getRowHeaders(){return[...this.rowHeaders.values()]}createColumnHeader(){return Xo(qo,this,Jo).call(this,this.columnHeaders,Go)}getColumnHeaders(){return[...this.columnHeaders.values()]}createActiveRowHeader(){return Xo(qo,this,Jo).call(this,this.activeRowHeaders,Bo)}getActiveRowHeaders(){return[...this.activeRowHeaders.values()]}createActiveColumnHeader(){return Xo(qo,this,Jo).call(this,this.activeColumnHeaders,Bo)}getActiveColumnHeaders(){return[...this.activeColumnHeaders.values()]}createActiveCornerHeader(){return Xo(qo,this,Jo).call(this,this.activeCornerHeaders,Bo)}getActiveCornerHeaders(){return[...this.activeCornerHeaders.values()]}createRowHighlight(){return Xo(qo,this,Jo).call(this,this.rowHighlights,$o)}getRowHighlights(){return[...this.rowHighlights.values()]}createColumnHighlight(){return Xo(qo,this,Jo).call(this,this.columnHighlights,zo)}getColumnHighlights(){return[...this.columnHighlights.values()]}getCustomSelections(){return[...this.customSelections.values()]}addCustomSelection(e){this.customSelections.push(function(e){let{border:t,visualCellRange:n,...r}=e;return new Uo({...t,...r,selectionType:Fo.OS},n)}({...this.options,...e}))}clear(){this.focus.clear(),this.fill.clear(),(0,F.z0)(this.areas.values(),(e=>{e.clear()})),(0,F.z0)(this.layeredAreas.values(),(e=>{e.clear()})),(0,F.z0)(this.rowHeaders.values(),(e=>{e.clear()})),(0,F.z0)(this.columnHeaders.values(),(e=>{e.clear()})),(0,F.z0)(this.activeRowHeaders.values(),(e=>{e.clear()})),(0,F.z0)(this.activeColumnHeaders.values(),(e=>{e.clear()})),(0,F.z0)(this.activeCornerHeaders.values(),(e=>{e.clear()})),(0,F.z0)(this.rowHighlights.values(),(e=>{e.clear()})),(0,F.z0)(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 Jo(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}const Zo=Qo;function ei(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ti{constructor(e){ei(this,"ranges",[]),ei(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]()}}const ni=ti;function ri(e,t,n){oi(e,t),t.set(e,n)}function oi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ii(e,t){return e.get(ai(e,t))}function si(e,t,n){return e.set(ai(e,t),n),n}function ai(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 li=new WeakMap,ui=new WeakMap,hi=new WeakMap,ci=new WeakSet;class di{constructor(e,t){var n;oi(this,n=ci),n.add(this),ri(this,li,void 0),ri(this,ui,void 0),ri(this,hi,{x:0,y:0}),si(li,this,e),si(ui,this,t)}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=ii(ui,this).createCellCoords(e,t);let o=ii(li,this).current().highlight;const i=ii(ui,this).visualToRenderableCoords(o);let s=0,a=0;if(this.runLocalHooks("beforeTransformStart",r),null!==i.row&&null!==i.col){const{width:e,height:t}=ai(ci,this,pi).call(this),{row:i,col:l}=ai(ci,this,yi).call(this,o),u=ii(ui,this).fixedRowsBottom(),h=ii(ui,this).minSpareRows(),c=ii(ui,this).minSpareCols(),d=ii(ui,this).autoWrapRow(),m=ii(ui,this).autoWrapCol(),p=ii(ui,this).createCellCoords(i+r.row,l+r.col);if(p.row>=t){const r=(0,v.nA)(n&&h>0&&0===u),o=p.col+1,i=ii(ui,this).createCellCoords(p.row-t,o>=e?o-e:o);this.runLocalHooks("beforeColumnWrap",r,ai(ci,this,wi).call(this,i),o>=e),r.value?this.runLocalHooks("insertRowRequire",ii(ui,this).countRenderableRows()):m&&p.assign(i)}else if(p.row<0){const n=(0,v.nA)(m),r=p.col-1,o=ii(ui,this).createCellCoords(t+p.row,r<0?e+r:r);this.runLocalHooks("beforeColumnWrap",n,ai(ci,this,wi).call(this,o),r<0),m&&p.assign(o)}if(p.col>=e){const r=(0,v.nA)(n&&c>0),o=p.row+1,i=ii(ui,this).createCellCoords(o>=t?o-t:o,p.col-e);this.runLocalHooks("beforeRowWrap",r,ai(ci,this,wi).call(this,i),o>=t),r.value?this.runLocalHooks("insertColRequire",ii(ui,this).countRenderableColumns()):d&&p.assign(i)}else if(p.col<0){const n=(0,v.nA)(d),r=p.row-1,o=ii(ui,this).createCellCoords(r<0?t+r:r,e+p.col);this.runLocalHooks("beforeRowWrap",n,ai(ci,this,wi).call(this,o),r<0),d&&p.assign(o)}const{rowDir:f,colDir:g}=ai(ci,this,mi).call(this,p);s=f,a=g,o=ai(ci,this,wi).call(this,p)}return this.runLocalHooks("afterTransformStart",o,s,a),o}transformEnd(e,t){const n=ii(ui,this).createCellCoords(e,t),r=ii(li,this).current(),o=ii(ui,this).visualToRenderableCoords(r.highlight),i=ai(ci,this,fi).call(this,r.to.row,r.from.row),s=ai(ci,this,gi).call(this,r.to.col,r.from.col),a=r.to.clone();let l=0,u=0;if(this.runLocalHooks("beforeTransformEnd",n),null!==o.row&&null!==o.col&&null!==i&&null!==s){const{row:e,col:t}=ai(ci,this,yi).call(this,r.highlight),o=ii(ui,this).createCellCoords(i+n.row,s+n.col),h=r.getTopStartCorner(),c=r.getTopEndCorner(),d=r.getBottomEndCorner();if(n.col<0&&s>=t&&o.col<t){const e=o.col-t;o.col=ai(ci,this,gi).call(this,h.col,c.col)+e}else if(n.col>0&&s<=t&&o.col>t){const e=ai(ci,this,gi).call(this,c.col,h.col),t=Math.max(o.col-e,1);o.col=e+t}if(n.row<0&&i>=e&&o.row<e){const t=o.row-e;o.row=ai(ci,this,fi).call(this,h.row,d.row)+t}else if(n.row>0&&i<=e&&o.row>e){const e=ai(ci,this,fi).call(this,d.row,h.row),t=Math.max(o.row-e,1);o.row=e+t}const{rowDir:m,colDir:p}=ai(ci,this,mi).call(this,o);l=m,u=p;const f=ai(ci,this,wi).call(this,o);0===n.row&&0!==n.col?a.col=f.col:0!==n.row&&0===n.col?a.row=f.row:(a.row=f.row,a.col=f.col)}return this.runLocalHooks("afterTransformEnd",a,l,u),a}setOffsetSize(e){let{x:t,y:n}=e;si(hi,this,{x:t,y:n})}resetOffsetSize(){si(hi,this,{x:0,y:0})}}function mi(e){const{width:t,height:n}=ai(ci,this,pi).call(this);let r=0,o=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?(o=-1,e.col=0):e.col>0&&e.col>=t&&(o=1,e.col=t-1),{rowDir:r,colDir:o}}function pi(){return{width:ii(hi,this).x+ii(ui,this).countRenderableColumns(),height:ii(hi,this).y+ii(ui,this).countRenderableRows()}}function fi(e,t){const n=ii(ui,this).findFirstNonHiddenRenderableRow(e,t);return null===n?null:ii(hi,this).y+n}function gi(e,t){const n=ii(ui,this).findFirstNonHiddenRenderableColumn(e,t);return null===n?null:ii(hi,this).x+n}function yi(e){const{row:t,col:n}=ii(ui,this).visualToRenderableCoords(e);if(null===t||null===n)throw new Error("Renderable coords are not visible.");return ii(ui,this).createCellCoords(ii(hi,this).y+t,ii(hi,this).x+n)}function wi(e){const t=e.clone();return t.col=e.col-ii(hi,this).x,t.row=e.row-ii(hi,this).y,ii(ui,this).renderableToVisualCoords(t)}(0,v.co)(di,Jr.A);const vi=di;var _i=n(76396);function bi(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function Si(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ci(e,t){return e.get(Mi(e,t))}function Ei(e,t,n){return e.set(Mi(e,t),n),n}function Mi(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 Ti=new WeakMap,Ri=new WeakMap,Ai=new WeakMap,Ni=new WeakMap,Li=new WeakMap,xi=new WeakMap;class Oi{constructor(e,t){var n=this;Si(this,"settings",void 0),Si(this,"tableProps",void 0),Si(this,"inProgress",!1),Si(this,"selectedRange",new ni(((e,t,n)=>this.tableProps.createCellRange(e,t,n)))),Si(this,"highlight",void 0),bi(this,Ti,void 0),bi(this,Ri,void 0),Si(this,"selectedByRowHeader",new Set),Si(this,"selectedByColumnHeader",new Set),bi(this,Ai,!1),bi(this,Ni,!1),bi(this,Li,"unknown"),bi(this,xi,-1),this.settings=e,this.tableProps=t,this.highlight=new Zo({headerClassName:e.currentHeaderClassName,activeHeaderClassName:e.activeHeaderClassName,rowClassName:e.currentRowClassName,columnClassName:e.currentColClassName,cellAttributes:[(0,Ee.H0)()],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)}),Ei(Ti,this,new vi(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})),Ei(Ri,this,new vi(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})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ti,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)})),Ci(Ri,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)})),Ci(Ri,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){Ei(Li,this,e)}markEndSource(){Ei(Li,this,"unknown")}getSelectionSource(){return Ci(Li,this)}setExpectedLayers(e){Ei(xi,this,e)}begin(){this.inProgress=!0}finish(){this.runLocalHooks("afterSelectionFinished",Array.from(this.selectedRange)),this.inProgress=!1,Ei(xi,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 o="multiple"===this.settings.selectionMode,s=(0,i.b0)(t)?this.tableProps.getShortcutManager().isCtrlPressed():t,a=e.clone();Ei(Ai,this,!1),this.runLocalHooks("beforeSetRangeStart"+(n?"Only":""),a),(!o||o&&!s&&(0,i.b0)(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(),o=this.selectedRange.current().clone().setTo(e).isSingleHeader();if((n>0||r>0)&&(0===n&&t.col<0&&!o||0===r&&t.row<0&&!o))return;this.runLocalHooks("beforeSetRangeEnd",t),this.begin();const i=this.selectedRange.current();if(this.settings.navigableHeaders||i.highlight.normalize(),"single"===this.settings.selectionMode)i.setFrom(i.highlight),i.setTo(i.highlight);else{const e=i.getHorizontalDirection(),n=i.getVerticalDirection(),r=this.isMultiple();i.setTo(t),r&&(e!==i.getHorizontalDirection()||1===i.getWidth()&&!i.includes(i.highlight))&&i.from.assign({col:i.highlight.col}),r&&(n!==i.getVerticalDirection()||1===i.getHeight()&&!i.includes(i.highlight))&&i.from.assign({row:i.highlight.row})}n>0&&r>0&&(!this.settings.navigableHeaders||this.settings.navigableHeaders&&!i.isSingleHeader())&&i.to.normalize(),this.runLocalHooks("beforeHighlightSet"),this.setRangeFocus(this.selectedRange.current().highlight),this.applyAndCommit();const s=-1===Ci(xi,this)||this.selectedRange.size()===Ci(xi,this);this.runLocalHooks("afterSetRangeEnd",e,s)}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&&((0,F.z0)(this.highlight.getAreas(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getLayeredAreas(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getRowHeaders(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getColumnHeaders(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getActiveRowHeaders(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getActiveColumnHeaders(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getActiveCornerHeaders(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getRowHighlights(),(e=>{e.clear()})),(0,F.z0)(this.highlight.getColumnHighlights(),(e=>{e.clear()}))),this.highlight.useLayerLevel(t);const o=this.highlight.createArea(),i=this.highlight.createLayeredArea(),s=this.highlight.createRowHeader(),a=this.highlight.createColumnHeader(),l=this.highlight.createActiveRowHeader(),u=this.highlight.createActiveColumnHeader(),h=this.highlight.createActiveCornerHeader(),c=this.highlight.createRowHighlight(),d=this.highlight.createColumnHighlight();if(o.clear(),i.clear(),s.clear(),a.clear(),l.clear(),u.clear(),h.clear(),c.clear(),d.clear(),this.highlight.isEnabledFor(Fo.LX,e.highlight)&&(this.isMultiple()||t>=1)&&(o.add(e.from).add(e.to).commit(),i.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(Fo.PP,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)),o=this.tableProps.createCellCoords(-1,e.to.col);"single"===this.settings.selectionMode?(s.add(t).commit(),a.add(r).commit(),c.add(t).commit(),d.add(r).commit()):(s.add(t).add(n).commit(),a.add(r).add(o).commit(),c.add(t).add(n).commit(),d.add(r).add(o).commit())}const t=!Ci(Ni,this)&&this.isEntireRowSelected()&&(r>0&&r===e.getWidth()||0===r&&this.isSelectedByRowHeader()),o=!Ci(Ni,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(),o&&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&&o&&h.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(Fo.Yt,t.highlight)&&n.add(t.highlight).commit().syncWith(t),this.inProgress||(Ei(Ai,this,!0),this.runLocalHooks("afterSetFocus",t.highlight))}transformStart(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this.settings.navigableHeaders?Ci(Ti,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ci(Ti,this).resetOffsetSize(),this.setRangeStart(Ci(Ti,this).transformStart(e,t,n))}transformEnd(e,t){this.settings.navigableHeaders?Ci(Ti,this).setOffsetSize({x:this.tableProps.countRowHeaders(),y:this.tableProps.countColHeaders()}):Ci(Ti,this).resetOffsetSize(),this.setRangeEnd(Ci(Ti,this).transformEnd(e,t))}transformFocus(e,t){const n=this.selectedRange.current(),{row:r,col:o}=n.getOuterTopStartCorner(),i=this.tableProps.countRenderableColumnsInRange(0,o-1),s=this.tableProps.countRenderableRowsInRange(0,r-1);n.highlight.isHeader()?Ci(Ri,this).setOffsetSize({x:o<0?Math.abs(o):-i,y:r<0?Math.abs(r):-s}):Ci(Ri,this).setOffsetSize({x:o<0?0:-i,y:r<0?0:-s});const a=Ci(Ri,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:o,highlight:i}=n,s=this.tableProps.countRows(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=l?-1:0,h=l?0:t;this.getSelectedRange().pop();const c=this.tableProps.createCellCoords((0,j.qE)(r.row+h,u,s-1),r.col),d=this.tableProps.createCellCoords((0,j.qE)(o.row+t,u,s-1),o.col);this.markSource("shift"),i.row>=e?this.setRangeStartOnly(c,!0,this.tableProps.createCellCoords((0,j.qE)(i.row+t,0,s-1),i.col)):this.setRangeStartOnly(c,!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:o,highlight:i}=n,s=this.tableProps.countCols(),a=this.isSelectedByRowHeader(),l=this.isSelectedByColumnHeader(),u=a?-1:0,h=a?0:t;this.getSelectedRange().pop();const c=this.tableProps.createCellCoords(r.row,(0,j.qE)(r.col+h,u,s-1)),d=this.tableProps.createCellCoords(o.row,(0,j.qE)(o.col+t,u,s-1));this.markSource("shift"),i.col>=e?this.setRangeStartOnly(c,!0,this.tableProps.createCellCoords(i.row,(0,j.qE)(i.col+t,0,s-1))):this.setRangeStartOnly(c,!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=(0,v.nA)(!this.selectedRange.current().isSingle());return this.runLocalHooks("afterIsMultipleSelection",e),e.value}isFocusSelectionChanged(){return this.isSelected()&&Ci(Ai,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 o=this.tableProps.countRows(),i=this.tableProps.countCols(),s=this.tableProps.countRowHeaders(),a=this.tableProps.countColHeaders(),l=n?-a:0,u=t?-s:0;if(0===l&&0===u&&(0===o||0===i))return;let h=null===(e=this.getSelectedRange().current())||void 0===e?void 0:e.highlight;const{focusPosition:c,disableHeadersHighlight:d}=r;Ei(Ni,this,d),c&&Number.isInteger(null==c?void 0:c.row)&&Number.isInteger(null==c?void 0:c.col)&&(h=this.tableProps.createCellCoords((0,j.qE)(c.row,l,o-1),(0,j.qE)(c.col,u,i-1)));const m=this.tableProps.createCellCoords(l,u),p=this.tableProps.createCellCoords(o-1,i-1);this.clear(),this.setRangeStartOnly(m,void 0,h),u<0&&this.selectedByRowHeader.add(this.getLayerLevel()),l<0&&this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(p),this.finish(),Ei(Ni,this,!1)}selectCells(e){var t=this;const n=(0,_i.ML)(e);if(n===_i.Qz)return!1;if(n===_i.ay)throw new Error(Ae.O`Unsupported format of the selection ranges was passed. To select cells pass\x20
  142. the coordinates as an array of arrays ([[rowStart, columnStart/columnPropStart, rowEnd,\x20
  143. columnEnd/columnPropEnd]]) or as an array of CellRange objects.`);const r=(0,_i._e)(n,{createCellCoords:function(){return t.tableProps.createCellCoords(...arguments)},createCellRange:function(){return t.tableProps.createCellRange(...arguments)},propToCol:e=>this.tableProps.propToCol(e),keepDirection:!0}),o=this.settings.navigableHeaders,i={countRows:this.tableProps.countRows(),countCols:this.tableProps.countCols(),countRowHeaders:o?this.tableProps.countRowHeaders():0,countColHeaders:o?this.tableProps.countColHeaders():0},s=!e.some((e=>{const t=r(e),n=t.isValid(i);return!(n&&!t.containsHeaders()||n&&t.containsHeaders()&&t.isSingleHeader())}));return s&&(this.clear(),this.setExpectedLayers(e.length),(0,F.z0)(e,(e=>{const{from:t,to:n}=r(e);this.setRangeStartOnly(t.clone(),!1),this.setRangeEnd(n.clone())})),this.finish()),s}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,o="string"==typeof t?this.tableProps.propToCol(t):t,i=this.tableProps.countRows(),s=this.tableProps.countCols(),a=this.tableProps.countColHeaders(),l=0===a?0:-a,u=this.tableProps.createCellCoords(l,r),h=this.tableProps.createCellCoords(i-1,o),c=this.tableProps.createCellRange(u,u,h).isValid({countRows:i,countCols:s,countRowHeaders:0,countColHeaders:a});if(c){let e=0,t=0;Number.isInteger(null==n?void 0:n.row)&&Number.isInteger(null==n?void 0:n.col)?(e=(0,j.qE)(n.row,l,i-1),t=(0,j.qE)(n.col,Math.min(r,o),Math.max(r,o))):(e=(0,j.qE)(n,l,i-1),t=r);const s=this.tableProps.createCellCoords(e,t),u=0===a?0:(0,j.qE)(s.row,l,-1),h=i-1,c=this.tableProps.createCellCoords(u,r),d=this.tableProps.createCellCoords(h,o);this.runLocalHooks("beforeSelectColumns",c,d,s),c.row=u,d.row=h,this.setRangeStartOnly(c,void 0,s),this.selectedByColumnHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectColumns",c,d,s),this.finish()}return c}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(),o=this.tableProps.countCols(),i=this.tableProps.countRowHeaders(),s=0===i?0:-i,a=this.tableProps.createCellCoords(e,s),l=this.tableProps.createCellCoords(t,o-1),u=this.tableProps.createCellRange(a,a,l).isValid({countRows:r,countCols:o,countRowHeaders:i,countColHeaders:0});if(u){let r=0,a=0;Number.isInteger(null==n?void 0:n.row)&&Number.isInteger(null==n?void 0:n.col)?(r=(0,j.qE)(n.row,Math.min(e,t),Math.max(e,t)),a=(0,j.qE)(n.col,s,o-1)):(r=e,a=(0,j.qE)(n,s,o-1));const l=this.tableProps.createCellCoords(r,a),u=0===i?0:(0,j.qE)(l.col,s,-1),h=o-1,c=this.tableProps.createCellCoords(e,u),d=this.tableProps.createCellCoords(t,h);this.runLocalHooks("beforeSelectRows",c,d,l),c.col=u,d.col=h,this.setRangeStartOnly(c,void 0,l),this.selectedByRowHeader.add(this.getLayerLevel()),this.setRangeEnd(d),this.runLocalHooks("afterSelectRows",c,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:o,highlight:i}=n;this.clear(),i.assign({row:(0,j.qE)(i.row,-1/0,e-1),col:(0,j.qE)(i.col,-1/0,t-1)}),r.assign({row:(0,j.qE)(r.row,-1/0,e-1),col:(0,j.qE)(r.col,-1/0,t-1)}),o.assign({row:(0,j.qE)(o.row,0,e-1),col:(0,j.qE)(o.col,0,t-1)}),this.selectedRange.ranges.push(n),this.highlight.isEnabledFor(Fo.Yt,this.selectedRange.current().highlight)&&this.highlight.getFocus().add(i).commit().syncWith(n),this.applyAndCommit(n)}commit(){if(this.highlight.getCustomSelections().forEach((e=>{e.commit()})),!this.isSelected())return;const e=this.getLayerLevel(),t=this.selectedRange.current();this.highlight.isEnabledFor(Fo.Yt,t.highlight)&&this.highlight.getFocus().commit().syncWith(t);for(let e=0;e<this.selectedRange.size();e+=1){this.highlight.useLayerLevel(e);const t=this.highlight.createArea(),n=this.highlight.createLayeredArea(),r=this.highlight.createRowHeader(),o=this.highlight.createColumnHeader(),i=this.highlight.createActiveRowHeader(),s=this.highlight.createActiveColumnHeader(),a=this.highlight.createActiveCornerHeader(),l=this.highlight.createRowHighlight(),u=this.highlight.createColumnHighlight();t.commit(),n.commit(),r.commit(),o.commit(),i.commit(),s.commit(),a.commit(),l.commit(),u.commit()}this.highlight.useLayerLevel(e)}}(0,v.co)(Oi,Jr.A);const Ii=Oi;var ki=n(87979);function Di(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;const r="string"==typeof t.type?(0,ki.r0)(t.type):t.type;if(e._automaticallyAssignedMetaProps&&(0,v.v4)(t,((t,n)=>{e._automaticallyAssignedMetaProps.delete(n)})),!(0,v.Gv)(r))return;n!==e||e._automaticallyAssignedMetaProps||(e._automaticallyAssignedMetaProps=new Set);const o={};(0,v.v4)(r,((t,r)=>{var i;(function(e,t){var n;return"CELL_TYPE"!==e&&((null===(n=t._automaticallyAssignedMetaProps)||void 0===n?void 0:n.has(e))||!(0,v.mQ)(t,e))})(r,n)&&(o[r]=t,null===(i=e._automaticallyAssignedMetaProps)||void 0===i||i.add(r))})),(0,v.X$)(e,o)}function Pi(e){return Number.isInteger(e)&&e>=0}function Hi(e,t){if(!e())throw new Error(`Assertion failed: ${t}`)}function Fi(e){return null==e}const Yi=()=>({_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===(0,i.Im)(r))return!1;return!0},isEmptyRow(e){let t,n,r,o;for(t=0,n=this.countCols();t<n;t++)if(r=this.getDataAtCell(e,t),!1===(0,i.Im)(r))return"object"==typeof r&&(o=this.getCellMeta(e,t),(0,v.wU)(this.getSchema()[o.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,themeName:void 0,tabMoves:{row:0,col:1},title:void 0,trimDropdown:!0,trimRows:void 0,trimWhitespace:!0,type:"text",uncheckedTemplate:void 0,undo:!0,validator:void 0,viewportColumnRenderingOffset:"auto",viewportRowRenderingOffset:"auto",viewportColumnRenderingThreshold:0,viewportRowRenderingThreshold:0,visibleRows:10,width:void 0,wordWrap:!0});function Vi(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ui{constructor(e){Vi(this,"metaCtor",class{}),Vi(this,"meta",void 0),this.meta=this.metaCtor.prototype,(0,v.X$)(this.meta,Yi()),this.meta.instance=e}getMetaConstructor(){return this.metaCtor}getMeta(){return this.meta}updateMeta(e){var t;(0,v.X$)(this.meta,e),Di(this.meta,{...e,type:null!==(t=e.type)&&void 0!==t?t:this.meta.type},e)}}class Bi{constructor(e){var t,n,r;t=this,r=void 0,(n=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(n="meta"))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;const o=e.getMetaConstructor();this.meta=new o}getMeta(){return this.meta}updateMeta(e){(0,v.X$)(this.meta,e),Di(this.meta,e,e)}}function Wi(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class ji{constructor(e){Wi(this,"valueFactory",void 0),Wi(this,"data",[]),Wi(this,"index",[]),Wi(this,"holes",new Set),this.valueFactory=e}obtain(e){Hi((()=>Pi(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;Hi((()=>Pi(e)||Fi(e)),"Expecting an unsigned number or null/undefined argument.");const n=[],r=this.data.length;for(let e=0;e<t;e++)n.push(r+e),this.data.push(void 0);const o=Fi(e)?this.index.length:e;this.index=[...this.index.slice(0,o),...n,...this.index.slice(o)]}remove(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;Hi((()=>Pi(e)||Fi(e)),"Expecting an unsigned number or null/undefined argument.");const n=this.index.splice(Fi(e)?this.index.length-t:e,t);for(let e=0;e<n.length;e++){const t=n[e];"number"==typeof t&&this.holes.add(t)}}size(){return this.data.length-this.holes.size}values(){return this.data.filter(((e,t)=>void 0!==e&&!this.holes.has(t)))[Symbol.iterator]()}entries(){const e=[];for(let t=0;t<this.data.length;t++){const n=this._getKeyByStorageIndex(t);-1!==n&&void 0!==this.data[t]&&e.push([n,this.data[t]])}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 zi(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Gi=["data","width"];class $i{constructor(e){zi(this,"globalMeta",void 0),zi(this,"metas",new ji((()=>this._createMeta()))),this.globalMeta=e,this.metas=new ji((()=>this._createMeta()))}updateMeta(e,t){const n=this.getMeta(e);(0,v.X$)(n,t),Di(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 function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];function n(){}(0,v.IL)(n,e);for(let e=0;e<t.length;e++)n.prototype[t[e]]=void 0;return n}(this.globalMeta.getMetaConstructor(),Gi).prototype}}function Ki(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Xi{constructor(e){Ki(this,"columnMeta",void 0),Ki(this,"metas",new ji((()=>this._createRow()))),this.columnMeta=e}updateMeta(e,t,n){const r=this.getMeta(e,t);(0,v.X$)(r,n),Di(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 o;const i=this.metas.obtain(e).obtain(t);null===(o=i._automaticallyAssignedMetaProps)||void 0===o||o.delete(n),i[n]=r}removeMeta(e,t,n){delete this.metas.obtain(e).obtain(t)[n]}getMetas(){const e=[],t=Array.from(this.metas.values());for(let n=0;n<t.length;n++)(0,i.O9)(t[n])&&e.push(...t[n].values());return e}getMetasAtRow(e){Hi((()=>Pi(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 ji((e=>this._createMeta(e)))}_createMeta(e){return new(this.columnMeta.getMetaConstructor(e))}}class qi{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 Ui(e),this.tableMeta=new Bi(this.globalMeta),this.columnMeta=new $i(this.globalMeta),this.cellMeta=new Xi(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){const r=this.cellMeta.getMeta(e,t);return r.visualRow=n.visualRow,r.visualCol=n.visualColumn,r.row=e,r.col=t,n.skipMetaExtension||this.runLocalHooks("afterGetCellMeta",r),r}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 Qi(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}(0,v.co)(qi,Jr.A);class Ji{constructor(e){var t=this;Qi(this,"metaManager",void 0),Qi(this,"metaSyncMemo",new Map),this.metaManager=e,e.addLocalHook("afterGetCellMeta",(function(){return t.extendCellMeta(...arguments)})),_o.R.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:i,visualCol:s}=e,a=this.metaManager.hot,l=a.colToProp(s);e.prop=l,a.runHooks("beforeGetCellMeta",i,s,e);const u=(0,v.mQ)(e,"type")?e.type:null;let h=(0,o.Tn)(e.cells)?e.cells(n,r,l):null;var c;u&&(h?h.type=null!==(c=h.type)&&void 0!==c?c:u:h={type:u}),h&&this.metaManager.updateCellMeta(n,r,h),a.runHooks("afterGetCellMeta",i,s,e),this.metaSyncMemo.has(n)||this.metaSyncMemo.set(n,new Set),this.metaSyncMemo.get(n).add(r)}}function Zi(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var es=new WeakMap;class ts{constructor(e){var t,n,r;Zi(this,"metaManager",void 0),Zi(this,"usageTracker",new Set),Zi(this,"propDescriptors",new Map([["ariaTags",{initOnly:!0}],["fixedColumnsLeft",{target:"fixedColumnsStart",onChange(e){if(this.metaManager.hot.isRtl()&&"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}]])),r=(e,t,n)=>{if(!n)throw new Error(`The \`${e}\` option can not be updated after the Handsontable is initialized.`)},function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=es),n.set(t,r),this.metaManager=e,this.extendMetaProps()}extendMetaProps(){this.propDescriptors.forEach(((e,t)=>{const{initOnly:n,target:r,onChange:o}=e,i="string"==typeof r,s=i?r:t,a=`_${s}`;var l,u;this.metaManager.globalMeta.meta[a]=this.metaManager.globalMeta.meta[s],o?(this.installPropWatcher(t,a,o),i&&this.installPropWatcher(r,a,o)):n&&(this.installPropWatcher(t,a,(u=this,(l=es).get(function(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")}(l,u)))),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(o){const i=!r.usageTracker.has(e);r.usageTracker.add(e),n.call(r,e,o,i),this[t]=o},enumerable:!0,configurable:!0})}}var ns=n(13431);function rs(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class os{static get DESTINATION_RENDERER(){return 1}static get DESTINATION_CLIPBOARD_GENERATOR(){return 2}constructor(e,t,n){rs(this,"hot",void 0),rs(this,"metaManager",void 0),rs(this,"tableMeta",void 0),rs(this,"dataSource",void 0),rs(this,"duckSchema",void 0),rs(this,"colToPropCache",void 0),rs(this,"propToColCache",void 0),this.hot=e,this.metaManager=n,this.tableMeta=n.getTableMeta(),this.dataSource=t,this.refreshDuckSchema(),this.createMap()}createMap(){const e=this.getSchema();if(void 0===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,o=0,i=!1;if("function"==typeof t){const t=(0,v.$3)(e);r=t>0?t:this.countFirstRowKeys(),i=!0}else{const e=this.tableMeta.maxCols;r=Math.min(e,t.length)}for(n=0;n<r;n++){const e=i?t(n):t[n];if((0,v.Gv)(e)){if(void 0!==e.data){const t=i?o:n;this.colToPropCache[t]=e.data,this.propToColCache.set(e.data,t)}o+=1}}}else this.recursiveDuckColumns(e)}countFirstRowKeys(){return(0,Ur.E)(this.dataSource)}recursiveDuckColumns(e,t,n){let r,o=t,i=n;return void 0===o&&(o=0,i=""),"object"!=typeof e||Array.isArray(e)||(0,v.v4)(e,((e,t)=>{null===e?(r=i+t,this.colToPropCache.push(r),this.propToColCache.set(r,o),o+=1):o=this.recursiveDuckColumns(e,o,`${t}.`)})),o}colToProp(e){if(!1===Number.isInteger(e))return e;const t=this.hot.toPhysicalColumn(e);return null===t?e:this.colToPropCache&&(0,i.O9)(this.colToPropCache[t])?this.colToPropCache[t]:t}propToCol(e){const t=this.propToColCache.get(e);if((0,i.O9)(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]?(0,v.Nl)(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 o=this.hot.countSourceRows();let i=o,s=0,a=e;if(("number"!=typeof a||a>=o)&&(a=o),a<this.hot.countRows()&&(i=this.hot.toPhysicalRow(a)),!1===this.hot.runHooks("beforeCreateRow",a,t,n)||null===i)return{delta:0};const l=this.tableMeta.maxRows,u=this.getSchema().length,h=[];for(;s<t&&o+s<l;){let e=null;"array"===this.hot.dataType?this.tableMeta.dataSchema?e=(0,v.Go)(this.getSchema()):(e=[],(0,j.Ti)(u-1,(()=>e.push(null)))):"function"===this.hot.dataType?e=this.tableMeta.dataSchema(a+s):(e={},(0,v.zw)(e,this.getSchema())),h.push(e),s+=1}this.hot.rowIndexMapper.insertIndexes(a,s),"below"===r&&(i=Math.min(i+1,o)),this.spliceData(i,0,h);const c=this.hot.toVisualRow(i);return this.hot.countSourceRows()===h.length&&this.hot.columnIndexMapper.initToLength(this.hot.getInitialColumnCount()),s>0&&(null==e?this.metaManager.createRow(null,s):"auto"!==n&&this.metaManager.createRow(i,t)),this.hot.runHooks("afterCreateRow",c,s,n),{delta:s,startPhysicalIndex:i}}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 o=this.dataSource,i=this.tableMeta.maxCols,s=this.hot.countSourceCols();let a=e;if(("number"!=typeof a||a>=s)&&(a=s),!1===this.hot.runHooks("beforeCreateCol",a,t,n))return{delta:0};let l=s;a<this.hot.countCols()&&(l=this.hot.toPhysicalColumn(a));const u=this.hot.countSourceRows();let h=this.hot.countCols(),c=0,d=l;"end"===r&&(d=Math.min(d+1,s));const m=d;for(;c<t&&h<i;){if("number"!=typeof a||a>=h)if(u>0)for(let e=0;e<u;e+=1)void 0===o[e]&&(o[e]=[]),o[e].push(null);else o.push([null]);else for(let e=0;e<u;e++)o[e].splice(d,0,null);c+=1,d+=1,h+=1}this.hot.columnIndexMapper.insertIndexes(a,c),c>0&&(null==e?this.metaManager.createColumn(null,c):"auto"!==n&&this.metaManager.createColumn(m,t));const p=this.hot.toVisualColumn(m);return this.hot.runHooks("afterCreateCol",p,c,n),this.refreshDuckSchema(),{delta:c,startPhysicalIndex:m}}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 o=this.visualRowsToPhysical(r,t),s=this.hot.countSourceRows();if(r=(s+r)%s,!1===this.hot.runHooks("beforeRemoveRow",r,o.length,o,n))return!1;const a=o.length;if(this.filterData(r,a,o),r<this.hot.countRows()){this.hot.rowIndexMapper.removeIndexes(o);const e=(0,i.O9)(this.tableMeta.columns)||(0,i.O9)(this.tableMeta.dataSchema)||this.tableMeta.colHeaders;0!==this.hot.rowIndexMapper.getNotTrimmedIndexesLength()||e||this.hot.columnIndexMapper.setIndexesSequence([])}return o.slice(0).sort(((e,t)=>t-e)).forEach((e=>{this.metaManager.removeRow(e,1)})),this.hot.runHooks("afterRemoveRow",r,a,o,n),!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 o=this.visualColumnsToPhysical(r,t),i=o.slice(0).sort(((e,t)=>t-e));if(!1===this.hot.runHooks("beforeRemoveCol",r,t,o,n))return!1;let s=!0;const a=i.length,l=this.dataSource;for(let e=0;e<a;e++)s&&o[0]!==o[e]-e&&(s=!1);if(s)for(let e=0,n=this.hot.countSourceRows();e<n;e++)l[e].splice(o[0],t),0===e&&this.metaManager.removeColumn(o[0],t);else for(let e=0,t=this.hot.countSourceRows();e<t;e++)for(let t=0;t<a;t++)l[e].splice(i[t],1),0===e&&this.metaManager.removeColumn(i[t],1);return r<this.hot.countCols()&&(this.hot.columnIndexMapper.removeIndexes(o),this.tableMeta.rowHeaders||0!==this.hot.columnIndexMapper.getNotTrimmedIndexesLength()||this.hot.rowIndexMapper.setIndexesSequence([])),this.hot.runHooks("afterRemoveCol",r,t,o,n),this.refreshDuckSchema(),!0}spliceCol(e,t,n){const r=this.hot.getDataAtCol(e),o=r.slice(t,t+n),i=r.slice(t+n);for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l<s;l++)a[l-3]=arguments[l];(0,F.Sh)(a,i);let u=0;for(;u<n;)a.push(null),u+=1;return(0,F.Zz)(a),this.hot.populateFromArray(t,e,a,null,null,"spliceCol"),o}spliceRow(e,t,n){const r=this.hot.getSourceDataAtRow(e),o=r.slice(t,t+n),i=r.slice(t+n);for(var s=arguments.length,a=new Array(s>3?s-3:0),l=3;l<s;l++)a[l-3]=arguments[l];(0,F.Sh)(a,i);let u=0;for(;u<n;)a.push(null),u+=1;return this.hot.populateFromArray(e,t,[a],null,null,"spliceRow"),o}spliceData(e,t,n){if(!1!==this.hot.runHooks("beforeDataSplice",e,t,n)){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 o=this.hot.runHooks("modifyRowData",n);r=isNaN(o)?o:r;const{dataDotNotation:i}=this.hot.getSettings();let s=null;if(r&&r.hasOwnProperty&&(0,v.mQ)(r,t))s=r[t];else if(i&&"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]],void 0===e)return null;s=e}else"function"==typeof t&&(s=t(this.dataSource.slice(n,n+1)[0]));if(this.hot.hasHook("modifyData")){const e=(0,v.nA)(s);this.hot.runHooks("modifyData",n,this.propToCol(t),e,"get"),e.isTouched()&&(s=e.value)}return s}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 o=n,i=this.dataSource[r];const s=this.hot.runHooks("modifyRowData",r);if(i=isNaN(s)?s:i,this.hot.hasHook("modifyData")){const e=(0,v.nA)(o);this.hot.runHooks("modifyData",r,this.propToCol(t),e,"set"),e.isTouched()&&(o=e.value)}const{dataDotNotation:a}=this.hot.getSettings();if(i&&i.hasOwnProperty&&(0,v.mQ)(i,t))i[t]=o;else if(a&&"string"==typeof t&&t.indexOf(".")>-1){let e,n=i,r=0;const s=t.split(".");for(r=0,e=s.length-1;r<e;r++){if("__proto__"===s[r]||"constructor"===s[r]||"prototype"===s[r])return;void 0===n[s[r]]&&(n[s[r]]={}),n=n[s[r]]}n[s[r]]=o}else if("function"==typeof t)t(this.dataSource.slice(r,r+1)[0],o);else{if("__proto__"===t||"constructor"===t||"prototype"===t)return;i[t]=o}}visualRowsToPhysical(e,t){const n=this.hot.countSourceRows(),r=[];let o,i=(n+e)%n,s=t;for(;i<n&&s;)o=this.hot.toPhysicalRow(i),r.push(o),s-=1,i+=1;return r}visualColumnsToPhysical(e,t){const n=this.hot.countCols(),r=[];let o=(n+e)%n,i=t;for(;o<n&&i;){const e=this.hot.toPhysicalColumn(o);r.push(e),i-=1,o+=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,os.DESTINATION_RENDERER):[]}countCachedColumns(){return this.colToPropCache.length}getRange(e,t,n){const r=[];let o,i,s;const a=this.tableMeta.maxRows,l=this.tableMeta.maxCols;if(0===a||0===l)return[];const u=n===os.DESTINATION_CLIPBOARD_GENERATOR?this.getCopyable:this.get,h=Math.min(Math.max(a-1,0),Math.max(e.row,t.row)),c=Math.min(Math.max(l-1,0),Math.max(e.col,t.col));for(o=Math.min(e.row,t.row);o<=h;o++){s=[];const n=o>=0?this.hot.toPhysicalRow(o):o;for(i=Math.min(e.col,t.col);i<=c&&null!==n;i++)s.push(u.call(this,o,this.colToProp(i)));null!==n&&r.push(s)}return r}getText(e,t){return(0,ns.A)(this.getRange(e,t,os.DESTINATION_RENDERER))}getCopyableText(e,t){return(0,ns.A)(this.getRange(e,t,os.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}}const is=os;function ss(e,t,n,i){const{hotInstance:s,dataMap:a,dataSource:l,internalSource:u,source:h,metaManager:c,firstRun:d}=i,m=(0,W.Ob)(u),p=s.getSettings();Array.isArray(p.dataSchema)?s.dataType="array":(0,o.Tn)(p.dataSchema)?s.dataType="function":s.dataType="object",a&&a.destroy(),e=s.runHooks(`before${m}`,e,d,h);const f=new is(s,e,c);if(t(f),"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=f.getSchema();let n;e=[];let r=0,o=0;for(r=0,o=p.startRows;r<o;r++)if("object"!==s.dataType&&"function"!==s.dataType||!p.dataSchema)if("array"===s.dataType)n=(0,v.Go)(t[0]),e.push(n);else{n=[];for(let e=0,t=p.startCols;e<t;e++)n.push(null);e.push(n)}else n=(0,v.Go)(t),e.push(n)}}Array.isArray(e[0])&&(s.dataType="array"),p.data=e,f.dataSource=e,l.data=e,l.dataType=s.dataType,l.colToProp=f.colToProp.bind(f),l.propToCol=f.propToCol.bind(f),l.countCachedColumns=f.countCachedColumns.bind(f),n(f),s.runHooks(`after${m}`,e,d,h),d||(s.runHooks("afterChange",null,u),s.render()),s.getSettings().ariaTags&&(0,r.Bq)(s.rootElement,[(0,Ee.DZ)(-1),(0,Ee.Nb)(s.countCols()+(s.view?s.countRowHeaders():0))])}function as(e){(0,r.sb)(e)&&e.scrollIntoView({block:"nearest",inline:"nearest"})}function ls(e){const{selection:t,view:n}=e,r=e.getSelectedRangeLast(),o=t.getSelectionSource(),i=n.getFirstFullyVisibleColumn(),s=n.getLastFullyVisibleColumn(),a=r.getTopStartCorner().col,l=r.getBottomEndCorner().col,u=a<=i,h=l>=s,c=n.getFirstFullyVisibleRow(),d=n.getLastFullyVisibleRow(),m=r.getTopStartCorner().row,p=r.getBottomEndCorner().row,f=m<=c,g=p>=d;return{getComputedColumnTarget:e=>"mouse"===o||"keyboard"===o?e.col:u&&h?r.highlight.col:u?a:h?l:e.col,getComputedRowTarget:e=>"mouse"===o||"keyboard"===o?e.row:f&&g?r.highlight.row:f?m:g?p:e.row}}var us=n(79720);function hs(e){const t=e.rootDocument.createElement("input");return t.type="text",t.name="__htFocusCatcher",t.classList.add("htFocusCatcher"),e.getSettings().ariaTags&&(0,r.Bq)(t,[(0,Ee.SM)("Focus catcher")]),t}function cs(e){const{rowIndexMapper:t,columnIndexMapper:n}=e,{navigableHeaders:r}=e.getSettings();let o=r&&e.countColHeaders()>0?-e.countColHeaders():0,i=r&&e.countRowHeaders()>0?-e.countRowHeaders():0;return 0===o&&(o=t.getVisualFromRenderableIndex(o)),0===i&&(i=n.getVisualFromRenderableIndex(i)),null===o||null===i?null:e._createCellCoords(o,i)}function ds(e){var t,n;const{rowIndexMapper:r,columnIndexMapper:o}=e,{navigableHeaders:i}=e.getSettings();let s=r.getRenderableIndexesLength()-1,a=o.getRenderableIndexesLength()-1;if(s<0){if(!i||0===e.countColHeaders())return null;s=-1}if(a<0){if(!i||0===e.countColHeaders())return null;a=-1}return e._createCellCoords(null!==(t=r.getVisualFromRenderableIndex(s))&&void 0!==t?t:s,null!==(n=o.getVisualFromRenderableIndex(a))&&void 0!==n?n:a)}var ms=n(85428);const ps=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"]]),fs=e=>e.map((e=>{const t=e.toLowerCase();return ps.has(t)?ps.get(t):t})).sort().join("+"),gs=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"]]),ys=e=>{let{which:t,key:n}=e;if(gs.has(t))return gs.get(t);const r=String.fromCharCode(t).toLowerCase();return/^[a-z0-9]$/.test(r)?r:n.toLowerCase()},ws=Symbol("shortcut-context");function vs(e){return(0,v.Gv)(e)&&e.__kindOf===ws}const _s=["meta","alt","shift","control"],bs=function(){const e=new Set;return{press(t){e.add(t)},release(t){e.delete(t)},releaseAll(){e.clear()},isPressed:t=>e.has(t)}}(),Ss=[];let Cs=0;const Es={name:"editorCloseAndSave",callback(e){e._getEditorManager().closeEditorAndSaveChanges()}};var Ms=n(32564);const Ts={name:"editorCloseAndSaveByArrowKeys",callback(e,t,n){const r=e._getEditorManager(),o=r.getActiveEditor();o.isInFullEditMode()&&o.state===Ms._T.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())}},Rs={name:"editorCloseAndSaveByEnter",callback(e,t){const n=e._getEditorManager();n.closeEditorAndSaveChanges(t.ctrlKey||t.metaKey),n.moveSelectionAfterEnter(t)}},As={name:"editorCloseWithoutSaving",callback(e){const t=e._getEditorManager();t.closeEditorAndRestoreOriginalValue(e.getShortcutManager().isCtrlPressed()),t.activeEditor.focus()}},Ns={name:"editorFastOpen",callback(e,t){const{highlight:n}=e.getSelectedRangeLast();n.isHeader()||e._getEditorManager().openEditor(null,t,!0)}},Ls={name:"editorOpen",callback(e,t,n){const r=e._getEditorManager(),o=e.getSelectedRangeLast(),{highlight:i}=o;if(e.selection.isMultiple()&&!o.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0){const r=e.getSettings(),o="function"==typeof r.enterMoves?r.enterMoves(t):r.enterMoves;n.includes("shift")?e.selection.transformFocus(-o.row,-o.col):e.selection.transformFocus(o.row,o.col)}else i.isHeader()||(e.getSettings().enterBeginsEditing?r.cellProperties.readOnly?r.moveSelectionAfterEnter(t):r.openEditor(null,t,!0):r.moveSelectionAfterEnter(t),(0,l.CA)(t))}},xs={name:"extendCellsSelectionDown",callback(e){const{selection:t}=e,{highlight:n}=e.getSelectedRangeLast();t.isSelectedByColumnHeader()||t.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&t.isSelectedByRowHeader())||(t.markSource("keyboard"),t.transformEnd(1,0),t.markEndSource())}},Os={name:"extendCellsSelectionDownByViewportHeight",callback(e){const{selection:t,rowIndexMapper:n}=e,{to:r}=e.getSelectedRangeLast(),o=Math.min(r.row+e.countVisibleRows(),e.countRows()-1),i=n.getNearestNotHiddenIndex(o,-1);if(null!==i){const n=e._createCellCoords(i,r.col),o=r.row-e.getFirstFullyVisibleRow(),s=Math.min(n.row-o,e.countRows()-1);t.markSource("keyboard"),t.setRangeEnd(n),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},Is={name:"extendCellsSelectionLeft",callback(e){const{selection:t}=e,{highlight:n}=e.getSelectedRangeLast();t.isSelectedByRowHeader()||t.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&t.isSelectedByColumnHeader())||(t.markSource("keyboard"),t.transformEnd(0,-1*e.getDirectionFactor()),t.markEndSource())}},ks={name:"extendCellsSelectionRight",callback(e){const{selection:t}=e,{highlight:n}=e.getSelectedRangeLast();t.isSelectedByRowHeader()||t.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&t.isSelectedByColumnHeader())||(t.markSource("keyboard"),t.transformEnd(0,e.getDirectionFactor()),t.markEndSource())}},Ds={name:"extendCellsSelectionToColumns",callback(e){const{selection:t}=e,{highlight:n,from:r,to:o}=e.getSelectedRangeLast();t.markSource("keyboard"),t.isSelectedByRowHeader()?t.selectAll(!0,!0):e.selectColumns(r.col,o.col,n),t.markEndSource()}},Ps={name:"extendCellsSelectionToMostBottom",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast(),s=r.isHeader()&&t.isSelectedByRowHeader();if(r.isCell()||s){const a=n.getNearestNotHiddenIndex(e.countRows()-1,-1),l=o.clone();l.row=r.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,r.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},Hs={name:"extendCellsSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&r.isCell()){const s=n.getNearestNotHiddenIndex(e.countCols()-1,-1),a=o.clone();a.col=r.col,t.markSource("keyboard"),t.setRangeStart(a,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(i.row,s)),t.markEndSource()}}},Fs={name:"extendCellsSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast();if(!t.isSelectedByRowHeader()&&!t.isSelectedByCorner()&&r.isCell()){const s=parseInt(e.getSettings().fixedColumnsStart,10),a=n.getNearestNotHiddenIndex(s,1),l=o.clone();l.col=r.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,r.clone()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},Ys={name:"extendCellsSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast(),s=r.isHeader()&&t.isSelectedByColumnHeader();if(r.isCell()||s){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]),l=o.clone();l.col=r.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,r.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},Vs={name:"extendCellsSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast(),s=r.isHeader()&&t.isSelectedByColumnHeader();if(r.isCell()||s){const a=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]),l=o.clone();l.col=r.col,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,r.clone()),s&&t.selectedByColumnHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(i.row,a)),t.markEndSource()}}},Us={name:"extendCellsSelectionToMostTop",callback(e){const{selection:t,rowIndexMapper:n}=e,{highlight:r,from:o,to:i}=e.getSelectedRangeLast(),s=r.isHeader()&&t.isSelectedByRowHeader();if(r.isCell()||s){const a=n.getNearestNotHiddenIndex(0,1),l=o.clone();l.row=r.row,t.markSource("keyboard"),t.setRangeStart(l,void 0,!1,r.clone()),s&&t.selectedByRowHeader.add(t.getLayerLevel()),t.setRangeEnd(e._createCellCoords(a,i.col)),t.markEndSource()}}},Bs={name:"extendCellsSelectionToRows",callback(e){const{selection:t}=e,{highlight:n,from:r,to:o}=e.getSelectedRangeLast();t.markSource("keyboard"),t.isSelectedByColumnHeader()?t.selectAll(!0,!0):e.selectRows(r.row,o.row,n),t.markEndSource()}},Ws={name:"extendCellsSelectionUp",callback(e){const{selection:t}=e,{highlight:n}=e.getSelectedRangeLast();t.isSelectedByColumnHeader()||t.isSelectedByCorner()||!(n.isCell()||n.isHeader()&&t.isSelectedByRowHeader())||(t.markSource("keyboard"),t.transformEnd(-1,0),t.markEndSource())}},js={name:"extendCellsSelectionUpByViewportHeight",callback(e){const{selection:t,rowIndexMapper:n}=e,{to:r}=e.getSelectedRangeLast(),o=Math.max(r.row-e.countVisibleRows(),0),i=n.getNearestNotHiddenIndex(o,1);if(null!==i){const n=e._createCellCoords(i,r.col),o=r.row-e.getFirstFullyVisibleRow(),s=Math.max(n.row-o,0);t.markSource("keyboard"),t.setRangeEnd(n),t.markEndSource(),e.scrollViewportTo({row:s,verticalSnap:"top",horizontalSnap:"start"})}}},zs={name:"moveCellSelectionDown",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(1,0),t.markEndSource()}},Gs={name:"moveCellSelectionDownByViewportHeight",callback(e){const{selection:t}=e,{navigableHeaders:n}=e.getSettings(),r=n?e.countColHeaders():0,{row:o}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+r;i=0===i?1:i,o===e.countRows()-1?i=1:o+i>e.countRows()&&(i=e.countRows()-o-1),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource(),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}},$s={name:"moveCellSelectionInlineEnd",callback(e,t){const{selection:n}=e,r=e.getSettings(),o=e.getSelectedRangeLast(),i="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;n.markSource("keyboard"),n.isMultiple()&&!o.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?n.transformFocus(-i.row,-i.col):n.transformStart(-i.row,-i.col),n.markEndSource()}},Ks={name:"moveCellSelectionInlineStart",callback(e,t){const{selection:n}=e,r=e.getSettings(),o=e.getSelectedRangeLast(),i="function"==typeof r.tabMoves?r.tabMoves(t):r.tabMoves;n.markSource("keyboard"),n.isMultiple()&&!o.isHeader()&&e.countRenderedCols()>0&&e.countRenderedRows()>0?n.transformFocus(i.row,i.col):n.transformStart(i.row,i.col),n.markEndSource()}},Xs={name:"moveCellSelectionLeft",callback(e){const{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,-1*e.getDirectionFactor()),t.markEndSource()}},qs={name:"moveCellSelectionRight",callback(e){const{selection:t}=e;t.markSource("keyboard"),t.transformStart(0,e.getDirectionFactor()),t.markEndSource()}},Qs={name:"moveCellSelectionToMostBottom",callback(e){const{selection:t}=e,{col:n}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(e.countRows()-1,-1);null===r&&(r=-1),t.setRangeStart(e._createCellCoords(r,n))}},Js={name:"moveCellSelectionToMostBottomInlineEnd",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,o=parseInt(e.getSettings().fixedRowsBottom,10),i=n.getNearestNotHiddenIndex(e.countRows()-o-1,-1),s=r.getNearestNotHiddenIndex(e.countCols()-1,-1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(i,s)),t.markEndSource()}},Zs={name:"moveCellSelectionToMostInlineEnd",callback(e){const{selection:t,columnIndexMapper:n}=e;t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(e.getSelectedRangeLast().highlight.row,n.getNearestNotHiddenIndex(e.countCols()-1,-1))),t.markEndSource()}},ea={name:"moveCellSelectionToMostInlineStart",callback(e){const{selection:t,columnIndexMapper:n}=e,r=parseInt(e.getSettings().fixedColumnsStart,10),o=e.getSelectedRangeLast().highlight.row,i=n.getNearestNotHiddenIndex(r,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(o,i)),t.markEndSource()}},ta={name:"moveCellSelectionToMostLeft",callback(e){const{selection:t,columnIndexMapper:n}=e,r=e.getSelectedRangeLast().highlight.row;let o=n.getNearestNotHiddenIndex(...e.isRtl()?[e.countCols()-1,-1]:[0,1]);null===o&&(o=e.isRtl()?-1:-e.countRowHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(r,o)),t.markEndSource()}},na={name:"moveCellSelectionToMostRight",callback(e){const{selection:t,columnIndexMapper:n}=e,{row:r}=e.getSelectedRangeLast().highlight;let o=n.getNearestNotHiddenIndex(...e.isRtl()?[0,1]:[e.countCols()-1,-1]);null===o&&(o=e.isRtl()?-e.countRowHeaders():-1),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(r,o)),t.markEndSource()}},ra={name:"moveCellSelectionToMostTop",callback(e){const{selection:t}=e,{col:n}=e.getSelectedRangeLast().highlight;let r=e.rowIndexMapper.getNearestNotHiddenIndex(0,1);null===r&&(r=-e.countColHeaders()),t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(r,n)),t.markEndSource()}},oa={name:"moveCellSelectionToMostTopInlineStart",callback(e){const{selection:t,rowIndexMapper:n,columnIndexMapper:r}=e,o=parseInt(e.getSettings().fixedRowsTop,10),i=parseInt(e.getSettings().fixedColumnsStart,10),s=n.getNearestNotHiddenIndex(o,1),a=r.getNearestNotHiddenIndex(i,1);t.markSource("keyboard"),t.setRangeStart(e._createCellCoords(s,a)),t.markEndSource()}},ia={name:"moveCellSelectionUp",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.transformStart(-1,0),t.markEndSource()}},sa={name:"moveCellSelectionUpByViewportHight",callback(e){const{selection:t}=e,{navigableHeaders:n}=e.getSettings(),r=n?e.countColHeaders():0,{row:o}=e.getSelectedRangeLast().highlight;let i=e.countVisibleRows()+r;i=0===i?-1:-i,o===-r?i=-1:o+i<r&&(i=-(o+r)),t.markSource("keyboard"),t.transformStart(i,0),t.markEndSource(),e.getSelectedRangeLast().highlight.row<0&&e.scrollViewportTo({row:0})}},aa={name:"emptySelectedCells",callback(e){e.emptySelectedCells(),e._getEditorManager().prepareEditor()}},la={name:"scrollToFocusedCell",callback(e){const{highlight:t}=e.getSelectedRangeLast(),n=e.getFirstFullyVisibleRow()-1,r=e.getFirstFullyVisibleColumn()-1,o=e.getLastFullyVisibleRow()+1,i=e.getLastFullyVisibleColumn()+1,s=e._createCellCoords(n,r),a=e._createCellCoords(o,i);if(!e._createCellRange(s,s,a).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"})}}},ua={name:"selectAllCells",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!0}),t.markEndSource()}},ha={name:"selectAllCellsAndHeaders",callback(e){let{selection:t}=e;t.markSource("keyboard"),t.selectAll(!0,!0,{disableHeadersHighlight:!1}),t.markEndSource()}},ca={name:"populateSelectedCellsData",callback(e){const t=e.getSelectedRange(),{row:n,col:r}=t[t.length-1].highlight.normalize(),o=e.getDataAtCell(n,r),i=new Map;for(let s=0;s<t.length;s++)t[s].forAll(((t,s)=>{if(t>=0&&s>=0&&(t!==n||s!==r)){const{readOnly:n}=e.getCellMeta(t,s);n||i.set(`${t}x${s}`,[t,s,o])}}));e.setDataAtCell(Array.from(i.values()))}},da=[Es,Ts,Rs,As,Ns,Ls,xs,Os,Is,ks,Ds,Ps,Hs,Fs,Ys,Vs,Us,Bs,Ws,js,zs,Gs,$s,Ks,Xs,qs,Qs,Js,Zs,ea,ta,na,ra,oa,ia,sa,aa,la,ua,ha,ca];function ma(e){const t={};return da.forEach((n=>{let{name:r,callback:o}=n;t[r]=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return o(e,...n)}})),t}function pa(e){const t=e.getShortcutManager().addContext("editor"),n=ma(e),r={group:us.b};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()}],r)}function fa(e){const t=e.getShortcutManager().addContext("grid"),n=ma(e),r={runOnlyIf:()=>{const{navigableHeaders:t}=e.getSettings();return(0,i.O9)(e.getSelected())&&(t||!t&&e.countRenderedRows()>0&&e.countRenderedCols()>0)},group:us.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:us.b,runOnlyIf:()=>(0,i.O9)(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()}],r)}function ga(e){const{classNames:t}=(0,r.Oe)(e,/ht-theme-[a-zA-Z0-9_-]+/);return t.pop()}let ya=null;const wa=new Map;function va(e,t){var n,a=this;let c=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=this;const m=new h.A(d);let p,f,g,y,_,b,S=!0;_r(c)&&function(e){wr.set(e,!0)}(this),this.rootElement=e,this.rootDocument=e.ownerDocument,this.rootWindow=this.rootDocument.defaultView,this.isDestroyed=!1,this.renderSuspendedCounter=0,this.executionSuspendedCounter=0;const C=null!==(n=null==t?void 0:t.layoutDirection)&&void 0!==n?n:"inherit",E=["rtl","ltr"].includes(C)?C:this.rootWindow.getComputedStyle(this.rootElement).direction;this.rootElement.setAttribute("dir",E),this.isRtl=function(){return"rtl"===E},this.isLtr=function(){return!d.isRtl()},this.getDirectionFactor=function(){return d.isLtr()?1:-1},t.language=function(e){let t=bo(e);return Po(t)||(t=No,So(e)),t}(t.language);const M=Object.fromEntries(Object.entries(t).filter((e=>{let[t]=e;return!(_o.R.getSingleton().isRegistered(t)||_o.R.getSingleton().isDeprecated(t))}))),T=new qi(d,M,[Ji,ts]),R=T.getTableMeta(),A=T.getGlobalMeta(),N=(0,ms.u)();this.container=this.rootDocument.createElement("div"),e.insertBefore(this.container,e.firstChild),br(this)&&((0,i.k_)(t.licenseKey,e),(0,r.iQ)(e,"ht-wrapper")),this.guid=`ht_${(0,W.DU)()}`,wa.set(this.guid,this),this.columnIndexMapper=new vo,this.rowIndexMapper=new vo,this.columnIndexMapper.addLocalHook("indexesSequenceChange",(e=>{d.runHooks("afterColumnSequenceChange",e)})),this.rowIndexMapper.addLocalHook("indexesSequenceChange",(e=>{d.runHooks("afterRowSequenceChange",e)})),m.addEventListener(this.rootDocument.documentElement,"compositionstart",(e=>{d.runHooks("beforeCompositionStart",e)})),f=new Wr(d),this.rootElement.id&&"ht_"!==this.rootElement.id.substring(0,3)||(this.rootElement.id=this.guid);let L=new Ii(R,{rowIndexMapper:d.rowIndexMapper,columnIndexMapper:d.columnIndexMapper,countCols:()=>d.countCols(),countRows:()=>d.countRows(),propToCol:e=>p.propToCol(e),isEditorOpened:()=>!!d.getActiveEditor()&&d.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:()=>d.getShortcutManager(),createCellCoords:(e,t)=>d._createCellCoords(e,t),createCellRange:(e,t,n)=>d._createCellRange(e,t,n),visualToRenderableCoords:e=>{const{row:t,col:n}=e;return d._createCellCoords(t>=0?d.rowIndexMapper.getRenderableFromVisualIndex(t):t,n>=0?d.columnIndexMapper.getRenderableFromVisualIndex(n):n)},renderableToVisualCoords:e=>{const{row:t,col:n}=e;return d._createCellCoords(t>=0?d.rowIndexMapper.getVisualFromRenderableIndex(t):t,n>=0?d.columnIndexMapper.getVisualFromRenderableIndex(n):n)},findFirstNonHiddenRenderableRow:(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),o=Math.max(e,t),i=d.rowIndexMapper.getNearestNotHiddenIndex(e,n);return null===i||1===n&&i>o||-1===n&&i<r?null:i>=0?d.rowIndexMapper.getRenderableFromVisualIndex(i):i},findFirstNonHiddenRenderableColumn:(e,t)=>{const n=t>e?1:-1,r=Math.min(e,t),o=Math.max(e,t),i=d.columnIndexMapper.getNearestNotHiddenIndex(e,n);return null===i||1===n&&i>o||-1===n&&i<r?null:i>=0?d.columnIndexMapper.getRenderableFromVisualIndex(i):i},isDisabledCellSelection:(e,t)=>e<0||t<0?d.getSettings().disableVisualSelection:d.getCellMeta(e,t).disableVisualSelection});this.selection=L;const x=e=>{let{hiddenIndexesChanged:t}=e;this.forceFullRender=!0,t&&this.selection.commit()};function O(e,t){const n="className"===e?d.rootElement:d.table;if(S)(0,r.iQ)(n,t);else{let o=[],i=[];A[e]&&(o=Array.isArray(A[e])?A[e]:(0,F.Gn)(A[e])),t&&(i=Array.isArray(t)?t:(0,F.Gn)(t));const s=(0,F.fg)(o,i),a=(0,F.fg)(i,o);s.length&&(0,r.vy)(n,s),a.length&&(0,r.iQ)(n,a)}A[e]=t}function k(){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 D(e){const t=e.replace(",",".");return!1===isNaN(parseFloat(t))?parseFloat(t):e}function P(e,t,n){if(!e.length)return void n();const r=d.getActiveEditor(),o=new k;let i=!0;o.onQueueEmpty=()=>{r&&i&&r.cancelChanges(),n()};for(let n=e.length-1;n>=0;n--){const[r,s]=e[n],a=p.propToCol(s);let l;l=Number.isInteger(a)?d.getCellMeta(r,a):{...Object.getPrototypeOf(R),...R},d.getCellValidator(l)&&(o.addValidatorToQueue(),d.validateCell(e[n][3],l,function(t,n){return function(r){if("boolean"!=typeof r)throw new Error("Validation error: result is not boolean");!1===r&&!1===n.allowInvalid&&(i=!1,e.splice(t,1),n.valid=!0),o.removeValidatorFormQueue()}}(n,l),t))}o.checkIfQueueIsEmpty()}function H(e,t){for(let t=e.length-1;t>=0;t--){let n=!1;if(null!==e[t]){if(null!==e[t][2]&&void 0!==e[t][2]||null!==e[t][3]&&void 0!==e[t][3]){if(R.allowInsertRow)for(;e[t][0]>d.countRows()-1;){const{delta:e}=p.createRow(void 0,void 0,{source:"auto"});if(0===e){n=!0;break}}if("array"===d.dataType&&(!R.columns||0===R.columns.length)&&R.allowInsertColumn)for(;p.propToCol(e[t][1])>d.countCols()-1;){const{delta:e}=p.createCol(void 0,void 0,{source:"auto"});if(0===e){n=!0;break}}n||p.set(e[t][0],e[t][1],e[t][3])}}else e.splice(t,1)}if(e.length>0){g.adjustRowsAndCols(),d.runHooks("beforeChangeRender",e,t),y.closeEditor(),d.render(),y.prepareEditor(),d.view.adjustElementsSize(),d.runHooks("afterChange",e,t||"edit");const n=d.getActiveEditor();n&&(0,i.O9)(n.refreshValue)&&n.refreshValue()}else d.render()}function z(e,t,n){return Array.isArray(e)?e:[[e,t,n]]}function G(e,t){const n=d.runHooks("beforeChange",e,t||"edit"),r=e.filter((e=>null!==e));var o;if(!1===n||0===r.length)return null===(o=d.getActiveEditor())||void 0===o||o.cancelChanges(),[];for(let e=r.length-1;e>=0;e--){const[t,n,,o]=r[e],s=p.propToCol(n);let a;a=Number.isInteger(s)?d.getCellMeta(t,s):{...Object.getPrototypeOf(R),...R};const{type:l,checkedTemplate:u,uncheckedTemplate:h}=a;if("numeric"===l&&"string"==typeof o&&(0,j.LA)(o)&&(r[e][3]=D(o)),"checkbox"===l){const t=(0,i.As)(o),n=t===(0,i.As)(u),s=t===(0,i.As)(h);(n||s)&&(r[e][3]=n?u:h)}}return r}this.columnIndexMapper.addLocalHook("cacheUpdated",x),this.rowIndexMapper.addLocalHook("cacheUpdated",x),this.selection.addLocalHook("afterSetRangeEnd",((e,t)=>{const n=(0,v.nA)(!1),o=this.selection.getSelectedRange(),{from:i,to:s}=o.current(),a=o.size()-1;this.runHooks("afterSelection",i.row,i.col,s.row,s.col,n,a),this.runHooks("afterSelectionByProp",i.row,d.colToProp(i.col),s.row,d.colToProp(s.col),n,a),t&&(!n.isTouched()||n.isTouched()&&!n.value)&&b.scrollTo(e);const l=L.isSelectedByRowHeader(),u=L.isSelectedByColumnHeader();l&&u?(0,r.iQ)(this.rootElement,["ht__selection--rows","ht__selection--columns"]):l?((0,r.vy)(this.rootElement,"ht__selection--columns"),(0,r.iQ)(this.rootElement,"ht__selection--rows")):u?((0,r.vy)(this.rootElement,"ht__selection--rows"),(0,r.iQ)(this.rootElement,"ht__selection--columns")):(0,r.vy)(this.rootElement,["ht__selection--rows","ht__selection--columns"]),"shift"!==L.getSelectionSource()&&y.closeEditor(null),d.view.render(),y.prepareEditor()})),this.selection.addLocalHook("beforeSetFocus",(e=>{this.runHooks("beforeSelectionFocusSet",e.row,e.col)})),this.selection.addLocalHook("afterSetFocus",(e=>{const t=(0,v.nA)(!1);this.runHooks("afterSelectionFocusSet",e.row,e.col,t),(!t.isTouched()||t.isTouched()&&!t.value)&&b.scrollTo(e),y.closeEditor(),d.view.render(),y.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,d.colToProp(n.col),r.row,d.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",(()=>{y.closeEditor(),d.view.render(),(0,r.vy)(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"))),g={alter(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;const s=e=>{if(0===e.length)return[];const t=[...e];return t.sort(((e,t)=>{let[n]=e,[r]=t;return n===r?0:n>r?1:-1})),(0,F.mu)(t,((e,t)=>{let[n,r]=t;const o=e[e.length-1],[i,s]=o,a=i+s;if(n<=a){const e=Math.max(r-(a-n),0);o[1]+=e}else e.push([n,r]);return e}),[t[0]])};switch(e){case"insert_row_below":case"insert_row_above":const o=d.countSourceRows();if(R.maxRows===o)return;const a="insert_row_below"===e?"below":"above";t=null!=t?t:"below"===a?o:0;const{delta:l,startPhysicalIndex:u}=p.createRow(t,n,{source:r,mode:a});L.shiftRows(d.toVisualRow(u),l);break;case"insert_col_start":case"insert_col_end":const h="insert_col_end"===e?"end":"start";t=null!=t?t:"end"===h?d.countSourceCols():0;const{delta:c,startPhysicalIndex:m}=p.createCol(t,n,{source:r,mode:h});if(c){if(Array.isArray(R.colHeaders)){const e=[d.toVisualColumn(m),0];e.length+=c,Array.prototype.splice.apply(R.colHeaders,e)}L.shiftColumns(d.toVisualColumn(m),c)}break;case"remove_row":const f=e=>{let t=0;(0,F.z0)(e,(e=>{let[n,o]=e;const s=(0,i.Im)(n)?d.countRows()-1:Math.max(n-t,0);if(Number.isInteger(n)&&(n=Math.max(n-t,0)),!p.removeRow(n,o,r))return;if(L.isSelected()){const{row:e}=d.getSelectedRangeLast().highlight;e>=n&&e<=n+o-1&&y.closeEditor(!0)}const a=d.countRows(),l=R.fixedRowsTop;l>=s+1&&(R.fixedRowsTop-=Math.min(o,l-s));const u=R.fixedRowsBottom;u&&s>=a-u&&(R.fixedRowsBottom-=Math.min(o,u)),0===a?L.deselect():"ContextMenu.removeRow"===r?L.refresh():L.shiftRows(n,-o),t+=o}))};Array.isArray(t)?f(s(t)):f([[t,n]]);break;case"remove_col":const g=e=>{let t=0;(0,F.z0)(e,(e=>{let[n,o]=e;const s=(0,i.Im)(n)?d.countCols()-1:Math.max(n-t,0);let a=d.toPhysicalColumn(s);if(Number.isInteger(n)&&(n=Math.max(n-t,0)),!p.removeCol(n,o,r))return;if(L.isSelected()){const{col:e}=d.getSelectedRangeLast().highlight;e>=n&&e<=n+o-1&&y.closeEditor(!0)}0===d.countCols()?L.deselect():"ContextMenu.removeColumn"===r?L.refresh():L.shiftColumns(n,-o);const l=R.fixedColumnsStart;l>=s+1&&(R.fixedColumnsStart-=Math.min(o,l-s)),Array.isArray(R.colHeaders)&&(void 0===a&&(a=-1),R.colHeaders.splice(a,o)),t+=o}))};Array.isArray(t)?g(s(t)):g([[t,n]]);break;default:throw new Error(`There is no such action "${e}"`)}o||g.adjustRowsAndCols(),d.view.render(),d.view.adjustElementsSize()},adjustRowsAndCols(){const e=R.minRows,t=R.minSpareRows,n=R.minCols,r=R.minSpareCols;if(e){const t=d.countRows();t<e&&p.createRow(t,e-t,{source:"auto"})}if(t){const e=d.countEmptyRows(!0);if(e<t){const n=t-e,r=Math.min(n,R.maxRows-d.countSourceRows());p.createRow(d.countRows(),r,{source:"auto"})}}{let e;(n||r)&&(e=d.countEmptyCols(!0));let t=d.countCols();if(n&&!R.columns&&t<n){const r=n-t;e+=r,p.createCol(t,r,{source:"auto"})}if(r&&!R.columns&&"array"===d.dataType&&e<r){t=d.countCols();const n=r-e,o=Math.min(n,R.maxCols-t);p.createCol(t,o,{source:"auto"})}}},populateFromArray(e,t,n,r,o){let i,s,a,l;const u=[],h={},c=[],m=e.row,p=e.col;if(s=t.length,0===s)return!1;let f=0,g=0;switch((0,v.Gv)(n)&&(f=n.col-p+1,g=n.row-m+1),o){case"shift_down":const o=(0,F.h9)(t),y=o.length,w=Math.max(y,f),_=d.getData().slice(m),b=(0,F.h9)(_).slice(p,p+w);for(a=0;a<w;a+=1)if(a<y){for(i=0,s=o[a].length;i<g-s;i+=1)o[a].push(o[a][i%s]);a<b.length?c.push(o[a].concat(b[a])):c.push(o[a].concat(new Array(_.length).fill(null)))}else c.push(o[a%y].concat(b[a]));d.populateFromArray(m,p,(0,F.h9)(c));break;case"shift_right":const S=t.length,C=Math.max(S,g),E=d.getData().slice(m).map((e=>e.slice(p)));for(i=0;i<C;i+=1)if(i<S){for(a=0,l=t[i].length;a<f-l;a+=1)t[i].push(t[i][a%l]);if(i<E.length)for(let e=0;e<E[i].length;e+=1)t[i].push(E[i][e]);else t[i].push(...new Array(E[0].length).fill(null))}else t.push(t[i%s].slice(0,C).concat(E[i]));d.populateFromArray(m,p,t);break;default:h.row=e.row,h.col=e.col;let M,T=0,A=0,N=!0;const L=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},x=t.length,O=n?n.row-e.row+1:0;for(s=n?O:Math.max(x,O),i=0;i<s&&!(n&&h.row>n.row&&O>x||!R.allowInsertRow&&h.row>d.countRows()-1||h.row>=R.maxRows);i++){const t=i-T,o=L(t).length,c=n?n.col-e.col+1:0;if(l=n?c:Math.max(o,c),h.col=e.col,M=d.getCellMeta(h.row,h.col),"CopyPaste.paste"!==r&&"Autofill.fill"!==r||!M.skipRowOnPaste){for(A=0,a=0;a<l&&!(n&&h.col>n.col&&c>o||!R.allowInsertColumn&&h.col>d.countCols()-1||h.col>=R.maxCols);a++){if(M=d.getCellMeta(h.row,h.col),("CopyPaste.paste"===r||"Autofill.fill"===r)&&M.skipColumnOnPaste){A+=1,h.col+=1,l+=1;continue}if(M.readOnly&&"UndoRedo.undo"!==r){h.col+=1;continue}let e=L(t,a-A),n=d.getDataAtCell(h.row,h.col);if(null!==e&&"object"==typeof e)if(Array.isArray(e)&&null===n&&(n=[]),null===n||"object"!=typeof n)N=!1;else{const t=(0,v.Nl)(Array.isArray(n)?n:n[0]||n),r=(0,v.Nl)(Array.isArray(e)?e:e[0]||e);(0,v.wU)(t,r)||Array.isArray(t)&&Array.isArray(r)?e=(0,v.Go)(e):N=!1}else null!==n&&"object"==typeof n&&(N=!1);N&&u.push([h.row,h.col,e]),N=!0,h.col+=1}h.row+=1}else T+=1,h.row+=1,s+=1}d.setDataAtCell(u,null,null,r||"populateFromArray")}}},this.init=function(){f.setData(R.data),d.runHooks("beforeInit"),((0,s.rr)()||(0,s.zG)())&&(0,r.iQ)(d.rootElement,"mobile"),this.updateSettings(t,!0),this.view=new Vr(this);const e=R.themeName||ga(d.rootElement);d.useTheme(e),d.view.addClassNameToLicenseElement(d.getCurrentThemeName()),y=w.getInstance(d,R,L),b=function(e){const{selection:t}=e;let n=!1,r=!1;return{resume(){r=!1},suspend(){r=!0},skipNextScrollCycle(){n=!0},scrollTo(o){var i;if(n||r)return void(n=!1);let s;t.isFocusSelectionChanged()?s=function(e){return t=>{e.scrollViewportTo(t.toObject(),(()=>{const{row:t,col:n}=e.getSelectedRangeLast().highlight;as(e.getCell(t,n,!0))}))}}(e):t.isSelectedByCorner()?s=()=>{}:t.isSelectedByRowHeader()?s=function(e){return t=>{const n=ls(e).getComputedRowTarget(t);e.scrollViewportTo({row:n},(()=>{const t=!!e.getSettings().rowHeaders;as(e.getCell(n,t?-1:0,!0))}))}}(e):t.isSelectedByColumnHeader()?s=function(e){return t=>{const n=ls(e).getComputedColumnTarget(t);e.scrollViewportTo({col:n},(()=>{const t=!!e.getSettings().colHeaders;as(e.getCell(t?-1:0,n,!0))}))}}(e):1===t.getSelectedRange().size()&&t.isMultiple()?s=function(e){return t=>{const n=ls(e),r={row:n.getComputedRowTarget(t),col:n.getComputedColumnTarget(t)};e.scrollViewportTo(r,(()=>{const{row:t,col:n}=r;as(e.getCell(t,n,!0))}))}}(e):1!==t.getSelectedRange().size()||t.isMultiple()?t.getSelectedRange().size()>1&&(s=function(e){return t=>{const n=ls(e),r={row:n.getComputedRowTarget(t),col:n.getComputedColumnTarget(t)};e.scrollViewportTo(r,(()=>{const{row:t,col:n}=r;as(e.getCell(t,n,!0))}))}}(e)):s=function(e){return t=>{const n=e.selection.getSelectionSource(),{row:r,col:o}=t,i=()=>{as(e.getCell(r,o,!0))};if(r<0&&o>=0)e.scrollViewportTo({col:o},i);else if(o<0&&r>=0)e.scrollViewportTo({row:r},i);else{if("mouse"===n&&(o===e.view.getLastPartiallyVisibleColumn()||r===e.view.getLastPartiallyVisibleRow()))return;e.scrollViewportTo({row:r,col:o},i)}}}(e),null===(i=s)||void 0===i||i(o)}}}(d),_=new I(d),br(this)&&function(e){const t=function(e){return t=>{if(!t)return null;const n=cs(e),r=ds(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}}(e);let n;const{activate:r,deactivate:o}=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.rootElement,r=hs(e),o=hs(e);return r.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromTop())),o.addEventListener("focus",(()=>null==t?void 0:t.onFocusFromBottom())),n.firstChild.before(r),n.lastChild.after(o),{activate(){e._registerTimeout((()=>{r.tabIndex=0,o.tabIndex=0}),10)},deactivate(){e._registerTimeout((()=>{r.tabIndex=-1,o.tabIndex=-1}),10)}}}(e,{onFocusFromTop(){var r;const o=null!==(r=t(n))&&void 0!==r?r:cs(e);o&&(e.runHooks("modifyFocusOnTabNavigation","from_above",o),e.selectCell(o.row,o.col)),e.listen()},onFocusFromBottom(){var r;const o=null!==(r=t(n))&&void 0!==r?r:ds(e);o&&(e.runHooks("modifyFocusOnTabNavigation","from_below",o),e.selectCell(o.row,o.col)),e.listen()}}),i={wrapped:!1,flipped:!1};let s=!0,a=!1,l=!1;e.addHook("afterListen",(()=>o())),e.addHook("afterUnlisten",(()=>r())),e.addHook("afterSelection",((t,r,o,u,h)=>{var c;a&&(i.wrapped&&i.flipped||l)&&(l=!1,h.value=!0),s&&(n=null===(c=e.getSelectedRangeLast())||void 0===c?void 0:c.highlight)})),e.addHook("beforeRowWrap",((e,t,n)=>{i.wrapped=!0,i.flipped=n}));const u={keys:[["Tab"],["Shift","Tab"]],preventDefault:!1,stopPropagation:!1,relativeToGroup:us.B,group:"focusCatcher"};e.getShortcutManager().getContext("grid").addShortcuts([{...u,callback:()=>{const{tabNavigation:t}=e.getSettings();a=!0,e.getSelectedRangeLast()&&!t&&(s=!1),t||(l=!0)},position:"before"},{...u,callback:t=>{const{tabNavigation:r,autoWrapRow:o}=e.getSettings();if(a=!1,s=!0,!r||!e.selection.isSelected()||o&&i.wrapped&&i.flipped||!o&&i.wrapped)return o&&i.wrapped&&i.flipped&&(n=t.shiftKey?cs(e):ds(e)),i.wrapped=!1,i.flipped=!1,e.deselectCell(),e.unlisten(),!1;t.preventDefault()},position:"after"}])}(d),d.runHooks("init"),this.render(),S&&null===d.rootElement.offsetParent&&(0,r.I6)(d.rootElement,(()=>{d.view._wt.wtOverlays.updateLastSpreaderSize(),d.render(),d.view.adjustElementsSize()})),"object"==typeof S&&(d.runHooks("afterChange",S[0],S[1]),S=!1),d.runHooks("afterInit")},this._createCellCoords=function(e,t){return d.view._wt.createCellCoords(e,t)},this._createCellRange=function(e,t,n){return d.view._wt.createCellRange(e,t,n)},this.validateCell=function(e,t,n,r){let s=d.getCellValidator(t);function a(e){if(arguments.length>1&&void 0!==arguments[1]&&!arguments[1]||!0===t.hidden)return void n(e);const r=t.visualCol,o=t.visualRow,i=d.getCell(o,r,!0);if(i&&"TH"!==i.nodeName){const e=d.rowIndexMapper.getRenderableFromVisualIndex(o),t=d.columnIndexMapper.getRenderableFromVisualIndex(r);d.view._wt.getSetting("cellRenderer",e,t,i)}n(e)}var l;(0,i.gd)(s)&&(l=s,s=function(e,t){t(l.test(e))}),(0,o.Tn)(s)?(e=d.runHooks("beforeValidate",e,t.visualRow,t.prop,r),d._registerImmediate((()=>{s.call(t,e,(n=>{d&&(n=d.runHooks("afterValidate",n,e,t.visualRow,t.prop,r),t.valid=n,a(n),d.runHooks("postAfterValidate",n,e,t.visualRow,t.prop,r))}))}))):d._registerImmediate((()=>{t.valid=!0,a(t.valid,!1)}))},this.setDataAtCell=function(e,t,n,r){const o=z(e,t,n),i=[];let s,a,l,u=r;for(s=0,a=o.length;s<a;s++){if("object"!=typeof o[s])throw new Error("Method `setDataAtCell` accepts row number or changes array of arrays as its first parameter");if("number"!=typeof o[s][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=o[s][1]>=this.countCols()?o[s][1]:p.colToProp(o[s][1]),i.push([o[s][0],l,f.getAtCell(this.toPhysicalRow(o[s][0]),o[s][1]),o[s][2]])}u||"object"!=typeof e||(u=t);const h=G(i,u);d.runHooks("afterSetDataAtCell",h,u),P(h,u,(()=>{H(h,u)}))},this.setDataAtRowProp=function(e,t,n,r){const o=z(e,t,n),i=[];let s,a,l=r;for(s=0,a=o.length;s<a;s++)i.push([o[s][0],o[s][1],f.getAtCell(this.toPhysicalRow(o[s][0]),o[s][1]),o[s][2]]);l||"object"!=typeof e||(l=t);const u=G(i,r);d.runHooks("afterSetDataAtRowProp",u,l),P(u,l,(()=>{H(u,l)}))},this.listen=function(){d&&!d.isListening()&&(wa.forEach((e=>{d!==e&&e.unlisten()})),ya=d.guid,d.runHooks("afterListen"))},this.unlisten=function(){this.isListening()&&(ya=null,d.runHooks("afterUnlisten"))},this.isListening=function(){return ya===d.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];y.closeEditor(e),d.view.render(),t&&L.isSelected()&&y.prepareEditor()},this.populateFromArray=function(e,t,n,r,o,i,s){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?d._createCellCoords(r,o):null;return g.populateFromArray(d._createCellCoords(e,t),n,a,i,s)},this.spliceCol=function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return p.spliceCol(e,t,n,...o)},this.spliceRow=function(e,t,n){for(var r=arguments.length,o=new Array(r>3?r-3:0),i=3;i<r;i++)o[i-3]=arguments[i];return p.spliceRow(e,t,n,...o)},this.getSelected=function(){if(L.isSelected())return(0,F.YD)(L.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(L.isSelected())return Array.from(L.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(!L.isSelected()||0===this.countRows()||0===this.countCols())return;const t=[];(0,F.z0)(L.getSelectedRange(),(e=>{if(e.isSingleHeader())return;const n=e.getTopStartCorner(),r=e.getBottomEndCorner();(0,j.Ti)(n.row,r.row,(e=>{(0,j.Ti)(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||d.view.render()},this.render=function(){this.view&&(this.forceFullRender=!0,this.isRenderSuspended()||d.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(!d.view)return;const e=d.view,{width:t,height:n}=e.getLastSize(),{width:r,height:o}=d.rootElement.getBoundingClientRect(),i=r!==t||o!==n;!1===d.runHooks("beforeRefreshDimensions",{width:t,height:n},{width:r,height:o},i)||((i||e._wt.wtOverlays.scrollableElement===d.rootWindow)&&(e.setLastSize(r,o),d.render(),e.adjustElementsSize()),d.runHooks("afterRefreshDimensions",{width:t,height:n},{width:r,height:o},i))},this.updateData=function(e,t){ss(e,(e=>{p=e}),(e=>{p=e,d.columnIndexMapper.fitToLength(this.getInitialColumnCount()),d.rowIndexMapper.fitToLength(this.countSourceRows()),g.adjustRowsAndCols(),L.refresh()}),{hotInstance:d,dataMap:p,dataSource:f,internalSource:"updateData",source:t,metaManager:T,firstRun:S})},this.loadData=function(e,t){ss(e,(e=>{p=e}),(()=>{T.clearCellsCache(),d.initIndexMappers(),g.adjustRowsAndCols(),L.refresh(),S&&(S=[null,"loadData"])}),{hotInstance:d,dataMap:p,dataSource:f,internalSource:"loadData",source:t,metaManager:T,firstRun:S})},this.getInitialColumnCount=function(){const e=R.columns;let t=0;if(Array.isArray(e))t=e.length;else if((0,o.Tn)(e))if("array"===d.dataType){const n=this.countSourceCols();for(let r=0;r<n;r+=1)e(r)&&(t+=1)}else"object"!==d.dataType&&"function"!==d.dataType||(t=p.colToPropCache.length);else if((0,i.O9)(R.dataSchema)){const e=p.getSchema();t=Array.isArray(e)?e.length:(0,v.$3)(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(0,i.b0)(e)?p.getAll():p.getRange(d._createCellCoords(e,t),d._createCellCoords(n,r),p.DESTINATION_RENDERER)},this.getCopyableText=function(e,t,n,r){return p.getCopyableText(d._createCellCoords(e,t),d._createCellCoords(n,r))},this.getCopyableData=function(e,t){return p.getCopyable(e,p.colToProp(t))},this.getSchema=function(){return p.getSchema()},this.updateSettings=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=(S?d.loadData:d.updateData).bind(this);let r,s,a=!1;if((0,i.O9)(e.rows))throw new Error('The "rows" setting is no longer supported. Do you mean startRows, minRows or maxRows?');if((0,i.O9)(e.cols))throw new Error('The "cols" setting is no longer supported. Do you mean startCols, minCols or maxCols?');if((0,i.O9)(e.ganttChart))throw new Error('Since 8.0.0 the "ganttChart" setting is no longer supported.');for(r in e.language&&function(e){const t=bo(e);Po(t)?(d.runHooks("beforeLanguageChange",t),A.language=t,d.runHooks("afterLanguageChange",t)):So(e)}(e.language),e)if("data"===r||"language"===r);else if("className"===r)O("className",e.className);else if("tableClassName"===r&&d.table)O("tableClassName",e.tableClassName),d.view._wt.wtOverlays.syncOverlayTableClassNames();else if(_o.R.getSingleton().isRegistered(r)||_o.R.getSingleton().isDeprecated(r)){const t=e[r];(0,o.Tn)(t)?(_o.R.getSingleton().addAsFixed(r,t,d),R[r]=t):Array.isArray(t)&&(_o.R.getSingleton().add(r,t,d),R[r]=t)}else!t&&(0,v.mQ)(e,r)&&(A[r]=e[r]);void 0===e.data&&void 0===R.data?n(null,"updateSettings"):void 0!==e.data?n(e.data,"updateSettings"):void 0!==e.columns&&(p.createMap(),d.initIndexMappers());const l=d.countCols(),u=R.columns;if(u&&(0,o.Tn)(u)&&(a=!0),void 0===e.cell&&void 0===e.cells&&void 0===e.columns||T.clearCache(),l>0)for(r=0,s=0;r<l;r++){if(u){const e=a?u(r):u[s];e&&T.updateColumnMeta(s,e)}s+=1}(0,i.O9)(e.cell)&&(0,v.v4)(e.cell,(e=>{d.setCellMetaObject(e.row,e.col,e)})),d.runHooks("afterCellMetaReset");let h=d.rootElement.style.height;""!==h&&(h=parseInt(d.rootElement.style.height,10));let c=e.height;if((0,o.Tn)(c)&&(c=c()),t&&d.rootElement.getAttribute("style")&&d.rootElement.setAttribute("data-initialstyle",d.rootElement.getAttribute("style")),null===c){const e=d.rootElement.getAttribute("data-initialstyle");e&&(e.indexOf("height")>-1||e.indexOf("overflow")>-1)?d.rootElement.setAttribute("style",e):(d.rootElement.style.height="",d.rootElement.style.overflow="")}else void 0!==c&&(d.rootElement.style.height=isNaN(c)?`${c}`:`${c}px`,d.rootElement.style.overflow="hidden");if(void 0!==e.width){let t=e.width;(0,o.Tn)(t)&&(t=t()),d.rootElement.style.width=isNaN(t)?`${t}`:`${t}px`}if(!t){if(d.view){d.view._wt.wtViewport.resetHasOversizedColumnHeadersMarked(),d.view._wt.exportSettingsAsClassNames();const t=d.getCurrentThemeName(),n=(0,v.mQ)(e,"themeName");t&&n&&t!==e.themeName&&(d.view.getStylesHandler().removeClassNames(),d.view.removeClassNameFromLicenseElement(t));const r=n&&e.themeName||ga(d.rootElement);d.useTheme(r),d.view.addClassNameToLicenseElement(d.getCurrentThemeName())}d.runHooks("afterUpdateSettings",e)}g.adjustRowsAndCols(),d.view&&!S&&(d.render(),d.view._wt.wtOverlays.adjustElementsSize()),t||!d.view||""!==h&&""!==c&&void 0!==c||h===c||d.view._wt.wtOverlays.updateMainScrollableElements()},this.getValue=function(){const e=d.getSelectedLast();if(R.getValue){if((0,o.Tn)(R.getValue))return R.getValue.call(d);if(e)return d.getData()[e[0][0]][R.getValue]}else if(e)return d.getDataAtCell(e[0],e[1])},this.getSettings=function(){return R},this.clear=function(){this.selectAll(),this.emptySelectedCells()},this.alter=function(e,t,n,r,o){g.alter(e,t,n,r,o)},this.getCell=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=t,o=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;o=this.rowIndexMapper.getRenderableFromVisualIndex(e)}return null===o||null===r||void 0===o||void 0===r?null:d.view.getCellAtCoords(d._createCellCoords(o,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 o=n,i=r;return n>=0&&(o=this.rowIndexMapper.getVisualFromRenderableIndex(n)),r>=0&&(i=this.columnIndexMapper.getVisualFromRenderableIndex(r)),d._createCellCoords(o,i)},this.colToProp=function(e){return p.colToProp(e)},this.propToCol=function(e){return p.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 p.get(e,p.colToProp(t))},this.getDataAtRowProp=function(e,t){return p.get(e,t)},this.getDataAtCol=function(e){const t=[],n=p.getRange(d._createCellCoords(0,e),d._createCellCoords(R.data.length-1,e),p.DESTINATION_RENDERER);for(let e=0;e<n.length;e+=1)for(let r=0;r<n[e].length;r+=1)t.push(n[e][r]);return t},this.getDataAtProp=function(e){const t=[],n=p.getRange(d._createCellCoords(0,p.propToCol(e)),d._createCellCoords(R.data.length-1,p.propToCol(e)),p.DESTINATION_RENDERER);for(let e=0;e<n.length;e+=1)for(let r=0;r<n[e].length;r+=1)t.push(n[e][r]);return t},this.getSourceData=function(e,t,n,r){let o;return o=void 0===e?f.getData():f.getByRange(d._createCellCoords(e,t),d._createCellCoords(n,r)),o},this.getSourceDataArray=function(e,t,n,r){let o;return o=void 0===e?f.getData(!0):f.getByRange(d._createCellCoords(e,t),d._createCellCoords(n,r),!0),o},this.getSourceDataAtCol=function(e){return f.getAtColumn(e)},this.setSourceDataAtCell=function(e,t,n,r){const o=z(e,t,n),s=this.hasHook("afterSetSourceDataAtCell"),a=[];s&&(0,F.z0)(o,(e=>{let[t,n,r]=e;a.push([t,n,f.getAtCell(t,n),r])})),(0,F.z0)(o,(e=>{let[t,n,r]=e;f.setAtCell(t,n,r)})),s&&this.runHooks("afterSetSourceDataAtCell",a,r),this.render();const l=d.getActiveEditor();l&&(0,i.O9)(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){return p.getRange(d._createCellCoords(e,0),d._createCellCoords(e,this.countCols()-1),p.DESTINATION_RENDERER)[0]||[]},this.getDataType=function(e,t,n,r){const o=void 0===e?[0,0,this.countRows(),this.countCols()]:[e,t,n,r],[i,s]=o;let[,,a,l]=o,u=null,h=null;void 0===a&&(a=i),void 0===l&&(l=s);let c="mixed";return(0,j.Ti)(Math.max(Math.min(i,a),0),Math.max(i,a),(e=>{let t=!0;return(0,j.Ti)(Math.max(Math.min(s,l),0),Math.max(s,l),(n=>{const r=this.getCellMeta(e,n);return h=r.type,u?t=u===h:u=h,t})),c=t?h:"mixed",t})),c},this.removeCellMeta=function(e,t,n){const[r,o]=[this.toPhysicalRow(e),this.toPhysicalColumn(t)];let i=T.getCellMetaKeyValue(r,o,n);!1!==d.runHooks("beforeRemoveCellMeta",e,t,n,i)&&(T.removeCellMeta(r,o,n),d.runHooks("afterRemoveCellMeta",e,t,n,i)),i=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),o=2;o<n;o++)r[o-2]=arguments[o];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&&T.removeRow(this.toPhysicalRow(e),t),r.length>0&&(0,F.z0)(r.reverse(),(t=>{T.createRow(this.toPhysicalRow(e)),(0,F.z0)(t,((t,n)=>this.setCellMetaObject(e,n,t)))})),d.render()},this.setCellMetaObject=function(e,t,n){"object"==typeof n&&(0,v.v4)(n,((n,r)=>{this.setCellMeta(e,t,r,n)}))},this.setCellMeta=function(e,t,n,r){if(!1===d.runHooks("beforeSetCellMeta",e,t,n,r))return;let o=e,i=t;e<this.countRows()&&(o=this.toPhysicalRow(e)),t<this.countCols()&&(i=this.toPhysicalColumn(t)),T.setCellMeta(o,i,n,r),d.runHooks("afterSetCellMeta",e,t,n,r)},this.getCellsMeta=function(){return T.getCellsMeta()},this.getCellMeta=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{skipMetaExtension:!1},r=this.toPhysicalRow(e),o=this.toPhysicalColumn(t);return null===r&&(r=e),null===o&&(o=t),T.getCellMeta(r,o,{visualRow:e,visualColumn:t,...n})},this.getColumnMeta=function(e){return T.getColumnMeta(this.toPhysicalColumn(e))},this.getCellMetaAtRow=function(e){return T.getCellsMetaAtRow(e)},this.isColumnModificationAllowed=function(){return!("object"===d.dataType||R.columns)},this.getCellRenderer=function(e,t){const n="number"==typeof e?d.getCellMeta(e,t).renderer:e.renderer;return"string"==typeof n?(0,U.gB)(n):(0,i.b0)(n)?(0,U.gB)("text"):n},this.getCellEditor=function(e,t){const n="number"==typeof e?d.getCellMeta(e,t).editor:e.editor;return"string"==typeof n?(0,u.M8)(n):(0,i.b0)(n)?(0,u.M8)("text"):n},this.getCellValidator=function(e,t){const n="number"==typeof e?d.getCellMeta(e,t).validator:e.validator;return"string"==typeof n?(0,B.by)(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 k;e&&(r.onQueueEmpty=e);let o=d.countRows()-1;for(;o>=0;){if(void 0!==t&&-1===t.indexOf(o)){o-=1;continue}let e=d.countCols()-1;for(;e>=0;)void 0===n||-1!==n.indexOf(e)?(r.addValidatorToQueue(),d.validateCell(d.getDataAtCell(o,e),d.getCellMeta(o,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;o-=1}r.checkIfQueueIsEmpty()},this.getRowHeader=function(e){let t=R.rowHeaders,n=e;return void 0!==n&&(n=d.runHooks("modifyRowHeader",n)),void 0===n?(t=[],(0,j.Ti)(d.countRows()-1,(e=>{t.push(d.getRowHeader(e))}))):Array.isArray(t)&&void 0!==t[n]?t=t[n]:(0,o.Tn)(t)?t=t(n):t&&"string"!=typeof t&&"number"!=typeof t&&(t=n+1),t},this.hasRowHeaders=function(){return!!R.rowHeaders},this.hasColHeaders=function(){if(void 0!==R.colHeaders&&null!==R.colHeaders)return!!R.colHeaders;for(let e=0,t=d.countCols();e<t;e++)if(d.getColHeader(e))return!0;return!1},this.getColHeader=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;const n=d.runHooks("modifyColHeader",e);if(void 0===n){const e=[],t=d.countCols();for(let n=0;n<t;n++)e.push(d.getColHeader(n));return e}let r=R.colHeaders;const i=d.toPhysicalColumn(n),s=function(e){const t=[],n=d.countCols();let r=0;for(;r<n;r++)(0,o.Tn)(R.columns)&&R.columns(r)&&t.push(r);return t[e]}(i);return!1===R.colHeaders?r=null:R.columns&&(0,o.Tn)(R.columns)&&R.columns(s)&&R.columns(s).title?r=R.columns(s).title:R.columns&&R.columns[i]&&R.columns[i].title?r=R.columns[i].title:Array.isArray(R.colHeaders)&&void 0!==R.colHeaders[i]?r=R.colHeaders[i]:(0,o.Tn)(R.colHeaders)?r=R.colHeaders(i):R.colHeaders&&"string"!=typeof R.colHeaders&&"number"!=typeof R.colHeaders&&(r=(0,Ur.$I)(n)),r=d.runHooks("modifyColumnHeaderValue",r,e,t),r},this._getColWidthFromSettings=function(e){let t;if(e>=0&&(t=d.getCellMeta(0,e).width),void 0!==t&&t!==R.width||(t=R.colWidths),null!=t){switch(typeof t){case"object":t=t[e];break;case"function":t=t(e)}"string"==typeof t&&(t=parseInt(t,10))}return t},this.getColWidth=function(e,t){let n=d._getColWidthFromSettings(e);return n=d.runHooks("modifyColWidth",n,e,t),void 0===n&&(n=wn.j),n},this._getRowHeightFromSettings=function(e){const t=this.view.getDefaultRowHeight();let n=R.rowHeights;if(null!=n){switch(typeof n){case"object":n=n[e];break;case"function":n=n(e)}"string"==typeof n&&(n=parseInt(n,10))}return null!=n&&n<t?t:n},this.getRowHeight=function(e,t){let n=d._getRowHeightFromSettings(e);return n=d.runHooks("modifyRowHeight",n,e,t),n},this.countSourceRows=function(){return f.countRows()},this.countSourceCols=function(){return f.countFirstRowKeys()},this.countRows=function(){return p.getLength()},this.countCols=function(){const e=R.maxCols,t=this.columnIndexMapper.getNotTrimmedIndexesLength();return Math.min(e,t)},this.countRenderedRows=function(){return d.view._wt.drawn?d.view._wt.wtTable.getRenderedRowsCount():-1},this.countVisibleRows=function(){return d.view._wt.drawn?d.view._wt.wtTable.getVisibleRowsCount():-1},this.countRenderedCols=function(){return d.view._wt.drawn?d.view._wt.wtTable.getRenderedColumnsCount():-1},this.countVisibleCols=function(){return d.view._wt.drawn?d.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(0,j.fk)(d.countRows()-1,(n=>{if(d.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(0,j.fk)(d.countCols()-1,(n=>{if(d.isEmptyCol(n))t+=1;else if(!0===e)return!1})),t},this.isEmptyRow=function(e){return R.isEmptyRow.call(d,e)},this.isEmptyCol=function(e){return R.isEmptyCol.call(d,e)},this.selectCell=function(e,t,n,r){let o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5];return!(0,i.b0)(e)&&!(0,i.b0)(t)&&this.selectCells([[e,t,n,r]],o,s)},this.selectCells=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[[]],t=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];!1===(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&b.suspend();const n=L.selectCells(e);return n&&t&&d.listen(),b.resume(),n},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 L.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 L.selectRows(e,t,n)},this.deselectCell=function(){L.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;b.skipNextScrollCycle(),L.selectAll(e,t,n)};const $=(e,t)=>e.getNearestNotHiddenIndex(t,1,!0);this.scrollViewportTo=function(e,t){var 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,considerHiddenIndexes:s}=null!=e?e:{};let a=r,l=i;if((0,o.Tn)(t)&&this.addHookOnce("afterScroll",t),void 0===s||s){const e=Number.isInteger(r)&&r>=0,t=Number.isInteger(i)&&i>=0,n=e?$(this.rowIndexMapper,r):void 0,o=t?$(this.columnIndexMapper,i):void 0;if(null===n||null===o)return!1;a=e?d.rowIndexMapper.getRenderableFromVisualIndex(n):r,l=t?d.columnIndexMapper.getRenderableFromVisualIndex(o):i}const u=Number.isInteger(a),h=Number.isInteger(l);let c=!1;return u&&a>=0&&h&&l>=0?c=d.view.scrollViewport(d._createCellCoords(a,l),e.horizontalSnap,e.verticalSnap):u&&a>=0&&(h&&l<0||!h)?c=d.view.scrollViewportVertically(a,e.verticalSnap):h&&l>=0&&(u&&a<0||!u)&&(c=d.view.scrollViewportHorizontally(l,e.horizontalSnap)),(0,o.Tn)(t)&&(c?this.view.render():(this.removeHook("afterScroll",t),this._registerMicrotask((()=>t())))),c},this.scrollToFocusedCell=function(e){if(!this.selection.isSelected())return!1;(0,o.Tn)(e)&&this.addHookOnce("afterScroll",e);const{highlight:t}=this.getSelectedRangeLast(),n=this.scrollViewportTo(t.toObject());return n?this.view.render():(0,o.Tn)(e)&&(this.removeHook("afterScroll",e),this._registerMicrotask((()=>e()))),n},this.destroy=function(){if(d._clearTimeouts(),d._clearImmediates(),d.view&&d.view.destroy(),f&&f.destroy(),f=null,this.getShortcutManager().destroy(),T.clearCache(),wa.delete(this.guid),br(d)){const e=this.rootDocument.querySelector(".hot-display-license-info");e&&e.parentNode.removeChild(e)}(0,r.Ie)(d.rootElement),m.destroy(),y&&y.destroy(),d.batchExecution((()=>{d.rowIndexMapper.unregisterAll(),d.columnIndexMapper.unregisterAll(),N.getItems().forEach((e=>{let[,t]=e;t.destroy()})),N.clear(),d.runHooks("afterDestroy")}),!0),_o.R.getSingleton().destroy(d),(0,v.v4)(d,((e,t,n)=>{var r;(0,o.Tn)(e)?n[t]=(r=t,()=>{throw new Error(`The "${r}" method cannot be called because this Handsontable instance has been destroyed`)}):"guid"!==t&&(n[t]=null)})),d.isDestroyed=!0,p&&p.destroy(),p=null,g=null,L=null,y=null,d=null},this.getActiveEditor=function(){return y.getActiveEditor()},this.getFirstRenderedVisibleRow=function(){return d.view.getFirstRenderedVisibleRow()},this.getLastRenderedVisibleRow=function(){return d.view.getLastRenderedVisibleRow()},this.getFirstRenderedVisibleColumn=function(){return d.view.getFirstRenderedVisibleColumn()},this.getLastRenderedVisibleColumn=function(){return d.view.getLastRenderedVisibleColumn()},this.getFirstFullyVisibleRow=function(){return d.view.getFirstFullyVisibleRow()},this.getLastFullyVisibleRow=function(){return d.view.getLastFullyVisibleRow()},this.getFirstFullyVisibleColumn=function(){return d.view.getFirstFullyVisibleColumn()},this.getLastFullyVisibleColumn=function(){return d.view.getLastFullyVisibleColumn()},this.getFirstPartiallyVisibleRow=function(){return d.view.getFirstPartiallyVisibleRow()},this.getLastPartiallyVisibleRow=function(){return d.view.getLastPartiallyVisibleRow()},this.getFirstPartiallyVisibleColumn=function(){return d.view.getFirstPartiallyVisibleColumn()},this.getLastPartiallyVisibleColumn=function(){return d.view.getLastPartiallyVisibleColumn()},this.getPlugin=function(e){return N.getItem((0,W.Ob)(e))},this.getPluginName=function(e){return e===this.undoRedo?this.undoRedo.constructor.PLUGIN_KEY:N.getId(e)},this.getInstance=function(){return d},this.addHook=function(e,t,n){_o.R.getSingleton().add(e,t,d,n)},this.hasHook=function(e){return _o.R.getSingleton().has(e,d)||_o.R.getSingleton().has(e)},this.addHookOnce=function(e,t,n){_o.R.getSingleton().once(e,t,d,n)},this.removeHook=function(e,t){_o.R.getSingleton().remove(e,t,d)},this.runHooks=function(e,t,n,r,o,i,s){return _o.R.getSingleton().run(d,e,t,n,r,o,i,s)},this.getTranslatedPhrase=function(e,t){return Ho(R.language,e,t)},this.toHTML=()=>(0,Y.KN)(this),this.toTableElement=()=>{const e=this.rootDocument.createElement("div");return e.insertAdjacentHTML("afterbegin",(0,Y.KN)(this)),e.firstElementChild},this.timeouts=[],this.useTheme=e=>{this.view.getStylesHandler().useTheme(e),this.runHooks("afterSetTheme",e,!!S)},this.getCurrentThemeName=()=>this.view.getStylesHandler().getThemeName(),this._registerTimeout=function(e){let t=e;"function"==typeof t&&(t=setTimeout(t,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0)),this.timeouts.push(t)},this._clearTimeouts=function(){(0,F.z0)(this.timeouts,(e=>{clearTimeout(e)}))},this.immediates=[],this._registerImmediate=function(e){this.immediates.push(setImmediate(e))},this._clearImmediates=function(){(0,F.z0)(this.immediates,(e=>{clearImmediate(e)}))},this._registerMicrotask=function(e){this.rootWindow.queueMicrotask((()=>{this.isDestroyed||e()}))},this._getEditorManager=function(){return y};const K=(e=>{let{ownerWindow:t,handleEvent:n,beforeKeyDown:a,afterKeyDown:u}=e;const h=(0,ms.u)({errorIdExists:e=>`The "${e}" context name is already registered.`});let c="grid";const d=()=>c,m=e=>h.getItem(e);let p=!1;const f=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d();const r=vs(n)?n:m(n);let o=!1;if(!r.hasShortcut(t))return o;const i=r.getShortcuts(t);for(let n=0;n<i.length;n++){const{callback:r,runOnlyIf:s,preventDefault:a,stopPropagation:u,captureCtrl:h,forwardToContext:c}=i[n];if(!0===s(e)){if(p=h,o=!1===r(e,t),p=!1,a&&e.preventDefault(),u&&((0,l.CA)(e),e.stopPropagation()),o)break;c&&f(e,t,c)}}return o},g=function(e,t,n,o,i){const a=e=>_s.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},h=e=>{if(!1===t(e))return;if(!1===n(e)||229===e.keyCode||"string"!=typeof e.key||(0,l.d)(e))return;const r=ys(e);let h=[];a(r)||(h=u(e));const c=[r].concat(h);!i(e,c)&&((0,s.U0)()&&h.includes("meta")||!(0,s.U0)()&&h.includes("control"))&&i(e,[r].concat(u(e,!0))),o(e)},c=e=>{if("string"==typeof e.key){const t=ys(e);a(t)&&bs.press(t)}},d=e=>{if("string"==typeof e.key){const t=ys(e);a(t)&&bs.release(t)}},m=()=>{bs.releaseAll()};return{mount:()=>{let t=e;for(Cs+=1;t;)1===Cs&&(t.document.documentElement.addEventListener("keydown",c),Ss.push({event:"keydown",listener:c}),t.document.documentElement.addEventListener("keyup",d),Ss.push({event:"keyup",listener:d})),t.document.documentElement.addEventListener("keydown",h),t.document.documentElement.addEventListener("blur",m),t=(0,r.Ly)(t)},unmount:()=>{let t=e;for(Cs-=1;t;){if(0===Cs){for(let e=0;e<Ss.length;e++){const{event:n,listener:r}=Ss[e];t.document.documentElement.removeEventListener(n,r)}Ss.length=0}t.document.documentElement.removeEventListener("keydown",h),t.document.documentElement.removeEventListener("blur",m),t=(0,r.Ly)(t)}},isPressed:e=>bs.isPressed(e),releasePressedKeys:()=>bs.releaseAll()}}(t,n,a,u,f);return g.mount(),{addContext:e=>{const t=(e=>{const t=(0,ms.u)({errorIdExists:t=>`The "${t}" shortcut is already registered in the "${e}" context.`}),n=function(){let{keys:e,callback:n,group:r,runOnlyIf:s=()=>!0,captureCtrl:a=!1,preventDefault:l=!0,stopPropagation:u=!1,relativeToGroup:h,position:c,forwardToContext:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if((0,i.b0)(r))throw new Error("You need to define the shortcut's group.");if(!1===(0,o.Tn)(n))throw new Error("The shortcut's callback needs to be a function.");if(!1===Array.isArray(e))throw new Error(Ae.O`Pass the shortcut\'s keys as an array of arrays,\x20
  144. using the KeyboardEvent.key properties:\x20
  145. https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values.`);const m={callback:n,group:r,runOnlyIf:s,captureCtrl:a,preventDefault:l,stopPropagation:u};(0,i.O9)(h)&&(m.relativeToGroup=h,m.position=c),vs(d)&&(m.forwardToContext=d),e.forEach((e=>{const n=fs(e);if(t.hasItem(n)){const e=t.getItem(n);let r=e.findIndex((e=>e.group===h));-1!==r?"before"===c?r-=1:r+=1:r=e.length,e.splice(r,0,m)}else t.addItem(n,[m])}))},r=e=>{const n=fs(e);t.removeItem(n)};return{__kindOf:ws,addShortcut:n,addShortcuts:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e.forEach((e=>{(0,v.v4)(t,((n,r)=>{!1===Object.prototype.hasOwnProperty.call(e,r)&&(e[r]=t[r])})),n(e)}))},getShortcuts:e=>{const n=fs(e),r=t.getItem(n);return(0,i.O9)(r)?r.slice():[]},hasShortcut:e=>{const n=fs(e);return t.hasItem(n)},removeShortcutsByKeys:r,removeShortcutsByGroup:e=>{t.getItems().forEach((t=>{let[n,o]=t;const i=o.filter((t=>t.group!==e));0===i.length?r((e=>e.split("+"))(n)):(o.length=0,o.push(...i))}))}}})(e);return h.addItem(e,t),t},getActiveContextName:d,getContext:m,setActiveContextName:e=>{if(!h.hasItem(e))throw new Error(Ae.O`You've tried to activate the "${e}" shortcut context\x20
  146. that does not exist. Before activation, register the context using the "addContext" method.`);c=e},isCtrlPressed:()=>!p&&(g.isPressed("control")||g.isPressed("meta")),releasePressedKeys:()=>g.releasePressedKeys(),destroy:()=>g.unmount()}})({handleEvent:()=>d.isListening(),beforeKeyDown:e=>this.runHooks("beforeKeyDown",e),afterKeyDown:e=>{this.isDestroyed||d.runHooks("afterDocumentKeyDown",e)},ownerWindow:this.rootWindow});var X;this.addHook("beforeOnCellMouseDown",(e=>{!1===e.ctrlKey&&!1===e.metaKey&&K.releasePressedKeys()})),this.getShortcutManager=function(){return K},this.getFocusManager=function(){return _},(0,V.f4)().forEach((e=>{const t=(0,V.sd)(e);N.addItem(e,new t(this))})),X=d,[fa,pa].forEach((e=>e(X))),K.setActiveContextName("grid"),_o.R.getSingleton().run(d,"construct")}new Set;var _a=n(34675);function ba(e,t){const n=new va(e,t||{},vr);return n.init(),n}(0,ki.Gk)(_a.Y),ba.editors={BaseEditor:Ms.b7},ba.Core=function(e){return new va(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},vr)},ba.DefaultSettings=Yi(),ba.hooks=_o.R.getSingleton(),ba.CellCoords=ht.A,ba.CellRange=ct.A,ba.packageName="handsontable",ba.buildDate="24/04/2025 10:59:00",ba.version="15.3.0",ba.languages={dictionaryKeys:Ao,getLanguageDictionary:Do,getLanguagesDictionaries:function(){return Io()},registerLanguageDictionary:ko,getTranslatedPhrase:Ho};const Sa=ba},84451:function(e,t,n){!function(e){"use strict";var t={1:"೧",2:"೨",3:"೩",4:"೪",5:"೫",6:"೬",7:"೭",8:"೮",9:"೯",0:"೦"},n={"೧":"1","೨":"2","೩":"3","೪":"4","೫":"5","೬":"6","೭":"7","೮":"8","೯":"9","೦":"0"};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}})}(n(95093))},84549:(e,t,n)=>{"use strict";var r=n(44576);e.exports=function(e,t){var n=r.Iterator,o=n&&n.prototype,i=o&&o[e],s=!1;if(i)try{i.call({next:function(){return{done:!0}},return:function(){s=!0}},-1)}catch(e){e instanceof t||(s=!1)}if(!s)return i}},84606:(e,t,n)=>{"use strict";var r=n(16823),o=TypeError;e.exports=function(e,t){if(!delete e[t])throw new o("Cannot delete property "+r(t)+" of "+r(e))}},84916:(e,t,n)=>{"use strict";var r=n(97751),o=function(e){return{size:e,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},i=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](o(0));try{return(new n)[e](o(-1)),!1}catch(r){if(!t)return!0;try{return(new n)[e](i(-1/0)),!1}catch(r){var s=new n;return s.add(1),s.add(2),t(s[e](i(1/0)))}}}catch(e){return!1}}},85072:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},s=[],a=0;a<e.length;a++){var l=e[a],u=r.base?l[0]+r.base:l[0],h=i[u]||0,c="".concat(u," ").concat(h);i[u]=h+1;var d=n(c),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(m);else{var p=o(m,r);r.byIndex=a,t.splice(a,0,{identifier:c,updater:p,references:1})}s.push(c)}return s}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var s=0;s<i.length;s++){var a=n(i[s]);t[a].references--}for(var l=r(e,o),u=0;u<i.length;u++){var h=n(i[u]);0===t[h].references&&(t[h].updater(),t.splice(h,1))}i=l}}},85078:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(24902),o=n(92296),i=n(33044),s=n(82227);function a(e,t){const{className:n,elementType:a,ownerState:l,externalForwardedProps:u,internalForwardedProps:h,shouldForwardComponentProp:c=!1,...d}=t,{component:m,slots:p={[e]:void 0},slotProps:f={[e]:void 0},...g}=u,y=p[e]||a,w=(0,i.A)(f[e],l),{props:{component:v,..._},internalRef:b}=(0,s.A)({className:n,...d,externalForwardedProps:"root"===e?g:void 0,externalSlotProps:w}),S=(0,r.A)(b,w?.ref,t.ref),C="root"===e?v||m:v;return[y,(0,o.A)(y,{..."root"===e&&!m&&!p[e]&&h,..."root"!==e&&!p[e]&&h,..._,...C&&!c&&{as:C},...C&&c&&{component:C},ref:S},l)]}},85096:function(e,t,n){!function(e){"use strict";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ı"};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;return e+(t[r]||t[e%100-r]||t[e>=100?100:null])}},week:{dow:1,doy:7}})}(n(95093))},85408:(e,t,n)=>{"use strict";n.d(t,{K:()=>s});var r=n(41895),o=n(48046),i=n(13317);class s extends r.n{constructor(){super((e=>e))}insert(e,t){const n=(0,i.z)(this.indexedValues,t);this.indexedValues=(0,o.N)(n,e,t),super.insert(e,t)}remove(e){const t=(0,o.H)(this.indexedValues,e);this.indexedValues=(0,i.v)(t,e),super.remove(e)}}},85428:(e,t,n)=>{"use strict";n.d(t,{u:()=>i}),n(16280),n(98992),n(72577);var r=n(83986);const o=e=>`The id '${e}' is already declared in a map.`;function i(){let{errorIdExists:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=new Map;function n(){return[...t]}function i(e){return t.has(e)}return e=(0,r.Tn)(e)?e:o,{addItem:function(n,r){if(i(n))throw new Error(e(n));t.set(n,r)},clear:function(){t.clear()},getId:function(e){const[t]=n().find((t=>{let[n,r]=t;return e===r&&n}))||[null];return t},getItem:function(e){return t.get(e)},getItems:n,hasItem:i,removeItem:function(e){return t.delete(e)}}}},85498:function(e,t,n){!function(e){"use strict";var t=/(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,n=[/^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];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:t,monthsShortRegex:t,monthsStrictRegex:/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,monthsShortStrictRegex:/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,monthsParse:n,longMonthsParse:n,shortMonthsParse:n,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}})}(n(95093))},85874:(e,t,n)=>{"use strict";n.d(t,{$I:()=>i,DJ:()=>u,E:()=>a,Wm:()=>s,ZI:()=>l}),n(44114),n(98992),n(23215),n(3949);var r=n(32919);const o=26;function i(e){let t,n=e+1,r="";for(;n>0;)t=(n-1)%o,r=String.fromCharCode(65+t)+r,n=parseInt((n-t)/o,10);return r}function s(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,o)=>{r.push([n+t,o,e])})):Object.keys(e).forEach((o=>{r.push([n+t,o,e[o]])}))})),r}function a(e){let t=0;return Array.isArray(e)&&(e[0]&&Array.isArray(e[0])?t=e[0].length:e[0]&&(0,r.Gv)(e[0])&&(t=(0,r.$3)(e[0]))),t}function l(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>Array.isArray(e))))}function u(e){return!!(Array.isArray(e)&&e.length&&e.every((e=>"object"==typeof e&&!Array.isArray(e)&&null!==e)))}},85975:(e,t,n)=>{"use strict";n.d(t,{O:()=>o});var r=n(77325);function o(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return(0,r.mu)(e,((e,t,r)=>e+t.replace(/\r?\n\s*/g,"")+(n[r]?n[r]:"")),"").trim()}},86169:function(e,t,n){!function(e){"use strict";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 o="";if(t)switch(n){case"s":o="काही सेकंद";break;case"ss":o="%d सेकंद";break;case"m":o="एक मिनिट";break;case"mm":o="%d मिनिटे";break;case"h":o="एक तास";break;case"hh":o="%d तास";break;case"d":o="एक दिवस";break;case"dd":o="%d दिवस";break;case"M":o="एक महिना";break;case"MM":o="%d महिने";break;case"y":o="एक वर्ष";break;case"yy":o="%d वर्षे"}else switch(n){case"s":o="काही सेकंदां";break;case"ss":o="%d सेकंदां";break;case"m":o="एका मिनिटा";break;case"mm":o="%d मिनिटां";break;case"h":o="एका तासा";break;case"hh":o="%d तासां";break;case"d":o="एका दिवसा";break;case"dd":o="%d दिवसां";break;case"M":o="एका महिन्या";break;case"MM":o="%d महिन्यां";break;case"y":o="एका वर्षा";break;case"yy":o="%d वर्षां"}return o.replace(/%d/i,e)}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}})}(n(95093))},86368:(e,t,n)=>{"use strict";var r=n(46518),o=n(44576),i=n(59225).clear;r({global:!0,bind:!0,enumerable:!0,forced:o.clearImmediate!==i},{clearImmediate:i})},86571:function(e,t,n){!function(e){"use strict";var t={0:"-ум",1:"-ум",2:"-юм",3:"-юм",4:"-ум",5:"-ум",6:"-ум",7:"-ум",8:"-ум",9:"-ум",10:"-ум",12:"-ум",13:"-ум",20:"-ум",30:"-юм",40:"-ум",50:"-ум",60:"-ум",70:"-ум",80:"-ум",90:"-ум",100:"-ум"};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){return e+(t[e]||t[e%10]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(95093))},86794:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},87979:(e,t,n)=>{"use strict";n.d(t,{Gk:()=>m,L4:()=>u,r0:()=>d}),n(16280);var r=n(34647),o=n(11080),i=n(54950),s=n(82993);const{register:a,getItem:l,hasItem:u,getNames:h,getValues:c}=(0,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&&(e=(t=e).CELL_TYPE);const{editor:n,renderer:r,validator:l}=t;n&&(0,o.VA)(e,n),r&&(0,i.TS)(e,r),l&&(0,s.qV)(e,l),a(e,t)}},88383:function(e,t,n){!function(e){"use strict";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(){return 0===this.day()?"[La scorsa] dddd [a"+(this.hours()>1?"lle ":0===this.hours()?" ":"ll'")+"]LT":"[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}})}(n(95093))},88514:(e,t,n)=>{"use strict";function r(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{C:()=>o}),n(16280),n(98992),n(3949);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)}}},88612:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(10644);function o(e){return(0,r.A)(e).defaultView||window}},88727:e=>{"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},89026:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,N:()=>i});var r=n(96148),o=n(1908);function i(e){return(0,o.Ay)("MuiFilledInput",e)}const s={...n(26410).A,...(0,r.A)("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])}},89286:(e,t,n)=>{"use strict";var r=n(94402),o=n(38469),i=r.Set,s=r.add;e.exports=function(e){var t=new i;return o(e,(function(e){s(t,e)})),t}},89374:function(e,t,n){!function(e){"use strict";function t(e){return e%100==11||e%10!=1}function n(e,n,r,o){var i=e+" ";switch(r){case"s":return n||o?"nokkrar sekúndur":"nokkrum sekúndum";case"ss":return t(e)?i+(n||o?"sekúndur":"sekúndum"):i+"sekúnda";case"m":return n?"mínúta":"mínútu";case"mm":return t(e)?i+(n||o?"mínútur":"mínútum"):n?i+"mínúta":i+"mínútu";case"hh":return t(e)?i+(n||o?"klukkustundir":"klukkustundum"):i+"klukkustund";case"d":return n?"dagur":o?"dag":"degi";case"dd":return t(e)?n?i+"dagar":i+(o?"daga":"dögum"):n?i+"dagur":i+(o?"dag":"degi");case"M":return n?"mánuður":o?"mánuð":"mánuði";case"MM":return t(e)?n?i+"mánuðir":i+(o?"mánuði":"mánuðum"):n?i+"mánuður":i+(o?"mánuð":"mánuði");case"y":return n||o?"ár":"ári";case"yy":return t(e)?i+(n||o?"ár":"árum"):i+(n||o?"ár":"ári")}}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}})}(n(95093))},89544:(e,t,n)=>{"use strict";var r=n(82839);e.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)},89722:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},89756:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},90527:function(e,t,n){!function(e){"use strict";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,r,o,i){var s="";switch(o){case"s":return i?"muutaman sekunnin":"muutama sekunti";case"ss":s=i?"sekunnin":"sekuntia";break;case"m":return i?"minuutin":"minuutti";case"mm":s=i?"minuutin":"minuuttia";break;case"h":return i?"tunnin":"tunti";case"hh":s=i?"tunnin":"tuntia";break;case"d":return i?"päivän":"päivä";case"dd":s=i?"päivän":"päivää";break;case"M":return i?"kuukauden":"kuukausi";case"MM":s=i?"kuukauden":"kuukautta";break;case"y":return i?"vuoden":"vuosi";case"yy":s=i?"vuoden":"vuotta"}return function(e,r){return e<10?r?n[e]:t[e]:e}(e,i)+" "+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}})}(n(95093))},90609:function(e,t,n){!function(e){"use strict";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 o=e;switch(n){case"s":return r||t?"néhány másodperc":"néhány másodperce";case"ss":return o+(r||t)?" másodperc":" másodperce";case"m":return"egy"+(r||t?" perc":" perce");case"mm":return o+(r||t?" perc":" perce");case"h":return"egy"+(r||t?" óra":" órája");case"hh":return o+(r||t?" óra":" órája");case"d":return"egy"+(r||t?" nap":" napja");case"dd":return o+(r||t?" nap":" napja");case"M":return"egy"+(r||t?" hónap":" hónapja");case"MM":return o+(r||t?" hónap":" hónapja");case"y":return"egy"+(r||t?" év":" éve");case"yy":return o+(r||t?" év":" éve")}return""}function r(e){return(e?"":"[múlt] ")+"["+t[this.day()]+"] LT[-kor]"}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}})}(n(95093))},90679:(e,t,n)=>{"use strict";var r=n(1625),o=TypeError;e.exports=function(e,t){if(r(t,e))return e;throw new o("Incorrect invocation")}},91092:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>a});var o=n(96540);let i=0;const s={...r||(r=n.t(o,2))}.useId;function a(e){if(void 0!==s){const t=s();return e??t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n(`mui-${i}`))}),[t]),r}(e)}},91181:(e,t,n)=>{"use strict";var r,o,i,s=n(58622),a=n(44576),l=n(20034),u=n(66699),h=n(39297),c=n(77629),d=n(66119),m=n(30421),p="Object already initialized",f=a.TypeError,g=a.WeakMap;if(s||c.state){var y=c.state||(c.state=new g);y.get=y.get,y.has=y.has,y.set=y.set,r=function(e,t){if(y.has(e))throw new f(p);return t.facade=e,y.set(e,t),t},o=function(e){return y.get(e)||{}},i=function(e){return y.has(e)}}else{var w=d("state");m[w]=!0,r=function(e,t){if(h(e,w))throw new f(p);return t.facade=e,u(e,w,t),t},o=function(e){return h(e,w)?e[w]:{}},i=function(e){return h(e,w)}}e.exports={set:r,get:o,has:i,enforce:function(e){return i(e)?o(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=o(t)).type!==e)throw new f("Incompatible receiver, "+e+" required");return n}}}},91291:(e,t,n)=>{"use strict";var r=n(80741);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},91385:(e,t,n)=>{"use strict";var r=n(9539);e.exports=function(e,t,n){for(var o=e.length-1;o>=0;o--)if(void 0!==e[o])try{n=r(e[o].iterator,t,n)}catch(e){t="throw",n=e}if("throw"===t)throw n;return n}},92140:(e,t,n)=>{"use strict";var r={};r[n(78227)("toStringTag")]="z",e.exports="[object z]"===String(r)},92182:(e,t,n)=>{"use strict";n.d(t,{F:()=>s});var r=n(69478),o=n(20091),i=n(65615);function s(e,t,n,s,a,l,u){r.j.apply(this,[e,t,n,s,a,l,u]);let h=l;!h&&u.placeholder&&(h=u.placeholder),h=(0,i.As)(h),u.trimWhitespace&&(h=h.trim()),(0,o.c6)(t,h)}s.RENDERER_TYPE="text"},92296:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e,t,n){return void 0===e||"string"==typeof e?t:{...t,ownerState:{...t.ownerState,...n}}}},92297:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},92572:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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}})}(n(95093))},92796:(e,t,n)=>{"use strict";var r=n(79039),o=n(94901),i=/#|\.prototype\./,s=function(e,t){var n=l[a(e)];return n===h||n!==u&&(o(t)?r(t):!!t)},a=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},l=s.data={},u=s.NATIVE="N",h=s.POLYFILL="P";e.exports=s},93383:function(e,t,n){!function(e){"use strict";function t(e,t,n,r){var o={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?o[n][0]:o[n][1]}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){return"D"===t?e+"er":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"}})}(n(95093))},93514:(e,t,n)=>{"use strict";n(6469)("flat")},93583:(e,t,n)=>{"use strict";function r({props:e,states:t,muiFormControl:n}){return t.reduce(((t,r)=>(t[r]=e[r],n&&void 0===e[r]&&(t[r]=n[r]),t)),{})}n.d(t,{A:()=>r})},93601:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},93781:(e,t,n)=>{"use strict";n.d(t,{LX:()=>p,MA:()=>m,_W:()=>f,Lc:()=>y,Ms:()=>w});var r=n(7196),o=n(39612),i=n(49900);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},u=function(){const e={};return t=>(void 0===e[t]&&(e[t]=(e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=s[t],o=a[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})(t)),e[t])}(),h=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],c=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],d=[...h,...c];function m(e,t,n,r){const i=(0,o.Yn)(e,t,!0)??n;return"number"==typeof i||"string"==typeof i?e=>"string"==typeof e?e:"string"==typeof i?i.startsWith("var(")&&0===e?0:i.startsWith("var(")&&1===e?i:`calc(${e} * ${i})`:i*e:Array.isArray(i)?e=>{if("string"==typeof e)return e;const t=Math.abs(e),n=i[t];return e>=0?n:"number"==typeof n?-n:"string"==typeof n&&n.startsWith("var(")?`calc(-1 * ${n})`:`-${n}`}:"function"==typeof i?i:()=>{}}function p(e){return m(e,"spacing",8)}function f(e,t){return"string"==typeof t||null==t?t:e(t)}function g(e,t){const n=p(e.theme);return Object.keys(e).map((o=>function(e,t,n,o){if(!t.includes(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=f(t,n),e)),{})}(u(n),o),s=e[n];return(0,r.NI)(e,s,i)}(e,t,o,n))).reduce(i.A,{})}function y(e){return g(e,h)}function w(e){return g(e,c)}function v(e){return g(e,d)}y.propTypes={},y.filterProps=h,w.propTypes={},w.filterProps=c,v.propTypes={},v.filterProps=d},94034:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96540),o=n(40961),i=n(3576),s=n(24902),a=n(11108),l=n(17726);const u=r.forwardRef((function(e,t){const{children:n,container:u,disablePortal:h=!1}=e,[c,d]=r.useState(null),m=(0,s.A)(r.isValidElement(n)?(0,l.A)(n):null,t);if((0,i.A)((()=>{h||d(function(e){return"function"==typeof e?e():e}(u)||document.body)}),[u,h]),(0,i.A)((()=>{if(c&&!h)return(0,a.A)(t,c),()=>{(0,a.A)(t,null)}}),[t,c,h]),h){if(r.isValidElement(n)){const e={ref:m};return r.cloneElement(n,e)}return n}return c?o.createPortal(n,c):c}))},94402:(e,t,n)=>{"use strict";var r=n(79504),o=Set.prototype;e.exports={Set,add:r(o.add),has:r(o.has),remove:r(o.delete),proto:o}},94418:function(e,t,n){!function(e){"use strict";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 o(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function i(e,t,n){var r=e+" ";switch(n){case"ss":return r+(o(e)?"sekundy":"sekund");case"m":return t?"minuta":"minutę";case"mm":return r+(o(e)?"minuty":"minut");case"h":return t?"godzina":"godzinę";case"hh":return r+(o(e)?"godziny":"godzin");case"ww":return r+(o(e)?"tygodnie":"tygodni");case"MM":return r+(o(e)?"miesiące":"miesięcy");case"yy":return r+(o(e)?"lata":"lat")}}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:i,m:i,mm:i,h:i,hh:i,d:"1 dzień",dd:"%d dni",w:"tydzień",ww:i,M:"miesiąc",MM:i,y:"rok",yy:i},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:"%d.",week:{dow:1,doy:4}})}(n(95093))},94726:(e,t,n)=>{"use strict";n.d(t,{U:()=>s,j:()=>i}),n(16280),n(44114);var r=n(88514);function o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const i=50;class s extends r.C{constructor(e){let{calculationTypes:t,viewportWidth:n,scrollOffset:r,totalColumns:i,columnWidthFn:s,overrideFn:a,inlineStartOffset:l}=e;super(t),o(this,"viewportWidth",0),o(this,"scrollOffset",0),o(this,"zeroBasedScrollOffset",0),o(this,"totalColumns",0),o(this,"columnWidthFn",null),o(this,"columnWidth",0),o(this,"overrideFn",null),o(this,"inlineStartOffset",0),o(this,"totalCalculatedWidth",0),o(this,"startPositions",[]),o(this,"needReverse",!0),this.viewportWidth=n,this.scrollOffset=r,this.zeroBasedScrollOffset=Math.max(r,0),this.totalColumns=i,this.columnWidthFn=s,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)?i:t}}},94814:(e,t,n)=>{"use strict";n.d(t,{A:()=>u}),n(16280),n(44114);var r=n(3709);function o(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){return e.get(s(e,t))}function s(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 a=new WeakMap;class l{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];var i,l;o(this,"highlight",null),o(this,"from",null),o(this,"to",null),function(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}(this,a,!1),this.highlight=e.clone(),this.from=t.clone(),this.to=n.clone(),l=r,(i=a).set(s(i,this),l)}setHighlight(e){return this.highlight=e.clone(),this}setFrom(e){return this.from=e.clone(),this}setTo(e){return this.to=e.clone(),this}normalize(){return this.highlight.normalize(),this.from.normalize(),this.to.normalize(),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(),o=this.getOuterBottomEndCorner();return r.row<=t&&o.row>=t&&r.col<=n&&o.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(),o=this.getDirection(),i=e.getOuterTopStartCorner(),s=e.getOuterBottomEndCorner(),a=Math.min(n.row,i.row),l=Math.min(n.col,i.col),u=Math.max(r.row,s.row),h=Math.max(r.col,s.col),c=this._createCellCoords(a,l),d=this._createCellCoords(u,h);return this.from=c,this.to=d,this.setDirection(o),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()]}}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(){switch(this.getDirection()){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")}}flipDirectionHorizontally(){switch(this.getDirection()){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")}}getTopStartCorner(){return this._createCellCoords(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col)).normalize()}getTopLeftCorner(){return i(a,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 i(a,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 i(a,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 i(a,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 i(a,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 i(a,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 i(a,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 i(a,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=Math.min(this.from.row,this.to.row),n=Math.max(this.from.row,this.to.row),r=Math.min(this.from.col,this.to.col),o=Math.max(this.from.col,this.to.col),s=Math.min(e.from.row,e.to.row),l=Math.max(e.from.row,e.to.row),u=Math.min(e.from.col,e.to.col),h=Math.max(e.from.col,e.to.col),c=[];return t===s&&c.push("top"),o===h&&c.push(i(a,this)?"left":"right"),n===l&&c.push("bottom"),r===u&&c.push(i(a,this)?"right":"left"),c}getInner(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let o=e.col;o<=t.col;o++)this.from.row===r&&this.from.col===o||this.to.row===r&&this.to.col===o||n.push(this._createCellCoords(r,o));return n}getAll(){const e=this.getOuterTopStartCorner(),t=this.getOuterBottomEndCorner(),n=[];for(let r=e.row;r<=t.row;r++)for(let o=e.col;o<=t.col;o++)e.row===r&&e.col===o?n.push(e):t.row===r&&t.col===o?n.push(t):n.push(this._createCellCoords(r,o));return n}forAll(e){const t=this.getOuterTopStartCorner(),n=this.getOuterBottomEndCorner();for(let r=t.row;r<=n.row;r++)for(let o=t.col;o<=n.col;o++)if(!1===e(r,o))return}clone(){return new l(this.highlight,this.from,this.to,i(a,this))}toObject(){return{from:this.from.toObject(),to:this.to.toObject()}}_createCellCoords(e,t){return new r.A(e,t,i(a,this))}}const u=l},94901:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},95050:function(e,t,n){!function(e){"use strict";var t={1:"૧",2:"૨",3:"૩",4:"૪",5:"૫",6:"૬",7:"૭",8:"૮",9:"૯",0:"૦"},n={"૧":"1","૨":"2","૩":"3","૪":"4","૫":"5","૬":"6","૭":"7","૮":"8","૯":"9","૦":"0"};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}})}(n(95093))},95093:function(e,t,n){(e=n.nmd(e)).exports=function(){"use strict";var t,r;function o(){return t.apply(null,arguments)}function i(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function s(e){return null!=e&&"[object Object]"===Object.prototype.toString.call(e)}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(e).length;var t;for(t in e)if(a(e,t))return!1;return!0}function u(e){return void 0===e}function h(e){return"number"==typeof e||"[object Number]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function d(e,t){var n,r=[],o=e.length;for(n=0;n<o;++n)r.push(t(e[n],n));return r}function m(e,t){for(var n in t)a(t,n)&&(e[n]=t[n]);return a(t,"toString")&&(e.toString=t.toString),a(t,"valueOf")&&(e.valueOf=t.valueOf),e}function p(e,t,n,r){return kt(e,t,n,r,!0).utc()}function f(e){return null==e._pf&&(e._pf={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}),e._pf}function g(e){var t=null,n=!1,o=e._d&&!isNaN(e._d.getTime());return o&&(t=f(e),n=r.call(t.parsedDateParts,(function(e){return null!=e})),o=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&&(o=o&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)),null!=Object.isFrozen&&Object.isFrozen(e)?o:(e._isValid=o,e._isValid)}function y(e){var t=p(NaN);return null!=e?m(f(t),e):f(t).userInvalidated=!0,t}r=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 w=o.momentProperties=[],v=!1;function _(e,t){var n,r,o,i=w.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=f(t)),u(t._locale)||(e._locale=t._locale),i>0)for(n=0;n<i;n++)u(o=t[r=w[n]])||(e[r]=o);return e}function b(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===v&&(v=!0,o.updateOffset(this),v=!1)}function S(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function C(e){!1===o.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function E(e,t){var n=!0;return m((function(){if(null!=o.deprecationHandler&&o.deprecationHandler(null,e),n){var r,i,s,l=[],u=arguments.length;for(i=0;i<u;i++){if(r="","object"==typeof arguments[i]){for(s in r+="\n["+i+"] ",arguments[0])a(arguments[0],s)&&(r+=s+": "+arguments[0][s]+", ");r=r.slice(0,-2)}else r=arguments[i];l.push(r)}C(e+"\nArguments: "+Array.prototype.slice.call(l).join("")+"\n"+(new Error).stack),n=!1}return t.apply(this,arguments)}),t)}var M,T={};function R(e,t){null!=o.deprecationHandler&&o.deprecationHandler(e,t),T[e]||(C(t),T[e]=!0)}function A(e){return"undefined"!=typeof Function&&e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function N(e,t){var n,r=m({},e);for(n in t)a(t,n)&&(s(e[n])&&s(t[n])?(r[n]={},m(r[n],e[n]),m(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);for(n in e)a(e,n)&&!a(t,n)&&s(e[n])&&(r[n]=m({},r[n]));return r}function L(e){null!=e&&this.set(e)}o.suppressDeprecationWarnings=!1,o.deprecationHandler=null,M=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)a(e,t)&&n.push(t);return n};function x(e,t,n){var r=""+Math.abs(e),o=t-r.length;return(e>=0?n?"+":"":"-")+Math.pow(10,Math.max(0,o)).toString().substr(1)+r}var O=/(\[[^\[]*\])|(\\)?([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,I=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,k={},D={};function P(e,t,n,r){var o=r;"string"==typeof r&&(o=function(){return this[r]()}),e&&(D[e]=o),t&&(D[t[0]]=function(){return x(o.apply(this,arguments),t[1],t[2])}),n&&(D[n]=function(){return this.localeData().ordinal(o.apply(this,arguments),e)})}function H(e,t){return e.isValid()?(t=F(t,e.localeData()),k[t]=k[t]||function(e){var t,n,r,o=e.match(O);for(t=0,n=o.length;t<n;t++)D[o[t]]?o[t]=D[o[t]]:o[t]=(r=o[t]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(t){var r,i="";for(r=0;r<n;r++)i+=A(o[r])?o[r].call(t,e):o[r];return i}}(t),k[t](e)):e.localeData().invalidDate()}function F(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(I.lastIndex=0;n>=0&&I.test(e);)e=e.replace(I,r),I.lastIndex=0,n-=1;return e}var Y={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 V(e){return"string"==typeof e?Y[e]||Y[e.toLowerCase()]:void 0}function U(e){var t,n,r={};for(n in e)a(e,n)&&(t=V(n))&&(r[t]=e[n]);return r}var B={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};var W,j=/\d/,z=/\d\d/,G=/\d{3}/,$=/\d{4}/,K=/[+-]?\d{6}/,X=/\d\d?/,q=/\d\d\d\d?/,Q=/\d\d\d\d\d\d?/,J=/\d{1,3}/,Z=/\d{1,4}/,ee=/[+-]?\d{1,6}/,te=/\d+/,ne=/[+-]?\d+/,re=/Z|[+-]\d\d:?\d\d/gi,oe=/Z|[+-]\d\d(?::?\d\d)?/gi,ie=/[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,se=/^[1-9]\d?/,ae=/^([1-9]\d|\d)/;function le(e,t,n){W[e]=A(t)?t:function(e,r){return e&&n?n:t}}function ue(e,t){return a(W,e)?W[e](t._strict,t._locale):new RegExp(he(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(e,t,n,r,o){return t||n||r||o}))))}function he(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ce(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function de(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=ce(t)),n}W={};var me={};function pe(e,t){var n,r,o=t;for("string"==typeof e&&(e=[e]),h(t)&&(o=function(e,n){n[t]=de(e)}),r=e.length,n=0;n<r;n++)me[e[n]]=o}function fe(e,t){pe(e,(function(e,n,r,o){r._w=r._w||{},t(e,r._w,r,o)}))}function ge(e,t,n){null!=t&&a(me,e)&&me[e](t,n._a,n,e)}function ye(e){return e%4==0&&e%100!=0||e%400==0}var we=0,ve=1,_e=2,be=3,Se=4,Ce=5,Ee=6,Me=7,Te=8;function Re(e){return ye(e)?366:365}P("Y",0,0,(function(){var e=this.year();return e<=9999?x(e,4):"+"+e})),P(0,["YY",2],0,(function(){return this.year()%100})),P(0,["YYYY",4],0,"year"),P(0,["YYYYY",5],0,"year"),P(0,["YYYYYY",6,!0],0,"year"),le("Y",ne),le("YY",X,z),le("YYYY",Z,$),le("YYYYY",ee,K),le("YYYYYY",ee,K),pe(["YYYYY","YYYYYY"],we),pe("YYYY",(function(e,t){t[we]=2===e.length?o.parseTwoDigitYear(e):de(e)})),pe("YY",(function(e,t){t[we]=o.parseTwoDigitYear(e)})),pe("Y",(function(e,t){t[we]=parseInt(e,10)})),o.parseTwoDigitYear=function(e){return de(e)+(de(e)>68?1900:2e3)};var Ae,Ne=Le("FullYear",!0);function Le(e,t){return function(n){return null!=n?(Oe(this,e,n),o.updateOffset(this,t),this):xe(this,e)}}function xe(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 Oe(e,t,n){var r,o,i,s,a;if(e.isValid()&&!isNaN(n)){switch(r=e._d,o=e._isUTC,t){case"Milliseconds":return void(o?r.setUTCMilliseconds(n):r.setMilliseconds(n));case"Seconds":return void(o?r.setUTCSeconds(n):r.setSeconds(n));case"Minutes":return void(o?r.setUTCMinutes(n):r.setMinutes(n));case"Hours":return void(o?r.setUTCHours(n):r.setHours(n));case"Date":return void(o?r.setUTCDate(n):r.setDate(n));case"FullYear":break;default:return}i=n,s=e.month(),a=29!==(a=e.date())||1!==s||ye(i)?a:28,o?r.setUTCFullYear(i,s,a):r.setFullYear(i,s,a)}}function Ie(e,t){if(isNaN(e)||isNaN(t))return NaN;var n,r=(t%(n=12)+n)%n;return e+=(t-r)/12,1===r?ye(e)?29:28:31-r%7%2}Ae=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},P("M",["MM",2],"Mo",(function(){return this.month()+1})),P("MMM",0,0,(function(e){return this.localeData().monthsShort(this,e)})),P("MMMM",0,0,(function(e){return this.localeData().months(this,e)})),le("M",X,se),le("MM",X,z),le("MMM",(function(e,t){return t.monthsShortRegex(e)})),le("MMMM",(function(e,t){return t.monthsRegex(e)})),pe(["M","MM"],(function(e,t){t[ve]=de(e)-1})),pe(["MMM","MMMM"],(function(e,t,n,r){var o=n._locale.monthsParse(e,r,n._strict);null!=o?t[ve]=o:f(n).invalidMonth=e}));var ke="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),De="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pe=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,He=ie,Fe=ie;function Ye(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)i=p([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(i,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(i,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(o=Ae.call(this._shortMonthsParse,s))?o:null:-1!==(o=Ae.call(this._longMonthsParse,s))?o:null:"MMM"===t?-1!==(o=Ae.call(this._shortMonthsParse,s))||-1!==(o=Ae.call(this._longMonthsParse,s))?o:null:-1!==(o=Ae.call(this._longMonthsParse,s))||-1!==(o=Ae.call(this._shortMonthsParse,s))?o:null}function Ve(e,t){if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=de(t);else if(!h(t=e.localeData().monthsParse(t)))return e;var n=t,r=e.date();return r=r<29?r:Math.min(r,Ie(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Ue(e){return null!=e?(Ve(this,e),o.updateOffset(this,!0),this):xe(this,"Month")}function Be(){function e(e,t){return t.length-e.length}var t,n,r,o,i=[],s=[],a=[];for(t=0;t<12;t++)n=p([2e3,t]),r=he(this.monthsShort(n,"")),o=he(this.months(n,"")),i.push(r),s.push(o),a.push(o),a.push(r);i.sort(e),s.sort(e),a.sort(e),this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+i.join("|")+")","i")}function We(e,t,n,r,o,i,s){var a;return e<100&&e>=0?(a=new Date(e+400,t,n,r,o,i,s),isFinite(a.getFullYear())&&a.setFullYear(e)):a=new Date(e,t,n,r,o,i,s),a}function je(e){var t,n;return e<100&&e>=0?((n=Array.prototype.slice.call(arguments))[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 ze(e,t,n){var r=7+t-n;return-(7+je(e,0,r).getUTCDay()-t)%7+r-1}function Ge(e,t,n,r,o){var i,s,a=1+7*(t-1)+(7+n-r)%7+ze(e,r,o);return a<=0?s=Re(i=e-1)+a:a>Re(e)?(i=e+1,s=a-Re(e)):(i=e,s=a),{year:i,dayOfYear:s}}function $e(e,t,n){var r,o,i=ze(e.year(),t,n),s=Math.floor((e.dayOfYear()-i-1)/7)+1;return s<1?r=s+Ke(o=e.year()-1,t,n):s>Ke(e.year(),t,n)?(r=s-Ke(e.year(),t,n),o=e.year()+1):(o=e.year(),r=s),{week:r,year:o}}function Ke(e,t,n){var r=ze(e,t,n),o=ze(e+1,t,n);return(Re(e)-r+o)/7}P("w",["ww",2],"wo","week"),P("W",["WW",2],"Wo","isoWeek"),le("w",X,se),le("ww",X,z),le("W",X,se),le("WW",X,z),fe(["w","ww","W","WW"],(function(e,t,n,r){t[r.substr(0,1)]=de(e)}));function Xe(e,t){return e.slice(t,7).concat(e.slice(0,t))}P("d",0,"do","day"),P("dd",0,0,(function(e){return this.localeData().weekdaysMin(this,e)})),P("ddd",0,0,(function(e){return this.localeData().weekdaysShort(this,e)})),P("dddd",0,0,(function(e){return this.localeData().weekdays(this,e)})),P("e",0,0,"weekday"),P("E",0,0,"isoWeekday"),le("d",X),le("e",X),le("E",X),le("dd",(function(e,t){return t.weekdaysMinRegex(e)})),le("ddd",(function(e,t){return t.weekdaysShortRegex(e)})),le("dddd",(function(e,t){return t.weekdaysRegex(e)})),fe(["dd","ddd","dddd"],(function(e,t,n,r){var o=n._locale.weekdaysParse(e,r,n._strict);null!=o?t.d=o:f(n).invalidWeekday=e})),fe(["d","e","E"],(function(e,t,n,r){t[r]=de(e)}));var qe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Qe="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Je="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Ze=ie,et=ie,tt=ie;function nt(e,t,n){var r,o,i,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)i=p([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(i,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(i,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(i,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(o=Ae.call(this._weekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Ae.call(this._shortWeekdaysParse,s))?o:null:-1!==(o=Ae.call(this._minWeekdaysParse,s))?o:null:"dddd"===t?-1!==(o=Ae.call(this._weekdaysParse,s))||-1!==(o=Ae.call(this._shortWeekdaysParse,s))||-1!==(o=Ae.call(this._minWeekdaysParse,s))?o:null:"ddd"===t?-1!==(o=Ae.call(this._shortWeekdaysParse,s))||-1!==(o=Ae.call(this._weekdaysParse,s))||-1!==(o=Ae.call(this._minWeekdaysParse,s))?o:null:-1!==(o=Ae.call(this._minWeekdaysParse,s))||-1!==(o=Ae.call(this._weekdaysParse,s))||-1!==(o=Ae.call(this._shortWeekdaysParse,s))?o:null}function rt(){function e(e,t){return t.length-e.length}var t,n,r,o,i,s=[],a=[],l=[],u=[];for(t=0;t<7;t++)n=p([2e3,1]).day(t),r=he(this.weekdaysMin(n,"")),o=he(this.weekdaysShort(n,"")),i=he(this.weekdays(n,"")),s.push(r),a.push(o),l.push(i),u.push(r),u.push(o),u.push(i);s.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("^("+s.join("|")+")","i")}function ot(){return this.hours()%12||12}function it(e,t){P(e,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)}))}function st(e,t){return t._meridiemParse}P("H",["HH",2],0,"hour"),P("h",["hh",2],0,ot),P("k",["kk",2],0,(function(){return this.hours()||24})),P("hmm",0,0,(function(){return""+ot.apply(this)+x(this.minutes(),2)})),P("hmmss",0,0,(function(){return""+ot.apply(this)+x(this.minutes(),2)+x(this.seconds(),2)})),P("Hmm",0,0,(function(){return""+this.hours()+x(this.minutes(),2)})),P("Hmmss",0,0,(function(){return""+this.hours()+x(this.minutes(),2)+x(this.seconds(),2)})),it("a",!0),it("A",!1),le("a",st),le("A",st),le("H",X,ae),le("h",X,se),le("k",X,se),le("HH",X,z),le("hh",X,z),le("kk",X,z),le("hmm",q),le("hmmss",Q),le("Hmm",q),le("Hmmss",Q),pe(["H","HH"],be),pe(["k","kk"],(function(e,t,n){var r=de(e);t[be]=24===r?0:r})),pe(["a","A"],(function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e})),pe(["h","hh"],(function(e,t,n){t[be]=de(e),f(n).bigHour=!0})),pe("hmm",(function(e,t,n){var r=e.length-2;t[be]=de(e.substr(0,r)),t[Se]=de(e.substr(r)),f(n).bigHour=!0})),pe("hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[be]=de(e.substr(0,r)),t[Se]=de(e.substr(r,2)),t[Ce]=de(e.substr(o)),f(n).bigHour=!0})),pe("Hmm",(function(e,t,n){var r=e.length-2;t[be]=de(e.substr(0,r)),t[Se]=de(e.substr(r))})),pe("Hmmss",(function(e,t,n){var r=e.length-4,o=e.length-2;t[be]=de(e.substr(0,r)),t[Se]=de(e.substr(r,2)),t[Ce]=de(e.substr(o))}));var at=Le("Hours",!0);var lt,ut={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,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",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ke,monthsShort:De,week:{dow:0,doy:6},weekdays:qe,weekdaysMin:Je,weekdaysShort:Qe,meridiemParse:/[ap]\.?m?\.?/i},ht={},ct={};function dt(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 mt(e){return e?e.toLowerCase().replace("_","-"):e}function pt(t){var r=null;if(void 0===ht[t]&&e&&e.exports&&function(e){return!(!e||!e.match("^[^/\\\\]*$"))}(t))try{r=lt._abbr,n(35358)("./"+t),ft(r)}catch(e){ht[t]=null}return ht[t]}function ft(e,t){var n;return e&&((n=u(t)?yt(e):gt(e,t))?lt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),lt._abbr}function gt(e,t){if(null!==t){var n,r=ut;if(t.abbr=e,null!=ht[e])R("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=ht[e]._config;else if(null!=t.parentLocale)if(null!=ht[t.parentLocale])r=ht[t.parentLocale]._config;else{if(null==(n=pt(t.parentLocale)))return ct[t.parentLocale]||(ct[t.parentLocale]=[]),ct[t.parentLocale].push({name:e,config:t}),null;r=n._config}return ht[e]=new L(N(r,t)),ct[e]&&ct[e].forEach((function(e){gt(e.name,e.config)})),ft(e),ht[e]}return delete ht[e],null}function yt(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return lt;if(!i(e)){if(t=pt(e))return t;e=[e]}return function(e){for(var t,n,r,o,i=0;i<e.length;){for(t=(o=mt(e[i]).split("-")).length,n=(n=mt(e[i+1]))?n.split("-"):null;t>0;){if(r=pt(o.slice(0,t).join("-")))return r;if(n&&n.length>=t&&dt(o,n)>=t-1)break;t--}i++}return lt}(e)}function wt(e){var t,n=e._a;return n&&-2===f(e).overflow&&(t=n[ve]<0||n[ve]>11?ve:n[_e]<1||n[_e]>Ie(n[we],n[ve])?_e:n[be]<0||n[be]>24||24===n[be]&&(0!==n[Se]||0!==n[Ce]||0!==n[Ee])?be:n[Se]<0||n[Se]>59?Se:n[Ce]<0||n[Ce]>59?Ce:n[Ee]<0||n[Ee]>999?Ee:-1,f(e)._overflowDayOfYear&&(t<we||t>_e)&&(t=_e),f(e)._overflowWeeks&&-1===t&&(t=Me),f(e)._overflowWeekday&&-1===t&&(t=Te),f(e).overflow=t),e}var vt=/^\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)?)?$/,_t=/^\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)?)?$/,bt=/Z|[+-]\d\d(?::?\d\d)?/,St=[["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]],Ct=[["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/]],Et=/^\/?Date\((-?\d+)/i,Mt=/^(?:(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}))$/,Tt={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Rt(e){var t,n,r,o,i,s,a=e._i,l=vt.exec(a)||_t.exec(a),u=St.length,h=Ct.length;if(l){for(f(e).iso=!0,t=0,n=u;t<n;t++)if(St[t][1].exec(l[1])){o=St[t][0],r=!1!==St[t][2];break}if(null==o)return void(e._isValid=!1);if(l[3]){for(t=0,n=h;t<n;t++)if(Ct[t][1].exec(l[3])){i=(l[2]||" ")+Ct[t][0];break}if(null==i)return void(e._isValid=!1)}if(!r&&null!=i)return void(e._isValid=!1);if(l[4]){if(!bt.exec(l[4]))return void(e._isValid=!1);s="Z"}e._f=o+(i||"")+(s||""),Ot(e)}else e._isValid=!1}function At(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Nt(e){var t,n,r,o,i,s,a,l,u=Mt.exec(e._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(u){if(n=u[4],r=u[3],o=u[2],i=u[5],s=u[6],a=u[7],l=[At(n),De.indexOf(r),parseInt(o,10),parseInt(i,10),parseInt(s,10)],a&&l.push(parseInt(a,10)),t=l,!function(e,t,n){return!e||Qe.indexOf(e)===new Date(t[0],t[1],t[2]).getDay()||(f(n).weekdayMismatch=!0,n._isValid=!1,!1)}(u[1],t,e))return;e._a=t,e._tzm=function(e,t,n){if(e)return Tt[e];if(t)return 0;var r=parseInt(n,10),o=r%100;return(r-o)/100*60+o}(u[8],u[9],u[10]),e._d=je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),f(e).rfc2822=!0}else e._isValid=!1}function Lt(e,t,n){return null!=e?e:null!=t?t:n}function xt(e){var t,n,r,i,s,a=[];if(!e._d){for(r=function(e){var t=new Date(o.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}(e),e._w&&null==e._a[_e]&&null==e._a[ve]&&function(e){var t,n,r,o,i,s,a,l,u;null!=(t=e._w).GG||null!=t.W||null!=t.E?(i=1,s=4,n=Lt(t.GG,e._a[we],$e(Dt(),1,4).year),r=Lt(t.W,1),((o=Lt(t.E,1))<1||o>7)&&(l=!0)):(i=e._locale._week.dow,s=e._locale._week.doy,u=$e(Dt(),i,s),n=Lt(t.gg,e._a[we],u.year),r=Lt(t.w,u.week),null!=t.d?((o=t.d)<0||o>6)&&(l=!0):null!=t.e?(o=t.e+i,(t.e<0||t.e>6)&&(l=!0)):o=i),r<1||r>Ke(n,i,s)?f(e)._overflowWeeks=!0:null!=l?f(e)._overflowWeekday=!0:(a=Ge(n,r,o,i,s),e._a[we]=a.year,e._dayOfYear=a.dayOfYear)}(e),null!=e._dayOfYear&&(s=Lt(e._a[we],r[we]),(e._dayOfYear>Re(s)||0===e._dayOfYear)&&(f(e)._overflowDayOfYear=!0),n=je(s,0,e._dayOfYear),e._a[ve]=n.getUTCMonth(),e._a[_e]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[be]&&0===e._a[Se]&&0===e._a[Ce]&&0===e._a[Ee]&&(e._nextDay=!0,e._a[be]=0),e._d=(e._useUTC?je:We).apply(null,a),i=e._useUTC?e._d.getUTCDay():e._d.getDay(),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[be]=24),e._w&&void 0!==e._w.d&&e._w.d!==i&&(f(e).weekdayMismatch=!0)}}function Ot(e){if(e._f!==o.ISO_8601)if(e._f!==o.RFC_2822){e._a=[],f(e).empty=!0;var t,n,r,i,s,a,l,u=""+e._i,h=u.length,c=0;for(l=(r=F(e._f,e._locale).match(O)||[]).length,t=0;t<l;t++)i=r[t],(n=(u.match(ue(i,e))||[])[0])&&((s=u.substr(0,u.indexOf(n))).length>0&&f(e).unusedInput.push(s),u=u.slice(u.indexOf(n)+n.length),c+=n.length),D[i]?(n?f(e).empty=!1:f(e).unusedTokens.push(i),ge(i,n,e)):e._strict&&!n&&f(e).unusedTokens.push(i);f(e).charsLeftOver=h-c,u.length>0&&f(e).unusedInput.push(u),e._a[be]<=12&&!0===f(e).bigHour&&e._a[be]>0&&(f(e).bigHour=void 0),f(e).parsedDateParts=e._a.slice(0),f(e).meridiem=e._meridiem,e._a[be]=function(e,t,n){var r;return null==n?t:null!=e.meridiemHour?e.meridiemHour(t,n):null!=e.isPM?((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0),t):t}(e._locale,e._a[be],e._meridiem),null!==(a=f(e).era)&&(e._a[we]=e._locale.erasConvertYear(a,e._a[we])),xt(e),wt(e)}else Nt(e);else Rt(e)}function It(e){var t=e._i,n=e._f;return e._locale=e._locale||yt(e._l),null===t||void 0===n&&""===t?y({nullInput:!0}):("string"==typeof t&&(e._i=t=e._locale.preparse(t)),S(t)?new b(wt(t)):(c(t)?e._d=t:i(n)?function(e){var t,n,r,o,i,s,a=!1,l=e._f.length;if(0===l)return f(e).invalidFormat=!0,void(e._d=new Date(NaN));for(o=0;o<l;o++)i=0,s=!1,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[o],Ot(t),g(t)&&(s=!0),i+=f(t).charsLeftOver,i+=10*f(t).unusedTokens.length,f(t).score=i,a?i<r&&(r=i,n=t):(null==r||i<r||s)&&(r=i,n=t,s&&(a=!0));m(e,n||t)}(e):n?Ot(e):function(e){var t=e._i;u(t)?e._d=new Date(o.now()):c(t)?e._d=new Date(t.valueOf()):"string"==typeof t?function(e){var t=Et.exec(e._i);null===t?(Rt(e),!1===e._isValid&&(delete e._isValid,Nt(e),!1===e._isValid&&(delete e._isValid,e._strict?e._isValid=!1:o.createFromInputFallback(e)))):e._d=new Date(+t[1])}(e):i(t)?(e._a=d(t.slice(0),(function(e){return parseInt(e,10)})),xt(e)):s(t)?function(e){if(!e._d){var t=U(e._i),n=void 0===t.day?t.date:t.day;e._a=d([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],(function(e){return e&&parseInt(e,10)})),xt(e)}}(e):h(t)?e._d=new Date(t):o.createFromInputFallback(e)}(e),g(e)||(e._d=null),e))}function kt(e,t,n,r,o){var a,u={};return!0!==t&&!1!==t||(r=t,t=void 0),!0!==n&&!1!==n||(r=n,n=void 0),(s(e)&&l(e)||i(e)&&0===e.length)&&(e=void 0),u._isAMomentObject=!0,u._useUTC=u._isUTC=o,u._l=n,u._i=e,u._f=t,u._strict=r,(a=new b(wt(It(u))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function Dt(e,t,n,r){return kt(e,t,n,r,!1)}o.createFromInputFallback=E("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":""))})),o.ISO_8601=function(){},o.RFC_2822=function(){};var Pt=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:y()})),Ht=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var e=Dt.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:y()}));function Ft(e,t){var n,r;if(1===t.length&&i(t[0])&&(t=t[0]),!t.length)return Dt();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}var Yt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Vt(e){var t=U(e),n=t.year||0,r=t.quarter||0,o=t.month||0,i=t.week||t.isoWeek||0,s=t.day||0,l=t.hour||0,u=t.minute||0,h=t.second||0,c=t.millisecond||0;this._isValid=function(e){var t,n,r=!1,o=Yt.length;for(t in e)if(a(e,t)&&(-1===Ae.call(Yt,t)||null!=e[t]&&isNaN(e[t])))return!1;for(n=0;n<o;++n)if(e[Yt[n]]){if(r)return!1;parseFloat(e[Yt[n]])!==de(e[Yt[n]])&&(r=!0)}return!0}(t),this._milliseconds=+c+1e3*h+6e4*u+1e3*l*60*60,this._days=+s+7*i,this._months=+o+3*r+12*n,this._data={},this._locale=yt(),this._bubble()}function Ut(e){return e instanceof Vt}function Bt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function Wt(e,t){P(e,0,0,(function(){var e=this.utcOffset(),n="+";return e<0&&(e=-e,n="-"),n+x(~~(e/60),2)+t+x(~~e%60,2)}))}Wt("Z",":"),Wt("ZZ",""),le("Z",oe),le("ZZ",oe),pe(["Z","ZZ"],(function(e,t,n){n._useUTC=!0,n._tzm=zt(oe,e)}));var jt=/([\+\-]|\d\d)/gi;function zt(e,t){var n,r,o=(t||"").match(e);return null===o?null:0===(r=60*(n=((o[o.length-1]||[])+"").match(jt)||["-",0,0])[1]+de(n[2]))?0:"+"===n[0]?r:-r}function Gt(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(S(e)||c(e)?e.valueOf():Dt(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),o.updateOffset(n,!1),n):Dt(e).local()}function $t(e){return-Math.round(e._d.getTimezoneOffset())}function Kt(){return!!this.isValid()&&this._isUTC&&0===this._offset}o.updateOffset=function(){};var Xt=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,qt=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Qt(e,t){var n,r,o,i,s,l,u=e,c=null;return Ut(e)?u={ms:e._milliseconds,d:e._days,M:e._months}:h(e)||!isNaN(+e)?(u={},t?u[t]=+e:u.milliseconds=+e):(c=Xt.exec(e))?(n="-"===c[1]?-1:1,u={y:0,d:de(c[_e])*n,h:de(c[be])*n,m:de(c[Se])*n,s:de(c[Ce])*n,ms:de(Bt(1e3*c[Ee]))*n}):(c=qt.exec(e))?(n="-"===c[1]?-1:1,u={y:Jt(c[2],n),M:Jt(c[3],n),w:Jt(c[4],n),d:Jt(c[5],n),h:Jt(c[6],n),m:Jt(c[7],n),s:Jt(c[8],n)}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(i=Dt(u.from),s=Dt(u.to),o=i.isValid()&&s.isValid()?(s=Gt(s,i),i.isBefore(s)?l=Zt(i,s):((l=Zt(s,i)).milliseconds=-l.milliseconds,l.months=-l.months),l):{milliseconds:0,months:0},(u={}).ms=o.milliseconds,u.M=o.months),r=new Vt(u),Ut(e)&&a(e,"_locale")&&(r._locale=e._locale),Ut(e)&&a(e,"_isValid")&&(r._isValid=e._isValid),r}function Jt(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function Zt(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 en(e,t){return function(n,r){var o;return null===r||isNaN(+r)||(R(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."),o=n,n=r,r=o),tn(this,Qt(n,r),e),this}}function tn(e,t,n,r){var i=t._milliseconds,s=Bt(t._days),a=Bt(t._months);e.isValid()&&(r=null==r||r,a&&Ve(e,xe(e,"Month")+a*n),s&&Oe(e,"Date",xe(e,"Date")+s*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&o.updateOffset(e,s||a))}Qt.fn=Vt.prototype,Qt.invalid=function(){return Qt(NaN)};var nn=en(1,"add"),rn=en(-1,"subtract");function on(e){return"string"==typeof e||e instanceof String}function sn(e){return S(e)||c(e)||on(e)||h(e)||function(e){var t=i(e),n=!1;return t&&(n=0===e.filter((function(t){return!h(t)&&on(e)})).length),t&&n}(e)||function(e){var t,n,r=s(e)&&!l(e),o=!1,i=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],u=i.length;for(t=0;t<u;t+=1)n=i[t],o=o||a(e,n);return r&&o}(e)||null==e}function an(e,t){if(e.date()<t.date())return-an(t,e);var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,"months");return-(n+(t-r<0?(t-r)/(r-e.clone().add(n-1,"months")):(t-r)/(e.clone().add(n+1,"months")-r)))||0}function ln(e){var t;return void 0===e?this._locale._abbr:(null!=(t=yt(e))&&(this._locale=t),this)}o.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",o.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var un=E("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 hn(){return this._locale}var cn=1e3,dn=6e4,mn=36e5,pn=126227808e5;function fn(e,t){return(e%t+t)%t}function gn(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-pn:new Date(e,t,n).valueOf()}function yn(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-pn:Date.UTC(e,t,n)}function wn(e,t){return t.erasAbbrRegex(e)}function vn(){var e,t,n,r,o,i=[],s=[],a=[],l=[],u=this.eras();for(e=0,t=u.length;e<t;++e)n=he(u[e].name),r=he(u[e].abbr),o=he(u[e].narrow),s.push(n),i.push(r),a.push(o),l.push(n),l.push(r),l.push(o);this._erasRegex=new RegExp("^("+l.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+s.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+i.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+a.join("|")+")","i")}function _n(e,t){P(0,[e,e.length],0,t)}function bn(e,t,n,r,o){var i;return null==e?$e(this,r,o).year:(t>(i=Ke(e,r,o))&&(t=i),Sn.call(this,e,t,n,r,o))}function Sn(e,t,n,r,o){var i=Ge(e,t,n,r,o),s=je(i.year,0,i.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}P("N",0,0,"eraAbbr"),P("NN",0,0,"eraAbbr"),P("NNN",0,0,"eraAbbr"),P("NNNN",0,0,"eraName"),P("NNNNN",0,0,"eraNarrow"),P("y",["y",1],"yo","eraYear"),P("y",["yy",2],0,"eraYear"),P("y",["yyy",3],0,"eraYear"),P("y",["yyyy",4],0,"eraYear"),le("N",wn),le("NN",wn),le("NNN",wn),le("NNNN",(function(e,t){return t.erasNameRegex(e)})),le("NNNNN",(function(e,t){return t.erasNarrowRegex(e)})),pe(["N","NN","NNN","NNNN","NNNNN"],(function(e,t,n,r){var o=n._locale.erasParse(e,r,n._strict);o?f(n).era=o:f(n).invalidEra=e})),le("y",te),le("yy",te),le("yyy",te),le("yyyy",te),le("yo",(function(e,t){return t._eraYearOrdinalRegex||te})),pe(["y","yy","yyy","yyyy"],we),pe(["yo"],(function(e,t,n,r){var o;n._locale._eraYearOrdinalRegex&&(o=e.match(n._locale._eraYearOrdinalRegex)),n._locale.eraYearOrdinalParse?t[we]=n._locale.eraYearOrdinalParse(e,o):t[we]=parseInt(e,10)})),P(0,["gg",2],0,(function(){return this.weekYear()%100})),P(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),_n("gggg","weekYear"),_n("ggggg","weekYear"),_n("GGGG","isoWeekYear"),_n("GGGGG","isoWeekYear"),le("G",ne),le("g",ne),le("GG",X,z),le("gg",X,z),le("GGGG",Z,$),le("gggg",Z,$),le("GGGGG",ee,K),le("ggggg",ee,K),fe(["gggg","ggggg","GGGG","GGGGG"],(function(e,t,n,r){t[r.substr(0,2)]=de(e)})),fe(["gg","GG"],(function(e,t,n,r){t[r]=o.parseTwoDigitYear(e)})),P("Q",0,"Qo","quarter"),le("Q",j),pe("Q",(function(e,t){t[ve]=3*(de(e)-1)})),P("D",["DD",2],"Do","date"),le("D",X,se),le("DD",X,z),le("Do",(function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient})),pe(["D","DD"],_e),pe("Do",(function(e,t){t[_e]=de(e.match(X)[0])}));var Cn=Le("Date",!0);P("DDD",["DDDD",3],"DDDo","dayOfYear"),le("DDD",J),le("DDDD",G),pe(["DDD","DDDD"],(function(e,t,n){n._dayOfYear=de(e)})),P("m",["mm",2],0,"minute"),le("m",X,ae),le("mm",X,z),pe(["m","mm"],Se);var En=Le("Minutes",!1);P("s",["ss",2],0,"second"),le("s",X,ae),le("ss",X,z),pe(["s","ss"],Ce);var Mn,Tn,Rn=Le("Seconds",!1);for(P("S",0,0,(function(){return~~(this.millisecond()/100)})),P(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),P(0,["SSS",3],0,"millisecond"),P(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),P(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),P(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),P(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),P(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),P(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),le("S",J,j),le("SS",J,z),le("SSS",J,G),Mn="SSSS";Mn.length<=9;Mn+="S")le(Mn,te);function An(e,t){t[Ee]=de(1e3*("0."+e))}for(Mn="S";Mn.length<=9;Mn+="S")pe(Mn,An);Tn=Le("Milliseconds",!1),P("z",0,0,"zoneAbbr"),P("zz",0,0,"zoneName");var Nn=b.prototype;function Ln(e){return e}Nn.add=nn,Nn.calendar=function(e,t){1===arguments.length&&(arguments[0]?sn(arguments[0])?(e=arguments[0],t=void 0):function(e){var t,n=s(e)&&!l(e),r=!1,o=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"];for(t=0;t<o.length;t+=1)r=r||a(e,o[t]);return n&&r}(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||Dt(),r=Gt(n,this).startOf("day"),i=o.calendarFormat(this,r)||"sameElse",u=t&&(A(t[i])?t[i].call(this,n):t[i]);return this.format(u||this.localeData().calendar(i,this,Dt(n)))},Nn.clone=function(){return new b(this)},Nn.diff=function(e,t,n){var r,o,i;if(!this.isValid())return NaN;if(!(r=Gt(e,this)).isValid())return NaN;switch(o=6e4*(r.utcOffset()-this.utcOffset()),t=V(t)){case"year":i=an(this,r)/12;break;case"month":i=an(this,r);break;case"quarter":i=an(this,r)/3;break;case"second":i=(this-r)/1e3;break;case"minute":i=(this-r)/6e4;break;case"hour":i=(this-r)/36e5;break;case"day":i=(this-r-o)/864e5;break;case"week":i=(this-r-o)/6048e5;break;default:i=this-r}return n?i:ce(i)},Nn.endOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yn:gn,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+=mn-fn(t+(this._isUTC?0:this.utcOffset()*dn),mn)-1;break;case"minute":t=this._d.valueOf(),t+=dn-fn(t,dn)-1;break;case"second":t=this._d.valueOf(),t+=cn-fn(t,cn)-1}return this._d.setTime(t),o.updateOffset(this,!0),this},Nn.format=function(e){e||(e=this.isUtc()?o.defaultFormatUtc:o.defaultFormat);var t=H(this,e);return this.localeData().postformat(t)},Nn.from=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Qt({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Nn.fromNow=function(e){return this.from(Dt(),e)},Nn.to=function(e,t){return this.isValid()&&(S(e)&&e.isValid()||Dt(e).isValid())?Qt({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Nn.toNow=function(e){return this.to(Dt(),e)},Nn.get=function(e){return A(this[e=V(e)])?this[e]():this},Nn.invalidAt=function(){return f(this).overflow},Nn.isAfter=function(e,t){var n=S(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Nn.isBefore=function(e,t){var n=S(e)?e:Dt(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Nn.isBetween=function(e,t,n,r){var o=S(e)?e:Dt(e),i=S(t)?t:Dt(t);return!!(this.isValid()&&o.isValid()&&i.isValid())&&("("===(r=r||"()")[0]?this.isAfter(o,n):!this.isBefore(o,n))&&(")"===r[1]?this.isBefore(i,n):!this.isAfter(i,n))},Nn.isSame=function(e,t){var n,r=S(e)?e:Dt(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=V(t)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Nn.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Nn.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Nn.isValid=function(){return g(this)},Nn.lang=un,Nn.locale=ln,Nn.localeData=hn,Nn.max=Ht,Nn.min=Pt,Nn.parsingFlags=function(){return m({},f(this))},Nn.set=function(e,t){if("object"==typeof e){var n,r=function(e){var t,n=[];for(t in e)a(e,t)&&n.push({unit:t,priority:B[t]});return n.sort((function(e,t){return e.priority-t.priority})),n}(e=U(e)),o=r.length;for(n=0;n<o;n++)this[r[n].unit](e[r[n].unit])}else if(A(this[e=V(e)]))return this[e](t);return this},Nn.startOf=function(e){var t,n;if(void 0===(e=V(e))||"millisecond"===e||!this.isValid())return this;switch(n=this._isUTC?yn:gn,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-=fn(t+(this._isUTC?0:this.utcOffset()*dn),mn);break;case"minute":t=this._d.valueOf(),t-=fn(t,dn);break;case"second":t=this._d.valueOf(),t-=fn(t,cn)}return this._d.setTime(t),o.updateOffset(this,!0),this},Nn.subtract=rn,Nn.toArray=function(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]},Nn.toObject=function(){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()}},Nn.toDate=function(){return new Date(this.valueOf())},Nn.toISOString=function(e){if(!this.isValid())return null;var t=!0!==e,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?H(n,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):A(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",H(n,"Z")):H(n,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},Nn.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e,t,n,r="moment",o="";return this.isLocal()||(r=0===this.utcOffset()?"moment.utc":"moment.parseZone",o="Z"),e="["+r+'("]',t=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",n=o+'[")]',this.format(e+t+"-MM-DD[T]HH:mm:ss.SSS"+n)},"undefined"!=typeof Symbol&&null!=Symbol.for&&(Nn[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),Nn.toJSON=function(){return this.isValid()?this.toISOString():null},Nn.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Nn.unix=function(){return Math.floor(this.valueOf()/1e3)},Nn.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Nn.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Nn.eraName=function(){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""},Nn.eraNarrow=function(){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""},Nn.eraAbbr=function(){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""},Nn.eraYear=function(){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()-o(i[e].since).year())*n+i[e].offset;return this.year()},Nn.year=Ne,Nn.isLeapYear=function(){return ye(this.year())},Nn.weekYear=function(e){return bn.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)},Nn.isoWeekYear=function(e){return bn.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Nn.quarter=Nn.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Nn.month=Ue,Nn.daysInMonth=function(){return Ie(this.year(),this.month())},Nn.week=Nn.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Nn.isoWeek=Nn.isoWeeks=function(e){var t=$e(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Nn.weeksInYear=function(){var e=this.localeData()._week;return Ke(this.year(),e.dow,e.doy)},Nn.weeksInWeekYear=function(){var e=this.localeData()._week;return Ke(this.weekYear(),e.dow,e.doy)},Nn.isoWeeksInYear=function(){return Ke(this.year(),1,4)},Nn.isoWeeksInISOWeekYear=function(){return Ke(this.isoWeekYear(),1,4)},Nn.date=Cn,Nn.day=Nn.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t=xe(this,"Day");return null!=e?(e=function(e,t){return"string"!=typeof e?e:isNaN(e)?"number"==typeof(e=t.weekdaysParse(e))?e:null:parseInt(e,10)}(e,this.localeData()),this.add(e-t,"d")):t},Nn.weekday=function(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")},Nn.isoWeekday=function(e){if(!this.isValid())return null!=e?this:NaN;if(null!=e){var t=function(e,t){return"string"==typeof e?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7},Nn.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Nn.hour=Nn.hours=at,Nn.minute=Nn.minutes=En,Nn.second=Nn.seconds=Rn,Nn.millisecond=Nn.milliseconds=Tn,Nn.utcOffset=function(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(null===(e=zt(oe,e)))return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(r=$t(this)),this._offset=e,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==e&&(!t||this._changeInProgress?tn(this,Qt(e-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,o.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?i:$t(this)},Nn.utc=function(e){return this.utcOffset(0,e)},Nn.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract($t(this),"m")),this},Nn.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var e=zt(re,this._i);null!=e?this.utcOffset(e):this.utcOffset(0,!0)}return this},Nn.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?Dt(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Nn.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Nn.isLocal=function(){return!!this.isValid()&&!this._isUTC},Nn.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Nn.isUtc=Kt,Nn.isUTC=Kt,Nn.zoneAbbr=function(){return this._isUTC?"UTC":""},Nn.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Nn.dates=E("dates accessor is deprecated. Use date instead.",Cn),Nn.months=E("months accessor is deprecated. Use month instead",Ue),Nn.years=E("years accessor is deprecated. Use year instead",Ne),Nn.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()})),Nn.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e,t={};return _(t,this),(t=It(t))._a?(e=t._isUTC?p(t._a):Dt(t._a),this._isDSTShifted=this.isValid()&&function(e,t,n){var r,o=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),s=0;for(r=0;r<o;r++)(n&&e[r]!==t[r]||!n&&de(e[r])!==de(t[r]))&&s++;return s+i}(t._a,e.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}));var xn=L.prototype;function On(e,t,n,r){var o=yt(),i=p().set(r,t);return o[n](i,e)}function In(e,t,n){if(h(e)&&(t=e,e=void 0),e=e||"",null!=t)return On(e,t,n,"month");var r,o=[];for(r=0;r<12;r++)o[r]=On(e,r,n,"month");return o}function kn(e,t,n,r){"boolean"==typeof e?(h(t)&&(n=t,t=void 0),t=t||""):(n=t=e,e=!1,h(t)&&(n=t,t=void 0),t=t||"");var o,i=yt(),s=e?i._week.dow:0,a=[];if(null!=n)return On(t,(n+s)%7,r,"day");for(o=0;o<7;o++)a[o]=On(t,(o+s)%7,r,"day");return a}xn.calendar=function(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return A(r)?r.call(t,n):r},xn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(O).map((function(e){return"MMMM"===e||"MM"===e||"DD"===e||"dddd"===e?e.slice(1):e})).join(""),this._longDateFormat[e])},xn.invalidDate=function(){return this._invalidDate},xn.ordinal=function(e){return this._ordinal.replace("%d",e)},xn.preparse=Ln,xn.postformat=Ln,xn.relativeTime=function(e,t,n,r){var o=this._relativeTime[n];return A(o)?o(e,t,n,r):o.replace(/%d/i,e)},xn.pastFuture=function(e,t){var n=this._relativeTime[e>0?"future":"past"];return A(n)?n(t):n.replace(/%s/i,t)},xn.set=function(e){var t,n;for(n in e)a(e,n)&&(A(t=e[n])?this[n]=t:this["_"+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},xn.eras=function(e,t){var n,r,i,s=this._eras||yt("en")._eras;for(n=0,r=s.length;n<r;++n)switch("string"==typeof s[n].since&&(i=o(s[n].since).startOf("day"),s[n].since=i.valueOf()),typeof s[n].until){case"undefined":s[n].until=1/0;break;case"string":i=o(s[n].until).startOf("day").valueOf(),s[n].until=i.valueOf()}return s},xn.erasParse=function(e,t,n){var r,o,i,s,a,l=this.eras();for(e=e.toUpperCase(),r=0,o=l.length;r<o;++r)if(i=l[r].name.toUpperCase(),s=l[r].abbr.toUpperCase(),a=l[r].narrow.toUpperCase(),n)switch(t){case"N":case"NN":case"NNN":if(s===e)return l[r];break;case"NNNN":if(i===e)return l[r];break;case"NNNNN":if(a===e)return l[r]}else if([i,s,a].indexOf(e)>=0)return l[r]},xn.erasConvertYear=function(e,t){var n=e.since<=e.until?1:-1;return void 0===t?o(e.since).year():o(e.since).year()+(t-e.offset)*n},xn.erasAbbrRegex=function(e){return a(this,"_erasAbbrRegex")||vn.call(this),e?this._erasAbbrRegex:this._erasRegex},xn.erasNameRegex=function(e){return a(this,"_erasNameRegex")||vn.call(this),e?this._erasNameRegex:this._erasRegex},xn.erasNarrowRegex=function(e){return a(this,"_erasNarrowRegex")||vn.call(this),e?this._erasNarrowRegex:this._erasRegex},xn.months=function(e,t){return e?i(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pe).test(t)?"format":"standalone"][e.month()]:i(this._months)?this._months:this._months.standalone},xn.monthsShort=function(e,t){return e?i(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pe.test(t)?"format":"standalone"][e.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},xn.monthsParse=function(e,t,n){var r,o,i;if(this._monthsParseExact)return Ye.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(o=p([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(o,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(o,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(i="^"+this.months(o,"")+"|^"+this.monthsShort(o,""),this._monthsParse[r]=new RegExp(i.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}},xn.monthsRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Be.call(this),e?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=Fe),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)},xn.monthsShortRegex=function(e){return this._monthsParseExact?(a(this,"_monthsRegex")||Be.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=He),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)},xn.week=function(e){return $e(e,this._week.dow,this._week.doy).week},xn.firstDayOfYear=function(){return this._week.doy},xn.firstDayOfWeek=function(){return this._week.dow},xn.weekdays=function(e,t){var n=i(this._weekdays)?this._weekdays:this._weekdays[e&&!0!==e&&this._weekdays.isFormat.test(t)?"format":"standalone"];return!0===e?Xe(n,this._week.dow):e?n[e.day()]:n},xn.weekdaysMin=function(e){return!0===e?Xe(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin},xn.weekdaysShort=function(e){return!0===e?Xe(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort},xn.weekdaysParse=function(e,t,n){var r,o,i;if(this._weekdaysParseExact)return nt.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(o=p([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(o,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(o,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(o,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(i="^"+this.weekdays(o,"")+"|^"+this.weekdaysShort(o,"")+"|^"+this.weekdaysMin(o,""),this._weekdaysParse[r]=new RegExp(i.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}},xn.weekdaysRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=Ze),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)},xn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=et),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},xn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||rt.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=tt),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},xn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},xn.meridiem=function(e,t,n){return e>11?n?"pm":"PM":n?"am":"AM"},ft("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;return e+(1===de(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),o.lang=E("moment.lang is deprecated. Use moment.locale instead.",ft),o.langData=E("moment.langData is deprecated. Use moment.localeData instead.",yt);var Dn=Math.abs;function Pn(e,t,n,r){var o=Qt(t,n);return e._milliseconds+=r*o._milliseconds,e._days+=r*o._days,e._months+=r*o._months,e._bubble()}function Hn(e){return e<0?Math.floor(e):Math.ceil(e)}function Fn(e){return 4800*e/146097}function Yn(e){return 146097*e/4800}function Vn(e){return function(){return this.as(e)}}var Un=Vn("ms"),Bn=Vn("s"),Wn=Vn("m"),jn=Vn("h"),zn=Vn("d"),Gn=Vn("w"),$n=Vn("M"),Kn=Vn("Q"),Xn=Vn("y"),qn=Un;function Qn(e){return function(){return this.isValid()?this._data[e]:NaN}}var Jn=Qn("milliseconds"),Zn=Qn("seconds"),er=Qn("minutes"),tr=Qn("hours"),nr=Qn("days"),rr=Qn("months"),or=Qn("years");var ir=Math.round,sr={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function ar(e,t,n,r,o){return o.relativeTime(t||1,!!n,e,r)}var lr=Math.abs;function ur(e){return(e>0)-(e<0)||+e}function hr(){if(!this.isValid())return this.localeData().invalidDate();var e,t,n,r,o,i,s,a,l=lr(this._milliseconds)/1e3,u=lr(this._days),h=lr(this._months),c=this.asSeconds();return c?(e=ce(l/60),t=ce(e/60),l%=60,e%=60,n=ce(h/12),h%=12,r=l?l.toFixed(3).replace(/\.?0+$/,""):"",o=c<0?"-":"",i=ur(this._months)!==ur(c)?"-":"",s=ur(this._days)!==ur(c)?"-":"",a=ur(this._milliseconds)!==ur(c)?"-":"",o+"P"+(n?i+n+"Y":"")+(h?i+h+"M":"")+(u?s+u+"D":"")+(t||e||l?"T":"")+(t?a+t+"H":"")+(e?a+e+"M":"")+(l?a+r+"S":"")):"P0D"}var cr=Vt.prototype;return cr.isValid=function(){return this._isValid},cr.abs=function(){var e=this._data;return this._milliseconds=Dn(this._milliseconds),this._days=Dn(this._days),this._months=Dn(this._months),e.milliseconds=Dn(e.milliseconds),e.seconds=Dn(e.seconds),e.minutes=Dn(e.minutes),e.hours=Dn(e.hours),e.months=Dn(e.months),e.years=Dn(e.years),this},cr.add=function(e,t){return Pn(this,e,t,1)},cr.subtract=function(e,t){return Pn(this,e,t,-1)},cr.as=function(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if("month"===(e=V(e))||"quarter"===e||"year"===e)switch(t=this._days+r/864e5,n=this._months+Fn(t),e){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(t=this._days+Math.round(Yn(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)}},cr.asMilliseconds=Un,cr.asSeconds=Bn,cr.asMinutes=Wn,cr.asHours=jn,cr.asDays=zn,cr.asWeeks=Gn,cr.asMonths=$n,cr.asQuarters=Kn,cr.asYears=Xn,cr.valueOf=qn,cr._bubble=function(){var e,t,n,r,o,i=this._milliseconds,s=this._days,a=this._months,l=this._data;return i>=0&&s>=0&&a>=0||i<=0&&s<=0&&a<=0||(i+=864e5*Hn(Yn(a)+s),s=0,a=0),l.milliseconds=i%1e3,e=ce(i/1e3),l.seconds=e%60,t=ce(e/60),l.minutes=t%60,n=ce(t/60),l.hours=n%24,s+=ce(n/24),a+=o=ce(Fn(s)),s-=Hn(Yn(o)),r=ce(a/12),a%=12,l.days=s,l.months=a,l.years=r,this},cr.clone=function(){return Qt(this)},cr.get=function(e){return e=V(e),this.isValid()?this[e+"s"]():NaN},cr.milliseconds=Jn,cr.seconds=Zn,cr.minutes=er,cr.hours=tr,cr.days=nr,cr.weeks=function(){return ce(this.days()/7)},cr.months=rr,cr.years=or,cr.humanize=function(e,t){if(!this.isValid())return this.localeData().invalidDate();var n,r,o=!1,i=sr;return"object"==typeof e&&(t=e,e=!1),"boolean"==typeof e&&(o=e),"object"==typeof t&&(i=Object.assign({},sr,t),null!=t.s&&null==t.ss&&(i.ss=t.s-1)),r=function(e,t,n,r){var o=Qt(e).abs(),i=ir(o.as("s")),s=ir(o.as("m")),a=ir(o.as("h")),l=ir(o.as("d")),u=ir(o.as("M")),h=ir(o.as("w")),c=ir(o.as("y")),d=i<=n.ss&&["s",i]||i<n.s&&["ss",i]||s<=1&&["m"]||s<n.m&&["mm",s]||a<=1&&["h"]||a<n.h&&["hh",a]||l<=1&&["d"]||l<n.d&&["dd",l];return null!=n.w&&(d=d||h<=1&&["w"]||h<n.w&&["ww",h]),(d=d||u<=1&&["M"]||u<n.M&&["MM",u]||c<=1&&["y"]||["yy",c])[2]=t,d[3]=+e>0,d[4]=r,ar.apply(null,d)}(this,!o,i,n=this.localeData()),o&&(r=n.pastFuture(+this,r)),n.postformat(r)},cr.toISOString=hr,cr.toString=hr,cr.toJSON=hr,cr.locale=ln,cr.localeData=hn,cr.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",hr),cr.lang=un,P("X",0,0,"unix"),P("x",0,0,"valueOf"),le("x",ne),le("X",/[+-]?\d+(\.\d{1,3})?/),pe("X",(function(e,t,n){n._d=new Date(1e3*parseFloat(e))})),pe("x",(function(e,t,n){n._d=new Date(de(e))})),o.version="2.30.1",t=Dt,o.fn=Nn,o.min=function(){return Ft("isBefore",[].slice.call(arguments,0))},o.max=function(){return Ft("isAfter",[].slice.call(arguments,0))},o.now=function(){return Date.now?Date.now():+new Date},o.utc=p,o.unix=function(e){return Dt(1e3*e)},o.months=function(e,t){return In(e,t,"months")},o.isDate=c,o.locale=ft,o.invalid=y,o.duration=Qt,o.isMoment=S,o.weekdays=function(e,t,n){return kn(e,t,n,"weekdays")},o.parseZone=function(){return Dt.apply(null,arguments).parseZone()},o.localeData=yt,o.isDuration=Ut,o.monthsShort=function(e,t){return In(e,t,"monthsShort")},o.weekdaysMin=function(e,t,n){return kn(e,t,n,"weekdaysMin")},o.defineLocale=gt,o.updateLocale=function(e,t){if(null!=t){var n,r,o=ut;null!=ht[e]&&null!=ht[e].parentLocale?ht[e].set(N(ht[e]._config,t)):(null!=(r=pt(e))&&(o=r._config),t=N(o,t),null==r&&(t.abbr=e),(n=new L(t)).parentLocale=ht[e],ht[e]=n),ft(e)}else null!=ht[e]&&(null!=ht[e].parentLocale?(ht[e]=ht[e].parentLocale,e===ft()&&ft(e)):null!=ht[e]&&delete ht[e]);return ht[e]},o.locales=function(){return M(ht)},o.weekdaysShort=function(e,t,n){return kn(e,t,n,"weekdaysShort")},o.normalizeUnits=V,o.relativeTimeRounding=function(e){return void 0===e?ir:"function"==typeof e&&(ir=e,!0)},o.relativeTimeThreshold=function(e,t){return void 0!==sr[e]&&(void 0===t?sr[e]:(sr[e]=t,"s"===e&&(sr.ss=t-1),!0))},o.calendarFormat=function(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"},o.prototype=Nn,o.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"},o}()},95239:(e,t,n)=>{"use strict";n.d(t,{t:()=>f}),n(16280);var r=n(32564),o=n(28061),i=n(58002),s=n(20091),a=n(71409),l=n(83023),u=n(65615);function h(e,t){const n=(0,s.JC)(t),r=t.value.split("\n");let o=n,i=0;for(let t=0;t<r.length;t++){const s=r[t];0!==t&&(i+=r[t-1].length+1);const a=i+s.length;if("home"===e?o=i:"end"===e&&(o=a),n<=a)break}(0,s.vZ)(t,o)}var c=n(66422);function d(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const m="ht_editor_hidden",p="textEditor";class f extends r.b7{static get EDITOR_TYPE(){return"text"}constructor(e){super(e),d(this,"eventManager",new o.A(this)),d(this,"autoResize",(0,l.j)(this.hot.rootDocument)),d(this,"TEXTAREA",void 0),d(this,"textareaStyle",void 0),d(this,"TEXTAREA_PARENT",void 0),d(this,"textareaParentStyle",void 0),d(this,"layerClass",void 0),this.eventManager=new o.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(),(0,s.yq)(this.hot.rootDocument.activeElement,this.hot.rootElement)&&this.hot.listen(),this.hideEditableElement(),this.unregisterShortcuts()}prepare(e,t,n,o,i,s){const a=this.state;if(super.prepare(e,t,n,o,i,s),!s.readOnly){this.refreshDimensions(!0);const{allowInvalid:e}=s;e&&!this.isOpened()&&(this.TEXTAREA.value=""),a===r._T.FINISHED||this.isOpened()||this.hideEditableElement()}}beginEditing(e,t){this.state===r._T.VIRGIN&&(this.TEXTAREA.value="",super.beginEditing(e,t))}focus(){this.TEXTAREA.select(),(0,s.vZ)(this.TEXTAREA,this.TEXTAREA.value.length)}createElements(){const{rootDocument:e}=this.hot;this.TEXTAREA=e.createElement("TEXTAREA"),(0,s.Bq)(this.TEXTAREA,[["data-hot-input",""],(0,c.vC)(-1)]),(0,s.iQ)(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"),(0,s.iQ)(this.TEXTAREA_PARENT,"handsontableInputHolder"),(0,s.nB)(this.TEXTAREA_PARENT,this.layerClass)&&(0,s.vy)(this.TEXTAREA_PARENT,this.layerClass),(0,s.iQ)(this.TEXTAREA_PARENT,m),this.textareaParentStyle=this.TEXTAREA_PARENT.style,this.TEXTAREA_PARENT.appendChild(this.TEXTAREA),this.hot.rootElement.appendChild(this.TEXTAREA_PARENT)}hideEditableElement(){(0,i.UP)()&&(this.textareaStyle.textIndent="-99999px"),this.textareaStyle.overflowY="visible",this.textareaParentStyle.opacity="0",this.textareaParentStyle.height="1px",(0,s.vy)(this.TEXTAREA_PARENT,this.layerClass),(0,s.iQ)(this.TEXTAREA_PARENT,m)}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;(0,a.Ti)(e.length-1,(n=>{const r=e[n];if((0,s.nB)(r,"handsontableEditor"))return t=!0,!1})),(0,s.nB)(this.TEXTAREA_PARENT,m)&&(0,s.vy)(this.TEXTAREA_PARENT,m),t?(this.layerClass="ht_editor_visible",(0,s.iQ)(this.TEXTAREA_PARENT,this.layerClass)):(this.layerClass=this.getEditedCellsLayerClass(),(0,s.iQ)(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._T.EDITING&&!e)return;if(this.TD=this.getEditedCell(),!this.TD)return void(e||this.close());const{top:t,start:n,width:o,maxWidth:i,height:s,maxHeight:a}=this.getEditedCellRect();this.textareaParentStyle.top=`${t}px`,this.textareaParentStyle[this.hot.isRtl()?"right":"left"]=`${n}px`,this.showEditableElement();const l=this.hot.rootWindow.getComputedStyle(this.TD);this.TEXTAREA.style.fontSize=l.fontSize,this.TEXTAREA.style.fontFamily=l.fontFamily,this.TEXTAREA.style.backgroundColor=this.TD.style.backgroundColor,this.autoResize.init(this.TEXTAREA,{minWidth:Math.min(o,i),minHeight:Math.min(s,a),maxWidth:i,maxHeight:a},!0)}bindEvents(){(0,i.un)()&&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._T.EDITING&&this.focus()})),this.addHook("afterRowResize",(()=>{this.refreshDimensions(),this.state===r._T.EDITING&&this.focus()}))}allowKeyEventPropagation(){}destroy(){this.eventManager.destroy(),this.clearHooks()}registerShortcuts(){const e=this.hot.getShortcutManager().getContext("editor"),t={runOnlyIf:()=>(0,u.O9)(this.hot.getSelected()),group:p},n=()=>{this.hot.rootDocument.execCommand("insertText",!1,"\n")};e.addShortcuts([{keys:[["Control","Enter"]],callback:()=>(n(),!1),runOnlyIf:e=>!this.hot.selection.isMultiple()&&!e.altKey},{keys:[["Meta","Enter"]],callback:()=>(n(),!1),runOnlyIf:()=>!this.hot.selection.isMultiple()},{keys:[["Alt","Enter"]],callback:()=>(n(),!1)},{keys:[["Home"]],callback:(e,t)=>{let[n]=t;h(n,this.TEXTAREA)}},{keys:[["End"]],callback:(e,t)=>{let[n]=t;h(n,this.TEXTAREA)}}],t)}unregisterShortcuts(){this.hot.getShortcutManager().getContext("editor").removeShortcutsByGroup(p)}}},95533:function(e,t,n){!function(e){"use strict";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ı"};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;return e+(t[n]||t[e%100-n]||t[e>=100?100:null])},week:{dow:1,doy:7}})}(n(95093))},95548:(e,t,n)=>{"use strict";n.d(t,{A:()=>h});var r=n(97102),o=n(49900),i=n(39612),s=n(7196),a=n(63132),l=n(98762);const u=function(){function e(e,t,n,o){const a={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:u=e,themeKey:h,transform:c,style:d}=l;if(null==t)return null;if("typography"===h&&"inherit"===t)return{[e]:t};const m=(0,i.Yn)(n,h)||{};return d?d(a):(0,s.NI)(a,t,(t=>{let n=(0,i.BO)(m,c,t);return t===n&&"string"==typeof t&&(n=(0,i.BO)(m,c,`${e}${"default"===t?"":(0,r.A)(t)}`,t)),!1===u?n:{[u]:n}}))}return function t(n){const{sx:r,theme:i={}}=n||{};if(!r)return null;const u=i.unstable_sxConfig??l.A;function h(n){let r=n;if("function"==typeof n)r=n(i);else if("object"!=typeof n)return n;if(!r)return null;const l=(0,s.EU)(i.breakpoints),h=Object.keys(l);let c=l;return Object.keys(r).forEach((n=>{const a="function"==typeof(l=r[n])?l(i):l;var l;if(null!=a)if("object"==typeof a)if(u[n])c=(0,o.A)(c,e(n,a,i,u));else{const e=(0,s.NI)({theme:i},a,(e=>({[n]:e})));!function(...e){const t=e.reduce(((e,t)=>e.concat(Object.keys(t))),[]),n=new Set(t);return e.every((e=>n.size===Object.keys(e).length))}(e,a)?c=(0,o.A)(c,e):c[n]=t({sx:a,theme:i})}else c=(0,o.A)(c,e(n,a,i,u))})),(0,a._S)(i,(0,s.vf)(h,c))}return Array.isArray(r)?r.map(h):h(r)}}();u.filterProps=["sx"];const h=u},95995:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},96148:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(1908);function o(e,t,n="Mui"){const o={};return t.forEach((t=>{o[t]=(0,r.Ay)(e,t,n)})),o}},96319:(e,t,n)=>{"use strict";var r=n(28551),o=n(9539);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){o(e,"throw",t)}}},96395:e=>{"use strict";e.exports=!1},96801:(e,t,n)=>{"use strict";var r=n(43724),o=n(48686),i=n(24913),s=n(28551),a=n(25397),l=n(71072);t.f=r&&!o?Object.defineProperties:function(e,t){s(e);for(var n,r=a(t),o=l(t),u=o.length,h=0;u>h;)i.f(e,n=o[h++],r[n]);return e}},96837:e=>{"use strict";var t=TypeError;e.exports=function(e){if(e>9007199254740991)throw t("Maximum allowed index exceeded");return e}},96870:function(e,t,n){!function(e){"use strict";var t={1:"១",2:"២",3:"៣",4:"៤",5:"៥",6:"៦",7:"៧",8:"៨",9:"៩",0:"០"},n={"១":"1","២":"2","៣":"3","៤":"4","៥":"5","៦":"6","៧":"7","៨":"8","៩":"9","០":"0"};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}})}(n(95093))},97040:(e,t,n)=>{"use strict";var r=n(43724),o=n(24913),i=n(6980);e.exports=function(e,t,n){r?o.f(e,t,i(0,n)):e[t]=n}},97080:(e,t,n)=>{"use strict";var r=n(94402).has;e.exports=function(e){return r(e),e}},97102:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(4076);function o(e){if("string"!=typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},97164:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);function o(e){const{controlled:t,default:n,name:o,state:i="value"}=e,{current:s}=r.useRef(void 0!==t),[a,l]=r.useState(n);return[s?t:a,r.useCallback((e=>{s||l(e)}),[])]}},97650:function(e,t,n){!function(e){"use strict";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],o=/^(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;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:o,monthsShortRegex:o,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"})}(n(95093))},97711:function(e,t,n){!function(e){"use strict";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}})}(n(95093))},97751:(e,t,n)=>{"use strict";var r=n(44576),o=n(94901);e.exports=function(e,t){return arguments.length<2?(n=r[e],o(n)?n:void 0):r[e]&&r[e][t];var n}},97825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},98174:function(e,t,n){!function(e){"use strict";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("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}})}(n(95093))},98300:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(96540),o=n(34164),i=n(21362),s=n(26739),a=n(20439),l=n(99692),u=n(39407);const h=n(14292).A;var c=n(1713),d=n(96148),m=n(1908);function p(e){return(0,m.Ay)("MuiFormControl",e)}(0,d.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);var f=n(74848);const g=(0,s.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`margin${(0,u.A)(n.margin)}`],n.fullWidth&&t.fullWidth]}})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),y=r.forwardRef((function(e,t){const n=(0,a.b)({props:e,name:"MuiFormControl"}),{children:s,className:d,color:m="primary",component:y="div",disabled:w=!1,error:v=!1,focused:_,fullWidth:b=!1,hiddenLabel:S=!1,margin:C="none",required:E=!1,size:M="medium",variant:T="outlined",...R}=n,A={...n,color:m,component:y,disabled:w,error:v,fullWidth:b,hiddenLabel:S,margin:C,required:E,size:M,variant:T},N=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&`margin${(0,u.A)(n)}`,r&&"fullWidth"]};return(0,i.A)(o,p,t)})(A),[L,x]=r.useState((()=>{let e=!1;return s&&r.Children.forEach(s,(t=>{if(!h(t,["Input","Select"]))return;const n=h(t,["Select"])?t.props.input:t;n&&(0,l.gr)(n.props)&&(e=!0)})),e})),[O,I]=r.useState((()=>{let e=!1;return s&&r.Children.forEach(s,(t=>{h(t,["Input","Select"])&&((0,l.lq)(t.props,!0)||(0,l.lq)(t.props.inputProps,!0))&&(e=!0)})),e})),[k,D]=r.useState(!1);w&&k&&D(!1);const P=void 0===_||w?k:_;let H;r.useRef(!1);const F=r.useCallback((()=>{I(!0)}),[]),Y=r.useCallback((()=>{I(!1)}),[]),V=r.useMemo((()=>({adornedStart:L,setAdornedStart:x,color:m,disabled:w,error:v,filled:O,focused:P,fullWidth:b,hiddenLabel:S,size:M,onBlur:()=>{D(!1)},onFocus:()=>{D(!0)},onEmpty:Y,onFilled:F,registerEffect:H,required:E,variant:T})),[L,m,w,v,O,P,b,S,H,Y,F,E,M,T]);return(0,f.jsx)(c.A.Provider,{value:V,children:(0,f.jsx)(g,{as:y,ownerState:A,className:(0,o.A)(N.root,d),ref:t,...R,children:s})})}))},98587:(e,t,n)=>{"use strict";function r(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}n.d(t,{A:()=>r})},98663:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(34164);function o(e,t){if(!e)return t;function n(e,t){const n={};return Object.keys(t).forEach((r=>{(function(e,t){const n=e.charCodeAt(2);return"o"===e[0]&&"n"===e[1]&&n>=65&&n<=90&&"function"==typeof t})(r,t[r])&&"function"==typeof e[r]&&(n[r]=(...n)=>{e[r](...n),t[r](...n)})})),n}if("function"==typeof e||"function"==typeof t)return o=>{const i="function"==typeof t?t(o):t,s="function"==typeof e?e({...o,...i}):e,a=(0,r.A)(o?.className,i?.className,s?.className),l=n(s,i);return{...i,...s,...l,...!!a&&{className:a},...i?.style&&s?.style&&{style:{...i.style,...s.style}},...i?.sx&&s?.sx&&{sx:[...Array.isArray(i.sx)?i.sx:[i.sx],...Array.isArray(s.sx)?s.sx:[s.sx]]}}};const o=t,i=n(e,o),s=(0,r.A)(o?.className,e?.className);return{...t,...e,...i,...!!s&&{className:s},...o?.style&&e?.style&&{style:{...o.style,...e.style}},...o?.sx&&e?.sx&&{sx:[...Array.isArray(o.sx)?o.sx:[o.sx],...Array.isArray(e.sx)?e.sx:[e.sx]]}}}},98762:(e,t,n)=>{"use strict";n.d(t,{A:()=>k});var r=n(93781),o=n(39612),i=n(49900);const s=function(...e){const t=e.reduce(((e,t)=>(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),n=e=>Object.keys(e).reduce(((n,r)=>t[r]?(0,i.A)(n,t[r](e)):n),{});return n.propTypes={},n.filterProps=e.reduce(((e,t)=>e.concat(t.filterProps)),[]),n};var a=n(7196);function l(e){return"number"!=typeof e?e:`${e}px solid`}function u(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const h=u("border",l),c=u("borderTop",l),d=u("borderRight",l),m=u("borderBottom",l),p=u("borderLeft",l),f=u("borderColor"),g=u("borderTopColor"),y=u("borderRightColor"),w=u("borderBottomColor"),v=u("borderLeftColor"),_=u("outline",l),b=u("outlineColor"),S=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,a.NI)(e,e.borderRadius,n)}return null};S.propTypes={},S.filterProps=["borderRadius"],s(h,c,d,m,p,f,g,y,w,v,S,_,b);const C=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,a.NI)(e,e.gap,n)}return null};C.propTypes={},C.filterProps=["gap"];const E=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.columnGap,n)}return null};E.propTypes={},E.filterProps=["columnGap"];const M=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.rowGap,n)}return null};function T(e,t){return"grey"===t?t:e}function R(e){return e<=1&&0!==e?100*e+"%":e}M.propTypes={},M.filterProps=["rowGap"],s(C,E,M,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"})),s((0,o.Ay)({prop:"color",themeKey:"palette",transform:T}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:T}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:T}));const A=(0,o.Ay)({prop:"width",transform:R}),N=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{const n=e.theme?.breakpoints?.values?.[t]||a.zu[t];return n?"px"!==e.theme?.breakpoints?.unit?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:R(t)}};return(0,a.NI)(e,e.maxWidth,t)}return null};N.filterProps=["maxWidth"];const L=(0,o.Ay)({prop:"minWidth",transform:R}),x=(0,o.Ay)({prop:"height",transform:R}),O=(0,o.Ay)({prop:"maxHeight",transform:R}),I=(0,o.Ay)({prop:"minHeight",transform:R}),k=((0,o.Ay)({prop:"size",cssProperty:"width",transform:R}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:R}),s(A,N,L,x,O,I,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:S},color:{themeKey:"palette",transform:T},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:T},backgroundColor:{themeKey:"palette",transform:T},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:C},rowGap:{style:M},columnGap:{style:E},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:R},maxWidth:{style:N},minWidth:{transform:R},height:{transform:R},maxHeight:{transform:R},minHeight:{transform:R},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},98855:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(23);const o=e=>(0,r.A)(e)&&"classes"!==e},98992:(e,t,n)=>{"use strict";n(18111)},99053:function(e,t,n){!function(e){"use strict";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}}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}}})}(n(95093))},99692:(e,t,n)=>{"use strict";function r(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function o(e,t=!1){return e&&(r(e.value)&&""!==e.value||t&&r(e.defaultValue)&&""!==e.defaultValue)}function i(e){return e.startAdornment}n.d(t,{gr:()=>i,lq:()=>o})},99798:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(96540),o=n(37353),i=n(17726),s=n(53356),a=n(24337),l=n(30301),u=n(74848);const h={entering:{opacity:1},entered:{opacity:1}},c=r.forwardRef((function(e,t){const n=(0,s.A)(),c={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:d,appear:m=!0,children:p,easing:f,in:g,onEnter:y,onEntered:w,onEntering:v,onExit:_,onExited:b,onExiting:S,style:C,timeout:E=c,TransitionComponent:M=o.Ay,...T}=e,R=r.useRef(null),A=(0,l.A)(R,(0,i.A)(p),t),N=e=>t=>{if(e){const n=R.current;void 0===t?e(n):e(n,t)}},L=N(v),x=N(((e,t)=>{(0,a.q)(e);const r=(0,a.c)({style:C,timeout:E,easing:f},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),y&&y(e,t)})),O=N(w),I=N(S),k=N((e=>{const t=(0,a.c)({style:C,timeout:E,easing:f},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),_&&_(e)})),D=N(b);return(0,u.jsx)(M,{appear:m,in:g,nodeRef:R,onEnter:x,onEntered:O,onEntering:L,onExit:k,onExited:D,onExiting:I,addEndListener:e=>{d&&d(R.current,e)},timeout:E,...T,children:(e,{ownerState:t,...n})=>r.cloneElement(p,{style:{opacity:0,visibility:"exited"!==e||g?void 0:"hidden",...h[e],...C,...p.props.style},ref:A,...n})})}))}}]);